@vavt/react-ui 1.0.0 → 1.0.2

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.
Files changed (148) hide show
  1. package/README.md +50 -2
  2. package/dist/Card-BkZhLXQ5.cjs +1 -0
  3. package/dist/{Card-DlztNV-6.js → Card-DCLfLn1x.js} +13 -12
  4. package/dist/Cron-3D9GmlYf.cjs +1 -0
  5. package/dist/{Cron-Di7k2FTL.js → Cron-Go4yIqrd.js} +361 -353
  6. package/dist/{DatePicker-M-MwejjV.js → DatePicker-B-F5q_s_.js} +1 -1
  7. package/dist/{DatePicker-DAxv2h-d.cjs → DatePicker-CoHW85qm.cjs} +1 -1
  8. package/dist/{DateTimePicker-BcT3FtN-.js → DateTimePicker-BSBZZ7xV.js} +1 -1
  9. package/dist/{DateTimePicker-B3C3v99L.cjs → DateTimePicker-CAkdoY--.cjs} +1 -1
  10. package/dist/Divider-BXNZyvHY.js +48 -0
  11. package/dist/Divider-BnmUNmy2.cjs +1 -0
  12. package/dist/Drawer-C0toQ-fQ.js +112 -0
  13. package/dist/Drawer-D45miZ27.cjs +1 -0
  14. package/dist/Dropdown-BsXYVdt6.cjs +1 -0
  15. package/dist/Dropdown-DljKFnvO.js +319 -0
  16. package/dist/Empty-Dny96c3p.cjs +1 -0
  17. package/dist/Empty-MmxZitR8.js +40 -0
  18. package/dist/{MessageBox-CrIifoig.js → MessageBox-B4Qo1vs2.js} +1 -1
  19. package/dist/{MessageBox-Ddn-R2MS.cjs → MessageBox-CTJfdU29.cjs} +1 -1
  20. package/dist/Modal-i_Do8GsG.cjs +1 -0
  21. package/dist/Modal-otJ_9ldu.js +210 -0
  22. package/dist/{Pagination-B7a9v6BU.js → Pagination-CSI5IzQB.js} +32 -33
  23. package/dist/Pagination-ODU-i3gn.cjs +1 -0
  24. package/dist/Select-BRKxpX-_.cjs +1 -0
  25. package/dist/Select-QedbJ4pD.js +468 -0
  26. package/dist/{Table-C8cSyts5.js → Table-B9NTkptC.js} +1 -1
  27. package/dist/{Table-JoJ9vpu-.cjs → Table-Bqjey5fw.cjs} +1 -1
  28. package/dist/TimePicker-CHZsr_jj.js +207 -0
  29. package/dist/TimePicker-Cpmvn8tx.cjs +1 -0
  30. package/dist/Tooltip-Buk5F9f_.js +205 -0
  31. package/dist/Tooltip-CP8rpNYG.cjs +1 -0
  32. package/dist/Upload-DZC_bt6G.js +183 -0
  33. package/dist/Upload-bxJz2avf.cjs +1 -0
  34. package/dist/base.css +1 -1
  35. package/dist/cjs/Card.cjs +1 -1
  36. package/dist/cjs/Cron.cjs +1 -1
  37. package/dist/cjs/DatePicker.cjs +1 -1
  38. package/dist/cjs/DateTimePicker.cjs +1 -1
  39. package/dist/cjs/Divider.cjs +1 -1
  40. package/dist/cjs/Drawer.cjs +1 -1
  41. package/dist/cjs/Dropdown.cjs +1 -1
  42. package/dist/cjs/Empty.cjs +1 -0
  43. package/dist/cjs/MessageBox.cjs +1 -1
  44. package/dist/cjs/Modal.cjs +1 -1
  45. package/dist/cjs/Pagination.cjs +1 -1
  46. package/dist/cjs/Select.cjs +1 -1
  47. package/dist/cjs/Table.cjs +1 -1
  48. package/dist/cjs/TimePicker.cjs +1 -1
  49. package/dist/cjs/Tooltip.cjs +1 -1
  50. package/dist/cjs/Upload.cjs +1 -0
  51. package/dist/cjs/global.cjs +1 -1
  52. package/dist/cjs/index.cjs +1 -1
  53. package/dist/cjs/register.cjs +1 -1
  54. package/dist/content-DCGQZQp8.cjs +1 -0
  55. package/dist/content-Dllrr-7G.js +11 -0
  56. package/dist/css/Button.css +1 -1
  57. package/dist/css/DateTimePicker.css +1 -1
  58. package/dist/css/Empty.css +1 -0
  59. package/dist/css/Pagination.css +1 -1
  60. package/dist/css/Upload.css +1 -0
  61. package/dist/date-picker-BsiNrLZC.js +592 -0
  62. package/dist/date-picker-DNN0BiRA.cjs +1 -0
  63. package/dist/es/Card.mjs +1 -1
  64. package/dist/es/Cron.mjs +1 -1
  65. package/dist/es/DatePicker.mjs +1 -1
  66. package/dist/es/DateTimePicker.mjs +1 -1
  67. package/dist/es/Divider.mjs +1 -1
  68. package/dist/es/Drawer.mjs +1 -1
  69. package/dist/es/Dropdown.mjs +1 -1
  70. package/dist/es/Empty.mjs +3 -0
  71. package/dist/es/MessageBox.mjs +1 -1
  72. package/dist/es/Modal.mjs +1 -1
  73. package/dist/es/Pagination.mjs +1 -1
  74. package/dist/es/Select.mjs +1 -1
  75. package/dist/es/Table.mjs +1 -1
  76. package/dist/es/TimePicker.mjs +1 -1
  77. package/dist/es/Tooltip.mjs +1 -1
  78. package/dist/es/Upload.mjs +3 -0
  79. package/dist/es/global.mjs +1 -1
  80. package/dist/es/index.mjs +31 -29
  81. package/dist/es/register.mjs +1 -1
  82. package/dist/index.css +1 -1
  83. package/dist/layer-BgiUZy_t.cjs +1 -0
  84. package/dist/layer-DDm97-sb.js +53 -0
  85. package/dist/registry-BGNWNSiC.cjs +1 -0
  86. package/dist/registry-q6UdMOyj.js +83 -0
  87. package/dist/style/Empty.cjs +7 -0
  88. package/dist/style/Empty.mjs +7 -0
  89. package/dist/style/Pagination.cjs +1 -0
  90. package/dist/style/Pagination.mjs +1 -0
  91. package/dist/style/Upload.cjs +7 -0
  92. package/dist/style/Upload.mjs +7 -0
  93. package/dist/types/Cron/type.d.cts +2 -0
  94. package/dist/types/Cron/type.d.ts +2 -0
  95. package/dist/types/DatePicker/type.d.cts +2 -0
  96. package/dist/types/DatePicker/type.d.ts +2 -0
  97. package/dist/types/Dropdown/type.d.cts +2 -0
  98. package/dist/types/Dropdown/type.d.ts +2 -0
  99. package/dist/types/Empty/Empty.d.cts +3 -0
  100. package/dist/types/Empty/Empty.d.ts +3 -0
  101. package/dist/types/Empty/index.d.cts +5 -0
  102. package/dist/types/Empty/index.d.ts +5 -0
  103. package/dist/types/Empty/type.d.cts +24 -0
  104. package/dist/types/Empty/type.d.ts +24 -0
  105. package/dist/types/Select/type.d.cts +2 -0
  106. package/dist/types/Select/type.d.ts +2 -0
  107. package/dist/types/TimePicker/type.d.cts +2 -0
  108. package/dist/types/TimePicker/type.d.ts +2 -0
  109. package/dist/types/Tooltip/type.d.cts +2 -0
  110. package/dist/types/Tooltip/type.d.ts +2 -0
  111. package/dist/types/Upload/Upload.d.cts +3 -0
  112. package/dist/types/Upload/Upload.d.ts +3 -0
  113. package/dist/types/Upload/index.d.cts +5 -0
  114. package/dist/types/Upload/index.d.ts +5 -0
  115. package/dist/types/Upload/type.d.cts +62 -0
  116. package/dist/types/Upload/type.d.ts +62 -0
  117. package/dist/types/_shared/content.d.cts +13 -0
  118. package/dist/types/_shared/content.d.ts +13 -0
  119. package/dist/types/_shared/layer.d.cts +63 -0
  120. package/dist/types/_shared/layer.d.ts +63 -0
  121. package/dist/types/global.d.cts +4 -0
  122. package/dist/types/global.d.ts +4 -0
  123. package/dist/types/index.d.cts +2 -0
  124. package/dist/types/index.d.ts +2 -0
  125. package/dist/types/registry.d.cts +2 -0
  126. package/dist/types/registry.d.ts +2 -0
  127. package/package.json +2 -4
  128. package/dist/Card-nILlh9c_.cjs +0 -1
  129. package/dist/Cron-CoO2Vnnm.cjs +0 -1
  130. package/dist/Divider-BfvQ6BVP.cjs +0 -1
  131. package/dist/Divider-vyftxh3F.js +0 -47
  132. package/dist/Drawer-D28QbyA3.js +0 -103
  133. package/dist/Drawer-OmMfdgKN.cjs +0 -1
  134. package/dist/Dropdown-CYx6RxVv.js +0 -311
  135. package/dist/Dropdown-swfND4yK.cjs +0 -1
  136. package/dist/Modal-B_VqN16m.js +0 -201
  137. package/dist/Modal-Dm48HmGu.cjs +0 -1
  138. package/dist/Pagination-mj-pO6ql.cjs +0 -1
  139. package/dist/Select-DQLup8Y-.cjs +0 -1
  140. package/dist/Select-DccM9YpB.js +0 -458
  141. package/dist/TimePicker-ClQCHa6M.js +0 -199
  142. package/dist/TimePicker-DNBo2Rn5.cjs +0 -1
  143. package/dist/Tooltip-CbPYYr6R.cjs +0 -1
  144. package/dist/Tooltip-Ds4Odm7K.js +0 -197
  145. package/dist/date-picker-DkRwNu2m.js +0 -584
  146. package/dist/date-picker-DyGLrw5H.cjs +0 -1
  147. package/dist/registry-CkiH1x-J.js +0 -79
  148. package/dist/registry-YCz7D-2R.cjs +0 -1
