sky-ui-kit 0.1.9 → 0.1.11
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 +17 -20
- package/components.json +1 -1
- package/dist/html/button.css +12 -0
- package/dist/html/input.css +39 -0
- package/dist/html/number.css +8 -0
- package/dist/html/number.js +31 -0
- package/dist/html/panel.css +12 -0
- package/dist/html/theme.css +218 -0
- package/dist/model-workspace.css +252 -15
- package/dist/style.css +254 -17
- package/docs/AI-CHANGELOG.md +46 -0
- package/docs/AI-GUIDE.md +15 -2
- package/docs/CSS-THEME.md +32 -0
- package/docs/HTML-FORM-CATALOG.md +225 -0
- package/docs/HTML-INTEGRATION.md +121 -0
- package/docs/INTEGRATION.md +12 -0
- package/docs/ON-DEMAND.md +8 -0
- package/docs/RELEASE-HISTORY.md +12 -0
- package/examples/html/index.html +41 -0
- package/examples/html/migration/after.html +38 -0
- package/examples/html/migration/before.html +34 -0
- package/examples/html/migration/business.js +18 -0
- package/examples/html/migration/layout.css +9 -0
- package/examples/html/migration/legacy-controls.css +8 -0
- package/llms-full.txt +639 -6
- package/llms.txt +6 -2
- package/package.json +104 -93
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
|
4
|
+
<title>原生地图悬浮面板 · 迁移前</title>
|
|
5
|
+
<link rel="stylesheet" href="./legacy-controls.css">
|
|
6
|
+
<link rel="stylesheet" href="./layout.css">
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="map"><p id="mapStatus">地图布局占位,点击此背景可核对穿透(不加载地图引擎)。</p></div>
|
|
10
|
+
<!-- 透明地图覆盖层不添加 sky-html。业务定位和穿透规则不变。 -->
|
|
11
|
+
<div id="workspace">
|
|
12
|
+
<section class="query-position" data-demo-theme data-theme="light">
|
|
13
|
+
<header><h1>水库查询</h1><button id="theme" type="button">切换主题</button></header>
|
|
14
|
+
<form id="searchForm" class="form-layout">
|
|
15
|
+
<label class="field-layout" for="name">名称<input id="name" name="name" required placeholder="请输入名称"></label>
|
|
16
|
+
<label class="field-layout" for="province">省份<select id="province" name="province" multiple size="3"><option selected>湖北</option><option>湖南</option><option>四川</option></select></label>
|
|
17
|
+
<label><input name="enabled" type="checkbox" checked>仅显示可用项</label>
|
|
18
|
+
<label>只读编码<input name="code" value="363" readonly></label>
|
|
19
|
+
<div class="actions-layout"><button type="submit">查询</button><button type="reset">重置</button><button type="button" disabled>禁用操作</button></div>
|
|
20
|
+
<output id="status" aria-live="polite">等待查询</output>
|
|
21
|
+
</form>
|
|
22
|
+
<footer><button id="openDetails" type="button">打开 body 浮层</button></footer>
|
|
23
|
+
</section>
|
|
24
|
+
</div>
|
|
25
|
+
<dialog id="details" class="dialog-position">
|
|
26
|
+
<!-- 浮层与查询面板是兄弟节点,明确使用自己的主题边界并同步 data-theme。 -->
|
|
27
|
+
<section class="legacy-dialog" data-demo-theme data-theme="light">
|
|
28
|
+
<header><h2>独立浮层</h2></header>
|
|
29
|
+
<div><label>备注<input name="notes" placeholder="原生浮层输入"></label></div>
|
|
30
|
+
<footer><button id="closeDetails" type="button">关闭</button></footer>
|
|
31
|
+
</section>
|
|
32
|
+
</dialog>
|
|
33
|
+
<script src="./business.js"></script>
|
|
34
|
+
</body></html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* 两个页面共用原生业务监听器,不创建/替换业务 DOM,不依赖 Vue。 */
|
|
2
|
+
const form = document.getElementById('searchForm');
|
|
3
|
+
const status = document.getElementById('status');
|
|
4
|
+
form.addEventListener('submit', event => {
|
|
5
|
+
event.preventDefault();
|
|
6
|
+
const data = new FormData(form);
|
|
7
|
+
status.textContent = '查询:' + data.get('name') + ';已选省份:' + data.getAll('province').join('、');
|
|
8
|
+
});
|
|
9
|
+
form.addEventListener('reset', () => { status.textContent = '查询条件已重置'; });
|
|
10
|
+
document.getElementById('map').addEventListener('click', () => { document.getElementById('mapStatus').textContent = '地图背景仍可点击'; });
|
|
11
|
+
const dialog = document.getElementById('details');
|
|
12
|
+
document.getElementById('openDetails').addEventListener('click', () => { dialog.showModal(); });
|
|
13
|
+
document.getElementById('closeDetails').addEventListener('click', () => { dialog.close(); });
|
|
14
|
+
document.getElementById('theme').addEventListener('click', () => {
|
|
15
|
+
const panels = document.querySelectorAll('[data-demo-theme]');
|
|
16
|
+
const next = panels[0].dataset.theme === 'dark' ? 'light' : 'dark';
|
|
17
|
+
panels.forEach(panel => { panel.dataset.theme = next; });
|
|
18
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* 迁移前后原样保留的业务布局,不负责控件皮肤。 */
|
|
2
|
+
body { margin:0; }
|
|
3
|
+
#map { position:fixed; inset:0; display:grid; place-items:center; background:repeating-linear-gradient(35deg,#b5d6c2 0 60px,#b9dbe8 60px 120px); }
|
|
4
|
+
#workspace { position:fixed; inset:0; background:transparent; pointer-events:none; }
|
|
5
|
+
.query-position { position:absolute; inset:24px auto auto 24px; width:min(360px,calc(100% - 48px)); pointer-events:auto; }
|
|
6
|
+
.form-layout { display:grid; gap:16px; }
|
|
7
|
+
.field-layout { display:grid; gap:6px; }
|
|
8
|
+
.actions-layout { display:flex; flex-wrap:wrap; gap:12px; }
|
|
9
|
+
.dialog-position { width:min(420px,calc(100% - 48px)); padding:0; border:0; }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* 旧皮肤:迁移后移除该文件,不用更强的选择器继续覆盖。 */
|
|
2
|
+
.query-position { background:#eee; border:2px solid #555; padding:14px; }
|
|
3
|
+
#searchForm input, #searchForm select { background:#ddd; color:#222; border:2px solid #555; border-radius:0; padding:4px; }
|
|
4
|
+
#searchForm input:focus { outline:3px solid orange; }
|
|
5
|
+
#searchForm button, #openDetails, #closeDetails { background:#333; color:white; border:2px solid #777; border-radius:0; height:28px; }
|
|
6
|
+
#searchForm button:hover { background:#555; }
|
|
7
|
+
#searchForm button:disabled { background:#999; color:#ccc; }
|
|
8
|
+
#searchForm input:checked { accent-color:orange; }
|