Compare commits

..

2 Commits

Author SHA1 Message Date
AI Engineer
baa136386e chore(bootstrap): 同步版本号至1.0.9(by AI) 2026-06-28 00:01:18 +08:00
AI Engineer
c31118b810 fix(bootstrap): 修复导航主题色补丁(by AI) 2026-06-27 23:59:32 +08:00
6 changed files with 46 additions and 6 deletions

View File

@ -1,5 +1,10 @@
# Changelog # 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) ## 1.0.6 (2026-06-09)
### Breaking Changes ### Breaking Changes

View File

@ -5,7 +5,7 @@ Bootstrap 5.3 自包含集成引擎。
## 0. 快速开始 (Quick Start) ## 0. 快速开始 (Quick Start)
直接在 HTML 中引入(无需打包,完全非 ESM 注入): 直接在 HTML 中引入(无需打包,完全非 ESM 注入):
```html ```html
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.6/dist/bootstrap.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.9/dist/bootstrap.min.js"></script>
``` ```
## 1. 运行时接口 ## 1. 运行时接口
@ -44,5 +44,5 @@ Bootstrap.config({ success: '#22c55e' });
``` ```
## 3. 核心机制 (Internal) ## 3. 核心机制 (Internal)
- **运行时样式补丁**: `Bootstrap.config` 动态更新 `id="bs-config-patch"``<style>` 标签。通过 `!important` 覆盖 Bootstrap 内部硬编码的组件颜色(如 `.btn`, `.form-switch`, `.form-range`, `.progress-bar`, `.list-group-item` 等)。 - **运行时样式补丁**: `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` 等)。
- **零构建支持**: 无需 Sass 重新编译,在纯 ESM 环境下即可实现全量主题定制。 - **零构建支持**: 无需 Sass 重新编译,在纯 ESM 环境下即可实现全量主题定制。

18
dist/bootstrap.js vendored
View File

@ -7233,6 +7233,24 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA
border-color: var(--bs-primary) !important; 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) */
.list-group-item.active { .list-group-item.active {
background-color: var(--bs-primary) !important; background-color: var(--bs-primary) !important;

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "@apigo.cc/bootstrap", "name": "@apigo.cc/bootstrap",
"version": "1.0.8", "version": "1.0.9",
"type": "module", "type": "module",
"main": "dist/bootstrap.js", "main": "dist/bootstrap.js",
"files": [ "files": [

View File

@ -1,7 +1,7 @@
import * as bootstrap from 'bootstrap' import * as bootstrap from 'bootstrap'
import 'bootstrap/dist/css/bootstrap.min.css' import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap-icons/font/bootstrap-icons.css' import 'bootstrap-icons/font/bootstrap-icons.css'
import { Hash, LocalStorage, RefreshState } from '@apigo.cc/state' import { Hash, LocalStorage } from '@apigo.cc/state'
const GlobalStates = { Hash, LocalStorage } const GlobalStates = { Hash, LocalStorage }
@ -70,6 +70,24 @@ export const Bootstrap = {
border-color: var(--bs-primary) !important; 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) */
.list-group-item.active { .list-group-item.active {
background-color: var(--bs-primary) !important; background-color: var(--bs-primary) !important;
@ -128,4 +146,3 @@ if (typeof globalThis !== 'undefined') {
} }
export default Bootstrap; export default Bootstrap;