@@ -0,0 +1 @@
1
+ let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.createContext)(null),r={dropdown:`var(--vl-z-dropdown)`,popover:`var(--vl-z-popover)`,tooltip:`var(--vl-z-tooltip)`,modal:`var(--vl-z-modal)`},i={[r.dropdown]:1e3,[r.popover]:1100,[r.tooltip]:1e3,[r.modal]:1200},a=e=>typeof e==`string`?i[e]:void 0,o=({base:e,offset:t})=>t===0?e:typeof e==`number`?e+t:`calc(${e} ${t>0?`+`:`-`} ${Math.abs(t)})`,s=(e,t)=>o({...e,offset:e.offset+t}),c=({defaultZIndex:t,zIndex:r,withMask:i=!1})=>{let c=(0,e.useContext)(n),l=(0,e.useMemo)(()=>{if(r!==void 0)return{base:r,offset:0};let e=a(t);if(c){let t=i?2:1,n=c.offset+t,r=c.rank;if(!(e!==void 0&&r!==void 0&&e>r+n))return{base:c.base,offset:n,rank:r}}return{base:t,offset:0,rank:e}},[t,c,i,r]),u=r===void 0&&l.offset===0&&l.base===t?void 0:o(l);return{layer:l,zIndex:u,maskZIndex:u===void 0?void 0:s(l,-1)}},l=({layer:e,children:r})=>(0,t.jsx)(n.Provider,{value:e,children:r});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
@@ -0,0 +1,53 @@
1
+ import { createContext as e, useContext as t, useMemo as n } from "react";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ //#region components/_shared/layer.tsx
4
+ var i = e(null), a = {
5
+ dropdown: "var(--vl-z-dropdown)",
6
+ popover: "var(--vl-z-popover)",
7
+ tooltip: "var(--vl-z-tooltip)",
8
+ modal: "var(--vl-z-modal)"
9
+ }, o = {
10
+ [a.dropdown]: 1e3,
11
+ [a.popover]: 1100,
12
+ [a.tooltip]: 1e3,
13
+ [a.modal]: 1200
14
+ }, s = (e) => typeof e == "string" ? o[e] : void 0, c = ({ base: e, offset: t }) => t === 0 ? e : typeof e == "number" ? e + t : `calc(${e} ${t > 0 ? "+" : "-"} ${Math.abs(t)})`, l = (e, t) => c({
15
+ ...e,
16
+ offset: e.offset + t
17
+ }), u = ({ defaultZIndex: e, zIndex: r, withMask: a = !1 }) => {
18
+ let o = t(i), u = n(() => {
19
+ if (r !== void 0) return {
20
+ base: r,
21
+ offset: 0
22
+ };
23
+ let t = s(e);
24
+ if (o) {
25
+ let e = a ? 2 : 1, n = o.offset + e, r = o.rank;
26
+ if (!(t !== void 0 && r !== void 0 && t > r + n)) return {
27
+ base: o.base,
28
+ offset: n,
29
+ rank: r
30
+ };
31
+ }
32
+ return {
33
+ base: e,
34
+ offset: 0,
35
+ rank: t
36
+ };
37
+ }, [
38
+ e,
39
+ o,
40
+ a,
41
+ r
42
+ ]), d = r === void 0 && u.offset === 0 && u.base === e ? void 0 : c(u);
43
+ return {
44
+ layer: u,
45
+ zIndex: d,
46
+ maskZIndex: d === void 0 ? void 0 : l(u, -1)
47
+ };
48
+ }, d = ({ layer: e, children: t }) => /* @__PURE__ */ r(i.Provider, {
49
+ value: e,
50
+ children: t
51
+ });
52
+ //#endregion
53
+ export { a as n, u as r, d as t };
@@ -0,0 +1 @@
1
+ const e=require("./Alert-tPSJmCXK.cjs"),t=require("./Anchor-iriRYxEs.cjs"),n=require("./Announcement-XjJyJ28N.cjs"),r=require("./Button-qURrKHQ0.cjs"),i=require("./Card-BkZhLXQ5.cjs"),a=require("./Checkbox-CQZSg9Xu.cjs"),o=require("./Col-qcq7T83y.cjs"),s=require("./Transition-X_89ga-e.cjs"),c=require("./Input-CoDZggqc.cjs"),l=require("./Tabs-BhjvKN84.cjs"),u=require("./NumberInput-CYVj89_s.cjs"),d=require("./Cron-3D9GmlYf.cjs"),f=require("./Dropdown-BsXYVdt6.cjs"),p=require("./DatePicker-CoHW85qm.cjs"),m=require("./DateTimePicker-CAkdoY--.cjs"),h=require("./Divider-BnmUNmy2.cjs"),g=require("./Drawer-D45miZ27.cjs"),_=require("./Empty-Dny96c3p.cjs"),v=require("./Form-7un_DeDk.cjs"),y=require("./Loading-C2pY-4fA.cjs"),b=require("./Modal-i_Do8GsG.cjs"),x=require("./MessageBox-CTJfdU29.cjs"),S=require("./Select-BRKxpX-_.cjs"),C=require("./Pagination-ODU-i3gn.cjs"),w=require("./Progress-DTAjlgwZ.cjs"),T=require("./cjs/Radio.cjs"),E=require("./cjs/Row.cjs"),D=require("./Scrollbar-CEQT6Ao_.cjs"),O=require("./Sidebar-BPXVnP7y.cjs"),k=require("./Slider-DCIUxcBa.cjs"),A=require("./Space-DJGRG2rt.cjs"),j=require("./Switch-7yJ-Q_o_.cjs"),M=require("./Tooltip-CP8rpNYG.cjs"),N=require("./Table-Bqjey5fw.cjs"),P=require("./Tag-Cf9M_HT6.cjs"),F=require("./Textarea-C2dNYM0F.cjs"),I=require("./Timeline-ROggEQnD.cjs"),L=require("./TimePicker-Cpmvn8tx.cjs"),R=require("./Upload-bxJz2avf.cjs");var z={VlAlert:e.n,VlAnchor:t.n,VlAnnouncement:n.n,VlButton:r.n,VlCard:i.n,VlCheckbox:a.n,VlCol:o.n,VlCron:d.n,VlDatePicker:p.n,VlDateTimePicker:m.n,VlDivider:h.n,VlDrawer:g.n,VlDropdown:f.n,VlEmpty:_.n,VlForm:v.t,VlInput:c.n,VlLoading:y.n,VlMessageBox:x.t,VlModal:b.n,VlNumberInput:u.n,VlPagination:C.n,VlProgress:w.n,VlRadio:T.VlRadio,VlRow:E.VlRow,VlScrollbar:D.n,VlSelect:S.n,VlSidebar:O.n,VlSlider:k.n,VlSpace:A.n,VlSwitch:j.n,VlTable:N.n,VlTabs:l.n,VlTag:P.n,VlTextarea:F.n,VlTimeline:I.n,VlTimePicker:L.n,VlTooltip:M.n,VlTransition:s.n,VlUpload:R.n},B=(e=globalThis)=>(Object.assign(e,z),z);Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return z}});
@@ -0,0 +1,83 @@
1
+ import { n as e } from "./Alert-BGyLKuv0.js";
2
+ import { n as t } from "./Anchor-QZROepM_.js";
3
+ import { n } from "./Announcement-D_NccvTm.js";
4
+ import { n as r } from "./Button-CwkWSWau.js";
5
+ import { n as i } from "./Card-DCLfLn1x.js";
6
+ import { n as a } from "./Checkbox-CQeqLO0S.js";
7
+ import { n as o } from "./Col-CZjR94ac.js";
8
+ import { n as s } from "./Transition-DiO4GsP3.js";
9
+ import { n as c } from "./Input-CIB_TY2n.js";
10
+ import { n as l } from "./Tabs-VT6nQ63W.js";
11
+ import { n as u } from "./NumberInput-C_vLULbX.js";
12
+ import { n as d } from "./Cron-Go4yIqrd.js";
13
+ import { n as f } from "./Dropdown-DljKFnvO.js";
14
+ import { n as p } from "./DatePicker-B-F5q_s_.js";
15
+ import { n as m } from "./DateTimePicker-BSBZZ7xV.js";
16
+ import { n as h } from "./Divider-BXNZyvHY.js";
17
+ import { n as g } from "./Drawer-C0toQ-fQ.js";
18
+ import { n as _ } from "./Empty-MmxZitR8.js";
19
+ import { t as v } from "./Form-CwgaAZWr.js";
20
+ import { n as y } from "./Loading-CL0wUgYK.js";
21
+ import { n as b } from "./Modal-otJ_9ldu.js";
22
+ import { t as x } from "./MessageBox-B4Qo1vs2.js";
23
+ import { n as S } from "./Select-QedbJ4pD.js";
24
+ import { n as C } from "./Pagination-CSI5IzQB.js";
25
+ import { n as w } from "./Progress-D2C6LCml.js";
26
+ import { VlRadio as T } from "./es/Radio.mjs";
27
+ import { VlRow as E } from "./es/Row.mjs";
28
+ import { n as D } from "./Scrollbar-BdMGZrYi.js";
29
+ import { n as O } from "./Sidebar-u980T-QB.js";
30
+ import { n as k } from "./Slider-BzlZc0p4.js";
31
+ import { n as A } from "./Space-gnVH7rEt.js";
32
+ import { n as j } from "./Switch-DOO2tiYR.js";
33
+ import { n as M } from "./Tooltip-Buk5F9f_.js";
34
+ import { n as N } from "./Table-B9NTkptC.js";
35
+ import { n as P } from "./Tag-CkfqoSwA.js";
36
+ import { n as F } from "./Textarea-BEd7ToXv.js";
37
+ import { n as I } from "./Timeline-euWvUS4e.js";
38
+ import { n as L } from "./TimePicker-CHZsr_jj.js";
39
+ import { n as R } from "./Upload-DZC_bt6G.js";
40
+ //#region components/registry.ts
41
+ var z = {
42
+ VlAlert: e,
43
+ VlAnchor: t,
44
+ VlAnnouncement: n,
45
+ VlButton: r,
46
+ VlCard: i,
47
+ VlCheckbox: a,
48
+ VlCol: o,
49
+ VlCron: d,
50
+ VlDatePicker: p,
51
+ VlDateTimePicker: m,
52
+ VlDivider: h,
53
+ VlDrawer: g,
54
+ VlDropdown: f,
55
+ VlEmpty: _,
56
+ VlForm: v,
57
+ VlInput: c,
58
+ VlLoading: y,
59
+ VlMessageBox: x,
60
+ VlModal: b,
61
+ VlNumberInput: u,
62
+ VlPagination: C,
63
+ VlProgress: w,
64
+ VlRadio: T,
65
+ VlRow: E,
66
+ VlScrollbar: D,
67
+ VlSelect: S,
68
+ VlSidebar: O,
69
+ VlSlider: k,
70
+ VlSpace: A,
71
+ VlSwitch: j,
72
+ VlTable: N,
73
+ VlTabs: l,
74
+ VlTag: P,
75
+ VlTextarea: F,
76
+ VlTimeline: I,
77
+ VlTimePicker: L,
78
+ VlTooltip: M,
79
+ VlTransition: s,
80
+ VlUpload: R
81
+ }, B = (e = globalThis) => (Object.assign(e, z), z);
82
+ //#endregion
83
+ export { B as n, z as t };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 此文件由 scripts/generate-style-entries.ts 依据组件 import 图自动生成,请勿手工修改。
3
+ *
4
+ * 纯副作用模块:依赖的样式入口在前、自身 CSS 在后,共享模块由打包器按模块 id 去重。
5
+ */
6
+ require("../base.css");
7
+ require("../css/Empty.css");
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 此文件由 scripts/generate-style-entries.ts 依据组件 import 图自动生成,请勿手工修改。
3
+ *
4
+ * 纯副作用模块:依赖的样式入口在前、自身 CSS 在后,共享模块由打包器按模块 id 去重。
5
+ */
6
+ import "../base.css";
7
+ import "../css/Empty.css";
@@ -4,4 +4,5 @@
4
4
  * 纯副作用模块:依赖的样式入口在前、自身 CSS 在后,共享模块由打包器按模块 id 去重。
