@vavt/react-ui 1.5.0 → 1.6.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/dist/Alert-DOkvqQvm.js +53 -0
- package/dist/Alert-sLmfxqI9.cjs +1 -0
- package/dist/Anchor-BS3LMt1h.cjs +1 -0
- package/dist/Anchor-BjJM-_mv.js +211 -0
- package/dist/Announcement-B8vIk1Rj.js +226 -0
- package/dist/Announcement-CySIi9IJ.cjs +1 -0
- package/dist/AutoComplete-DtLb-HE6.cjs +1 -0
- package/dist/AutoComplete-Dy-Kr0rL.js +219 -0
- package/dist/Avatar-B5P63lmD.js +152 -0
- package/dist/Avatar-D8i7gV9y.cjs +1 -0
- package/dist/Badge-57id067T.js +77 -0
- package/dist/Badge-CVTadUEf.cjs +1 -0
- package/dist/Breadcrumb-BFyFxX4o.cjs +1 -0
- package/dist/Breadcrumb-lgkQsPcN.js +109 -0
- package/dist/Button-C5QblDdX.cjs +1 -0
- package/dist/Button-Cf1wZRwv.js +98 -0
- package/dist/Cascader-CwXX4K-h.cjs +1 -0
- package/dist/Cascader-eGxWTgQF.js +350 -0
- package/dist/Checkbox-BIIL_BGY.js +105 -0
- package/dist/Checkbox-CLTu0bHv.js +130 -0
- package/dist/Checkbox-DD_PVIm8.cjs +1 -0
- package/dist/Checkbox-DaIfYAh6.cjs +1 -0
- package/dist/Collapse-7OHimp_f.cjs +1 -0
- package/dist/Collapse-BBEima1V.js +119 -0
- package/dist/Cron-ZOHcyvZ5.cjs +1 -0
- package/dist/Cron-h36r5DQI.js +1256 -0
- package/dist/{DatePicker-DBjtTP2Q.js → DatePicker-ClP5xjNw.js} +1 -1
- package/dist/{DatePicker-apiCVsKF.cjs → DatePicker-JNDkFFdi.cjs} +1 -1
- package/dist/{DateTimePicker-2omkPUuf.cjs → DateTimePicker-BXZFzGDJ.cjs} +1 -1
- package/dist/{DateTimePicker-IpyJLY4J.js → DateTimePicker-CXd0DFtN.js} +1 -1
- package/dist/Divider-BF4sBcyc.cjs +1 -0
- package/dist/Divider-DewVy2WZ.js +49 -0
- package/dist/Drawer-ZHiCGBV9.cjs +1 -0
- package/dist/Drawer-kL3IKbGs.js +132 -0
- package/dist/Dropdown-BlLNFpNY.js +385 -0
- package/dist/Dropdown-KY6-0lNd.cjs +1 -0
- package/dist/{Empty-Dny96c3p.cjs → Empty-DOXWcltv.cjs} +1 -1
- package/dist/{Empty-MmxZitR8.js → Empty-DiG1Bfjp.js} +6 -6
- package/dist/Form-CL3RQz-O.cjs +1 -0
- package/dist/Form-DZEcx2f-.js +518 -0
- package/dist/Image-Rk4nWRrc.cjs +1 -0
- package/dist/Image-WofeQtU9.js +322 -0
- package/dist/Input-C89PlPIf.cjs +1 -0
- package/dist/Input-Cj4t0Dor.js +147 -0
- package/dist/Layout-BvzpahYT.js +62 -0
- package/dist/Layout-gSZevex1.cjs +1 -0
- package/dist/List-BPaMr973.cjs +1 -0
- package/dist/{List-BupBfl-B.js → List-DnddRNf7.js} +6 -2
- package/dist/Loading-BsbXYn5I.js +49 -0
- package/dist/Loading-DiOUppkA.cjs +1 -0
- package/dist/Menu-CVQfORyM.js +231 -0
- package/dist/Menu-M2d3szN0.cjs +1 -0
- package/dist/Message-CDxOzMxv.cjs +1 -0
- package/dist/Message-TmgyiTLQ.js +227 -0
- package/dist/MessageBox-B0TkCbcA.js +230 -0
- package/dist/MessageBox-B0wir3PE.cjs +1 -0
- package/dist/Modal-D3z74epw.cjs +1 -0
- package/dist/Modal-SEcJXLHr.js +272 -0
- package/dist/Notification-BZgFLf5M.cjs +1 -0
- package/dist/Notification-GA45VI6a.js +251 -0
- package/dist/NumberInput-BFdOKU22.cjs +1 -0
- package/dist/NumberInput-CX64HVpD.js +179 -0
- package/dist/Pagination-BTIrIcrA.js +193 -0
- package/dist/Pagination-BydXOzkW.cjs +1 -0
- package/dist/Popconfirm-CxELRlYH.js +94 -0
- package/dist/Popconfirm-Ds9VvotR.cjs +1 -0
- package/dist/Popover-Bx40HGHC.js +243 -0
- package/dist/Popover-CGLV14NH.cjs +1 -0
- package/dist/Progress-BOxDD7M4.cjs +1 -0
- package/dist/Progress-CkANFxHW.js +41 -0
- package/dist/RadioGroup-CC4J-HMH.js +233 -0
- package/dist/RadioGroup-CqRQvu5a.cjs +1 -0
- package/dist/{Result-CcnBHoE5.js → Result-BxVunr6s.js} +14 -14
- package/dist/Result-DmE09BV4.cjs +1 -0
- package/dist/Scrollbar-BdByLYS1.cjs +1 -0
- package/dist/Scrollbar-Dprb-UNK.js +278 -0
- package/dist/Segmented-DNWPPCh_.cjs +1 -0
- package/dist/Segmented-xNZ5weRI.js +40 -0
- package/dist/Select-CSSIvqeF.js +549 -0
- package/dist/Select-__nuf01m.cjs +1 -0
- package/dist/Sidebar-CL3RBc56.cjs +1 -0
- package/dist/Sidebar-CtuY3ViD.js +82 -0
- package/dist/{Skeleton-C80MPzfN.js → Skeleton-D2wjkTKQ.js} +2 -2
- package/dist/{Skeleton-B_cZyDWx.cjs → Skeleton-qghEqJuT.cjs} +1 -1
- package/dist/Slider-CG7lTmYW.js +259 -0
- package/dist/Slider-CSDQJ-SO.cjs +1 -0
- package/dist/Space-DG-poomt.cjs +1 -0
- package/dist/{Space-gnVH7rEt.js → Space-Gxs8Dq37.js} +1 -1
- package/dist/{Statistic-BitBMhSW.cjs → Statistic-Bnx-S52U.cjs} +1 -1
- package/dist/{Statistic-DVduwOGW.js → Statistic-DOdu7ZQ_.js} +1 -1
- package/dist/{Steps-Cnswg-bb.js → Steps-CnvRwUHr.js} +12 -7
- package/dist/Steps-D1KA1GYB.cjs +1 -0
- package/dist/Switch-CHCsRtdM.js +99 -0
- package/dist/Switch-CkBY9vvd.cjs +1 -0
- package/dist/Table-CUhgkd0h.cjs +1 -0
- package/dist/Table-hlHAagQL.js +579 -0
- package/dist/Tabs-Coy80Als.cjs +1 -0
- package/dist/Tabs-es2_tcwg.js +165 -0
- package/dist/Tag-DgER2JB4.cjs +1 -0
- package/dist/Tag-lRk1klOV.js +73 -0
- package/dist/Textarea-DCGKyIdH.cjs +1 -0
- package/dist/Textarea-DmkOQbxw.js +108 -0
- package/dist/TimePicker-CL4cvY6f.js +228 -0
- package/dist/TimePicker-rjdK-1bZ.cjs +1 -0
- package/dist/{Timeline-euWvUS4e.js → Timeline-DS8fnQfx.js} +33 -28
- package/dist/Timeline-DqMuGL3H.cjs +1 -0
- package/dist/Tooltip-DCnxa8SO.js +221 -0
- package/dist/Tooltip-DKFomTs5.cjs +1 -0
- package/dist/Transfer-CT-OQ88J.cjs +1 -0
- package/dist/Transfer-HzFO2fJO.js +142 -0
- package/dist/Transition-B5WW_-G-.cjs +1 -0
- package/dist/Transition-BqsDG9CS.js +137 -0
- package/dist/Tree-BVfdybXj.js +254 -0
- package/dist/Tree-TICzK1gn.cjs +1 -0
- package/dist/TreeSelect-B2Z7YlWG.js +152 -0
- package/dist/TreeSelect-BV6SNXA5.cjs +1 -0
- package/dist/Typography-DGNiWmMw.js +106 -0
- package/dist/Typography-Hz70NWCj.cjs +1 -0
- package/dist/Upload-B9xeJd90.cjs +1 -0
- package/dist/Upload-BmD3BRXF.js +260 -0
- package/dist/base.css +1 -1
- package/dist/choice-popup-G6DBcv0i.cjs +1 -0
- package/dist/choice-popup-nIqR2Rcb.js +202 -0
- package/dist/cjs/Alert.cjs +1 -1
- package/dist/cjs/Anchor.cjs +1 -1
- package/dist/cjs/Announcement.cjs +1 -1
- package/dist/cjs/AutoComplete.cjs +1 -1
- package/dist/cjs/Avatar.cjs +1 -1
- package/dist/cjs/Badge.cjs +1 -1
- package/dist/cjs/Breadcrumb.cjs +1 -1
- package/dist/cjs/Button.cjs +1 -1
- package/dist/cjs/Cascader.cjs +1 -1
- package/dist/cjs/Checkbox.cjs +1 -1
- package/dist/cjs/Collapse.cjs +1 -1
- package/dist/cjs/Cron.cjs +1 -1
- package/dist/cjs/DatePicker.cjs +1 -1
- package/dist/cjs/DateTimePicker.cjs +1 -1
- package/dist/cjs/Divider.cjs +1 -1
- package/dist/cjs/Drawer.cjs +1 -1
- package/dist/cjs/Dropdown.cjs +1 -1
- package/dist/cjs/Empty.cjs +1 -1
- package/dist/cjs/Form.cjs +1 -1
- package/dist/cjs/Image.cjs +1 -1
- package/dist/cjs/Input.cjs +1 -1
- package/dist/cjs/Layout.cjs +1 -1
- package/dist/cjs/List.cjs +1 -1
- package/dist/cjs/Loading.cjs +1 -1
- package/dist/cjs/Menu.cjs +1 -1
- package/dist/cjs/Message.cjs +1 -1
- package/dist/cjs/MessageBox.cjs +1 -1
- package/dist/cjs/Modal.cjs +1 -1
- package/dist/cjs/Notification.cjs +1 -1
- package/dist/cjs/NumberInput.cjs +1 -1
- package/dist/cjs/Pagination.cjs +1 -1
- package/dist/cjs/Popconfirm.cjs +1 -1
- package/dist/cjs/Popover.cjs +1 -1
- package/dist/cjs/Progress.cjs +1 -1
- package/dist/cjs/Radio.cjs +1 -1
- package/dist/cjs/Result.cjs +1 -1
- package/dist/cjs/Scrollbar.cjs +1 -1
- package/dist/cjs/Segmented.cjs +1 -1
- package/dist/cjs/Select.cjs +1 -1
- package/dist/cjs/Sidebar.cjs +1 -1
- package/dist/cjs/Skeleton.cjs +1 -1
- package/dist/cjs/Slider.cjs +1 -1
- package/dist/cjs/Space.cjs +1 -1
- package/dist/cjs/Statistic.cjs +1 -1
- package/dist/cjs/Steps.cjs +1 -1
- package/dist/cjs/Switch.cjs +1 -1
- package/dist/cjs/Table.cjs +1 -1
- package/dist/cjs/Tabs.cjs +1 -1
- package/dist/cjs/Tag.cjs +1 -1
- package/dist/cjs/Textarea.cjs +1 -1
- package/dist/cjs/TimePicker.cjs +1 -1
- package/dist/cjs/Timeline.cjs +1 -1
- package/dist/cjs/Tooltip.cjs +1 -1
- package/dist/cjs/Transfer.cjs +1 -1
- package/dist/cjs/Transition.cjs +1 -1
- package/dist/cjs/Tree.cjs +1 -1
- package/dist/cjs/TreeSelect.cjs +1 -1
- package/dist/cjs/Typography.cjs +1 -1
- package/dist/cjs/Upload.cjs +1 -1
- package/dist/cjs/global.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/register.cjs +1 -1
- package/dist/css/Alert.css +1 -1
- package/dist/css/Anchor.css +1 -1
- package/dist/css/Announcement.css +1 -1
- package/dist/css/AutoComplete.css +1 -1
- package/dist/css/Avatar.css +1 -1
- package/dist/css/Badge.css +1 -1
- package/dist/css/Breadcrumb.css +1 -1
- package/dist/css/Button.css +1 -1
- package/dist/css/Card.css +1 -1
- package/dist/css/Cascader.css +1 -1
- package/dist/css/Checkbox.css +1 -1
- package/dist/css/Col.css +1 -1
- package/dist/css/Collapse.css +1 -1
- package/dist/css/Cron.css +1 -1
- package/dist/css/DatePicker.css +1 -1
- package/dist/css/DateTimePicker.css +1 -1
- package/dist/css/Descriptions.css +1 -1
- package/dist/css/Divider.css +1 -1
- package/dist/css/Drawer.css +1 -1
- package/dist/css/Dropdown.css +1 -1
- package/dist/css/Empty.css +1 -1
- package/dist/css/Form.css +1 -1
- package/dist/css/Image.css +1 -1
- package/dist/css/Input.css +1 -1
- package/dist/css/Layout.css +1 -1
- package/dist/css/List.css +1 -1
- package/dist/css/Loading.css +1 -1
- package/dist/css/Menu.css +1 -1
- package/dist/css/Message.css +1 -1
- package/dist/css/MessageBox.css +1 -1
- package/dist/css/Modal.css +1 -1
- package/dist/css/Notification.css +1 -1
- package/dist/css/NumberInput.css +1 -1
- package/dist/css/Pagination.css +1 -1
- package/dist/css/Popconfirm.css +1 -1
- package/dist/css/Popover.css +1 -1
- package/dist/css/Progress.css +1 -1
- package/dist/css/Radio.css +1 -1
- package/dist/css/Result.css +1 -1
- package/dist/css/Row.css +1 -1
- package/dist/css/Scrollbar.css +1 -1
- package/dist/css/Segmented.css +1 -1
- package/dist/css/Select.css +1 -1
- package/dist/css/Sidebar.css +1 -1
- package/dist/css/Skeleton.css +1 -1
- package/dist/css/Slider.css +1 -1
- package/dist/css/Statistic.css +1 -1
- package/dist/css/Steps.css +1 -1
- package/dist/css/Switch.css +1 -1
- package/dist/css/Table.css +1 -1
- package/dist/css/Tabs.css +1 -1
- package/dist/css/Tag.css +1 -1
- package/dist/css/Textarea.css +1 -1
- package/dist/css/TimePicker.css +1 -1
- package/dist/css/Timeline.css +1 -1
- package/dist/css/Tooltip.css +1 -1
- package/dist/css/Transfer.css +1 -1
- package/dist/css/Tree.css +1 -1
- package/dist/css/TreeSelect.css +1 -1
- package/dist/css/Typography.css +1 -1
- package/dist/css/Upload.css +1 -1
- package/dist/date-picker-CGO6ckz3.cjs +1 -0
- package/dist/date-picker-CwYlRU13.js +729 -0
- package/dist/dialog-shell-C1FMUESq.cjs +1 -0
- package/dist/{dialog-shell-Bv1Jvhjb.js → dialog-shell-CKtHqdVE.js} +38 -33
- package/dist/es/Alert.mjs +1 -1
- package/dist/es/Anchor.mjs +1 -1
- package/dist/es/Announcement.mjs +1 -1
- package/dist/es/AutoComplete.mjs +1 -1
- package/dist/es/Avatar.mjs +1 -1
- package/dist/es/Badge.mjs +1 -1
- package/dist/es/Breadcrumb.mjs +1 -1
- package/dist/es/Button.mjs +1 -1
- package/dist/es/Cascader.mjs +1 -1
- package/dist/es/Checkbox.mjs +1 -1
- package/dist/es/Collapse.mjs +1 -1
- package/dist/es/Cron.mjs +1 -1
- package/dist/es/DatePicker.mjs +1 -1
- package/dist/es/DateTimePicker.mjs +1 -1
- package/dist/es/Divider.mjs +1 -1
- package/dist/es/Drawer.mjs +1 -1
- package/dist/es/Dropdown.mjs +1 -1
- package/dist/es/Empty.mjs +1 -1
- package/dist/es/Form.mjs +1 -1
- package/dist/es/Image.mjs +1 -1
- package/dist/es/Input.mjs +1 -1
- package/dist/es/Layout.mjs +1 -1
- package/dist/es/List.mjs +1 -1
- package/dist/es/Loading.mjs +1 -1
- package/dist/es/Menu.mjs +1 -1
- package/dist/es/Message.mjs +1 -1
- package/dist/es/MessageBox.mjs +1 -1
- package/dist/es/Modal.mjs +1 -1
- package/dist/es/Notification.mjs +1 -1
- package/dist/es/NumberInput.mjs +1 -1
- package/dist/es/Pagination.mjs +1 -1
- package/dist/es/Popconfirm.mjs +1 -1
- package/dist/es/Popover.mjs +1 -1
- package/dist/es/Progress.mjs +1 -1
- package/dist/es/Radio.mjs +1 -1
- package/dist/es/Result.mjs +1 -1
- package/dist/es/Scrollbar.mjs +1 -1
- package/dist/es/Segmented.mjs +1 -1
- package/dist/es/Select.mjs +1 -1
- package/dist/es/Sidebar.mjs +1 -1
- package/dist/es/Skeleton.mjs +1 -1
- package/dist/es/Slider.mjs +1 -1
- package/dist/es/Space.mjs +1 -1
- package/dist/es/Statistic.mjs +1 -1
- package/dist/es/Steps.mjs +1 -1
- package/dist/es/Switch.mjs +1 -1
- package/dist/es/Table.mjs +1 -1
- package/dist/es/Tabs.mjs +1 -1
- package/dist/es/Tag.mjs +1 -1
- package/dist/es/Textarea.mjs +1 -1
- package/dist/es/TimePicker.mjs +1 -1
- package/dist/es/Timeline.mjs +1 -1
- package/dist/es/Tooltip.mjs +1 -1
- package/dist/es/Transfer.mjs +1 -1
- package/dist/es/Transition.mjs +1 -1
- package/dist/es/Tree.mjs +1 -1
- package/dist/es/TreeSelect.mjs +1 -1
- package/dist/es/Typography.mjs +1 -1
- package/dist/es/Upload.mjs +1 -1
- package/dist/es/global.mjs +1 -1
- package/dist/es/index.mjs +59 -59
- package/dist/es/register.mjs +1 -1
- package/dist/{floating-B6CCQcuK.cjs → floating-BHmOWQnJ.cjs} +1 -1
- package/dist/{floating-C8pd2mFu.js → floating-C-0-Sk6n.js} +1 -1
- package/dist/focus-DndacLWx.cjs +1 -0
- package/dist/focus-oev-zUHI.js +9 -0
- package/dist/icon-B0ZZGPnp.cjs +1 -0
- package/dist/icon-CDsPa8R1.js +26 -0
- package/dist/index.css +1 -1
- package/dist/layer-D27_z68G.js +105 -0
- package/dist/layer-kZfooayr.cjs +1 -0
- package/dist/{notice-timer-OkrpLRrG.cjs → notice-timer-9sjKpz2g.cjs} +1 -1
- package/dist/{notice-timer-BRLTVgTj.js → notice-timer-Biq_Sc_9.js} +3 -3
- package/dist/refs-C1T7xAaV.js +20 -0
- package/dist/refs-oZ0l8Ckc.cjs +1 -0
- package/dist/registry-CKsCoyn0.cjs +1 -0
- package/dist/registry-DCaxFUxl.js +131 -0
- package/dist/time-wheel-DBKM4ruL.cjs +1 -0
- package/dist/time-wheel-Oxpcj0Hi.js +344 -0
- package/dist/types/Alert/type.d.cts +4 -4
- package/dist/types/Alert/type.d.ts +4 -4
- package/dist/types/Anchor/type.d.cts +9 -9
- package/dist/types/Anchor/type.d.ts +9 -9
- package/dist/types/Announcement/type.d.cts +4 -4
- package/dist/types/Announcement/type.d.ts +4 -4
- package/dist/types/AutoComplete/type.d.cts +6 -3
- package/dist/types/AutoComplete/type.d.ts +6 -3
- package/dist/types/Avatar/type.d.cts +13 -11
- package/dist/types/Avatar/type.d.ts +13 -11
- package/dist/types/Badge/type.d.cts +4 -4
- package/dist/types/Badge/type.d.ts +4 -4
- package/dist/types/Breadcrumb/type.d.cts +8 -8
- package/dist/types/Breadcrumb/type.d.ts +8 -8
- package/dist/types/Button/Button.d.cts +1 -1
- package/dist/types/Button/Button.d.ts +1 -1
- package/dist/types/Button/type.d.cts +2 -2
- package/dist/types/Button/type.d.ts +2 -2
- package/dist/types/Card/type.d.cts +7 -7
- package/dist/types/Card/type.d.ts +7 -7
- package/dist/types/Cascader/type.d.cts +15 -1
- package/dist/types/Cascader/type.d.ts +15 -1
- package/dist/types/Checkbox/context.d.cts +2 -0
- package/dist/types/Checkbox/context.d.ts +2 -0
- package/dist/types/Checkbox/type.d.cts +12 -12
- package/dist/types/Checkbox/type.d.ts +12 -12
- package/dist/types/Col/type.d.cts +12 -11
- package/dist/types/Col/type.d.ts +12 -11
- package/dist/types/Collapse/index.d.cts +1 -1
- package/dist/types/Collapse/index.d.ts +1 -1
- package/dist/types/Collapse/type.d.cts +13 -7
- package/dist/types/Collapse/type.d.ts +13 -7
- package/dist/types/Cron/CronPanel.d.cts +10 -1
- package/dist/types/Cron/CronPanel.d.ts +10 -1
- package/dist/types/Cron/schedule.d.cts +4 -1
- package/dist/types/Cron/schedule.d.ts +4 -1
- package/dist/types/Cron/type.d.cts +5 -5
- package/dist/types/Cron/type.d.ts +5 -5
- package/dist/types/DatePicker/type.d.cts +8 -4
- package/dist/types/DatePicker/type.d.ts +8 -4
- package/dist/types/DateTimePicker/type.d.cts +13 -4
- package/dist/types/DateTimePicker/type.d.ts +13 -4
- package/dist/types/Descriptions/type.d.cts +4 -2
- package/dist/types/Descriptions/type.d.ts +4 -2
- package/dist/types/Divider/type.d.cts +4 -2
- package/dist/types/Divider/type.d.ts +4 -2
- package/dist/types/Drawer/type.d.cts +11 -11
- package/dist/types/Drawer/type.d.ts +11 -11
- package/dist/types/Dropdown/type.d.cts +12 -10
- package/dist/types/Dropdown/type.d.ts +12 -10
- package/dist/types/Empty/type.d.cts +3 -3
- package/dist/types/Empty/type.d.ts +3 -3
- package/dist/types/Form/FormItem.d.cts +7 -3
- package/dist/types/Form/FormItem.d.ts +7 -3
- package/dist/types/Form/context.d.cts +3 -1
- package/dist/types/Form/context.d.ts +3 -1
- package/dist/types/Form/index.d.cts +2 -2
- package/dist/types/Form/index.d.ts +2 -2
- package/dist/types/Form/type.d.cts +11 -8
- package/dist/types/Form/type.d.ts +11 -8
- package/dist/types/Image/type.d.cts +7 -1
- package/dist/types/Image/type.d.ts +7 -1
- package/dist/types/Input/type.d.cts +7 -7
- package/dist/types/Input/type.d.ts +7 -7
- package/dist/types/Layout/type.d.cts +9 -3
- package/dist/types/Layout/type.d.ts +9 -3
- package/dist/types/List/type.d.cts +6 -1
- package/dist/types/List/type.d.ts +6 -1
- package/dist/types/Loading/type.d.cts +3 -3
- package/dist/types/Loading/type.d.ts +3 -3
- package/dist/types/Menu/type.d.cts +17 -1
- package/dist/types/Menu/type.d.ts +17 -1
- package/dist/types/Message/type.d.cts +10 -2
- package/dist/types/Message/type.d.ts +10 -2
- package/dist/types/MessageBox/type.d.cts +8 -8
- package/dist/types/MessageBox/type.d.ts +8 -8
- package/dist/types/Modal/type.d.cts +6 -6
- package/dist/types/Modal/type.d.ts +6 -6
- package/dist/types/Notification/service.d.cts +0 -1
- package/dist/types/Notification/service.d.ts +0 -1
- package/dist/types/Notification/type.d.cts +8 -7
- package/dist/types/Notification/type.d.ts +8 -7
- package/dist/types/NumberInput/type.d.cts +11 -11
- package/dist/types/NumberInput/type.d.ts +11 -11
- package/dist/types/Pagination/type.d.cts +6 -6
- package/dist/types/Pagination/type.d.ts +6 -6
- package/dist/types/Popconfirm/type.d.cts +5 -1
- package/dist/types/Popconfirm/type.d.ts +5 -1
- package/dist/types/Popover/type.d.cts +4 -1
- package/dist/types/Popover/type.d.ts +4 -1
- package/dist/types/Progress/type.d.cts +5 -5
- package/dist/types/Progress/type.d.ts +5 -5
- package/dist/types/Radio/context.d.cts +2 -0
- package/dist/types/Radio/context.d.ts +2 -0
- package/dist/types/Radio/type.d.cts +8 -8
- package/dist/types/Radio/type.d.ts +8 -8
- package/dist/types/Result/type.d.cts +7 -1
- package/dist/types/Result/type.d.ts +7 -1
- package/dist/types/Row/type.d.cts +3 -3
- package/dist/types/Row/type.d.ts +3 -3
- package/dist/types/Scrollbar/index.d.cts +1 -1
- package/dist/types/Scrollbar/index.d.ts +1 -1
- package/dist/types/Scrollbar/type.d.cts +3 -3
- package/dist/types/Scrollbar/type.d.ts +3 -3
- package/dist/types/Segmented/type.d.cts +5 -0
- package/dist/types/Segmented/type.d.ts +5 -0
- package/dist/types/Select/type.d.cts +5 -5
- package/dist/types/Select/type.d.ts +5 -5
- package/dist/types/Sidebar/type.d.cts +14 -14
- package/dist/types/Sidebar/type.d.ts +14 -14
- package/dist/types/Skeleton/type.d.cts +8 -5
- package/dist/types/Skeleton/type.d.ts +8 -5
- package/dist/types/Slider/type.d.cts +15 -11
- package/dist/types/Slider/type.d.ts +15 -11
- package/dist/types/Space/type.d.cts +3 -3
- package/dist/types/Space/type.d.ts +3 -3
- package/dist/types/Statistic/type.d.cts +8 -1
- package/dist/types/Statistic/type.d.ts +8 -1
- package/dist/types/Steps/type.d.cts +5 -2
- package/dist/types/Steps/type.d.ts +5 -2
- package/dist/types/Switch/type.d.cts +6 -6
- package/dist/types/Switch/type.d.ts +6 -6
- package/dist/types/Table/type.d.cts +6 -6
- package/dist/types/Table/type.d.ts +6 -6
- package/dist/types/Tabs/type.d.cts +5 -5
- package/dist/types/Tabs/type.d.ts +5 -5
- package/dist/types/Tag/Tag.d.cts +5 -2
- package/dist/types/Tag/Tag.d.ts +5 -2
- package/dist/types/Tag/index.d.cts +1 -1
- package/dist/types/Tag/index.d.ts +1 -1
- package/dist/types/Tag/type.d.cts +16 -7
- package/dist/types/Tag/type.d.ts +16 -7
- package/dist/types/Textarea/type.d.cts +6 -6
- package/dist/types/Textarea/type.d.ts +6 -6
- package/dist/types/TimePicker/type.d.cts +7 -5
- package/dist/types/TimePicker/type.d.ts +7 -5
- package/dist/types/Timeline/type.d.cts +8 -8
- package/dist/types/Timeline/type.d.ts +8 -8
- package/dist/types/Tooltip/type.d.cts +9 -9
- package/dist/types/Tooltip/type.d.ts +9 -9
- package/dist/types/Transfer/type.d.cts +6 -0
- package/dist/types/Transfer/type.d.ts +6 -0
- package/dist/types/Transition/type.d.cts +6 -6
- package/dist/types/Transition/type.d.ts +6 -6
- package/dist/types/Tree/Tree.d.cts +1 -0
- package/dist/types/Tree/Tree.d.ts +1 -0
- package/dist/types/Tree/type.d.cts +4 -0
- package/dist/types/Tree/type.d.ts +4 -0
- package/dist/types/TreeSelect/type.d.cts +13 -0
- package/dist/types/TreeSelect/type.d.ts +13 -0
- package/dist/types/Typography/type.d.cts +9 -2
- package/dist/types/Typography/type.d.ts +9 -2
- package/dist/types/Upload/type.d.cts +6 -2
- package/dist/types/Upload/type.d.ts +6 -2
- package/dist/types/_shared/choice-popup.d.cts +5 -1
- package/dist/types/_shared/choice-popup.d.ts +5 -1
- package/dist/types/_shared/date-calendar.d.cts +4 -3
- package/dist/types/_shared/date-calendar.d.ts +4 -3
- package/dist/types/_shared/refs.d.cts +5 -5
- package/dist/types/_shared/refs.d.ts +5 -5
- package/dist/types/_shared/time-wheel.d.cts +3 -1
- package/dist/types/_shared/time-wheel.d.ts +3 -1
- package/dist/types/registry.d.cts +2 -2
- package/dist/types/registry.d.ts +2 -2
- package/package.json +1 -1
- package/dist/Alert-BGyLKuv0.js +0 -52
- package/dist/Alert-tPSJmCXK.cjs +0 -1
- package/dist/Anchor-CAZPkv56.js +0 -197
- package/dist/Anchor-CmuV1Ump.cjs +0 -1
- package/dist/Announcement-BUvNHscy.cjs +0 -1
- package/dist/Announcement-CznCpx2T.js +0 -174
- package/dist/AutoComplete-D8yHFMHQ.js +0 -185
- package/dist/AutoComplete-Drl00grg.cjs +0 -1
- package/dist/Avatar-CVGMy2Ws.cjs +0 -1
- package/dist/Avatar-DiZ9p6tu.js +0 -125
- package/dist/Badge-CchY6uXz.js +0 -72
- package/dist/Badge-D3htuSXY.cjs +0 -1
- package/dist/Breadcrumb-BWR92yK_.cjs +0 -1
- package/dist/Breadcrumb-BmZKaAQx.js +0 -88
- package/dist/Button-CwkWSWau.js +0 -96
- package/dist/Button-qURrKHQ0.cjs +0 -1
- package/dist/Cascader-ZVE95kvm.cjs +0 -1
- package/dist/Cascader-bozg6Ebp.js +0 -268
- package/dist/Checkbox-CBMmX-R-.js +0 -86
- package/dist/Checkbox-CzNGP2tH.cjs +0 -1
- package/dist/Checkbox-GJlGNzlH.cjs +0 -1
- package/dist/Checkbox-bHOjYdMp.js +0 -61
- package/dist/Collapse-DVxYsq3L.cjs +0 -1
- package/dist/Collapse-DszkYUfD.js +0 -112
- package/dist/Cron-BWqWgWuv.js +0 -1206
- package/dist/Cron-zcb1FZ09.cjs +0 -1
- package/dist/Divider-BXNZyvHY.js +0 -48
- package/dist/Divider-BnmUNmy2.cjs +0 -1
- package/dist/Drawer--aEf7OiI.js +0 -109
- package/dist/Drawer-BEDZEapD.cjs +0 -1
- package/dist/Dropdown-FrlX_2wd.js +0 -332
- package/dist/Dropdown-dvIwbqMc.cjs +0 -1
- package/dist/Form-CGJDPj0N.js +0 -446
- package/dist/Form-lygZzVRZ.cjs +0 -1
- package/dist/Image-D7FGl2cQ.cjs +0 -1
- package/dist/Image-DJb-tcA-.js +0 -295
- package/dist/Input-BI-gwi8w.cjs +0 -1
- package/dist/Input-CoS-XMv1.js +0 -113
- package/dist/Layout-CJpTIRSF.cjs +0 -1
- package/dist/Layout-l-rfDdFR.js +0 -60
- package/dist/List-DAkXmKFR.cjs +0 -1
- package/dist/Loading-C9LBGbnd.js +0 -45
- package/dist/Loading-CRhiY3Ok.cjs +0 -1
- package/dist/Menu-CsGCo2ck.cjs +0 -1
- package/dist/Menu-t8GRH6oh.js +0 -168
- package/dist/Message-Bo-hPakI.js +0 -170
- package/dist/Message-D2WGz_wk.cjs +0 -1
- package/dist/MessageBox-CaTZOiZC.js +0 -145
- package/dist/MessageBox-D9rZAvhY.cjs +0 -1
- package/dist/Modal-BTMB0xbR.js +0 -250
- package/dist/Modal-ToC7SNzp.cjs +0 -1
- package/dist/Notification-C1lOX5Hn.js +0 -187
- package/dist/Notification-DK5jP-kX.cjs +0 -1
- package/dist/NumberInput-CB-nKZgs.js +0 -134
- package/dist/NumberInput-Dp1vTDkW.cjs +0 -1
- package/dist/Pagination-D_SAnFOA.cjs +0 -1
- package/dist/Pagination-fbC5EEq-.js +0 -166
- package/dist/Popconfirm-CQ59-YOh.cjs +0 -1
- package/dist/Popconfirm-D2zgbhKF.js +0 -91
- package/dist/Popover-Cb8BrtQC.js +0 -232
- package/dist/Popover-Dqrb-lKh.cjs +0 -1
- package/dist/Progress-D2C6LCml.js +0 -40
- package/dist/Progress-DTAjlgwZ.cjs +0 -1
- package/dist/RadioGroup-DTodR0VJ.cjs +0 -1
- package/dist/RadioGroup-DYjQMXdB.js +0 -136
- package/dist/Result-C3RqWqnc.cjs +0 -1
- package/dist/Scrollbar-BdMGZrYi.js +0 -235
- package/dist/Scrollbar-CEQT6Ao_.cjs +0 -1
- package/dist/Segmented-CQ18snYg.cjs +0 -1
- package/dist/Segmented-OykaARP4.js +0 -39
- package/dist/Select-CpoP5kRp.js +0 -504
- package/dist/Select-D8udcz4F.cjs +0 -1
- package/dist/Sidebar-2KVVRUEM.cjs +0 -1
- package/dist/Sidebar-ByLinOVm.js +0 -77
- package/dist/Slider-CKU03SsT.js +0 -256
- package/dist/Slider-CU9OS2HB.cjs +0 -1
- package/dist/Space-DJGRG2rt.cjs +0 -1
- package/dist/Steps-B9phXfUl.cjs +0 -1
- package/dist/Switch-CpXDMcPW.cjs +0 -1
- package/dist/Switch-CqTFvp-k.js +0 -58
- package/dist/Table-DMqVnyDN.js +0 -534
- package/dist/Table-rgp7iAWc.cjs +0 -1
- package/dist/Tabs-BZ0Zc0bL.cjs +0 -1
- package/dist/Tabs-HWLkyrQR.js +0 -106
- package/dist/Tag-4iZGcfrg.cjs +0 -1
- package/dist/Tag-TeYTDdHt.js +0 -51
- package/dist/Textarea-CA6Vzu7t.js +0 -68
- package/dist/Textarea-CEhAvE10.cjs +0 -1
- package/dist/TimePicker-BydMgSVN.js +0 -220
- package/dist/TimePicker-t4eGpNEu.cjs +0 -1
- package/dist/Timeline-ROggEQnD.cjs +0 -1
- package/dist/Tooltip-CWQDc8Nf.js +0 -201
- package/dist/Tooltip-Cn9pIMfU.cjs +0 -1
- package/dist/Transfer-BRjVUdyi.js +0 -115
- package/dist/Transfer-BfWsmx_x.cjs +0 -1
- package/dist/Transition-BBMxZ5_8.cjs +0 -1
- package/dist/Transition-CJDv6yI5.js +0 -125
- package/dist/Tree-BsG6l54c.js +0 -202
- package/dist/Tree-CcSMb0_M.cjs +0 -1
- package/dist/TreeSelect-DBJkW7zM.cjs +0 -1
- package/dist/TreeSelect-DWmDo7pg.js +0 -120
- package/dist/Typography-C9Ef3jN5.js +0 -91
- package/dist/Typography-DLrh1jPn.cjs +0 -1
- package/dist/Upload-aLdxGpWh.js +0 -184
- package/dist/Upload-wt5lnQHc.cjs +0 -1
- package/dist/choice-popup-Crn_uZzu.cjs +0 -1
- package/dist/choice-popup-CzxryGs6.js +0 -168
- package/dist/date-picker-BUZofYHp.js +0 -644
- package/dist/date-picker-CDbRvH7g.cjs +0 -1
- package/dist/dialog-shell-HPbp3xhc.cjs +0 -1
- package/dist/icon-Cbvuv4yF.js +0 -25
- package/dist/icon-DRLyKu8p.cjs +0 -1
- package/dist/layer-B9unaPbV.js +0 -109
- package/dist/layer-BcLkE2NM.cjs +0 -1
- package/dist/refs-D5IYOBaf.js +0 -14
- package/dist/refs-DCqd87V8.cjs +0 -1
- package/dist/registry-BFCksD7k.js +0 -131
- package/dist/registry-DftkiQnN.cjs +0 -1
- package/dist/time-wheel-BaCcA9nk.cjs +0 -1
- package/dist/time-wheel-BtvYZI6H.js +0 -291
|
@@ -6,13 +6,13 @@ export type UploadListType = 'text' | 'picture';
|
|
|
6
6
|
export type UploadSize = 'sm' | 'md' | 'lg';
|
|
7
7
|
/** Upload 展示与表单绑定的文件项。 */
|
|
8
8
|
export interface UploadFile {
|
|
9
|
-
/**
|
|
9
|
+
/** 文件项必需的稳定标识;原生选择的文件由组件生成,回填列表由调用方提供。 */
|
|
10
10
|
uid: string;
|
|
11
11
|
name: string;
|
|
12
12
|
size?: number;
|
|
13
13
|
type?: string;
|
|
14
14
|
status?: UploadFileStatus;
|
|
15
|
-
/**
|
|
15
|
+
/** 上传进度百分比;uploading 时夹取到 0-100,未提供或 NaN 时不渲染进度条。 */
|
|
16
16
|
percent?: number;
|
|
17
17
|
/** 可预览地址;listType 为 picture 时作为缩略图 src。 */
|
|
18
18
|
url?: string;
|
|
@@ -25,18 +25,21 @@ export interface UploadFile {
|
|
|
25
25
|
*
|
|
26
26
|
* Upload 不内置网络请求,onChange 把规范化后的文件列表交给调用方,
|
|
27
27
|
* 这样同一控件既可直接放进 Form,也可接入任意上传 SDK。
|
|
28
|
+
* 根 ref 指向 div;id、ARIA 名称/说明和校验状态用于真实选择按钮,hidden 隐藏整个组件。
|
|
28
29
|
*/
|
|
29
30
|
export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onChange' | 'onDrop' | 'defaultValue'> {
|
|
30
31
|
value?: UploadFile[];
|
|
31
32
|
defaultValue?: UploadFile[];
|
|
32
33
|
accept?: string;
|
|
33
34
|
multiple?: boolean;
|
|
35
|
+
/** 禁用选择与拖拽,结束未提交的校验会话;已选列表仍可预览和移除。 */
|
|
34
36
|
disabled?: boolean;
|
|
35
37
|
/** 是否启用拖拽投递区域。 */
|
|
36
38
|
drag?: boolean;
|
|
37
39
|
/**
|
|
38
40
|
* 最多保留的文件数量,仅在 multiple 为 true 时生效;超出的选择会被忽略并触发 onExceed。
|
|
39
41
|
* 达到上限后触发器变为 disabled,避免用户选完文件才被拒绝。
|
|
42
|
+
* 小数向下取整,负值归零;undefined / NaN / 正无穷表示不限数量。
|
|
40
43
|
*/
|
|
41
44
|
maxCount?: number;
|
|
42
45
|
listType?: UploadListType;
|
|
@@ -50,6 +53,7 @@ export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'child
|
|
|
50
53
|
/**
|
|
51
54
|
* 在文件进入列表前逐个校验;返回 false(或 Promise<false>)会拒绝该文件,抛错同样按拒绝处理。
|
|
52
55
|
* 第二个参数是本次选择中通过数量限制的候选文件,不是已在列表中的文件。
|
|
56
|
+
* 候选按顺序校验,提交使用最新模式、数量限制与受控列表;禁用、隐藏或卸载后忽略迟到结果。
|
|
53
57
|
*/
|
|
54
58
|
beforeUpload?: (file: File, candidates: File[]) => boolean | Promise<boolean>;
|
|
55
59
|
onChange?: (fileList: UploadFile[]) => void;
|
|
@@ -6,13 +6,13 @@ export type UploadListType = 'text' | 'picture';
|
|
|
6
6
|
export type UploadSize = 'sm' | 'md' | 'lg';
|
|
7
7
|
/** Upload 展示与表单绑定的文件项。 */
|
|
8
8
|
export interface UploadFile {
|
|
9
|
-
/**
|
|
9
|
+
/** 文件项必需的稳定标识;原生选择的文件由组件生成,回填列表由调用方提供。 */
|
|
10
10
|
uid: string;
|
|
11
11
|
name: string;
|
|
12
12
|
size?: number;
|
|
13
13
|
type?: string;
|
|
14
14
|
status?: UploadFileStatus;
|
|
15
|
-
/**
|
|
15
|
+
/** 上传进度百分比;uploading 时夹取到 0-100,未提供或 NaN 时不渲染进度条。 */
|
|
16
16
|
percent?: number;
|
|
17
17
|
/** 可预览地址;listType 为 picture 时作为缩略图 src。 */
|
|
18
18
|
url?: string;
|
|
@@ -25,18 +25,21 @@ export interface UploadFile {
|
|
|
25
25
|
*
|
|
26
26
|
* Upload 不内置网络请求,onChange 把规范化后的文件列表交给调用方,
|
|
27
27
|
* 这样同一控件既可直接放进 Form,也可接入任意上传 SDK。
|
|
28
|
+
* 根 ref 指向 div;id、ARIA 名称/说明和校验状态用于真实选择按钮,hidden 隐藏整个组件。
|
|
28
29
|
*/
|
|
29
30
|
export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'onChange' | 'onDrop' | 'defaultValue'> {
|
|
30
31
|
value?: UploadFile[];
|
|
31
32
|
defaultValue?: UploadFile[];
|
|
32
33
|
accept?: string;
|
|
33
34
|
multiple?: boolean;
|
|
35
|
+
/** 禁用选择与拖拽,结束未提交的校验会话;已选列表仍可预览和移除。 */
|
|
34
36
|
disabled?: boolean;
|
|
35
37
|
/** 是否启用拖拽投递区域。 */
|
|
36
38
|
drag?: boolean;
|
|
37
39
|
/**
|
|
38
40
|
* 最多保留的文件数量,仅在 multiple 为 true 时生效;超出的选择会被忽略并触发 onExceed。
|
|
39
41
|
* 达到上限后触发器变为 disabled,避免用户选完文件才被拒绝。
|
|
42
|
+
* 小数向下取整,负值归零;undefined / NaN / 正无穷表示不限数量。
|
|
40
43
|
*/
|
|
41
44
|
maxCount?: number;
|
|
42
45
|
listType?: UploadListType;
|
|
@@ -50,6 +53,7 @@ export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'child
|
|
|
50
53
|
/**
|
|
51
54
|
* 在文件进入列表前逐个校验;返回 false(或 Promise<false>)会拒绝该文件,抛错同样按拒绝处理。
|
|
52
55
|
* 第二个参数是本次选择中通过数量限制的候选文件,不是已在列表中的文件。
|
|
56
|
+
* 候选按顺序校验,提交使用最新模式、数量限制与受控列表;禁用、隐藏或卸载后忽略迟到结果。
|
|
53
57
|
*/
|
|
54
58
|
beforeUpload?: (file: File, candidates: File[]) => boolean | Promise<boolean>;
|
|
55
59
|
onChange?: (fileList: UploadFile[]) => void;
|
|
@@ -8,14 +8,18 @@ interface ChoicePopupOptions {
|
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
triggerRef: RefObject<HTMLElement | null>;
|
|
10
10
|
placement?: CornerPlacement;
|
|
11
|
+
/** 时间选择器保留可配置间距,其他选择控件继续使用默认 8px。 */
|
|
12
|
+
offset?: number;
|
|
11
13
|
zIndex?: number;
|
|
12
14
|
/** AutoComplete 保持输入焦点;树/级联面板则把焦点交给搜索框或第一项。 */
|
|
13
15
|
focusOnOpen: boolean;
|
|
14
16
|
}
|
|
15
17
|
/** 选择面板共享定位与焦点生命周期;值模型留在各控件内,避免把树、路径和自由文本混为一体。 */
|
|
16
|
-
export declare const useChoicePopup: ({ open: openProp, defaultOpen, controlled, onOpenChange, disabled, triggerRef, placement, zIndex, focusOnOpen }: ChoicePopupOptions) => {
|
|
18
|
+
export declare const useChoicePopup: ({ open: openProp, defaultOpen, controlled, onOpenChange, disabled, triggerRef, placement, offset, zIndex, focusOnOpen }: ChoicePopupOptions) => {
|
|
17
19
|
open: boolean;
|
|
18
20
|
setOpen: (next: boolean, restoreFocus?: boolean) => void;
|
|
21
|
+
inactive: boolean;
|
|
22
|
+
isUnavailable: () => boolean;
|
|
19
23
|
ready: boolean;
|
|
20
24
|
rootRef: RefObject<HTMLDivElement | null>;
|
|
21
25
|
panelRef: RefObject<HTMLDivElement | null>;
|
|
@@ -8,14 +8,18 @@ interface ChoicePopupOptions {
|
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
triggerRef: RefObject<HTMLElement | null>;
|
|
10
10
|
placement?: CornerPlacement;
|
|
11
|
+
/** 时间选择器保留可配置间距,其他选择控件继续使用默认 8px。 */
|
|
12
|
+
offset?: number;
|
|
11
13
|
zIndex?: number;
|
|
12
14
|
/** AutoComplete 保持输入焦点;树/级联面板则把焦点交给搜索框或第一项。 */
|
|
13
15
|
focusOnOpen: boolean;
|
|
14
16
|
}
|
|
15
17
|
/** 选择面板共享定位与焦点生命周期;值模型留在各控件内,避免把树、路径和自由文本混为一体。 */
|
|
16
|
-
export declare const useChoicePopup: ({ open: openProp, defaultOpen, controlled, onOpenChange, disabled, triggerRef, placement, zIndex, focusOnOpen }: ChoicePopupOptions) => {
|
|
18
|
+
export declare const useChoicePopup: ({ open: openProp, defaultOpen, controlled, onOpenChange, disabled, triggerRef, placement, offset, zIndex, focusOnOpen }: ChoicePopupOptions) => {
|
|
17
19
|
open: boolean;
|
|
18
20
|
setOpen: (next: boolean, restoreFocus?: boolean) => void;
|
|
21
|
+
inactive: boolean;
|
|
22
|
+
isUnavailable: () => boolean;
|
|
19
23
|
ready: boolean;
|
|
20
24
|
rootRef: RefObject<HTMLDivElement | null>;
|
|
21
25
|
panelRef: RefObject<HTMLDivElement | null>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { KeyboardEvent } from 'react';
|
|
2
1
|
interface DateCalendarProps {
|
|
3
2
|
classPrefix: string;
|
|
4
3
|
month: Date;
|
|
@@ -7,14 +6,16 @@ interface DateCalendarProps {
|
|
|
7
6
|
rangeValue: [Date | null, Date | null];
|
|
8
7
|
previewDate: Date | null;
|
|
9
8
|
selectedDate: Date | null;
|
|
9
|
+
focusedDate: Date | null;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
onFocusDate: (date: Date) => void;
|
|
10
12
|
isDateDisabled: (date: Date) => boolean;
|
|
11
13
|
onSelect: (date: Date) => void;
|
|
12
|
-
onKeyDown: (event: KeyboardEvent<HTMLButtonElement>, date: Date) => void;
|
|
13
14
|
onPreview: (date: Date | null) => void;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* 日期格与禁用判断留在 Transition 的子组件内,关闭后不再构建整月内容,离场期间仍保留原节点。
|
|
17
18
|
* 月份未变时复用日期数组;范围预览只更新视觉状态,不重新分配同一批日期对象。
|
|
18
19
|
*/
|
|
19
|
-
declare const DateCalendar: ({ classPrefix, month, monthLabel, range, rangeValue, previewDate, selectedDate, isDateDisabled, onSelect,
|
|
20
|
+
declare const DateCalendar: ({ classPrefix, month, monthLabel, range, rangeValue, previewDate, selectedDate, focusedDate, disabled, onFocusDate, isDateDisabled, onSelect, onPreview }: DateCalendarProps) => import("react").JSX.Element;
|
|
20
21
|
export default DateCalendar;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { KeyboardEvent } from 'react';
|
|
2
1
|
interface DateCalendarProps {
|
|
3
2
|
classPrefix: string;
|
|
4
3
|
month: Date;
|
|
@@ -7,14 +6,16 @@ interface DateCalendarProps {
|
|
|
7
6
|
rangeValue: [Date | null, Date | null];
|
|
8
7
|
previewDate: Date | null;
|
|
9
8
|
selectedDate: Date | null;
|
|
9
|
+
focusedDate: Date | null;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
onFocusDate: (date: Date) => void;
|
|
10
12
|
isDateDisabled: (date: Date) => boolean;
|
|
11
13
|
onSelect: (date: Date) => void;
|
|
12
|
-
onKeyDown: (event: KeyboardEvent<HTMLButtonElement>, date: Date) => void;
|
|
13
14
|
onPreview: (date: Date | null) => void;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* 日期格与禁用判断留在 Transition 的子组件内,关闭后不再构建整月内容,离场期间仍保留原节点。
|
|
17
18
|
* 月份未变时复用日期数组;范围预览只更新视觉状态,不重新分配同一批日期对象。
|
|
18
19
|
*/
|
|
19
|
-
declare const DateCalendar: ({ classPrefix, month, monthLabel, range, rangeValue, previewDate, selectedDate, isDateDisabled, onSelect,
|
|
20
|
+
declare const DateCalendar: ({ classPrefix, month, monthLabel, range, rangeValue, previewDate, selectedDate, focusedDate, disabled, onFocusDate, isDateDisabled, onSelect, onPreview }: DateCalendarProps) => import("react").JSX.Element;
|
|
20
21
|
export default DateCalendar;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* React ref 的小型互操作层。
|
|
3
3
|
*
|
|
4
|
-
* 组件经常需要同时保留内部 DOM ref 与转发调用方 ref。React
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* 组件经常需要同时保留内部 DOM ref 与转发调用方 ref。React 18 在卸载时传 null,React 19 还允许
|
|
5
|
+
* callback ref 返回清理函数。这里统一对象、普通回调和 cleanup 回调的释放约定,不缓存合并后的函数,
|
|
6
|
+
* 调用方若依赖引用稳定性应在组件内使用 useMemo。
|
|
7
7
|
*/
|
|
8
8
|
import type { Ref, RefCallback } from 'react';
|
|
9
9
|
/**
|
|
10
10
|
* 统一写入 callback ref 和 object ref。
|
|
11
|
-
*
|
|
11
|
+
* 返回 callback ref 提供的清理函数,由调用方负责配对执行;需要完整的挂载/释放管理时使用 mergeRefs。
|
|
12
12
|
*/
|
|
13
|
-
export declare const assignRef: <T>(ref: Ref<T> | undefined, value: T | null) => void;
|
|
13
|
+
export declare const assignRef: <T>(ref: Ref<T> | undefined, value: T | null) => void | (() => void);
|
|
14
14
|
/**
|
|
15
15
|
* 将多个 ref 合并为同一个 callback ref,并按声明顺序同步写入相同节点。
|
|
16
16
|
* 返回函数本身不会自动保持引用稳定,组件应根据外部 ref 的变化决定是否 memoize。
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* React ref 的小型互操作层。
|
|
3
3
|
*
|
|
4
|
-
* 组件经常需要同时保留内部 DOM ref 与转发调用方 ref。React
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* 组件经常需要同时保留内部 DOM ref 与转发调用方 ref。React 18 在卸载时传 null,React 19 还允许
|
|
5
|
+
* callback ref 返回清理函数。这里统一对象、普通回调和 cleanup 回调的释放约定,不缓存合并后的函数,
|
|
6
|
+
* 调用方若依赖引用稳定性应在组件内使用 useMemo。
|
|
7
7
|
*/
|
|
8
8
|
import type { Ref, RefCallback } from 'react';
|
|
9
9
|
/**
|
|
10
10
|
* 统一写入 callback ref 和 object ref。
|
|
11
|
-
*
|
|
11
|
+
* 返回 callback ref 提供的清理函数,由调用方负责配对执行;需要完整的挂载/释放管理时使用 mergeRefs。
|
|
12
12
|
*/
|
|
13
|
-
export declare const assignRef: <T>(ref: Ref<T> | undefined, value: T | null) => void;
|
|
13
|
+
export declare const assignRef: <T>(ref: Ref<T> | undefined, value: T | null) => void | (() => void);
|
|
14
14
|
/**
|
|
15
15
|
* 将多个 ref 合并为同一个 callback ref,并按声明顺序同步写入相同节点。
|
|
16
16
|
* 返回函数本身不会自动保持引用稳定,组件应根据外部 ref 的变化决定是否 memoize。
|
|
@@ -13,6 +13,8 @@ interface TimeWheelValue {
|
|
|
13
13
|
interface TimeWheelProps {
|
|
14
14
|
/** 当前选中的时分秒值 */
|
|
15
15
|
value: TimeWheelValue;
|
|
16
|
+
/** 空时间仍显示零时光标,但点击 00 应能首次选中午夜;不伪造已选项。 */
|
|
17
|
+
hasValue?: boolean;
|
|
16
18
|
/** 是否禁用整个时间滚轮组件 */
|
|
17
19
|
disabled?: boolean;
|
|
18
20
|
/** 无障碍说明标签 */
|
|
@@ -30,5 +32,5 @@ interface TimeWheelProps {
|
|
|
30
32
|
* iOS 风格的时、分、秒滚轮。原生滚动负责鼠标滚轮和触摸惯性,组件只在滚动
|
|
31
33
|
* 停止后做吸附、禁用项跳过和循环周期归位,避免自定义拖拽破坏浏览器手势体验。
|
|
32
34
|
*/
|
|
33
|
-
declare const TimeWheel: ({ value, disabled, ariaLabel, visibleItemCount, itemHeight, isOptionDisabled, onChange }: TimeWheelProps) => import("react").JSX.Element;
|
|
35
|
+
declare const TimeWheel: ({ value, hasValue, disabled, ariaLabel, visibleItemCount, itemHeight, isOptionDisabled, onChange }: TimeWheelProps) => import("react").JSX.Element;
|
|
34
36
|
export default TimeWheel;
|
|
@@ -13,6 +13,8 @@ interface TimeWheelValue {
|
|
|
13
13
|
interface TimeWheelProps {
|
|
14
14
|
/** 当前选中的时分秒值 */
|
|
15
15
|
value: TimeWheelValue;
|
|
16
|
+
/** 空时间仍显示零时光标,但点击 00 应能首次选中午夜;不伪造已选项。 */
|
|
17
|
+
hasValue?: boolean;
|
|
16
18
|
/** 是否禁用整个时间滚轮组件 */
|
|
17
19
|
disabled?: boolean;
|
|
18
20
|
/** 无障碍说明标签 */
|
|
@@ -30,5 +32,5 @@ interface TimeWheelProps {
|
|
|
30
32
|
* iOS 风格的时、分、秒滚轮。原生滚动负责鼠标滚轮和触摸惯性,组件只在滚动
|
|
31
33
|
* 停止后做吸附、禁用项跳过和循环周期归位,避免自定义拖拽破坏浏览器手势体验。
|
|
32
34
|
*/
|
|
33
|
-
declare const TimeWheel: ({ value, disabled, ariaLabel, visibleItemCount, itemHeight, isOptionDisabled, onChange }: TimeWheelProps) => import("react").JSX.Element;
|
|
35
|
+
declare const TimeWheel: ({ value, hasValue, disabled, ariaLabel, visibleItemCount, itemHeight, isOptionDisabled, onChange }: TimeWheelProps) => import("react").JSX.Element;
|
|
34
36
|
export default TimeWheel;
|
|
@@ -35,7 +35,7 @@ export declare const globalComponents: {
|
|
|
35
35
|
readonly VlDropdown: import("react").ForwardRefExoticComponent<import("./Dropdown/index.cjs").DropdownProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
36
|
readonly VlEmpty: import("react").ForwardRefExoticComponent<import("./Empty/index.cjs").EmptyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
37
37
|
readonly VlForm: import("./Form/index.cjs").FormComponent & {
|
|
38
|
-
Item: import("react").ForwardRefExoticComponent<import("./Form/index.cjs").FormItemProps & import("react").RefAttributes<HTMLDivElement
|
|
38
|
+
Item: import("react").ForwardRefExoticComponent<import("./Form/index.cjs").FormItemProps<import("./Form/index.cjs").FormValues> & import("react").RefAttributes<HTMLDivElement>> & (<V extends import("./Form/index.cjs").FormValues = import("./Form/index.cjs").FormValues>(props: import("./Form/index.cjs").FormItemProps<V> & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement);
|
|
39
39
|
};
|
|
40
40
|
readonly VlImage: import("react").ForwardRefExoticComponent<import("./Image/index.cjs").ImageProps & import("react").RefAttributes<HTMLImageElement>>;
|
|
41
41
|
readonly VlInput: import("react").ForwardRefExoticComponent<import("./Input/index.cjs").InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -70,7 +70,7 @@ export declare const globalComponents: {
|
|
|
70
70
|
displayName?: string;
|
|
71
71
|
};
|
|
72
72
|
readonly VlTabs: import("react").ForwardRefExoticComponent<import("./Tabs/index.cjs").TabsProps & import("react").RefAttributes<import("./Tabs/index.cjs").TabsRef>>;
|
|
73
|
-
readonly VlTag: import("react").
|
|
73
|
+
readonly VlTag: <T extends import("react").ElementType = "span">(props: import("./Tag/index.cjs").TagProps<T> & import("react").RefAttributes<import("react").ComponentRef<T>>) => import("react").ReactElement | null;
|
|
74
74
|
readonly VlTextarea: import("react").ForwardRefExoticComponent<import("./Textarea/index.cjs").TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
75
75
|
readonly VlTimeline: import("react").ForwardRefExoticComponent<import("./Timeline/index.cjs").TimelineProps & import("react").RefAttributes<HTMLOListElement>>;
|
|
76
76
|
readonly VlTimePicker: import("react").ForwardRefExoticComponent<import("./TimePicker/index.cjs").TimePickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/types/registry.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare const globalComponents: {
|
|
|
35
35
|
readonly VlDropdown: import("react").ForwardRefExoticComponent<import("./Dropdown/index.js").DropdownProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
36
|
readonly VlEmpty: import("react").ForwardRefExoticComponent<import("./Empty/index.js").EmptyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
37
37
|
readonly VlForm: import("./Form/index.js").FormComponent & {
|
|
38
|
-
Item: import("react").ForwardRefExoticComponent<import("./Form/index.js").FormItemProps & import("react").RefAttributes<HTMLDivElement
|
|
38
|
+
Item: import("react").ForwardRefExoticComponent<import("./Form/index.js").FormItemProps<import("./Form/index.js").FormValues> & import("react").RefAttributes<HTMLDivElement>> & (<V extends import("./Form/index.js").FormValues = import("./Form/index.js").FormValues>(props: import("./Form/index.js").FormItemProps<V> & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement);
|
|
39
39
|
};
|
|
40
40
|
readonly VlImage: import("react").ForwardRefExoticComponent<import("./Image/index.js").ImageProps & import("react").RefAttributes<HTMLImageElement>>;
|
|
41
41
|
readonly VlInput: import("react").ForwardRefExoticComponent<import("./Input/index.js").InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -70,7 +70,7 @@ export declare const globalComponents: {
|
|
|
70
70
|
displayName?: string;
|
|
71
71
|
};
|
|
72
72
|
readonly VlTabs: import("react").ForwardRefExoticComponent<import("./Tabs/index.js").TabsProps & import("react").RefAttributes<import("./Tabs/index.js").TabsRef>>;
|
|
73
|
-
readonly VlTag: import("react").
|
|
73
|
+
readonly VlTag: <T extends import("react").ElementType = "span">(props: import("./Tag/index.js").TagProps<T> & import("react").RefAttributes<import("react").ComponentRef<T>>) => import("react").ReactElement | null;
|
|
74
74
|
readonly VlTextarea: import("react").ForwardRefExoticComponent<import("./Textarea/index.js").TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
75
75
|
readonly VlTimeline: import("react").ForwardRefExoticComponent<import("./Timeline/index.js").TimelineProps & import("react").RefAttributes<HTMLOListElement>>;
|
|
76
76
|
readonly VlTimePicker: import("react").ForwardRefExoticComponent<import("./TimePicker/index.js").TimePickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
package/dist/Alert-BGyLKuv0.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./icon-Cbvuv4yF.js";
|
|
2
|
-
import { CircleAlert as t, CircleCheck as n, CircleX as r, Info as i, X as a } from "lucide-react";
|
|
3
|
-
import { forwardRef as o } from "react";
|
|
4
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
-
//#region components/Alert/Alert.tsx
|
|
6
|
-
var l = {
|
|
7
|
-
info: i,
|
|
8
|
-
success: n,
|
|
9
|
-
warning: t,
|
|
10
|
-
error: r
|
|
11
|
-
}, u = o((t, n) => {
|
|
12
|
-
let { status: r = "info", title: i, icon: o, closable: u = !1, onClose: d, className: f, role: p = "alert", children: m, ...h } = t, g = [
|
|
13
|
-
"vl-alert",
|
|
14
|
-
`is-${r}`,
|
|
15
|
-
i ? "has-title" : "is-content-only",
|
|
16
|
-
f || ""
|
|
17
|
-
].filter(Boolean).join(" "), _ = o === void 0 ? l[r] : o, v = (e) => {
|
|
18
|
-
d?.(e);
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ c("div", {
|
|
21
|
-
ref: n,
|
|
22
|
-
className: g,
|
|
23
|
-
role: p,
|
|
24
|
-
...h,
|
|
25
|
-
children: [
|
|
26
|
-
_ ? e(_, "vl-alert__icon") : null,
|
|
27
|
-
/* @__PURE__ */ c("div", {
|
|
28
|
-
className: "vl-alert__body",
|
|
29
|
-
children: [i ? /* @__PURE__ */ s("div", {
|
|
30
|
-
className: "vl-alert__title",
|
|
31
|
-
children: i
|
|
32
|
-
}) : null, m === void 0 ? null : /* @__PURE__ */ s("div", {
|
|
33
|
-
className: "vl-alert__content",
|
|
34
|
-
children: m
|
|
35
|
-
})]
|
|
36
|
-
}),
|
|
37
|
-
u ? /* @__PURE__ */ s("button", {
|
|
38
|
-
type: "button",
|
|
39
|
-
className: "vl-alert__close",
|
|
40
|
-
"aria-label": "关闭提示",
|
|
41
|
-
onClick: v,
|
|
42
|
-
children: /* @__PURE__ */ s(a, { "aria-hidden": "true" })
|
|
43
|
-
}) : null
|
|
44
|
-
]
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
u.displayName = "VlAlert";
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region components/Alert/index.ts
|
|
50
|
-
var d = u, f = u;
|
|
51
|
-
//#endregion
|
|
52
|
-
export { d as n, f as t };
|
package/dist/Alert-tPSJmCXK.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./icon-DRLyKu8p.cjs");let t=require("lucide-react"),n=require("react"),r=require("react/jsx-runtime");var i={info:t.Info,success:t.CircleCheck,warning:t.CircleAlert,error:t.CircleX},a=(0,n.forwardRef)((n,a)=>{let{status:o=`info`,title:s,icon:c,closable:l=!1,onClose:u,className:d,role:f=`alert`,children:p,...m}=n,h=[`vl-alert`,`is-${o}`,s?`has-title`:`is-content-only`,d||``].filter(Boolean).join(` `),g=c===void 0?i[o]:c,_=e=>{u?.(e)};return(0,r.jsxs)(`div`,{ref:a,className:h,role:f,...m,children:[g?e.t(g,`vl-alert__icon`):null,(0,r.jsxs)(`div`,{className:`vl-alert__body`,children:[s?(0,r.jsx)(`div`,{className:`vl-alert__title`,children:s}):null,p===void 0?null:(0,r.jsx)(`div`,{className:`vl-alert__content`,children:p})]}),l?(0,r.jsx)(`button`,{type:`button`,className:`vl-alert__close`,"aria-label":`关闭提示`,onClick:_,children:(0,r.jsx)(t.X,{"aria-hidden":`true`})}):null]})});a.displayName=`VlAlert`;var o=a,s=a;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
package/dist/Anchor-CAZPkv56.js
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./effect-nifYL_rH.js";
|
|
2
|
-
import { n as t, t as n } from "./state-BSDh-Ob2.js";
|
|
3
|
-
import { forwardRef as r, useCallback as i, useEffect as a, useImperativeHandle as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
4
|
-
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
|
-
//#region components/Anchor/Anchor.tsx
|
|
6
|
-
var f = (e) => e.flatMap((e) => [e, ...e.children ? f(e.children) : []]), p = (e) => e.startsWith("#") && e.length > 1, m = (e) => {
|
|
7
|
-
if (!p(e)) return null;
|
|
8
|
-
try {
|
|
9
|
-
return decodeURIComponent(e.slice(1));
|
|
10
|
-
} catch {
|
|
11
|
-
return e.slice(1);
|
|
12
|
-
}
|
|
13
|
-
}, h = (e) => typeof e == "function" ? e() : e ?? null, g = (e) => e[0]?.href, _ = (e, t) => !!(t && e?.some((e) => e.href === t || _(e.children, t))), v = r((r, p) => {
|
|
14
|
-
let { items: v = [], title: y, activeHref: b, defaultActiveHref: x, getContainer: S, offsetTop: C = 0, scrollBehavior: w = "smooth", className: T, id: E, "aria-label": D = "锚点导航", onChange: O, ...k } = r, A = c(null), [j, M] = l(0), [N, P] = l({
|
|
15
|
-
top: 0,
|
|
16
|
-
height: 0
|
|
17
|
-
}), F = s(() => f(v), [v]), I = n(r, "activeHref"), L = s(() => {
|
|
18
|
-
if (typeof window < "u") {
|
|
19
|
-
let e = window.location.hash;
|
|
20
|
-
if (e && F.some((t) => t.href === e)) return e;
|
|
21
|
-
}
|
|
22
|
-
return x ?? g(F);
|
|
23
|
-
}, [x, F]), [R, z] = t({
|
|
24
|
-
value: b,
|
|
25
|
-
defaultValue: L,
|
|
26
|
-
controlled: I,
|
|
27
|
-
onChange: (e) => {
|
|
28
|
-
e !== void 0 && O?.(e);
|
|
29
|
-
}
|
|
30
|
-
}), B = c(R), V = c(z), H = c(/* @__PURE__ */ new Map()), U = c(void 0);
|
|
31
|
-
a(() => {
|
|
32
|
-
B.current = R, V.current = z;
|
|
33
|
-
}, [R, z]);
|
|
34
|
-
let W = i((e) => {
|
|
35
|
-
!e || e === B.current || (B.current = e, V.current(e));
|
|
36
|
-
}, []), G = i(() => h(S), [S]), K = i(() => {
|
|
37
|
-
if (typeof document > "u") return;
|
|
38
|
-
let e = G(), t = e?.getBoundingClientRect(), n = (t?.top ?? 0) + Math.max(0, C), r = t?.bottom ?? window.innerHeight, i = F.map((e) => {
|
|
39
|
-
let t = m(e.href), n = t ? document.getElementById(t) : null;
|
|
40
|
-
return n ? {
|
|
41
|
-
href: e.href,
|
|
42
|
-
top: n.getBoundingClientRect().top
|
|
43
|
-
} : null;
|
|
44
|
-
}).filter((e) => !!e);
|
|
45
|
-
if (!i.length) return;
|
|
46
|
-
if (e ? e.scrollTop + e.clientHeight >= e.scrollHeight - 1 : window.scrollY + window.innerHeight >= document.documentElement.scrollHeight - 1) {
|
|
47
|
-
W(i[i.length - 1]?.href);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
let a = i.filter((e) => e.top <= n + (r - n) * .3), o = (a.length ? a[a.length - 1] : i[0])?.href;
|
|
51
|
-
W(o);
|
|
52
|
-
}, [
|
|
53
|
-
F,
|
|
54
|
-
C,
|
|
55
|
-
G,
|
|
56
|
-
W
|
|
57
|
-
]);
|
|
58
|
-
a(() => {
|
|
59
|
-
if (typeof document > "u") return;
|
|
60
|
-
let e = G(), t = e ?? window, n = F.map((e) => {
|
|
61
|
-
let t = m(e.href);
|
|
62
|
-
return t ? document.getElementById(t) : null;
|
|
63
|
-
}).filter((e) => !!e);
|
|
64
|
-
if (!n.length) return;
|
|
65
|
-
if (t.addEventListener("scroll", K, { passive: !0 }), K(), typeof IntersectionObserver > "u") return () => t.removeEventListener("scroll", K);
|
|
66
|
-
let r = new IntersectionObserver(K, {
|
|
67
|
-
root: e ?? null,
|
|
68
|
-
rootMargin: `-${Math.max(0, C)}px 0px -70% 0px`,
|
|
69
|
-
threshold: [0, 1]
|
|
70
|
-
});
|
|
71
|
-
return n.forEach((e) => r.observe(e)), () => {
|
|
72
|
-
r.disconnect(), t.removeEventListener("scroll", K);
|
|
73
|
-
};
|
|
74
|
-
}, [
|
|
75
|
-
F,
|
|
76
|
-
C,
|
|
77
|
-
j,
|
|
78
|
-
G,
|
|
79
|
-
K
|
|
80
|
-
]), a(() => {
|
|
81
|
-
if (typeof window > "u") return;
|
|
82
|
-
let e = () => {
|
|
83
|
-
let e = F.some((e) => e.href === window.location.hash) ? window.location.hash : void 0;
|
|
84
|
-
W(e);
|
|
85
|
-
};
|
|
86
|
-
return window.addEventListener("hashchange", e), () => window.removeEventListener("hashchange", e);
|
|
87
|
-
}, [F, W]), a(() => {
|
|
88
|
-
I || R && F.some((e) => e.href === R) || W(g(F));
|
|
89
|
-
}, [
|
|
90
|
-
R,
|
|
91
|
-
F,
|
|
92
|
-
I,
|
|
93
|
-
W
|
|
94
|
-
]);
|
|
95
|
-
let q = i(() => M((e) => e + 1), []);
|
|
96
|
-
o(p, () => ({ refresh: q }), [q]);
|
|
97
|
-
let J = i(() => {
|
|
98
|
-
let e = A.current, t = R ? H.current.get(R) : void 0;
|
|
99
|
-
if (!e || !t) return;
|
|
100
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
|
|
101
|
-
top: r.top - n.top,
|
|
102
|
-
height: r.height
|
|
103
|
-
};
|
|
104
|
-
P((e) => e.top === i.top && e.height === i.height ? e : i);
|
|
105
|
-
}, [R]), Y = i(() => {
|
|
106
|
-
typeof window > "u" || (U.current !== void 0 && window.cancelAnimationFrame(U.current), U.current = window.requestAnimationFrame(() => {
|
|
107
|
-
U.current = void 0, J();
|
|
108
|
-
}));
|
|
109
|
-
}, [J]);
|
|
110
|
-
e(() => {
|
|
111
|
-
Y();
|
|
112
|
-
let e = A.current;
|
|
113
|
-
if (!e || typeof ResizeObserver > "u") return () => {
|
|
114
|
-
U.current !== void 0 && window.cancelAnimationFrame(U.current);
|
|
115
|
-
};
|
|
116
|
-
let t = new ResizeObserver(Y);
|
|
117
|
-
return t.observe(e), () => {
|
|
118
|
-
t.disconnect(), U.current !== void 0 && window.cancelAnimationFrame(U.current);
|
|
119
|
-
};
|
|
120
|
-
}, [
|
|
121
|
-
F,
|
|
122
|
-
j,
|
|
123
|
-
Y,
|
|
124
|
-
y
|
|
125
|
-
]);
|
|
126
|
-
let X = (e, t) => {
|
|
127
|
-
if (t.defaultPrevented || t.button !== 0 || t.metaKey || t.ctrlKey || t.shiftKey || t.altKey) return;
|
|
128
|
-
let n = m(e.href);
|
|
129
|
-
if (!n || typeof document > "u") return;
|
|
130
|
-
let r = document.getElementById(n);
|
|
131
|
-
if (!r) return;
|
|
132
|
-
t.preventDefault();
|
|
133
|
-
let i = G();
|
|
134
|
-
if (i) {
|
|
135
|
-
let e = r.getBoundingClientRect(), t = i.getBoundingClientRect(), n = Math.max(0, i.scrollTop + e.top - t.top - Math.max(0, C));
|
|
136
|
-
i.scrollTo({
|
|
137
|
-
top: n,
|
|
138
|
-
behavior: w
|
|
139
|
-
});
|
|
140
|
-
} else {
|
|
141
|
-
let e = Math.max(0, window.scrollY + r.getBoundingClientRect().top - Math.max(0, C));
|
|
142
|
-
window.scrollTo({
|
|
143
|
-
top: e,
|
|
144
|
-
behavior: w
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
window.history.pushState(null, "", e.href), W(e.href);
|
|
148
|
-
}, Z = (e) => /* @__PURE__ */ u("ul", {
|
|
149
|
-
className: "vl-anchor__list",
|
|
150
|
-
children: e.map((e) => {
|
|
151
|
-
let t = R === e.href, n = t || _(e.children, R);
|
|
152
|
-
return /* @__PURE__ */ d("li", {
|
|
153
|
-
className: `vl-anchor__item${n ? " is-active" : ""}`,
|
|
154
|
-
children: [/* @__PURE__ */ u("a", {
|
|
155
|
-
ref: (t) => {
|
|
156
|
-
t ? H.current.set(e.href, t) : H.current.delete(e.href), t && e.href === R && Y();
|
|
157
|
-
},
|
|
158
|
-
className: `vl-anchor__link${n ? " is-active" : ""}`,
|
|
159
|
-
href: e.href,
|
|
160
|
-
"aria-current": t ? "location" : void 0,
|
|
161
|
-
onClick: (t) => X(e, t),
|
|
162
|
-
children: e.title
|
|
163
|
-
}), e.children?.length ? Z(e.children) : null]
|
|
164
|
-
}, e.href);
|
|
165
|
-
})
|
|
166
|
-
}), Q = ["vl-anchor", T || ""].filter(Boolean).join(" ");
|
|
167
|
-
return /* @__PURE__ */ d("nav", {
|
|
168
|
-
id: E,
|
|
169
|
-
className: Q,
|
|
170
|
-
"aria-label": D,
|
|
171
|
-
...k,
|
|
172
|
-
children: [y ? /* @__PURE__ */ u("div", {
|
|
173
|
-
className: "vl-anchor__title",
|
|
174
|
-
children: y
|
|
175
|
-
}) : null, /* @__PURE__ */ d("div", {
|
|
176
|
-
ref: A,
|
|
177
|
-
className: "vl-anchor__body",
|
|
178
|
-
children: [/* @__PURE__ */ u("span", {
|
|
179
|
-
className: "vl-anchor__rail",
|
|
180
|
-
"aria-hidden": "true",
|
|
181
|
-
children: /* @__PURE__ */ u("span", {
|
|
182
|
-
className: "vl-anchor__indicator",
|
|
183
|
-
style: {
|
|
184
|
-
top: N.top,
|
|
185
|
-
height: N.height
|
|
186
|
-
}
|
|
187
|
-
})
|
|
188
|
-
}), Z(v)]
|
|
189
|
-
})]
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
v.displayName = "VlAnchor";
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region components/Anchor/index.ts
|
|
195
|
-
var y = v, b = v;
|
|
196
|
-
//#endregion
|
|
197
|
-
export { y as n, b as t };
|
package/dist/Anchor-CmuV1Ump.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./effect-BpNxm_06.cjs"),t=require("./state-BuUx1onZ.cjs");let n=require("react"),r=require("react/jsx-runtime");var i=e=>e.flatMap(e=>[e,...e.children?i(e.children):[]]),a=e=>e.startsWith(`#`)&&e.length>1,o=e=>{if(!a(e))return null;try{return decodeURIComponent(e.slice(1))}catch{return e.slice(1)}},s=e=>typeof e==`function`?e():e??null,c=e=>e[0]?.href,l=(e,t)=>!!(t&&e?.some(e=>e.href===t||l(e.children,t))),u=(0,n.forwardRef)((a,u)=>{let{items:d=[],title:f,activeHref:p,defaultActiveHref:m,getContainer:h,offsetTop:g=0,scrollBehavior:_=`smooth`,className:v,id:y,"aria-label":b=`锚点导航`,onChange:x,...S}=a,C=(0,n.useRef)(null),[w,T]=(0,n.useState)(0),[E,D]=(0,n.useState)({top:0,height:0}),O=(0,n.useMemo)(()=>i(d),[d]),k=t.t(a,`activeHref`),A=(0,n.useMemo)(()=>{if(typeof window<`u`){let e=window.location.hash;if(e&&O.some(t=>t.href===e))return e}return m??c(O)},[m,O]),[j,M]=t.n({value:p,defaultValue:A,controlled:k,onChange:e=>{e!==void 0&&x?.(e)}}),N=(0,n.useRef)(j),P=(0,n.useRef)(M),F=(0,n.useRef)(new Map),I=(0,n.useRef)(void 0);(0,n.useEffect)(()=>{N.current=j,P.current=M},[j,M]);let L=(0,n.useCallback)(e=>{!e||e===N.current||(N.current=e,P.current(e))},[]),R=(0,n.useCallback)(()=>s(h),[h]),z=(0,n.useCallback)(()=>{if(typeof document>`u`)return;let e=R(),t=e?.getBoundingClientRect(),n=(t?.top??0)+Math.max(0,g),r=t?.bottom??window.innerHeight,i=O.map(e=>{let t=o(e.href),n=t?document.getElementById(t):null;return n?{href:e.href,top:n.getBoundingClientRect().top}:null}).filter(e=>!!e);if(!i.length)return;if(e?e.scrollTop+e.clientHeight>=e.scrollHeight-1:window.scrollY+window.innerHeight>=document.documentElement.scrollHeight-1){L(i[i.length-1]?.href);return}let a=i.filter(e=>e.top<=n+(r-n)*.3),s=(a.length?a[a.length-1]:i[0])?.href;L(s)},[O,g,R,L]);(0,n.useEffect)(()=>{if(typeof document>`u`)return;let e=R(),t=e??window,n=O.map(e=>{let t=o(e.href);return t?document.getElementById(t):null}).filter(e=>!!e);if(!n.length)return;if(t.addEventListener(`scroll`,z,{passive:!0}),z(),typeof IntersectionObserver>`u`)return()=>t.removeEventListener(`scroll`,z);let r=new IntersectionObserver(z,{root:e??null,rootMargin:`-${Math.max(0,g)}px 0px -70% 0px`,threshold:[0,1]});return n.forEach(e=>r.observe(e)),()=>{r.disconnect(),t.removeEventListener(`scroll`,z)}},[O,g,w,R,z]),(0,n.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{let e=O.some(e=>e.href===window.location.hash)?window.location.hash:void 0;L(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[O,L]),(0,n.useEffect)(()=>{k||j&&O.some(e=>e.href===j)||L(c(O))},[j,O,k,L]);let B=(0,n.useCallback)(()=>T(e=>e+1),[]);(0,n.useImperativeHandle)(u,()=>({refresh:B}),[B]);let V=(0,n.useCallback)(()=>{let e=C.current,t=j?F.current.get(j):void 0;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i={top:r.top-n.top,height:r.height};D(e=>e.top===i.top&&e.height===i.height?e:i)},[j]),H=(0,n.useCallback)(()=>{typeof window>`u`||(I.current!==void 0&&window.cancelAnimationFrame(I.current),I.current=window.requestAnimationFrame(()=>{I.current=void 0,V()}))},[V]);e.t(()=>{H();let e=C.current;if(!e||typeof ResizeObserver>`u`)return()=>{I.current!==void 0&&window.cancelAnimationFrame(I.current)};let t=new ResizeObserver(H);return t.observe(e),()=>{t.disconnect(),I.current!==void 0&&window.cancelAnimationFrame(I.current)}},[O,w,H,f]);let U=(e,t)=>{if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let n=o(e.href);if(!n||typeof document>`u`)return;let r=document.getElementById(n);if(!r)return;t.preventDefault();let i=R();if(i){let e=r.getBoundingClientRect(),t=i.getBoundingClientRect(),n=Math.max(0,i.scrollTop+e.top-t.top-Math.max(0,g));i.scrollTo({top:n,behavior:_})}else{let e=Math.max(0,window.scrollY+r.getBoundingClientRect().top-Math.max(0,g));window.scrollTo({top:e,behavior:_})}window.history.pushState(null,``,e.href),L(e.href)},W=e=>(0,r.jsx)(`ul`,{className:`vl-anchor__list`,children:e.map(e=>{let t=j===e.href,n=t||l(e.children,j);return(0,r.jsxs)(`li`,{className:`vl-anchor__item${n?` is-active`:``}`,children:[(0,r.jsx)(`a`,{ref:t=>{t?F.current.set(e.href,t):F.current.delete(e.href),t&&e.href===j&&H()},className:`vl-anchor__link${n?` is-active`:``}`,href:e.href,"aria-current":t?`location`:void 0,onClick:t=>U(e,t),children:e.title}),e.children?.length?W(e.children):null]},e.href)})}),G=[`vl-anchor`,v||``].filter(Boolean).join(` `);return(0,r.jsxs)(`nav`,{id:y,className:G,"aria-label":b,...S,children:[f?(0,r.jsx)(`div`,{className:`vl-anchor__title`,children:f}):null,(0,r.jsxs)(`div`,{ref:C,className:`vl-anchor__body`,children:[(0,r.jsx)(`span`,{className:`vl-anchor__rail`,"aria-hidden":`true`,children:(0,r.jsx)(`span`,{className:`vl-anchor__indicator`,style:{top:E.top,height:E.height}})}),W(d)]})]})});u.displayName=`VlAnchor`;var d=u,f=u;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./icon-DRLyKu8p.cjs"),t=require("./effect-BpNxm_06.cjs"),n=require("./state-BuUx1onZ.cjs"),r=require("./refs-DCqd87V8.cjs");let i=require("lucide-react"),a=require("react"),o=require("react/jsx-runtime");var ee=280,s=()=>{let[e,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=window.matchMedia?.(`(prefers-reduced-motion: reduce)`);if(!e)return;let n=()=>t(e.matches);return n(),e.addEventListener?.(`change`,n),()=>e.removeEventListener?.(`change`,n)},[]),e},c=(0,a.forwardRef)((c,l)=>{let{items:u,activeKey:d,defaultActiveKey:f,open:te,defaultOpen:ne=!0,autoPlay:p=!0,interval:m=5e3,pauseOnHover:re=!0,pauseOnFocus:ie=!0,status:h=`info`,icon:g=i.Megaphone,closable:ae=!1,renderItem:_,className:v,role:oe=`region`,tabIndex:y,"aria-label":se=`公告`,"aria-live":ce,onMouseEnter:b,onMouseLeave:x,onFocusCapture:S,onBlurCapture:le,onActiveChange:ue,onOpenChange:de,onClose:fe,onItemClick:C,...pe}=c,me=(0,a.useRef)(null),he=(0,a.useMemo)(()=>r.n(me,l),[l]),w=n.t(c,`activeKey`),ge=n.t(c,`open`),[T,E]=n.n({value:d,defaultValue:f??u[0]?.key,controlled:w,onChange:e=>{let t=u.findIndex(t=>t.key===e),n=u[t];n&&ue?.(n.key,n,t)}}),[D,O]=n.n({value:!!te,defaultValue:ne,controlled:ge,onChange:de}),[k,A]=(0,a.useState)(!1),[j,M]=(0,a.useState)(!1),[N,P]=(0,a.useState)(()=>typeof document>`u`||!document.hidden),[F,I]=(0,a.useState)(void 0),[L,R]=(0,a.useState)(!1),z=(0,a.useRef)(void 0),B=(0,a.useRef)(void 0),V=(0,a.useRef)(void 0),H=s(),U=u.findIndex(e=>e.key===T),W=U>=0?U:u.length?0:-1,G=W>=0?u[W]:void 0,K=G?.key,q=u.findIndex(e=>e.key===F),J=q>=0?u[q]:void 0,Y=D&&!!G,_e=!N||re&&k||ie&&j,X=Y&&p&&m>0&&u.length>1&&!_e,ve=(0,a.useMemo)(()=>[`vl-announcement`,`is-${h}`,v||``].filter(Boolean).join(` `),[v,h]),Z=(0,a.useCallback)(e=>{E(e.key)},[E]);(0,a.useEffect)(()=>{K!==void 0&&K!==T&&Z(G)},[G,T,K,Z]),(0,a.useEffect)(()=>{let e=()=>P(!document.hidden);return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),(0,a.useEffect)(()=>{if(!X||!G)return;let e=window.setTimeout(()=>{let e=u[(W+1)%u.length];e&&Z(e)},m);return()=>window.clearTimeout(e)},[G,m,u,W,Z,X]);let Q=(0,a.useCallback)(()=>{B.current!==void 0&&window.cancelAnimationFrame(B.current),V.current!==void 0&&window.clearTimeout(V.current),B.current=void 0,V.current=void 0,R(!1),I(void 0)},[]);t.t(()=>{A(!1),M(!1),Q()},[Y,Q]),t.t(()=>{if(!Y||K===void 0){z.current=void 0,Q();return}let e=z.current;if(z.current=K,e===void 0||e===K||H){Q();return}if(!u.some(t=>t.key===e)){Q();return}Q(),I(e),B.current=window.requestAnimationFrame(()=>{R(!0),V.current=window.setTimeout(Q,ee)})},[Q,u,H,K,Y]),(0,a.useEffect)(()=>Q,[Q]);let ye=()=>{O(!1),fe?.()},be=e=>{M(!0),S?.(e)},xe=e=>{e.currentTarget.contains(e.relatedTarget)||M(!1),le?.(e)},$=(e,t)=>{let n=_?_(e,t):e.content,r=n=>{C?.(e,t,n)};if(e.href){let t=e.rel??(e.target===`_blank`?`noopener noreferrer`:void 0);return(0,o.jsx)(`a`,{className:`vl-announcement__link`,href:e.href,target:e.target,rel:t,onClick:r,children:n})}return C?(0,o.jsx)(`button`,{type:`button`,className:`vl-announcement__link`,onClick:r,children:n}):(0,o.jsx)(`span`,{className:`vl-announcement__text`,children:n})};if(!D||!G)return null;let Se=y??(p&&u.length>1?0:void 0);return(0,o.jsxs)(`div`,{ref:he,className:ve,role:oe,tabIndex:Se,"aria-label":se,onMouseEnter:e=>{A(!0),b?.(e)},onMouseLeave:e=>{A(!1),x?.(e)},onFocusCapture:be,onBlurCapture:xe,...pe,children:[g?e.t(g,`vl-announcement__icon`):null,(0,o.jsx)(`div`,{className:`vl-announcement__viewport`,"aria-live":ce??(X&&!w?`off`:`polite`),"aria-atomic":`true`,children:(0,o.jsxs)(`div`,{className:[`vl-announcement__track`,L?`is-animating`:``].filter(Boolean).join(` `),children:[J?(0,o.jsx)(`div`,{className:`vl-announcement__item is-outgoing`,"aria-hidden":`true`,children:$(J,q)}):null,(0,o.jsx)(`div`,{className:`vl-announcement__item${J?` is-incoming`:``}`,onTransitionEnd:Q,children:$(G,W)},`${typeof G.key}-${G.key}`)]})}),ae?(0,o.jsx)(`button`,{type:`button`,className:`vl-announcement__close`,"aria-label":`关闭公告`,onClick:ye,children:(0,o.jsx)(i.X,{"aria-hidden":`true`})}):null]})});c.displayName=`VlAnnouncement`;var l=c,u=c;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
|