Compare commits
No commits in common. "baa136386e2f47bea6d096ca9ef3f0e9e84fcd57" and "b25c8417d14435dbcf5f143d6e2425caa7d025f9" have entirely different histories.
baa136386e
...
b25c8417d1
@ -1,10 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## 1.0.9 (2026-06-27)
|
||||
|
||||
### Fixes
|
||||
- **Theme Engine**: Extended `Bootstrap.config` color patch coverage to `nav-pills`, `dropdown-menu` active state, and `navbar-nav .nav-link.active` so navigation components follow the configured primary color instead of Bootstrap default blue.
|
||||
|
||||
## 1.0.6 (2026-06-09)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
@ -5,7 +5,7 @@ Bootstrap 5.3 自包含集成引擎。
|
||||
## 0. 快速开始 (Quick Start)
|
||||
直接在 HTML 中引入(无需打包,完全非 ESM 注入):
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.9/dist/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.6/dist/bootstrap.min.js"></script>
|
||||
```
|
||||
|
||||
## 1. 运行时接口
|
||||
@ -44,5 +44,5 @@ Bootstrap.config({ success: '#22c55e' });
|
||||
```
|
||||
|
||||
## 3. 核心机制 (Internal)
|
||||
- **运行时样式补丁**: `Bootstrap.config` 动态更新 `id="bs-config-patch"` 的 `<style>` 标签。通过 `!important` 覆盖 Bootstrap 内部硬编码的组件颜色(如 `.btn`, `.form-switch`, `.form-range`, `.progress-bar`, `.list-group-item`, `.nav-pills`, `.dropdown-menu`, `.navbar-nav .nav-link.active` 等)。
|
||||
- **运行时样式补丁**: `Bootstrap.config` 动态更新 `id="bs-config-patch"` 的 `<style>` 标签。通过 `!important` 覆盖 Bootstrap 内部硬编码的组件颜色(如 `.btn`, `.form-switch`, `.form-range`, `.progress-bar`, `.list-group-item` 等)。
|
||||
- **零构建支持**: 无需 Sass 重新编译,在纯 ESM 环境下即可实现全量主题定制。
|
||||
|
||||
18
dist/bootstrap.js
vendored
18
dist/bootstrap.js
vendored
@ -7233,24 +7233,6 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA
|
||||
border-color: var(--bs-primary) !important;
|
||||
}
|
||||
|
||||
/* 导航与下拉菜单 (Nav & Dropdown) */
|
||||
.nav {
|
||||
--bs-nav-link-color: var(--bs-body-color) !important;
|
||||
--bs-nav-link-hover-color: var(--bs-primary) !important;
|
||||
}
|
||||
.nav-pills {
|
||||
--bs-nav-pills-link-active-bg: var(--bs-primary) !important;
|
||||
--bs-nav-pills-link-active-color: #fff !important;
|
||||
}
|
||||
.dropdown-menu {
|
||||
--bs-dropdown-link-active-bg: var(--bs-primary) !important;
|
||||
--bs-dropdown-link-active-color: #fff !important;
|
||||
}
|
||||
.navbar-nav .nav-link.active,
|
||||
.navbar-nav .nav-link.show {
|
||||
color: var(--bs-primary) !important;
|
||||
}
|
||||
|
||||
/* 列表组 (List Group) */
|
||||
.list-group-item.active {
|
||||
background-color: var(--bs-primary) !important;
|
||||
|
||||
2
dist/bootstrap.min.js
vendored
2
dist/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@apigo.cc/bootstrap",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.8",
|
||||
"type": "module",
|
||||
"main": "dist/bootstrap.js",
|
||||
"files": [
|
||||
|
||||
21
src/index.js
21
src/index.js
@ -1,7 +1,7 @@
|
||||
import * as bootstrap from 'bootstrap'
|
||||
import 'bootstrap/dist/css/bootstrap.min.css'
|
||||
import 'bootstrap-icons/font/bootstrap-icons.css'
|
||||
import { Hash, LocalStorage } from '@apigo.cc/state'
|
||||
import { Hash, LocalStorage, RefreshState } from '@apigo.cc/state'
|
||||
|
||||
const GlobalStates = { Hash, LocalStorage }
|
||||
|
||||
@ -70,24 +70,6 @@ export const Bootstrap = {
|
||||
border-color: var(--bs-primary) !important;
|
||||
}
|
||||
|
||||
/* 导航与下拉菜单 (Nav & Dropdown) */
|
||||
.nav {
|
||||
--bs-nav-link-color: var(--bs-body-color) !important;
|
||||
--bs-nav-link-hover-color: var(--bs-primary) !important;
|
||||
}
|
||||
.nav-pills {
|
||||
--bs-nav-pills-link-active-bg: var(--bs-primary) !important;
|
||||
--bs-nav-pills-link-active-color: #fff !important;
|
||||
}
|
||||
.dropdown-menu {
|
||||
--bs-dropdown-link-active-bg: var(--bs-primary) !important;
|
||||
--bs-dropdown-link-active-color: #fff !important;
|
||||
}
|
||||
.navbar-nav .nav-link.active,
|
||||
.navbar-nav .nav-link.show {
|
||||
color: var(--bs-primary) !important;
|
||||
}
|
||||
|
||||
/* 列表组 (List Group) */
|
||||
.list-group-item.active {
|
||||
background-color: var(--bs-primary) !important;
|
||||
@ -146,3 +128,4 @@ if (typeof globalThis !== 'undefined') {
|
||||
}
|
||||
|
||||
export default Bootstrap;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user