5
5
  */
6
6
  require("../base.css");
7
+ require("./Select.cjs");
7
8
  require("../css/Pagination.css");
@@ -4,4 +4,5 @@
4
4
  * 纯副作用模块:依赖的样式入口在前、自身 CSS 在后,共享模块由打包器按模块 id 去重。
5
5
  */
6
6
  import "../base.css";
7
+ import "./Select.mjs";
7
8
  import "../css/Pagination.css";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 此文件由 scripts/generate-style-entries.ts 依据组件 import 图自动生成,请勿手工修改。
3
+ *
4
+ * 纯副作用模块:依赖的样式入口在前、自身 CSS 在后,共享模块由打包器按模块 id 去重。
5
+ */
6
+ require("../base.css");
7
+ require("../css/Upload.css");
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 此文件由 scripts/generate-style-entries.ts 依据组件 import 图自动生成,请勿手工修改。
3
+ *
4
+ * 纯副作用模块:依赖的样式入口在前、自身 CSS 在后,共享模块由打包器按模块 id 去重。
5
+ */
6
+ import "../base.css";
7
+ import "../css/Upload.css";
@@ -42,6 +42,8 @@ export interface CronProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChang
42
42
  placement?: CronPlacement;
43
43
  /** 下拉面板与输入框之间的垂直间距偏移量(px),默认为 8 */
