@kupola/kupola 1.4.2 → 1.4.3
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/README.md +3 -3
- package/css/kupola.css +3 -2
- package/css/table.css +74 -0
- package/dist/css/kupola.css +12 -1
- package/dist/css/kupola.min.css +1 -1
- package/dist/kupola.cjs.js +1800 -3609
- package/dist/kupola.cjs.js.map +1 -1
- package/dist/kupola.css +100 -3
- package/dist/kupola.esm.js +1791 -3610
- package/dist/kupola.esm.js.map +1 -1
- package/dist/kupola.min.css +1 -1
- package/dist/kupola.min.js +1 -1
- package/dist/kupola.min.js.map +1 -1
- package/dist/kupola.umd.js +1800 -3609
- package/dist/kupola.umd.js.map +1 -1
- package/dist/types/kupola.d.ts +41 -25
- package/js/calendar.js +3 -10
- package/js/carousel.js +3 -10
- package/js/collapse.js +3 -10
- package/js/color-picker.js +5 -16
- package/js/component.js +4 -18
- package/js/countdown.js +3 -10
- package/js/data-bind.js +56 -36
- package/js/datepicker.js +16 -24
- package/js/depends.js +27 -16
- package/js/dialog.js +1 -5
- package/js/drawer.js +3 -11
- package/js/dropdown.js +11 -18
- package/js/dynamic-tags.js +3 -10
- package/js/fileupload.js +10 -12
- package/js/form.js +26 -20
- package/js/global-events.js +1 -14
- package/js/heatmap.js +3 -12
- package/js/i18n.js +1 -14
- package/js/icons.js +2 -2
- package/js/image-preview.js +1 -7
- package/js/initializer.js +0 -43
- package/js/kupola-core.js +1 -13
- package/js/kupola-lifecycle.js +1 -9
- package/js/message.js +1 -6
- package/js/modal.js +22 -20
- package/js/notification.js +1 -6
- package/js/numberinput.js +3 -10
- package/js/pagination.js +0 -5
- package/js/registry.js +0 -4
- package/js/select.js +5 -16
- package/js/slide-captcha.js +8 -21
- package/js/slider.js +3 -10
- package/js/statcard.js +3 -11
- package/js/table.js +240 -262
- package/js/tag.js +3 -10
- package/js/theme.js +1 -12
- package/js/timepicker.js +6 -19
- package/js/tooltip.js +3 -10
- package/js/utils.js +281 -1439
- package/js/validation.js +2 -7
- package/js/virtual-list.js +13 -38
- package/js/web-components.js +0 -9
- package/package.json +10 -5
- package/scripts/build-css.cjs +3 -2
- package/types/kupola.d.ts +41 -25
- package/version.json +10 -0
- /package/css/{colors_and_type.css → colors-and-type.css} +0 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
[](https://github.com/kupola-cn/kupola/blob/main/LICENSE)
|
|
8
8
|
[](https://www.npmjs.com/package/@kupola/kupola)
|
|
9
|
-
[](https://img.shields.io/badge/gzip-104%20KB-blue)](https://bundlephobia.com/package/@kupola/kupola)
|
|
10
10
|
[](https://github.com/kupola-cn/kupola/stargazers)
|
|
11
11
|
|
|
12
12
|
**HTMX** (data fetching) + **Alpine.js** (declarative interaction) + **Bootstrap** (component richness) — in one zero-dependency package.
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
- **Responsive** — PC, Pad, and Phone
|
|
33
33
|
- **Accessible** — WCAG AA compliant
|
|
34
34
|
- **Form Validation** — Built-in validation with custom rules
|
|
35
|
-
- **Zero Dependencies** — Pure HTML/CSS/JavaScript, ~
|
|
35
|
+
- **Zero Dependencies** — Pure HTML/CSS/JavaScript, ~104 KB gzipped
|
|
36
36
|
- **Backend Agnostic** — Works with Flask, Django, FastAPI, Gin, Spring Boot, ASP.NET, Express, Rails, Actix-web, and any backend that outputs HTML
|
|
37
37
|
- **TypeScript Ready** — Full type definitions included
|
|
38
38
|
|
|
@@ -181,7 +181,7 @@ Chrome, Firefox, Safari, Edge (latest)
|
|
|
181
181
|
- **响应式** — 适配 PC、平板、手机
|
|
182
182
|
- **无障碍** — 符合 WCAG AA 标准
|
|
183
183
|
- **表单验证** — 内置验证系统,支持自定义规则
|
|
184
|
-
- **零依赖** — 纯 HTML/CSS/JavaScript,gzip 后约
|
|
184
|
+
- **零依赖** — 纯 HTML/CSS/JavaScript,gzip 后约 104 KB
|
|
185
185
|
- **后端无关** — 支持 Flask、Django、FastAPI、Gin、Spring Boot、ASP.NET、Express、Rails、Actix-web 等任何输出 HTML 的后端
|
|
186
186
|
- **TypeScript 支持** — 完整类型定义
|
|
187
187
|
|
package/css/kupola.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import url('
|
|
1
|
+
@import url('colors-and-type.css');
|
|
2
2
|
@import url('theme-light.css');
|
|
3
3
|
@import url('theme-dark.css');
|
|
4
4
|
@import url('brand-themes.css');
|
|
@@ -9,4 +9,5 @@
|
|
|
9
9
|
@import url('utilities.css');
|
|
10
10
|
@import url('responsive.css');
|
|
11
11
|
@import url('accessibility.css');
|
|
12
|
-
@import url('animations.css');
|
|
12
|
+
@import url('animations.css');
|
|
13
|
+
@import url('table.css');
|
package/css/table.css
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* ================================================================
|
|
2
|
+
KupolaTable Styles
|
|
3
|
+
================================================================ */
|
|
4
|
+
|
|
5
|
+
.kupola-table-wrapper { width: 100%; }
|
|
6
|
+
.kupola-table-container { overflow-x: auto; }
|
|
7
|
+
.kupola-table { width: 100%; border-collapse: collapse; font-size: 14px; }
|
|
8
|
+
.kupola-table th, .kupola-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #e8e8e8; }
|
|
9
|
+
.kupola-table th { background: #fafafa; font-weight: 600; color: #333; white-space: nowrap; }
|
|
10
|
+
.kupola-table-striped tbody tr:nth-child(even) { background: #fafafa; }
|
|
11
|
+
.kupola-table-hover tbody tr:hover { background: #f0f7ff; }
|
|
12
|
+
.kupola-table-bordered { border: 1px solid #e8e8e8; }
|
|
13
|
+
.kupola-table-bordered th, .kupola-table-bordered td { border: 1px solid #e8e8e8; }
|
|
14
|
+
.kupola-table-compact th, .kupola-table-compact td { padding: 8px 12px; }
|
|
15
|
+
.kupola-table-sortable { cursor: pointer; user-select: none; position: relative; }
|
|
16
|
+
.kupola-table-sortable:hover { background: #f0f0f0; }
|
|
17
|
+
.kupola-table-sort-icon { font-size: 12px; opacity: 0.5; margin-left: 4px; }
|
|
18
|
+
.kupola-table-sort-asc .kupola-table-sort-icon,
|
|
19
|
+
.kupola-table-sort-desc .kupola-table-sort-icon { opacity: 1; color: #1890ff; }
|
|
20
|
+
.kupola-table-empty, .kupola-table-loading { text-align: center; padding: 40px 16px !important; color: #999; }
|
|
21
|
+
.kupola-table-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
|
|
22
|
+
.kupola-table-toolbar-right { display: flex; align-items: center; gap: 8px; }
|
|
23
|
+
.kupola-table-filter-input { padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; width: 240px; }
|
|
24
|
+
.kupola-table-filter-input:focus { outline: none; border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,0.1); }
|
|
25
|
+
.kupola-table-info { color: #999; font-size: 13px; }
|
|
26
|
+
.kupola-table-selection-info { color: #1890ff; font-size: 13px; font-weight: 500; }
|
|
27
|
+
.kupola-table-col-selection { width: 40px; text-align: center; }
|
|
28
|
+
.kupola-table-col-expand { width: 40px; text-align: center; }
|
|
29
|
+
.kupola-table-expand-btn { background: none; border: none; cursor: pointer; font-size: 12px; padding: 2px 6px; color: #666; }
|
|
30
|
+
.kupola-table-expand-btn:hover { color: #1890ff; }
|
|
31
|
+
.kupola-table-expand-row td { background: #fafafa; padding: 16px; }
|
|
32
|
+
.kupola-table-row-selected { background: #e6f7ff !important; }
|
|
33
|
+
.kupola-table-row-selected:hover { background: #bae7ff !important; }
|
|
34
|
+
|
|
35
|
+
/* Resize */
|
|
36
|
+
.kupola-table-resize-handle { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; background: transparent; }
|
|
37
|
+
.kupola-table-resize-handle:hover { background: #1890ff; opacity: 0.3; }
|
|
38
|
+
|
|
39
|
+
/* Drag */
|
|
40
|
+
.kupola-table-draggable { transition: opacity 0.2s; }
|
|
41
|
+
.kupola-table-dragging { opacity: 0.4; }
|
|
42
|
+
.kupola-table-drag-over { border-top: 2px solid #1890ff !important; }
|
|
43
|
+
|
|
44
|
+
/* Edit */
|
|
45
|
+
.kupola-table-editable-cell { cursor: text; }
|
|
46
|
+
.kupola-table-editable-cell:hover { background: #e6f7ff; }
|
|
47
|
+
.kupola-table-edit-cell { display: flex; gap: 4px; align-items: center; }
|
|
48
|
+
.kupola-table-edit-input { flex: 1; padding: 2px 6px; font-size: 13px; }
|
|
49
|
+
.kupola-table-edit-actions { display: flex; gap: 2px; }
|
|
50
|
+
.kupola-table-edit-save, .kupola-table-edit-cancel { background: none; border: 1px solid #d9d9d9; border-radius: 3px; cursor: pointer; padding: 2px 6px; font-size: 12px; }
|
|
51
|
+
.kupola-table-edit-save { color: #52c41a; border-color: #52c41a; }
|
|
52
|
+
.kupola-table-edit-cancel { color: #ff4d4f; border-color: #ff4d4f; }
|
|
53
|
+
.kupola-table-edit-save:hover { background: #f6ffed; }
|
|
54
|
+
.kupola-table-edit-cancel:hover { background: #fff2f0; }
|
|
55
|
+
|
|
56
|
+
/* Tree */
|
|
57
|
+
.kupola-table-tree-indent { display: inline-block; }
|
|
58
|
+
.kupola-table-tree-toggle { background: none; border: none; cursor: pointer; font-size: 10px; padding: 0 4px; color: #666; }
|
|
59
|
+
.kupola-table-tree-toggle:hover { color: #1890ff; }
|
|
60
|
+
.kupola-table-tree-toggle-placeholder { display: inline-block; width: 18px; }
|
|
61
|
+
|
|
62
|
+
/* Virtual */
|
|
63
|
+
.kupola-table-virtual-wrapper .kupola-table-container { overflow-y: auto; }
|
|
64
|
+
|
|
65
|
+
/* Pagination */
|
|
66
|
+
.kupola-table-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px; padding: 8px 0; }
|
|
67
|
+
.kupola-table-pages { display: flex; gap: 4px; align-items: center; }
|
|
68
|
+
.kupola-table-page-btn { min-width: 32px; height: 32px; border: 1px solid #d9d9d9; border-radius: 4px; background: #fff; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }
|
|
69
|
+
.kupola-table-page-btn:hover:not(:disabled):not(.active) { border-color: #1890ff; color: #1890ff; }
|
|
70
|
+
.kupola-table-page-btn.active { background: #1890ff; color: #fff; border-color: #1890ff; }
|
|
71
|
+
.kupola-table-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
72
|
+
.kupola-table-page-ellipsis { padding: 0 4px; color: #999; }
|
|
73
|
+
.kupola-table-page-size { padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
|
|
74
|
+
.kupola-table-page-info { color: #999; font-size: 13px; }
|
package/dist/css/kupola.css
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../css/scaffold.css';
|
|
2
|
+
@import '../css/colors_and_type.css';
|
|
3
|
+
@import '../css/theme-light.css';
|
|
4
|
+
@import '../css/brand-themes.css';
|
|
5
|
+
@import '../css/components.css';
|
|
6
|
+
@import '../css/components-ext.css';
|
|
7
|
+
@import '../css/states.css';
|
|
8
|
+
@import '../css/responsive.css';
|
|
9
|
+
@import '../css/animations.css';
|
|
10
|
+
@import '../css/accessibility.css';
|
|
11
|
+
@import '../css/utilities.css';
|
|
12
|
+
@import '../css/table.css';
|
package/dist/css/kupola.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "../css/scaffold.css";@import "../css/colors_and_type.css";@import "../css/theme-light.css";@import "../css/brand-themes.css";@import "../css/components.css";@import "../css/components-ext.css";@import "../css/states.css";@import "../css/responsive.css";@import "../css/animations.css";@import "../css/accessibility.css";@import "../css/utilities.css";
|
|
1
|
+
@import "../css/scaffold.css";@import "../css/colors_and_type.css";@import "../css/theme-light.css";@import "../css/brand-themes.css";@import "../css/components.css";@import "../css/components-ext.css";@import "../css/states.css";@import "../css/responsive.css";@import "../css/animations.css";@import "../css/accessibility.css";@import "../css/utilities.css";@import "../css/table.css";
|