@icen.ai/ui 0.1.0 → 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/README.md +11 -0
- package/dist/base.css +72 -0
- package/dist/behaviors/accordion.mjs +34 -0
- package/dist/behaviors/carousel.mjs +50 -0
- package/dist/behaviors/charts.mjs +267 -0
- package/dist/behaviors/context-menu.mjs +223 -0
- package/dist/behaviors/dropdown.mjs +136 -0
- package/dist/behaviors/input.mjs +102 -0
- package/dist/behaviors/modal.mjs +107 -0
- package/dist/behaviors/nav.mjs +29 -0
- package/dist/behaviors/popover.mjs +164 -0
- package/dist/behaviors/select.mjs +132 -0
- package/dist/behaviors/sidebar.mjs +27 -0
- package/dist/behaviors/slider.mjs +72 -0
- package/dist/behaviors/tag-input.mjs +74 -0
- package/dist/behaviors/tree.mjs +44 -0
- package/dist/behaviors/upload.mjs +55 -0
- package/dist/components/breadcrumb.css +31 -0
- package/dist/components/card.css +56 -0
- package/dist/components/charts.css +95 -0
- package/dist/components/content.css +195 -0
- package/dist/components/empty.css +25 -0
- package/dist/components/feedback.css +106 -0
- package/dist/components/input.css +82 -0
- package/dist/components/layout.css +109 -0
- package/dist/components/media.css +133 -0
- package/dist/components/menu.css +85 -0
- package/dist/components/modal.css +107 -0
- package/dist/components/nav.css +59 -0
- package/dist/components/pagination.css +32 -0
- package/dist/components/popover.css +25 -0
- package/dist/components/segmented.css +112 -0
- package/dist/components/select.css +79 -0
- package/dist/components/sidebar.css +54 -0
- package/dist/components/slider.css +69 -0
- package/dist/components/steps.css +61 -0
- package/dist/components/switch.css +95 -0
- package/dist/components/tag-input.css +48 -0
- package/dist/components/toast.css +1 -1
- package/dist/components/tooltip.css +56 -0
- package/dist/components/upload.css +43 -0
- package/dist/index.mjs +1502 -1
- package/dist/registry.json +41 -3
- package/dist/ui.css +1899 -1
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @icen.ai/ui — Component: upload(拖放上传区)
|
|
3
|
+
* 规格源自 opengal primitives/advanced-input.tsx 的 Upload;与 behaviors/upload.ts 配套。
|
|
4
|
+
*
|
|
5
|
+
* 契约:
|
|
6
|
+
* <div class="upload control lift focus-ring" role="button" tabindex="0">
|
|
7
|
+
* <input type="file" multiple />
|
|
8
|
+
* <div class="upload-icon"><svg …></svg></div>
|
|
9
|
+
* <p class="upload-title">…</p>
|
|
10
|
+
* <p class="upload-desc">…</p>
|
|
11
|
+
* <p class="upload-error" hidden>…</p>
|
|
12
|
+
* </div>
|
|
13
|
+
* 拖入时 behavior 加 .is-drag。
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
.upload {
|
|
17
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
18
|
+
text-align: center; padding: 32px 16px;
|
|
19
|
+
border: 2px dashed var(--token-outline-soft);
|
|
20
|
+
border-radius: var(--radius-lg);
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
.upload:hover {
|
|
24
|
+
border-color: color-mix(in srgb, var(--token-accent) 60%, transparent);
|
|
25
|
+
background: var(--token-control-hover);
|
|
26
|
+
}
|
|
27
|
+
.upload.is-drag {
|
|
28
|
+
border-color: var(--token-accent);
|
|
29
|
+
background: var(--token-accent-subtle);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.upload input[type='file'] { display: none; }
|
|
33
|
+
|
|
34
|
+
.upload-icon {
|
|
35
|
+
display: flex; align-items: center; justify-content: center;
|
|
36
|
+
width: 40px; height: 40px; margin-bottom: 8px;
|
|
37
|
+
border-radius: var(--radius-lg);
|
|
38
|
+
background: var(--token-accent-subtle); color: var(--token-accent);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.upload-title { margin: 0; font-size: 13px; font-weight: 500; color: var(--token-text); }
|
|
42
|
+
.upload-desc { margin: 2px 0 0; font-size: 11px; color: var(--token-text-faint); }
|
|
43
|
+
.upload-error { margin: 4px 0 0; font-size: 11px; color: var(--token-error); }
|