44
44
  offset?: number;
45
+ /** 浮层层级;未传入时自动继承父浮层并递增 */
46
+ zIndex?: number;
45
47
  /** 快捷预设选项列表 */
46
48
  shortcuts?: CronShortcut[];
47
49
  /** 是否展示中文语义说明,默认为 true */
@@ -42,6 +42,8 @@ export interface CronProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChang
42
42
  placement?: CronPlacement;
43
43
  /** 下拉面板与输入框之间的垂直间距偏移量(px),默认为 8 */
44
44
  offset?: number;
45
+ /** 浮层层级;未传入时自动继承父浮层并递增 */
46
+ zIndex?: number;
45
47
  /** 快捷预设选项列表 */
46
48
  shortcuts?: CronShortcut[];
47
49
  /** 是否展示中文语义说明,默认为 true */
@@ -40,6 +40,8 @@ export interface DatePickerBaseProps extends Omit<HTMLAttributes<HTMLDivElement>
40
40
  placement?: DatePickerPlacement;
41
41
  /** 浮层与输入框之间的纵向偏移距离(px),默认为 4 */
42
42
  offset?: number;
43
+ /** 浮层层级;未传入时自动继承父浮层并递增 */
44
+ zIndex?: number;
43
45
  /** 清空内容时的回调函数 */
44
46
  onClear?: () => void;
45
47
  /** 下拉面板打开时的回调函数 */
@@ -40,6 +40,8 @@ export interface DatePickerBaseProps extends Omit<HTMLAttributes<HTMLDivElement>
40
40
  placement?: DatePickerPlacement;
41
41
  /** 浮层与输入框之间的纵向偏移距离(px),默认为 4 */
42
42
  offset?: number;
43
+ /** 浮层层级;未传入时自动继承父浮层并递增 */
44
+ zIndex?: number;
43
45
  /** 清空内容时的回调函数 */
44
46
  onClear?: () => void;
45
47
  /** 下拉面板打开时的回调函数 */
@@ -39,6 +39,8 @@ export interface DropdownProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onS
39
39
  placement?: DropdownPlacement;
40
40
  /** 菜单与触发器之间的像素间距,默认为 8 */
41
41
  offset?: number;
42
+ /** 菜单浮层层级;未传入时自动继承父浮层并递增 */
43
+ zIndex?: number;
42
44
  /** 点击菜单内部任意项后是否自动收起菜单,默认为 true */
43
45
  closeOnContentClick?: boolean;
44
46
  /** 触发菜单展开的交互方式,默认为 `'hover'` */
@@ -39,6 +39,8 @@ export interface DropdownProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onS
39
39
  placement?: DropdownPlacement;
40
40
  /** 菜单与触发器之间的像素间距,默认为 8 */
41
41
  offset?: number;
42
+ /** 菜单浮层层级;未传入时自动继承父浮层并递增 */
43
+ zIndex?: number;
42
44
  /** 点击菜单内部任意项后是否自动收起菜单,默认为 true */
43
45
  closeOnContentClick?: boolean;
44
46
  /** 触发菜单展开的交互方式,默认为 `'hover'` */
@@ -0,0 +1,3 @@
1
+ import type { EmptyProps } from './type.cjs';
2
+ declare const Empty: import("react").ForwardRefExoticComponent<EmptyProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ export default Empty;
@@ -0,0 +1,3 @@
1
+ import type { EmptyProps } from './type.js';
2
+ declare const Empty: import("react").ForwardRefExoticComponent<EmptyProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ export default Empty;
@@ -0,0 +1,5 @@
1
+ import Empty from './Empty.cjs';
2
+ /** 空状态组件。 */
3
+ export declare const VlEmpty: import("react").ForwardRefExoticComponent<import("./type.cjs").EmptyProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export type { EmptyProps, EmptyRef, EmptySize } from './type.cjs';
5
+ export default Empty;
@@ -0,0 +1,5 @@
1
+ import Empty from './Empty.js';
2
+ /** 空状态组件。 */
3
+ export declare const VlEmpty: import("react").ForwardRefExoticComponent<import("./type.js").EmptyProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export type { EmptyProps, EmptyRef, EmptySize } from './type.js';
5
+ export default Empty;
@@ -0,0 +1,24 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { DecorativeIcon } from '../_shared/icon.cjs';
3
+ /** 空状态内容的尺寸档位。 */
4
+ export type EmptySize = 'sm' | 'md' | 'lg';
5
+ /**
6
+ * Empty 组件属性接口。
7
+ *
8
+ * image 允许传入自定义插画或图标;显式传入 null 可隐藏默认图标,便于
9
+ * 在表格、卡片等已经提供视觉上下文的容器中只展示文案。
10
+ */
11
+ export interface EmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
12
+ /** 自定义空状态图像/图标,支持组件、元素与字符型内容;默认为内置 Inbox 图标,传 null 可隐藏。 */
13
+ image?: DecorativeIcon | null;
14
+ /** 空状态标题,默认为“暂无数据”;传 null 或空串可隐藏。 */
15
+ title?: ReactNode;
16
+ /** 对标题的补充说明。 */
17
+ description?: ReactNode;
18
+ /** 空状态尺寸,默认为 md。 */
19
+ size?: EmptySize;
20
+ /** 可选操作区,例如“重新加载”按钮。 */
21
+ children?: ReactNode;
22
+ }
23
+ /** Empty 根 DOM 元素类型。 */
24
+ export type EmptyRef = HTMLDivElement;
@@ -0,0 +1,24 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { DecorativeIcon } from '../_shared/icon.js';
3
+ /** 空状态内容的尺寸档位。 */
4
+ export type EmptySize = 'sm' | 'md' | 'lg';
5
+ /**
6
+ * Empty 组件属性接口。
7
+ *
8
+ * image 允许传入自定义插画或图标;显式传入 null 可隐藏默认图标,便于
9
+ * 在表格、卡片等已经提供视觉上下文的容器中只展示文案。
10
+ */
11
+ export interface EmptyProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
12
+ /** 自定义空状态图像/图标,支持组件、元素与字符型内容;默认为内置 Inbox 图标,传 null 可隐藏。 */
13
+ image?: DecorativeIcon | null;
14
+ /** 空状态标题,默认为“暂无数据”;传 null 或空串可隐藏。 */
15
+ title?: ReactNode;
16
+ /** 对标题的补充说明。 */
17
+ description?: ReactNode;
18
+ /** 空状态尺寸,默认为 md。 */
19
+ size?: EmptySize;
20
+ /** 可选操作区,例如“重新加载”按钮。 */
21
+ children?: ReactNode;
22
+ }
23
+ /** Empty 根 DOM 元素类型。 */
24
+ export type EmptyRef = HTMLDivElement;
@@ -55,6 +55,8 @@ export interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCha
55
55
  placement?: SelectPlacement;
56
56
  /** 下拉浮层与触发器的垂直间距偏移量(px),默认为 8 */
57
57
  offset?: number;
58
+ /** 下拉浮层层级;未传入时自动继承父浮层并递增 */
59
+ zIndex?: number;
58
60
  /** 无匹配数据时的提示文案,默认为 `'暂无数据'` */
59
61
  emptyText?: string;
60
62
  /** 自定义下拉选项内容的渲染函数 */
@@ -55,6 +55,8 @@ export interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCha
55
55
  placement?: SelectPlacement;
56
56
  /** 下拉浮层与触发器的垂直间距偏移量(px),默认为 8 */
57
57
  offset?: number;
58
+ /** 下拉浮层层级;未传入时自动继承父浮层并递增 */
59
+ zIndex?: number;
58
60
  /** 无匹配数据时的提示文案,默认为 `'暂无数据'` */
59
61
  emptyText?: string;
60
62
  /** 自定义下拉选项内容的渲染函数 */
@@ -42,6 +42,8 @@ export interface TimePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'o
42
42
  placement?: TimePickerPlacement;
43
43
  /** 下拉面板与输入框之间的垂直间距偏移量(px),默认为 8 */
44
44
  offset?: number;
45
+ /** 浮层层级;未传入时自动继承父浮层并递增 */
46
+ zIndex?: number;
45
47
  /** 时间值变更时的回调函数 */
46
48
  onChange?: (value: string | null) => void;
47
49
  /** 点击清空按钮时的回调函数 */
@@ -42,6 +42,8 @@ export interface TimePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'o
42
42
  placement?: TimePickerPlacement;
43
43
  /** 下拉面板与输入框之间的垂直间距偏移量(px),默认为 8 */
44
44
  offset?: number;
45
+ /** 浮层层级;未传入时自动继承父浮层并递增 */
46
+ zIndex?: number;
45
47
  /** 时间值变更时的回调函数 */
46
48
  onChange?: (value: string | null) => void;
47
49
  /** 点击清空按钮时的回调函数 */
@@ -25,6 +25,8 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCh
25
25
  showArrow?: boolean;
26
26
  /** 气泡内容的最大宽度(px 或 CSS 字符串),默认为 300 */
27
27
  maxWidth?: number | string;
28
+ /** 气泡浮层层级;未传入时自动继承父浮层并递增 */
29
+ zIndex?: number;
28
30
  /** 受控模式:气泡是否处于显示状态 */
29
31
  open?: boolean;
30
32
  /** 非受控模式:初始是否显示,默认为 false */
@@ -25,6 +25,8 @@ export interface TooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCh
25
25
  showArrow?: boolean;
26
26
  /** 气泡内容的最大宽度(px 或 CSS 字符串),默认为 300 */
27
27
  maxWidth?: number | string;
28
+ /** 气泡浮层层级;未传入时自动继承父浮层并递增 */
29
+ zIndex?: number;
28
30
  /** 受控模式:气泡是否处于显示状态 */
29
31
  open?: boolean;
30
32
  /** 非受控模式:初始是否显示,默认为 false */
@@ -0,0 +1,3 @@
1
+ import type { UploadProps } from './type.cjs';
2
+ declare const Upload: import("react").ForwardRefExoticComponent<UploadProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ export default Upload;
@@ -0,0 +1,3 @@
1
+ import type { UploadProps } from './type.js';
2
+ declare const Upload: import("react").ForwardRefExoticComponent<UploadProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ export default Upload;
@@ -0,0 +1,5 @@
1
+ import Upload from './Upload.cjs';
2
+ /** 文件上传组件。 */
3
+ export declare const VlUpload: import("react").ForwardRefExoticComponent<import("./type.cjs").UploadProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export type { UploadFile, UploadFileStatus, UploadListType, UploadProps, UploadRef } from './type.cjs';
5
+ export default Upload;
@@ -0,0 +1,5 @@
1
+ import Upload from './Upload.js';
2
+ /** 文件上传组件。 */
3
+ export declare const VlUpload: import("react").ForwardRefExoticComponent<import("./type.js").UploadProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export type { UploadFile, UploadFileStatus, UploadListType, UploadProps, UploadRef } from './type.js';
5
+ export default Upload;
@@ -0,0 +1,62 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ /** 上传项状态;组件默认只负责选择文件,上传请求由业务通过回调接管。 */
3
+ export type UploadFileStatus = 'ready' | 'uploading' | 'done' | 'error';
4
+ export type UploadListType = 'text' | 'picture';
5
+ /** Upload 展示与表单绑定的文件项。 */
6
+ export interface UploadFile {
7
+ /** 文件项稳定标识;不传入时由组件按选择顺序生成。 */
8
+ uid: string;
9
+ name: string;
10
+ size?: number;
11
+ type?: string;
12
+ status?: UploadFileStatus;
13
+ /** 上传进度百分比;仅在 status 为 uploading 时渲染进度条,取值会被夹取到 0-100。 */
14
+ percent?: number;
15
+ /** 可预览地址;listType 为 picture 时作为缩略图 src。 */
16
+ url?: string;
17
+ /** 原始 File;服务端回填列表时可以省略。 */
18
+ file?: File;
19
+ error?: string;
20
+ }
21
+ /**
22
+ * 文件上传组件属性接口。
23
+ *
24
+ * Upload 不内置网络请求,onChange 把规范化后的文件列表交给调用方,
25
+ * 这样同一控件既可直接放进 Form,也可接入任意上传 SDK。
26
+ */
27
+ export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onChange' | 'onDrop' | 'defaultValue'> {
28
+ value?: UploadFile[];
29
+ defaultValue?: UploadFile[];
30
+ accept?: string;
31
+ multiple?: boolean;
32
+ disabled?: boolean;
33
+ /** 是否启用拖拽投递区域。 */
34
+ drag?: boolean;
35
+ /**
36
+ * 最多保留的文件数量,仅在 multiple 为 true 时生效;超出的选择会被忽略并触发 onExceed。
37
+ * 达到上限后触发器变为 disabled,避免用户选完文件才被拒绝。
38
+ */
39
+ maxCount?: number;
40
+ listType?: UploadListType;
41
+ showFileList?: boolean;
42
+ /** 触发器中的主提示文案。 */
43
+ uploadText?: ReactNode;
44
+ /** 触发器下方的补充说明。 */
45
+ tip?: ReactNode;
46
+ /**
47
+ * 在文件进入列表前逐个校验;返回 false(或 Promise<false>)会拒绝该文件,抛错同样按拒绝处理。
48
+ * 第二个参数是本次选择中通过数量限制的候选文件,不是已在列表中的文件。
49
+ */
50
+ beforeUpload?: (file: File, candidates: File[]) => boolean | Promise<boolean>;
51
+ onChange?: (fileList: UploadFile[]) => void;
52
+ onRemove?: (file: UploadFile, fileList: UploadFile[]) => void;
53
+ onPreview?: (file: UploadFile) => void;
54
+ onExceed?: (files: File[], fileList: UploadFile[]) => void;
55
+ /**
56
+ * 自定义触发器内容,替换默认图标与文案。
57
+ * 触发器本身是原生 button,因此这里只应放展示性内容,不要再嵌套 button 或链接。
58
+ */
59
+ children?: ReactNode;
60
+ }
61
+ /** Upload 根 DOM 元素类型。 */
62
+ export type UploadRef = HTMLDivElement;
@@ -0,0 +1,62 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ /** 上传项状态;组件默认只负责选择文件,上传请求由业务通过回调接管。 */
3
+ export type UploadFileStatus = 'ready' | 'uploading' | 'done' | 'error';
4
+ export type UploadListType = 'text' | 'picture';
5
+ /** Upload 展示与表单绑定的文件项。 */
6
+ export interface UploadFile {
7
+ /** 文件项稳定标识;不传入时由组件按选择顺序生成。 */
8
+ uid: string;
9
+ name: string;
10
+ size?: number;
11
+ type?: string;
12
+ status?: UploadFileStatus;
13
+ /** 上传进度百分比;仅在 status 为 uploading 时渲染进度条,取值会被夹取到 0-100。 */
14
+ percent?: number;
15
+ /** 可预览地址;listType 为 picture 时作为缩略图 src。 */
16
+ url?: string;
17
+ /** 原始 File;服务端回填列表时可以省略。 */
18
+ file?: File;
19
+ error?: string;
20
+ }
21
+ /**
22
+ * 文件上传组件属性接口。
23
+ *
24
+ * Upload 不内置网络请求,onChange 把规范化后的文件列表交给调用方,
25
+ * 这样同一控件既可直接放进 Form,也可接入任意上传 SDK。
26
+ */
27
+ export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onChange' | 'onDrop' | 'defaultValue'> {
28
+ value?: UploadFile[];
29
+ defaultValue?: UploadFile[];
30
+ accept?: string;
31
+ multiple?: boolean;
32
+ disabled?: boolean;
33
+ /** 是否启用拖拽投递区域。 */
34
+ drag?: boolean;
35
+ /**
36
+ * 最多保留的文件数量,仅在 multiple 为 true 时生效;超出的选择会被忽略并触发 onExceed。
37
+ * 达到上限后触发器变为 disabled,避免用户选完文件才被拒绝。
38
+ */
39
+ maxCount?: number;
40
+ listType?: UploadListType;
41
+ showFileList?: boolean;
42
+ /** 触发器中的主提示文案。 */
43
+ uploadText?: ReactNode;
44
+ /** 触发器下方的补充说明。 */
45
+ tip?: ReactNode;
46
+ /**
47
+ * 在文件进入列表前逐个校验;返回 false(或 Promise<false>)会拒绝该文件,抛错同样按拒绝处理。
48
+ * 第二个参数是本次选择中通过数量限制的候选文件,不是已在列表中的文件。
49
+ */
50
+ beforeUpload?: (file: File, candidates: File[]) => boolean | Promise<boolean>;
51
+ onChange?: (fileList: UploadFile[]) => void;
52
+ onRemove?: (file: UploadFile, fileList: UploadFile[]) => void;
53
+ onPreview?: (file: UploadFile) => void;
54
+ onExceed?: (files: File[], fileList: UploadFile[]) => void;
55
+ /**
56
+ * 自定义触发器内容,替换默认图标与文案。
57
+ * 触发器本身是原生 button,因此这里只应放展示性内容,不要再嵌套 button 或链接。
58
+ */
59
+ children?: ReactNode;
60
+ }
61
+ /** Upload 根 DOM 元素类型。 */
62
+ export type UploadRef = HTMLDivElement;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 可选内容插槽的渲染判定。
3
+ *
4
+ * JSX 里的条件写法(`{flag && <Button />}`、`{list.length ? ... : null}`)在条件为假时会产出
5
+ * false、null 或空数组,而 `!== undefined` 放不掉这些值。插槽容器一旦带上 gap、margin 或边框,
6
+ * 空节点就会留下可见的空白与分隔线,因此统一用本判定决定是否渲染包裹层。
7
+ *
8
+ * 数字 0 与 NaN 视为有内容:它们是合法的可见文本,只有布尔和空串才是"没有内容"的表达。
9
+ * 数组与其他可重复遍历的 iterable 递归展开,空集合视为没有内容;一次性迭代器不展开,避免被消耗。
10
+ */
11
+ import type { ReactNode } from 'react';
12
+ /** 判断可选插槽是否存在需要渲染的内容。 */
13
+ export declare const hasContent: (content: ReactNode) => boolean;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 可选内容插槽的渲染判定。
3
+ *
4
+ * JSX 里的条件写法(`{flag && <Button />}`、`{list.length ? ... : null}`)在条件为假时会产出
5
+ * false、null 或空数组,而 `!== undefined` 放不掉这些值。插槽容器一旦带上 gap、margin 或边框,
6
+ * 空节点就会留下可见的空白与分隔线,因此统一用本判定决定是否渲染包裹层。
7
+ *
8
+ * 数字 0 与 NaN 视为有内容:它们是合法的可见文本,只有布尔和空串才是"没有内容"的表达。
9
+ * 数组与其他可重复遍历的 iterable 递归展开,空集合视为没有内容;一次性迭代器不展开,避免被消耗。
10
+ */
11
+ import type { ReactNode } from 'react';
12
+ /** 判断可选插槽是否存在需要渲染的内容。 */
13
+ export declare const hasContent: (content: ReactNode) => boolean;
@@ -0,0 +1,63 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ type LayerBase = Exclude<CSSProperties['zIndex'], undefined>;
3
+ export interface OverlayLayer {
4
+ /** 数字或 CSS Token 表达式基线;显式 zIndex 会替换继承链的基线。 */
5
+ base: LayerBase;
6
+ /** 相对基线的层级偏移,独立保存以避免多层嵌套产生 calc(calc(...))。 */
7
+ offset: number;
8
+ /**
9
+ * 基线所属设计波段的序号,仅用于比较继承链上的波段高低。
10
+ * 显式 zIndex 无从得知波段,记为 undefined,后代一律继承(尊重调用方的显式选择)。
11
+ */
12
+ rank?: number;
13
+ }
14
+ interface OverlayLayerProviderProps {
15
+ layer: OverlayLayer;
16
+ children: ReactNode;
17
+ }
18
+ interface UseOverlayLayerOptions {
19
+ /** 当前组件在没有父浮层时使用的现有设计 Token。 */
20
+ defaultZIndex: LayerBase;
21
+ /** 调用方显式层级,优先于父级自动递增。 */
22
+ zIndex?: LayerBase;
23
+ /** 是否需要在面板下方为遮罩保留一格,Modal / Drawer 传 true。 */
24
+ withMask?: boolean;
25
+ }
26
+ export declare const overlayLayerTokens: {
27
+ readonly dropdown: "var(--vl-z-dropdown)";
28
+ readonly popover: "var(--vl-z-popover)";
29
+ readonly tooltip: "var(--vl-z-tooltip)";
30
+ readonly modal: "var(--vl-z-modal)";
31
+ };
32
+ /**
33
+ * 各设计波段的相对次序。
34
+ *
35
+ * 这里保存的是「顺序」而非最终值:真实数值仍然只由 ui-styles 的 Token 决定,主题可以整体缩放,
36
+ * 但不能倒置波段顺序(Modal 必须高于 Dropdown 是组件库的语义前提)。
37
+ * design-system-contract 测试会比对这些数值与 SCSS Token 是否同步。
38
+ */
39
+ export declare const overlayBandRanks: {
40
+ readonly "var(--vl-z-dropdown)": 1000;
41
+ readonly "var(--vl-z-popover)": 1100;
42
+ readonly "var(--vl-z-tooltip)": 1000;
43
+ readonly "var(--vl-z-modal)": 1200;
44
+ };
45
+ /** 将结构化层级转换为最终可写入 style.zIndex 的数字或 CSS calc 表达式。 */
46
+ export declare const resolveOverlayZIndex: ({ base, offset }: OverlayLayer) => LayerBase;
47
+ /** 获取当前层的相邻层级,Modal/Drawer 遮罩用 -1 保持在面板正下方。 */
48
+ export declare const getAdjacentOverlayZIndex: (layer: OverlayLayer, delta: number) => LayerBase;
49
+ /**
50
+ * 解析当前组件的浮层层级。
51
+ *
52
+ * 显式 zIndex 是新的层级基线;否则在「继承父层」与「另起自身波段」之间取更高的那个。
53
+ * 根浮层落在默认波段时返回 zIndex: undefined,继续由现有 CSS Token 决定,主题覆盖无需同步到 JS。
54
+ */
55
+ export declare const useOverlayLayer: ({ defaultZIndex, zIndex, withMask }: UseOverlayLayerOptions) => {
56
+ layer: OverlayLayer;
57
+ zIndex: LayerBase | undefined;
58
+ /** 遮罩层级;面板沿用样式表默认值时同样交回样式表。 */
59
+ maskZIndex: LayerBase | undefined;
60
+ };
61
+ /** 将当前面板层级传给 React 子树;Context 会随子树跨越后续 Portal。 */
62
+ export declare const OverlayLayerProvider: ({ layer, children }: OverlayLayerProviderProps) => import("react").JSX.Element;
63
+ export {};