@vavt/react-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -0
- package/dist/Alert-BGyLKuv0.js +52 -0
- package/dist/Alert-tPSJmCXK.cjs +1 -0
- package/dist/Anchor-QZROepM_.js +197 -0
- package/dist/Anchor-iriRYxEs.cjs +1 -0
- package/dist/Announcement-D_NccvTm.js +212 -0
- package/dist/Announcement-XjJyJ28N.cjs +1 -0
- package/dist/Button-CwkWSWau.js +96 -0
- package/dist/Button-qURrKHQ0.cjs +1 -0
- package/dist/Card-DlztNV-6.js +48 -0
- package/dist/Card-nILlh9c_.cjs +1 -0
- package/dist/Checkbox-BCXbK1-8.cjs +1 -0
- package/dist/Checkbox-CQZSg9Xu.cjs +1 -0
- package/dist/Checkbox-CQeqLO0S.js +46 -0
- package/dist/Checkbox-cnXHW9Oz.js +61 -0
- package/dist/Col-CZjR94ac.js +55 -0
- package/dist/Col-qcq7T83y.cjs +1 -0
- package/dist/Cron-CoO2Vnnm.cjs +1 -0
- package/dist/Cron-Di7k2FTL.js +1187 -0
- package/dist/DatePicker-DAxv2h-d.cjs +1 -0
- package/dist/DatePicker-M-MwejjV.js +15 -0
- package/dist/DateTimePicker-B3C3v99L.cjs +1 -0
- package/dist/DateTimePicker-BcT3FtN-.js +16 -0
- package/dist/Divider-BfvQ6BVP.cjs +1 -0
- package/dist/Divider-vyftxh3F.js +47 -0
- package/dist/Drawer-D28QbyA3.js +103 -0
- package/dist/Drawer-OmMfdgKN.cjs +1 -0
- package/dist/Dropdown-CYx6RxVv.js +311 -0
- package/dist/Dropdown-swfND4yK.cjs +1 -0
- package/dist/Form-7un_DeDk.cjs +1 -0
- package/dist/Form-CwgaAZWr.js +323 -0
- package/dist/Input-CIB_TY2n.js +113 -0
- package/dist/Input-CoDZggqc.cjs +1 -0
- package/dist/Loading-C2pY-4fA.cjs +1 -0
- package/dist/Loading-CL0wUgYK.js +45 -0
- package/dist/MessageBox-CrIifoig.js +141 -0
- package/dist/MessageBox-Ddn-R2MS.cjs +1 -0
- package/dist/Modal-B_VqN16m.js +201 -0
- package/dist/Modal-Dm48HmGu.cjs +1 -0
- package/dist/NumberInput-CYVj89_s.cjs +1 -0
- package/dist/NumberInput-C_vLULbX.js +134 -0
- package/dist/Pagination-B7a9v6BU.js +167 -0
- package/dist/Pagination-mj-pO6ql.cjs +1 -0
- package/dist/Progress-D2C6LCml.js +40 -0
- package/dist/Progress-DTAjlgwZ.cjs +1 -0
- package/dist/RadioGroup-BRcNi5Oc.js +98 -0
- package/dist/RadioGroup-q2Aa50NV.cjs +1 -0
- package/dist/Row-BJZtEKxG.cjs +1 -0
- package/dist/Row-DpEse7PJ.js +24 -0
- package/dist/Scrollbar-BdMGZrYi.js +235 -0
- package/dist/Scrollbar-CEQT6Ao_.cjs +1 -0
- package/dist/Select-DQLup8Y-.cjs +1 -0
- package/dist/Select-DccM9YpB.js +458 -0
- package/dist/Sidebar-BPXVnP7y.cjs +1 -0
- package/dist/Sidebar-u980T-QB.js +76 -0
- package/dist/Slider-BzlZc0p4.js +256 -0
- package/dist/Slider-DCIUxcBa.cjs +1 -0
- package/dist/Space-DJGRG2rt.cjs +1 -0
- package/dist/Space-gnVH7rEt.js +35 -0
- package/dist/Switch-7yJ-Q_o_.cjs +1 -0
- package/dist/Switch-DOO2tiYR.js +58 -0
- package/dist/Table-C8cSyts5.js +440 -0
- package/dist/Table-JoJ9vpu-.cjs +1 -0
- package/dist/Tabs-BhjvKN84.cjs +1 -0
- package/dist/Tabs-VT6nQ63W.js +106 -0
- package/dist/Tag-Cf9M_HT6.cjs +1 -0
- package/dist/Tag-CkfqoSwA.js +42 -0
- package/dist/Textarea-BEd7ToXv.js +68 -0
- package/dist/Textarea-C2dNYM0F.cjs +1 -0
- package/dist/TimePicker-ClQCHa6M.js +199 -0
- package/dist/TimePicker-DNBo2Rn5.cjs +1 -0
- package/dist/Timeline-ROggEQnD.cjs +1 -0
- package/dist/Timeline-euWvUS4e.js +70 -0
- package/dist/Tooltip-CbPYYr6R.cjs +1 -0
- package/dist/Tooltip-Ds4Odm7K.js +197 -0
- package/dist/Transition-DiO4GsP3.js +125 -0
- package/dist/Transition-X_89ga-e.cjs +1 -0
- package/dist/base.css +1 -0
- package/dist/cjs/Alert.cjs +1 -0
- package/dist/cjs/Anchor.cjs +1 -0
- package/dist/cjs/Announcement.cjs +1 -0
- package/dist/cjs/Button.cjs +1 -0
- package/dist/cjs/Card.cjs +1 -0
- package/dist/cjs/Checkbox.cjs +1 -0
- package/dist/cjs/Col.cjs +1 -0
- package/dist/cjs/Cron.cjs +1 -0
- package/dist/cjs/DatePicker.cjs +1 -0
- package/dist/cjs/DateTimePicker.cjs +1 -0
- package/dist/cjs/Divider.cjs +1 -0
- package/dist/cjs/Drawer.cjs +1 -0
- package/dist/cjs/Dropdown.cjs +1 -0
- package/dist/cjs/Form.cjs +1 -0
- package/dist/cjs/Input.cjs +1 -0
- package/dist/cjs/Loading.cjs +1 -0
- package/dist/cjs/MessageBox.cjs +1 -0
- package/dist/cjs/Modal.cjs +1 -0
- package/dist/cjs/NumberInput.cjs +1 -0
- package/dist/cjs/Pagination.cjs +1 -0
- package/dist/cjs/Progress.cjs +1 -0
- package/dist/cjs/Radio.cjs +1 -0
- package/dist/cjs/Row.cjs +1 -0
- package/dist/cjs/Scrollbar.cjs +1 -0
- package/dist/cjs/Select.cjs +1 -0
- package/dist/cjs/Sidebar.cjs +1 -0
- package/dist/cjs/Slider.cjs +1 -0
- package/dist/cjs/Space.cjs +1 -0
- package/dist/cjs/Switch.cjs +1 -0
- package/dist/cjs/Table.cjs +1 -0
- package/dist/cjs/Tabs.cjs +1 -0
- package/dist/cjs/Tag.cjs +1 -0
- package/dist/cjs/Textarea.cjs +1 -0
- package/dist/cjs/TimePicker.cjs +1 -0
- package/dist/cjs/Timeline.cjs +1 -0
- package/dist/cjs/Tooltip.cjs +1 -0
- package/dist/cjs/Transition.cjs +1 -0
- package/dist/cjs/global.cjs +1 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/register.cjs +1 -0
- package/dist/client-BkoqeUs3.cjs +1 -0
- package/dist/client-pj_wzx28.js +8 -0
- package/dist/css/Alert.css +1 -0
- package/dist/css/Anchor.css +1 -0
- package/dist/css/Announcement.css +1 -0
- package/dist/css/Button.css +1 -0
- package/dist/css/Card.css +1 -0
- package/dist/css/Checkbox.css +1 -0
- package/dist/css/Col.css +1 -0
- package/dist/css/Cron.css +1 -0
- package/dist/css/DatePicker.css +1 -0
- package/dist/css/DateTimePicker.css +1 -0
- package/dist/css/Divider.css +1 -0
- package/dist/css/Drawer.css +1 -0
- package/dist/css/Dropdown.css +1 -0
- package/dist/css/Form.css +1 -0
- package/dist/css/Input.css +1 -0
- package/dist/css/Loading.css +1 -0
- package/dist/css/MessageBox.css +1 -0
- package/dist/css/Modal.css +1 -0
- package/dist/css/NumberInput.css +1 -0
- package/dist/css/Pagination.css +1 -0
- package/dist/css/Progress.css +1 -0
- package/dist/css/Radio.css +1 -0
- package/dist/css/Row.css +1 -0
- package/dist/css/Scrollbar.css +1 -0
- package/dist/css/Select.css +1 -0
- package/dist/css/Sidebar.css +1 -0
- package/dist/css/Slider.css +1 -0
- package/dist/css/Space.css +1 -0
- package/dist/css/Switch.css +1 -0
- package/dist/css/Table.css +1 -0
- package/dist/css/Tabs.css +1 -0
- package/dist/css/Tag.css +1 -0
- package/dist/css/Textarea.css +1 -0
- package/dist/css/TimePicker.css +1 -0
- package/dist/css/Timeline.css +1 -0
- package/dist/css/Tooltip.css +1 -0
- package/dist/css/Transition.css +0 -0
- package/dist/date-picker-DkRwNu2m.js +584 -0
- package/dist/date-picker-DyGLrw5H.cjs +1 -0
- package/dist/dialog-shell-DT1EoKQG.cjs +1 -0
- package/dist/dialog-shell-DehX3PNh.js +111 -0
- package/dist/effect-BpNxm_06.cjs +1 -0
- package/dist/effect-nifYL_rH.js +5 -0
- package/dist/es/Alert.mjs +3 -0
- package/dist/es/Anchor.mjs +3 -0
- package/dist/es/Announcement.mjs +3 -0
- package/dist/es/Button.mjs +3 -0
- package/dist/es/Card.mjs +3 -0
- package/dist/es/Checkbox.mjs +3 -0
- package/dist/es/Col.mjs +3 -0
- package/dist/es/Cron.mjs +3 -0
- package/dist/es/DatePicker.mjs +3 -0
- package/dist/es/DateTimePicker.mjs +3 -0
- package/dist/es/Divider.mjs +3 -0
- package/dist/es/Drawer.mjs +3 -0
- package/dist/es/Dropdown.mjs +3 -0
- package/dist/es/Form.mjs +3 -0
- package/dist/es/Input.mjs +3 -0
- package/dist/es/Loading.mjs +3 -0
- package/dist/es/MessageBox.mjs +3 -0
- package/dist/es/Modal.mjs +3 -0
- package/dist/es/NumberInput.mjs +3 -0
- package/dist/es/Pagination.mjs +3 -0
- package/dist/es/Progress.mjs +3 -0
- package/dist/es/Radio.mjs +6 -0
- package/dist/es/Row.mjs +6 -0
- package/dist/es/Scrollbar.mjs +3 -0
- package/dist/es/Select.mjs +3 -0
- package/dist/es/Sidebar.mjs +3 -0
- package/dist/es/Slider.mjs +3 -0
- package/dist/es/Space.mjs +3 -0
- package/dist/es/Switch.mjs +3 -0
- package/dist/es/Table.mjs +3 -0
- package/dist/es/Tabs.mjs +3 -0
- package/dist/es/Tag.mjs +3 -0
- package/dist/es/Textarea.mjs +3 -0
- package/dist/es/TimePicker.mjs +3 -0
- package/dist/es/Timeline.mjs +3 -0
- package/dist/es/Tooltip.mjs +3 -0
- package/dist/es/Transition.mjs +3 -0
- package/dist/es/global.mjs +3 -0
- package/dist/es/index.mjs +40 -0
- package/dist/es/register.mjs +7 -0
- package/dist/floating-DBAmeQIq.js +157 -0
- package/dist/floating-DXRnx48N.cjs +1 -0
- package/dist/focus-BDDJyKk3.js +9 -0
- package/dist/focus-D-h8CbGr.cjs +1 -0
- package/dist/icon-Cbvuv4yF.js +25 -0
- package/dist/icon-DRLyKu8p.cjs +1 -0
- package/dist/id-CF0zOP1G.cjs +1 -0
- package/dist/id-CHixuHb7.js +8 -0
- package/dist/index.css +1 -0
- package/dist/number-B7qJF_ZY.cjs +1 -0
- package/dist/number-BN2jHM6Z.js +6 -0
- package/dist/refs-D5IYOBaf.js +14 -0
- package/dist/refs-DCqd87V8.cjs +1 -0
- package/dist/registry-CkiH1x-J.js +79 -0
- package/dist/registry-YCz7D-2R.cjs +1 -0
- package/dist/state-ZBA75xZ_.cjs +1 -0
- package/dist/state-oH-YwB7_.js +15 -0
- package/dist/style/Alert.cjs +7 -0
- package/dist/style/Alert.mjs +7 -0
- package/dist/style/Anchor.cjs +7 -0
- package/dist/style/Anchor.mjs +7 -0
- package/dist/style/Announcement.cjs +7 -0
- package/dist/style/Announcement.mjs +7 -0
- package/dist/style/Button.cjs +7 -0
- package/dist/style/Button.mjs +7 -0
- package/dist/style/Card.cjs +7 -0
- package/dist/style/Card.mjs +7 -0
- package/dist/style/Checkbox.cjs +7 -0
- package/dist/style/Checkbox.mjs +7 -0
- package/dist/style/Col.cjs +7 -0
- package/dist/style/Col.mjs +7 -0
- package/dist/style/Cron.cjs +13 -0
- package/dist/style/Cron.mjs +13 -0
- package/dist/style/DatePicker.cjs +10 -0
- package/dist/style/DatePicker.mjs +10 -0
- package/dist/style/DateTimePicker.cjs +10 -0
- package/dist/style/DateTimePicker.mjs +10 -0
- package/dist/style/Divider.cjs +7 -0
- package/dist/style/Divider.mjs +7 -0
- package/dist/style/Drawer.cjs +8 -0
- package/dist/style/Drawer.mjs +8 -0
- package/dist/style/Dropdown.cjs +8 -0
- package/dist/style/Dropdown.mjs +8 -0
- package/dist/style/Form.cjs +7 -0
- package/dist/style/Form.mjs +7 -0
- package/dist/style/Input.cjs +7 -0
- package/dist/style/Input.mjs +7 -0
- package/dist/style/Loading.cjs +8 -0
- package/dist/style/Loading.mjs +8 -0
- package/dist/style/MessageBox.cjs +9 -0
- package/dist/style/MessageBox.mjs +9 -0
- package/dist/style/Modal.cjs +8 -0
- package/dist/style/Modal.mjs +8 -0
- package/dist/style/NumberInput.cjs +7 -0
- package/dist/style/NumberInput.mjs +7 -0
- package/dist/style/Pagination.cjs +7 -0
- package/dist/style/Pagination.mjs +7 -0
- package/dist/style/Progress.cjs +7 -0
- package/dist/style/Progress.mjs +7 -0
- package/dist/style/Radio.cjs +7 -0
- package/dist/style/Radio.mjs +7 -0
- package/dist/style/Row.cjs +7 -0
- package/dist/style/Row.mjs +7 -0
- package/dist/style/Scrollbar.cjs +7 -0
- package/dist/style/Scrollbar.mjs +7 -0
- package/dist/style/Select.cjs +8 -0
- package/dist/style/Select.mjs +8 -0
- package/dist/style/Sidebar.cjs +7 -0
- package/dist/style/Sidebar.mjs +7 -0
- package/dist/style/Slider.cjs +7 -0
- package/dist/style/Slider.mjs +7 -0
- package/dist/style/Space.cjs +7 -0
- package/dist/style/Space.mjs +7 -0
- package/dist/style/Switch.cjs +7 -0
- package/dist/style/Switch.mjs +7 -0
- package/dist/style/Table.cjs +9 -0
- package/dist/style/Table.mjs +9 -0
- package/dist/style/Tabs.cjs +7 -0
- package/dist/style/Tabs.mjs +7 -0
- package/dist/style/Tag.cjs +7 -0
- package/dist/style/Tag.mjs +7 -0
- package/dist/style/Textarea.cjs +7 -0
- package/dist/style/Textarea.mjs +7 -0
- package/dist/style/TimePicker.cjs +8 -0
- package/dist/style/TimePicker.mjs +8 -0
- package/dist/style/Timeline.cjs +7 -0
- package/dist/style/Timeline.mjs +7 -0
- package/dist/style/Tooltip.cjs +8 -0
- package/dist/style/Tooltip.mjs +8 -0
- package/dist/style/Transition.cjs +6 -0
- package/dist/style/Transition.mjs +6 -0
- package/dist/time-wheel-BaCcA9nk.cjs +1 -0
- package/dist/time-wheel-BtvYZI6H.js +291 -0
- package/dist/types/Alert/Alert.d.cts +3 -0
- package/dist/types/Alert/Alert.d.ts +3 -0
- package/dist/types/Alert/index.d.cts +5 -0
- package/dist/types/Alert/index.d.ts +5 -0
- package/dist/types/Alert/type.d.cts +21 -0
- package/dist/types/Alert/type.d.ts +21 -0
- package/dist/types/Anchor/Anchor.d.cts +3 -0
- package/dist/types/Anchor/Anchor.d.ts +3 -0
- package/dist/types/Anchor/index.d.cts +5 -0
- package/dist/types/Anchor/index.d.ts +5 -0
- package/dist/types/Anchor/type.d.cts +42 -0
- package/dist/types/Anchor/type.d.ts +42 -0
- package/dist/types/Announcement/Announcement.d.cts +3 -0
- package/dist/types/Announcement/Announcement.d.ts +3 -0
- package/dist/types/Announcement/host.d.cts +12 -0
- package/dist/types/Announcement/host.d.ts +12 -0
- package/dist/types/Announcement/index.d.cts +5 -0
- package/dist/types/Announcement/index.d.ts +5 -0
- package/dist/types/Announcement/type.d.cts +63 -0
- package/dist/types/Announcement/type.d.ts +63 -0
- package/dist/types/Button/Button.d.cts +23 -0
- package/dist/types/Button/Button.d.ts +23 -0
- package/dist/types/Button/ButtonGroup.d.cts +14 -0
- package/dist/types/Button/ButtonGroup.d.ts +14 -0
- package/dist/types/Button/context.d.cts +15 -0
- package/dist/types/Button/context.d.ts +15 -0
- package/dist/types/Button/index.d.cts +7 -0
- package/dist/types/Button/index.d.ts +7 -0
- package/dist/types/Button/type.d.cts +66 -0
- package/dist/types/Button/type.d.ts +66 -0
- package/dist/types/Card/Card.d.cts +15 -0
- package/dist/types/Card/Card.d.ts +15 -0
- package/dist/types/Card/index.d.cts +5 -0
- package/dist/types/Card/index.d.ts +5 -0
- package/dist/types/Card/type.d.cts +40 -0
- package/dist/types/Card/type.d.ts +40 -0
- package/dist/types/Checkbox/Checkbox.d.cts +3 -0
- package/dist/types/Checkbox/Checkbox.d.ts +3 -0
- package/dist/types/Checkbox/CheckboxGroup.d.cts +3 -0
- package/dist/types/Checkbox/CheckboxGroup.d.ts +3 -0
- package/dist/types/Checkbox/context.d.cts +19 -0
- package/dist/types/Checkbox/context.d.ts +19 -0
- package/dist/types/Checkbox/index.d.cts +7 -0
- package/dist/types/Checkbox/index.d.ts +7 -0
- package/dist/types/Checkbox/type.d.cts +55 -0
- package/dist/types/Checkbox/type.d.ts +55 -0
- package/dist/types/Col/Col.d.cts +3 -0
- package/dist/types/Col/Col.d.ts +3 -0
- package/dist/types/Col/index.d.cts +5 -0
- package/dist/types/Col/index.d.ts +5 -0
- package/dist/types/Col/type.d.cts +41 -0
- package/dist/types/Col/type.d.ts +41 -0
- package/dist/types/Cron/Cron.d.cts +3 -0
- package/dist/types/Cron/Cron.d.ts +3 -0
- package/dist/types/Cron/CronField.d.cts +14 -0
- package/dist/types/Cron/CronField.d.ts +14 -0
- package/dist/types/Cron/CronPanel.d.cts +27 -0
- package/dist/types/Cron/CronPanel.d.ts +27 -0
- package/dist/types/Cron/describe.d.cts +10 -0
- package/dist/types/Cron/describe.d.ts +10 -0
- package/dist/types/Cron/expression.d.cts +188 -0
- package/dist/types/Cron/expression.d.ts +188 -0
- package/dist/types/Cron/index.d.cts +5 -0
- package/dist/types/Cron/index.d.ts +5 -0
- package/dist/types/Cron/schedule.d.cts +15 -0
- package/dist/types/Cron/schedule.d.ts +15 -0
- package/dist/types/Cron/type.d.cts +65 -0
- package/dist/types/Cron/type.d.ts +65 -0
- package/dist/types/DatePicker/DatePicker.d.cts +3 -0
- package/dist/types/DatePicker/DatePicker.d.ts +3 -0
- package/dist/types/DatePicker/index.d.cts +5 -0
- package/dist/types/DatePicker/index.d.ts +5 -0
- package/dist/types/DatePicker/type.d.cts +89 -0
- package/dist/types/DatePicker/type.d.ts +89 -0
- package/dist/types/DateTimePicker/DateTimePicker.d.cts +3 -0
- package/dist/types/DateTimePicker/DateTimePicker.d.ts +3 -0
- package/dist/types/DateTimePicker/index.d.cts +5 -0
- package/dist/types/DateTimePicker/index.d.ts +5 -0
- package/dist/types/DateTimePicker/type.d.cts +64 -0
- package/dist/types/DateTimePicker/type.d.ts +64 -0
- package/dist/types/Divider/Divider.d.cts +3 -0
- package/dist/types/Divider/Divider.d.ts +3 -0
- package/dist/types/Divider/index.d.cts +5 -0
- package/dist/types/Divider/index.d.ts +5 -0
- package/dist/types/Divider/type.d.cts +20 -0
- package/dist/types/Divider/type.d.ts +20 -0
- package/dist/types/Drawer/Drawer.d.cts +3 -0
- package/dist/types/Drawer/Drawer.d.ts +3 -0
- package/dist/types/Drawer/index.d.cts +5 -0
- package/dist/types/Drawer/index.d.ts +5 -0
- package/dist/types/Drawer/type.d.cts +46 -0
- package/dist/types/Drawer/type.d.ts +46 -0
- package/dist/types/Dropdown/Dropdown.d.cts +3 -0
- package/dist/types/Dropdown/Dropdown.d.ts +3 -0
- package/dist/types/Dropdown/index.d.cts +5 -0
- package/dist/types/Dropdown/index.d.ts +5 -0
- package/dist/types/Dropdown/type.d.cts +67 -0
- package/dist/types/Dropdown/type.d.ts +67 -0
- package/dist/types/Form/Form.d.cts +3 -0
- package/dist/types/Form/Form.d.ts +3 -0
- package/dist/types/Form/FormItem.d.cts +3 -0
- package/dist/types/Form/FormItem.d.ts +3 -0
- package/dist/types/Form/context.d.cts +39 -0
- package/dist/types/Form/context.d.ts +39 -0
- package/dist/types/Form/index.d.cts +8 -0
- package/dist/types/Form/index.d.ts +8 -0
- package/dist/types/Form/type.d.cts +119 -0
- package/dist/types/Form/type.d.ts +119 -0
- package/dist/types/Input/Input.d.cts +3 -0
- package/dist/types/Input/Input.d.ts +3 -0
- package/dist/types/Input/index.d.cts +5 -0
- package/dist/types/Input/index.d.ts +5 -0
- package/dist/types/Input/type.d.cts +43 -0
- package/dist/types/Input/type.d.ts +43 -0
- package/dist/types/Loading/Loading.d.cts +3 -0
- package/dist/types/Loading/Loading.d.ts +3 -0
- package/dist/types/Loading/index.d.cts +5 -0
- package/dist/types/Loading/index.d.ts +5 -0
- package/dist/types/Loading/type.d.cts +18 -0
- package/dist/types/Loading/type.d.ts +18 -0
- package/dist/types/MessageBox/MessageBox.d.cts +3 -0
- package/dist/types/MessageBox/MessageBox.d.ts +3 -0
- package/dist/types/MessageBox/index.d.cts +5 -0
- package/dist/types/MessageBox/index.d.ts +5 -0
- package/dist/types/MessageBox/service.d.cts +12 -0
- package/dist/types/MessageBox/service.d.ts +12 -0
- package/dist/types/MessageBox/type.d.cts +62 -0
- package/dist/types/MessageBox/type.d.ts +62 -0
- package/dist/types/Modal/Modal.d.cts +3 -0
- package/dist/types/Modal/Modal.d.ts +3 -0
- package/dist/types/Modal/index.d.cts +5 -0
- package/dist/types/Modal/index.d.ts +5 -0
- package/dist/types/Modal/type.d.cts +50 -0
- package/dist/types/Modal/type.d.ts +50 -0
- package/dist/types/NumberInput/NumberInput.d.cts +3 -0
- package/dist/types/NumberInput/NumberInput.d.ts +3 -0
- package/dist/types/NumberInput/index.d.cts +5 -0
- package/dist/types/NumberInput/index.d.ts +5 -0
- package/dist/types/NumberInput/type.d.cts +40 -0
- package/dist/types/NumberInput/type.d.ts +40 -0
- package/dist/types/Pagination/Pagination.d.cts +3 -0
- package/dist/types/Pagination/Pagination.d.ts +3 -0
- package/dist/types/Pagination/index.d.cts +5 -0
- package/dist/types/Pagination/index.d.ts +5 -0
- package/dist/types/Pagination/type.d.cts +38 -0
- package/dist/types/Pagination/type.d.ts +38 -0
- package/dist/types/Progress/Progress.d.cts +3 -0
- package/dist/types/Progress/Progress.d.ts +3 -0
- package/dist/types/Progress/index.d.cts +5 -0
- package/dist/types/Progress/index.d.ts +5 -0
- package/dist/types/Progress/type.d.cts +30 -0
- package/dist/types/Progress/type.d.ts +30 -0
- package/dist/types/Radio/Radio.d.cts +3 -0
- package/dist/types/Radio/Radio.d.ts +3 -0
- package/dist/types/Radio/RadioGroup.d.cts +3 -0
- package/dist/types/Radio/RadioGroup.d.ts +3 -0
- package/dist/types/Radio/context.d.cts +19 -0
- package/dist/types/Radio/context.d.ts +19 -0
- package/dist/types/Radio/index.d.cts +7 -0
- package/dist/types/Radio/index.d.ts +7 -0
- package/dist/types/Radio/type.d.cts +53 -0
- package/dist/types/Radio/type.d.ts +53 -0
- package/dist/types/Row/Row.d.cts +8 -0
- package/dist/types/Row/Row.d.ts +8 -0
- package/dist/types/Row/index.d.cts +5 -0
- package/dist/types/Row/index.d.ts +5 -0
- package/dist/types/Row/type.d.cts +20 -0
- package/dist/types/Row/type.d.ts +20 -0
- package/dist/types/Scrollbar/Scrollbar.d.cts +3 -0
- package/dist/types/Scrollbar/Scrollbar.d.ts +3 -0
- package/dist/types/Scrollbar/index.d.cts +5 -0
- package/dist/types/Scrollbar/index.d.ts +5 -0
- package/dist/types/Scrollbar/type.d.cts +60 -0
- package/dist/types/Scrollbar/type.d.ts +60 -0
- package/dist/types/Select/Select.d.cts +3 -0
- package/dist/types/Select/Select.d.ts +3 -0
- package/dist/types/Select/index.d.cts +5 -0
- package/dist/types/Select/index.d.ts +5 -0
- package/dist/types/Select/type.d.cts +91 -0
- package/dist/types/Select/type.d.ts +91 -0
- package/dist/types/Sidebar/Sidebar.d.cts +3 -0
- package/dist/types/Sidebar/Sidebar.d.ts +3 -0
- package/dist/types/Sidebar/index.d.cts +5 -0
- package/dist/types/Sidebar/index.d.ts +5 -0
- package/dist/types/Sidebar/type.d.cts +54 -0
- package/dist/types/Sidebar/type.d.ts +54 -0
- package/dist/types/Slider/Slider.d.cts +3 -0
- package/dist/types/Slider/Slider.d.ts +3 -0
- package/dist/types/Slider/index.d.cts +5 -0
- package/dist/types/Slider/index.d.ts +5 -0
- package/dist/types/Slider/type.d.cts +47 -0
- package/dist/types/Slider/type.d.ts +47 -0
- package/dist/types/Space/Space.d.cts +3 -0
- package/dist/types/Space/Space.d.ts +3 -0
- package/dist/types/Space/index.d.cts +5 -0
- package/dist/types/Space/index.d.ts +5 -0
- package/dist/types/Space/type.d.cts +28 -0
- package/dist/types/Space/type.d.ts +28 -0
- package/dist/types/Switch/Switch.d.cts +3 -0
- package/dist/types/Switch/Switch.d.ts +3 -0
- package/dist/types/Switch/index.d.cts +5 -0
- package/dist/types/Switch/index.d.ts +5 -0
- package/dist/types/Switch/type.d.cts +28 -0
- package/dist/types/Switch/type.d.ts +28 -0
- package/dist/types/Table/Table.d.cts +8 -0
- package/dist/types/Table/Table.d.ts +8 -0
- package/dist/types/Table/index.d.cts +8 -0
- package/dist/types/Table/index.d.ts +8 -0
- package/dist/types/Table/type.d.cts +135 -0
- package/dist/types/Table/type.d.ts +135 -0
- package/dist/types/Tabs/Tabs.d.cts +3 -0
- package/dist/types/Tabs/Tabs.d.ts +3 -0
- package/dist/types/Tabs/index.d.cts +5 -0
- package/dist/types/Tabs/index.d.ts +5 -0
- package/dist/types/Tabs/type.d.cts +45 -0
- package/dist/types/Tabs/type.d.ts +45 -0
- package/dist/types/Tag/Tag.d.cts +3 -0
- package/dist/types/Tag/Tag.d.ts +3 -0
- package/dist/types/Tag/index.d.cts +5 -0
- package/dist/types/Tag/index.d.ts +5 -0
- package/dist/types/Tag/type.d.cts +24 -0
- package/dist/types/Tag/type.d.ts +24 -0
- package/dist/types/Textarea/Textarea.d.cts +3 -0
- package/dist/types/Textarea/Textarea.d.ts +3 -0
- package/dist/types/Textarea/index.d.cts +5 -0
- package/dist/types/Textarea/index.d.ts +5 -0
- package/dist/types/Textarea/type.d.cts +32 -0
- package/dist/types/Textarea/type.d.ts +32 -0
- package/dist/types/TimePicker/TimePicker.d.cts +3 -0
- package/dist/types/TimePicker/TimePicker.d.ts +3 -0
- package/dist/types/TimePicker/index.d.cts +5 -0
- package/dist/types/TimePicker/index.d.ts +5 -0
- package/dist/types/TimePicker/type.d.cts +55 -0
- package/dist/types/TimePicker/type.d.ts +55 -0
- package/dist/types/Timeline/Timeline.d.cts +3 -0
- package/dist/types/Timeline/Timeline.d.ts +3 -0
- package/dist/types/Timeline/index.d.cts +5 -0
- package/dist/types/Timeline/index.d.ts +5 -0
- package/dist/types/Timeline/type.d.cts +49 -0
- package/dist/types/Timeline/type.d.ts +49 -0
- package/dist/types/Tooltip/Tooltip.d.cts +3 -0
- package/dist/types/Tooltip/Tooltip.d.ts +3 -0
- package/dist/types/Tooltip/index.d.cts +5 -0
- package/dist/types/Tooltip/index.d.ts +5 -0
- package/dist/types/Tooltip/type.d.cts +40 -0
- package/dist/types/Tooltip/type.d.ts +40 -0
- package/dist/types/Transition/Transition.d.cts +6 -0
- package/dist/types/Transition/Transition.d.ts +6 -0
- package/dist/types/Transition/index.d.cts +8 -0
- package/dist/types/Transition/index.d.ts +8 -0
- package/dist/types/Transition/type.d.cts +22 -0
- package/dist/types/Transition/type.d.ts +22 -0
- package/dist/types/_shared/client.d.cts +9 -0
- package/dist/types/_shared/client.d.ts +9 -0
- package/dist/types/_shared/date-picker.d.cts +17 -0
- package/dist/types/_shared/date-picker.d.ts +17 -0
- package/dist/types/_shared/date.d.cts +55 -0
- package/dist/types/_shared/date.d.ts +55 -0
- package/dist/types/_shared/dialog-shell.d.cts +59 -0
- package/dist/types/_shared/dialog-shell.d.ts +59 -0
- package/dist/types/_shared/dialog.d.cts +20 -0
- package/dist/types/_shared/dialog.d.ts +20 -0
- package/dist/types/_shared/effect.d.cts +8 -0
- package/dist/types/_shared/effect.d.ts +8 -0
- package/dist/types/_shared/floating.d.cts +88 -0
- package/dist/types/_shared/floating.d.ts +88 -0
- package/dist/types/_shared/focus.d.cts +33 -0
- package/dist/types/_shared/focus.d.ts +33 -0
- package/dist/types/_shared/icon.d.cts +15 -0
- package/dist/types/_shared/icon.d.ts +15 -0
- package/dist/types/_shared/id.d.cts +10 -0
- package/dist/types/_shared/id.d.ts +10 -0
- package/dist/types/_shared/number.d.cts +22 -0
- package/dist/types/_shared/number.d.ts +22 -0
- package/dist/types/_shared/refs.d.cts +18 -0
- package/dist/types/_shared/refs.d.ts +18 -0
- package/dist/types/_shared/state.d.cts +15 -0
- package/dist/types/_shared/state.d.ts +15 -0
- package/dist/types/_shared/time-constraints.d.cts +31 -0
- package/dist/types/_shared/time-constraints.d.ts +31 -0
- package/dist/types/_shared/time-wheel.d.cts +34 -0
- package/dist/types/_shared/time-wheel.d.ts +34 -0
- package/dist/types/_vars.d.cts +7 -0
- package/dist/types/_vars.d.ts +7 -0
- package/dist/types/global.d.cts +86 -0
- package/dist/types/global.d.ts +86 -0
- package/dist/types/index.d.cts +42 -0
- package/dist/types/index.d.ts +42 -0
- package/dist/types/register.d.cts +1 -0
- package/dist/types/register.d.ts +1 -0
- package/dist/types/registry.d.cts +66 -0
- package/dist/types/registry.d.ts +66 -0
- package/dist/types/style.d.cts +7 -0
- package/dist/types/style.d.ts +7 -0
- package/package.json +165 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form 的公共类型契约。
|
|
3
|
+
*
|
|
4
|
+
* values 是扁平键值对象,字段规则共享提交时的同一份 values 快照;异步 validator 只返回错误文案,
|
|
5
|
+
* 不负责直接修改 Form 状态。FormRef 暴露命令式编排能力,但受控 values 的最终渲染仍由调用方回传决定。
|
|
6
|
+
*/
|
|
7
|
+
import type { FormHTMLAttributes, HTMLAttributes, ReactElement, ReactNode, RefAttributes } from 'react';
|
|
8
|
+
/** 表单值对象字典 */
|
|
9
|
+
export type FormValues = Record<string, unknown>;
|
|
10
|
+
/** 表单布局方式:垂直 (`vertical`) | 水平 (`horizontal`) | 行内 (`inline`) */
|
|
11
|
+
export type FormLayout = 'vertical' | 'horizontal' | 'inline';
|
|
12
|
+
/** 表单校验触发时机:值变化 (`change`) | 失去焦点 (`blur`) | 提交时 (`submit`) */
|
|
13
|
+
export type FormValidateTrigger = 'change' | 'blur' | 'submit';
|
|
14
|
+
/** 基础规则类型校验 */
|
|
15
|
+
export type FormRuleType = 'string' | 'number' | 'boolean' | 'array' | 'email';
|
|
16
|
+
/** 单条表单校验规则定义 */
|
|
17
|
+
export interface FormRule<V extends FormValues = FormValues> {
|
|
18
|
+
/** 是否为必填字段 */
|
|
19
|
+
required?: boolean;
|
|
20
|
+
/** 字段基础类型校验 */
|
|
21
|
+
type?: FormRuleType;
|
|
22
|
+
/** 最小值(数字)或最小长度(字符串/数组) */
|
|
23
|
+
min?: number;
|
|
24
|
+
/** 最大值(数字)或最大长度(字符串/数组) */
|
|
25
|
+
max?: number;
|
|
26
|
+
/** 精确长度(字符串/数组) */
|
|
27
|
+
len?: number;
|
|
28
|
+
/** 正则表达式校验 */
|
|
29
|
+
pattern?: RegExp;
|
|
30
|
+
/** 校验失败时展示的错误文案 */
|
|
31
|
+
message?: string;
|
|
32
|
+
/** 自定义校验函数,返回错误文案字符串或 reject 都会转成字段错误;返回空/Promise<void> 表示校验通过 */
|
|
33
|
+
validator?: (value: unknown, values: V) => string | void | Promise<string | void>;
|
|
34
|
+
}
|
|
35
|
+
/** 表单错误信息字典(字段名 -> 错误消息数组) */
|
|
36
|
+
export type FormErrors<V extends FormValues = FormValues> = Partial<Record<keyof V & string, string[]>>;
|
|
37
|
+
/** 表单整体校验结果对象 */
|
|
38
|
+
export type FormValidationResult<V extends FormValues = FormValues> = {
|
|
39
|
+
valid: true;
|
|
40
|
+
values: V;
|
|
41
|
+
errors: FormErrors<V>;
|
|
42
|
+
} | {
|
|
43
|
+
valid: false;
|
|
44
|
+
values: V;
|
|
45
|
+
errors: FormErrors<V>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Form 组件属性接口
|
|
49
|
+
*/
|
|
50
|
+
export interface FormProps<V extends FormValues = FormValues> extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'onReset'> {
|
|
51
|
+
/** 受控表单值数据对象 */
|
|
52
|
+
values?: V;
|
|
53
|
+
/** 非受控初始表单值数据对象 */
|
|
54
|
+
defaultValues?: V;
|
|
55
|
+
/** 表单布局排版方式,默认为 `vertical` */
|
|
56
|
+
layout?: FormLayout;
|
|
57
|
+
/** 标签文本统一宽度(如 `100px` 或 `100`) */
|
|
58
|
+
labelWidth?: number | string;
|
|
59
|
+
/** 标签对齐方式,默认为 `right`(水平布局下) */
|
|
60
|
+
labelAlign?: 'left' | 'right';
|
|
61
|
+
/** 全局默认的校验触发时机,默认为 `['change', 'blur']` */
|
|
62
|
+
validateTrigger?: FormValidateTrigger | FormValidateTrigger[];
|
|
63
|
+
/** 任何字段值发生变更时的回调函数 */
|
|
64
|
+
onValuesChange?: (changedValues: Partial<V>, values: V) => void;
|
|
65
|
+
/** 校验成功并通过后的提交回调函数 */
|
|
66
|
+
onFinish?: (values: V) => void | Promise<void>;
|
|
67
|
+
/** 提交回调抛出异常时触发;Form 会消费异常,避免原生 submit 产生未处理 Promise */
|
|
68
|
+
onFinishError?: (error: unknown, values: V) => void;
|
|
69
|
+
/** 校验失败未能提交时的回调函数 */
|
|
70
|
+
onFinishFailed?: (errors: FormErrors<V>, values: V) => void;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* FormItem 表单项组件属性接口
|
|
74
|
+
*/
|
|
75
|
+
export interface FormItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
76
|
+
/** 绑定的表单字段名 */
|
|
77
|
+
name?: string;
|
|
78
|
+
/** 标签标题文本或自定义节点 */
|
|
79
|
+
label?: ReactNode;
|
|
80
|
+
/** 是否标记为必填(展示必填星号) */
|
|
81
|
+
required?: boolean;
|
|
82
|
+
/** 当前字段专属的校验规则列表 */
|
|
83
|
+
rules?: FormRule[];
|
|
84
|
+
/** 额外的底部帮助/说明文本 */
|
|
85
|
+
help?: ReactNode;
|
|
86
|
+
/** 子控件绑定值的属性名,默认为 `'value'`(如 Checkbox 可指定为 `'checked'`) */
|
|
87
|
+
valuePropName?: string;
|
|
88
|
+
/** 收集子控件值变化的原生/自定义事件名称,默认为 `'onChange'` */
|
|
89
|
+
trigger?: string;
|
|
90
|
+
/** 自定义从事件参数中提取目标值的转换函数 */
|
|
91
|
+
getValueFromEvent?: (...args: unknown[]) => unknown;
|
|
92
|
+
/** 当前字段专属的校验触发时机,覆盖 Form 顶层配置 */
|
|
93
|
+
validateTrigger?: FormValidateTrigger | FormValidateTrigger[];
|
|
94
|
+
/** 唯一的表单输入控件子元素(如 Input、Select、Switch 等) */
|
|
95
|
+
children: ReactElement;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Form 组件暴露的命令式 Ref 操作句柄
|
|
99
|
+
*/
|
|
100
|
+
export interface FormRef<V extends FormValues = FormValues> {
|
|
101
|
+
/** 获取最近一次同步写入的值快照,可在 React 下一次渲染前读取 */
|
|
102
|
+
getValues: () => V;
|
|
103
|
+
/** 命令式批量设置表单字段值 */
|
|
104
|
+
setValues: (values: Partial<V>) => void;
|
|
105
|
+
/** 重置表单所有字段至初始值并清空错误 */
|
|
106
|
+
reset: () => void;
|
|
107
|
+
/** 校验当前已注册字段,不触发 onFinish/onFinishFailed */
|
|
108
|
+
validate: () => Promise<FormValidationResult<V>>;
|
|
109
|
+
/** 校验并执行提交流程;同一时间的重复调用复用同一个 Promise */
|
|
110
|
+
submit: () => Promise<FormValidationResult<V>>;
|
|
111
|
+
/** 查询当前是否正在执行提交操作 */
|
|
112
|
+
isSubmitting: () => boolean;
|
|
113
|
+
/** 获取当前所有字段的错误信息快照 */
|
|
114
|
+
getErrors: () => FormErrors<V>;
|
|
115
|
+
}
|
|
116
|
+
/** Form 组件类型定义(支持泛型值推导) */
|
|
117
|
+
export type FormComponent = {
|
|
118
|
+
<V extends FormValues = FormValues>(props: FormProps<V> & RefAttributes<FormRef<V>>): ReactElement;
|
|
119
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form 的公共类型契约。
|
|
3
|
+
*
|
|
4
|
+
* values 是扁平键值对象,字段规则共享提交时的同一份 values 快照;异步 validator 只返回错误文案,
|
|
5
|
+
* 不负责直接修改 Form 状态。FormRef 暴露命令式编排能力,但受控 values 的最终渲染仍由调用方回传决定。
|
|
6
|
+
*/
|
|
7
|
+
import type { FormHTMLAttributes, HTMLAttributes, ReactElement, ReactNode, RefAttributes } from 'react';
|
|
8
|
+
/** 表单值对象字典 */
|
|
9
|
+
export type FormValues = Record<string, unknown>;
|
|
10
|
+
/** 表单布局方式:垂直 (`vertical`) | 水平 (`horizontal`) | 行内 (`inline`) */
|
|
11
|
+
export type FormLayout = 'vertical' | 'horizontal' | 'inline';
|
|
12
|
+
/** 表单校验触发时机:值变化 (`change`) | 失去焦点 (`blur`) | 提交时 (`submit`) */
|
|
13
|
+
export type FormValidateTrigger = 'change' | 'blur' | 'submit';
|
|
14
|
+
/** 基础规则类型校验 */
|
|
15
|
+
export type FormRuleType = 'string' | 'number' | 'boolean' | 'array' | 'email';
|
|
16
|
+
/** 单条表单校验规则定义 */
|
|
17
|
+
export interface FormRule<V extends FormValues = FormValues> {
|
|
18
|
+
/** 是否为必填字段 */
|
|
19
|
+
required?: boolean;
|
|
20
|
+
/** 字段基础类型校验 */
|
|
21
|
+
type?: FormRuleType;
|
|
22
|
+
/** 最小值(数字)或最小长度(字符串/数组) */
|
|
23
|
+
min?: number;
|
|
24
|
+
/** 最大值(数字)或最大长度(字符串/数组) */
|
|
25
|
+
max?: number;
|
|
26
|
+
/** 精确长度(字符串/数组) */
|
|
27
|
+
len?: number;
|
|
28
|
+
/** 正则表达式校验 */
|
|
29
|
+
pattern?: RegExp;
|
|
30
|
+
/** 校验失败时展示的错误文案 */
|
|
31
|
+
message?: string;
|
|
32
|
+
/** 自定义校验函数,返回错误文案字符串或 reject 都会转成字段错误;返回空/Promise<void> 表示校验通过 */
|
|
33
|
+
validator?: (value: unknown, values: V) => string | void | Promise<string | void>;
|
|
34
|
+
}
|
|
35
|
+
/** 表单错误信息字典(字段名 -> 错误消息数组) */
|
|
36
|
+
export type FormErrors<V extends FormValues = FormValues> = Partial<Record<keyof V & string, string[]>>;
|
|
37
|
+
/** 表单整体校验结果对象 */
|
|
38
|
+
export type FormValidationResult<V extends FormValues = FormValues> = {
|
|
39
|
+
valid: true;
|
|
40
|
+
values: V;
|
|
41
|
+
errors: FormErrors<V>;
|
|
42
|
+
} | {
|
|
43
|
+
valid: false;
|
|
44
|
+
values: V;
|
|
45
|
+
errors: FormErrors<V>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Form 组件属性接口
|
|
49
|
+
*/
|
|
50
|
+
export interface FormProps<V extends FormValues = FormValues> extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'onReset'> {
|
|
51
|
+
/** 受控表单值数据对象 */
|
|
52
|
+
values?: V;
|
|
53
|
+
/** 非受控初始表单值数据对象 */
|
|
54
|
+
defaultValues?: V;
|
|
55
|
+
/** 表单布局排版方式,默认为 `vertical` */
|
|
56
|
+
layout?: FormLayout;
|
|
57
|
+
/** 标签文本统一宽度(如 `100px` 或 `100`) */
|
|
58
|
+
labelWidth?: number | string;
|
|
59
|
+
/** 标签对齐方式,默认为 `right`(水平布局下) */
|
|
60
|
+
labelAlign?: 'left' | 'right';
|
|
61
|
+
/** 全局默认的校验触发时机,默认为 `['change', 'blur']` */
|
|
62
|
+
validateTrigger?: FormValidateTrigger | FormValidateTrigger[];
|
|
63
|
+
/** 任何字段值发生变更时的回调函数 */
|
|
64
|
+
onValuesChange?: (changedValues: Partial<V>, values: V) => void;
|
|
65
|
+
/** 校验成功并通过后的提交回调函数 */
|
|
66
|
+
onFinish?: (values: V) => void | Promise<void>;
|
|
67
|
+
/** 提交回调抛出异常时触发;Form 会消费异常,避免原生 submit 产生未处理 Promise */
|
|
68
|
+
onFinishError?: (error: unknown, values: V) => void;
|
|
69
|
+
/** 校验失败未能提交时的回调函数 */
|
|
70
|
+
onFinishFailed?: (errors: FormErrors<V>, values: V) => void;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* FormItem 表单项组件属性接口
|
|
74
|
+
*/
|
|
75
|
+
export interface FormItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
76
|
+
/** 绑定的表单字段名 */
|
|
77
|
+
name?: string;
|
|
78
|
+
/** 标签标题文本或自定义节点 */
|
|
79
|
+
label?: ReactNode;
|
|
80
|
+
/** 是否标记为必填(展示必填星号) */
|
|
81
|
+
required?: boolean;
|
|
82
|
+
/** 当前字段专属的校验规则列表 */
|
|
83
|
+
rules?: FormRule[];
|
|
84
|
+
/** 额外的底部帮助/说明文本 */
|
|
85
|
+
help?: ReactNode;
|
|
86
|
+
/** 子控件绑定值的属性名,默认为 `'value'`(如 Checkbox 可指定为 `'checked'`) */
|
|
87
|
+
valuePropName?: string;
|
|
88
|
+
/** 收集子控件值变化的原生/自定义事件名称,默认为 `'onChange'` */
|
|
89
|
+
trigger?: string;
|
|
90
|
+
/** 自定义从事件参数中提取目标值的转换函数 */
|
|
91
|
+
getValueFromEvent?: (...args: unknown[]) => unknown;
|
|
92
|
+
/** 当前字段专属的校验触发时机,覆盖 Form 顶层配置 */
|
|
93
|
+
validateTrigger?: FormValidateTrigger | FormValidateTrigger[];
|
|
94
|
+
/** 唯一的表单输入控件子元素(如 Input、Select、Switch 等) */
|
|
95
|
+
children: ReactElement;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Form 组件暴露的命令式 Ref 操作句柄
|
|
99
|
+
*/
|
|
100
|
+
export interface FormRef<V extends FormValues = FormValues> {
|
|
101
|
+
/** 获取最近一次同步写入的值快照,可在 React 下一次渲染前读取 */
|
|
102
|
+
getValues: () => V;
|
|
103
|
+
/** 命令式批量设置表单字段值 */
|
|
104
|
+
setValues: (values: Partial<V>) => void;
|
|
105
|
+
/** 重置表单所有字段至初始值并清空错误 */
|
|
106
|
+
reset: () => void;
|
|
107
|
+
/** 校验当前已注册字段,不触发 onFinish/onFinishFailed */
|
|
108
|
+
validate: () => Promise<FormValidationResult<V>>;
|
|
109
|
+
/** 校验并执行提交流程;同一时间的重复调用复用同一个 Promise */
|
|
110
|
+
submit: () => Promise<FormValidationResult<V>>;
|
|
111
|
+
/** 查询当前是否正在执行提交操作 */
|
|
112
|
+
isSubmitting: () => boolean;
|
|
113
|
+
/** 获取当前所有字段的错误信息快照 */
|
|
114
|
+
getErrors: () => FormErrors<V>;
|
|
115
|
+
}
|
|
116
|
+
/** Form 组件类型定义(支持泛型值推导) */
|
|
117
|
+
export type FormComponent = {
|
|
118
|
+
<V extends FormValues = FormValues>(props: FormProps<V> & RefAttributes<FormRef<V>>): ReactElement;
|
|
119
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Input from './Input.cjs';
|
|
2
|
+
/** Input 文本输入框组件 */
|
|
3
|
+
export declare const VlInput: import("react").ForwardRefExoticComponent<import("./type.cjs").InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export type { InputProps, InputSize, InputRef, InputIcon } from './type.cjs';
|
|
5
|
+
export default Input;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Input from './Input.js';
|
|
2
|
+
/** Input 文本输入框组件 */
|
|
3
|
+
export declare const VlInput: import("react").ForwardRefExoticComponent<import("./type.js").InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export type { InputProps, InputSize, InputRef, InputIcon } from './type.js';
|
|
5
|
+
export default Input;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { ComponentIcon } from '../_shared/icon.cjs';
|
|
3
|
+
/** 输入框尺寸:小 (sm) | 中等 (md) | 大 (lg) */
|
|
4
|
+
export type InputSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
/** 输入框图标类型 */
|
|
6
|
+
export type InputIcon = ComponentIcon;
|
|
7
|
+
/**
|
|
8
|
+
* Input 组件属性接口
|
|
9
|
+
*/
|
|
10
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'value' | 'defaultValue' | 'onChange' | 'prefix' | 'suffix'> {
|
|
11
|
+
/** 受控模式:当前输入框文本值 */
|
|
12
|
+
value?: string | number;
|
|
13
|
+
/** 非受控模式:初始输入框文本值 */
|
|
14
|
+
defaultValue?: string | number;
|
|
15
|
+
/** 原生占位提示文案 */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** 是否禁用输入框,默认为 false */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** 是否展示加载中动画指示器,默认为 false */
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/** 输入框尺寸大小,默认为 `md` */
|
|
22
|
+
size?: InputSize;
|
|
23
|
+
/** 原生 `<input>` 类型(如 `'text'`、`'password'` 等),默认为 `'text'` */
|
|
24
|
+
type?: string;
|
|
25
|
+
/** 是否支持一键清空输入内容,默认为 false */
|
|
26
|
+
clearable?: boolean;
|
|
27
|
+
/** 前置装饰图标 */
|
|
28
|
+
prefixIcon?: InputIcon;
|
|
29
|
+
/** 后置装饰图标 */
|
|
30
|
+
suffixIcon?: InputIcon;
|
|
31
|
+
/** 底部辅助提示/错误文案 */
|
|
32
|
+
tips?: string;
|
|
33
|
+
/** 前置自定义内容插槽(位于输入框内部最左侧) */
|
|
34
|
+
prefix?: ReactNode;
|
|
35
|
+
/** 后置自定义内容插槽(位于输入框内部最右侧) */
|
|
36
|
+
suffix?: ReactNode;
|
|
37
|
+
/** 输入值变化时的回调函数(返回规整后的字符串) */
|
|
38
|
+
onChange?: (value: string) => void;
|
|
39
|
+
/** 点击清空图标时的回调函数 */
|
|
40
|
+
onClear?: () => void;
|
|
41
|
+
}
|
|
42
|
+
/** Input 根原生 input DOM 元素类型 */
|
|
43
|
+
export type InputRef = HTMLInputElement;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { ComponentIcon } from '../_shared/icon.js';
|
|
3
|
+
/** 输入框尺寸:小 (sm) | 中等 (md) | 大 (lg) */
|
|
4
|
+
export type InputSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
/** 输入框图标类型 */
|
|
6
|
+
export type InputIcon = ComponentIcon;
|
|
7
|
+
/**
|
|
8
|
+
* Input 组件属性接口
|
|
9
|
+
*/
|
|
10
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'value' | 'defaultValue' | 'onChange' | 'prefix' | 'suffix'> {
|
|
11
|
+
/** 受控模式:当前输入框文本值 */
|
|
12
|
+
value?: string | number;
|
|
13
|
+
/** 非受控模式:初始输入框文本值 */
|
|
14
|
+
defaultValue?: string | number;
|
|
15
|
+
/** 原生占位提示文案 */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** 是否禁用输入框,默认为 false */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** 是否展示加载中动画指示器,默认为 false */
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/** 输入框尺寸大小,默认为 `md` */
|
|
22
|
+
size?: InputSize;
|
|
23
|
+
/** 原生 `<input>` 类型(如 `'text'`、`'password'` 等),默认为 `'text'` */
|
|
24
|
+
type?: string;
|
|
25
|
+
/** 是否支持一键清空输入内容,默认为 false */
|
|
26
|
+
clearable?: boolean;
|
|
27
|
+
/** 前置装饰图标 */
|
|
28
|
+
prefixIcon?: InputIcon;
|
|
29
|
+
/** 后置装饰图标 */
|
|
30
|
+
suffixIcon?: InputIcon;
|
|
31
|
+
/** 底部辅助提示/错误文案 */
|
|
32
|
+
tips?: string;
|
|
33
|
+
/** 前置自定义内容插槽(位于输入框内部最左侧) */
|
|
34
|
+
prefix?: ReactNode;
|
|
35
|
+
/** 后置自定义内容插槽(位于输入框内部最右侧) */
|
|
36
|
+
suffix?: ReactNode;
|
|
37
|
+
/** 输入值变化时的回调函数(返回规整后的字符串) */
|
|
38
|
+
onChange?: (value: string) => void;
|
|
39
|
+
/** 点击清空图标时的回调函数 */
|
|
40
|
+
onClear?: () => void;
|
|
41
|
+
}
|
|
42
|
+
/** Input 根原生 input DOM 元素类型 */
|
|
43
|
+
export type InputRef = HTMLInputElement;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Loading from './Loading.cjs';
|
|
2
|
+
/** Loading 加载指示器组件 */
|
|
3
|
+
export declare const VlLoading: import("react").ForwardRefExoticComponent<import("./type.cjs").LoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export type { LoadingProps, LoadingRef } from './type.cjs';
|
|
5
|
+
export default Loading;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Loading from './Loading.js';
|
|
2
|
+
/** Loading 加载指示器组件 */
|
|
3
|
+
export declare const VlLoading: import("react").ForwardRefExoticComponent<import("./type.js").LoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export type { LoadingProps, LoadingRef } from './type.js';
|
|
5
|
+
export default Loading;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Loading 根 DOM 元素类型 */
|
|
3
|
+
export type LoadingRef = HTMLDivElement;
|
|
4
|
+
/**
|
|
5
|
+
* Loading 组件属性接口
|
|
6
|
+
*/
|
|
7
|
+
export interface LoadingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
8
|
+
/** 是否显示加载中状态,默认为 false */
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
/** 加载文案提示 */
|
|
11
|
+
text?: ReactNode;
|
|
12
|
+
/** 自定义加载指示器,使用 ReactNode 避免执行未经净化的 HTML 字符串 */
|
|
13
|
+
spinner?: ReactNode;
|
|
14
|
+
/** 遮罩层背景颜色(如 `rgba(255, 255, 255, 0.8)`) */
|
|
15
|
+
background?: string;
|
|
16
|
+
/** 是否以全屏模态遮罩形式展示,默认为 false */
|
|
17
|
+
fullscreen?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Loading 根 DOM 元素类型 */
|
|
3
|
+
export type LoadingRef = HTMLDivElement;
|
|
4
|
+
/**
|
|
5
|
+
* Loading 组件属性接口
|
|
6
|
+
*/
|
|
7
|
+
export interface LoadingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
8
|
+
/** 是否显示加载中状态,默认为 false */
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
/** 加载文案提示 */
|
|
11
|
+
text?: ReactNode;
|
|
12
|
+
/** 自定义加载指示器,使用 ReactNode 避免执行未经净化的 HTML 字符串 */
|
|
13
|
+
spinner?: ReactNode;
|
|
14
|
+
/** 遮罩层背景颜色(如 `rgba(255, 255, 255, 0.8)`) */
|
|
15
|
+
background?: string;
|
|
16
|
+
/** 是否以全屏模态遮罩形式展示,默认为 false */
|
|
17
|
+
fullscreen?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MessageBoxComponent } from './type.cjs';
|
|
2
|
+
/** MessageBox 确认消息弹框组件(支持声明式与命令式 alert/confirm 调用) */
|
|
3
|
+
export declare const VlMessageBox: MessageBoxComponent;
|
|
4
|
+
export type { MessageBoxProps, MessageBoxOptions, MessageBoxType, MessageBoxAction, MessageBoxRef, MessageBoxComponent } from './type.cjs';
|
|
5
|
+
export default VlMessageBox;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MessageBoxComponent } from './type.js';
|
|
2
|
+
/** MessageBox 确认消息弹框组件(支持声明式与命令式 alert/confirm 调用) */
|
|
3
|
+
export declare const VlMessageBox: MessageBoxComponent;
|
|
4
|
+
export type { MessageBoxProps, MessageBoxOptions, MessageBoxType, MessageBoxAction, MessageBoxRef, MessageBoxComponent } from './type.js';
|
|
5
|
+
export default VlMessageBox;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { MessageBoxAction, MessageBoxOptions } from './type.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* 打开仅含确认操作的命令式消息框。
|
|
5
|
+
* Promise 在确认成功后 resolve;通过关闭按钮或 Escape 退出时以 `close` reject。
|
|
6
|
+
*/
|
|
7
|
+
export declare const alert: (content: ReactNode, options?: MessageBoxOptions) => Promise<MessageBoxAction>;
|
|
8
|
+
/**
|
|
9
|
+
* 打开同时提供确认与取消操作的命令式消息框。
|
|
10
|
+
* 取消按钮与其他关闭入口分别以 `cancel`、`close` reject,便于调用方保留不同业务分支。
|
|
11
|
+
*/
|
|
12
|
+
export declare const confirm: (content: ReactNode, options?: MessageBoxOptions) => Promise<MessageBoxAction>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { MessageBoxAction, MessageBoxOptions } from './type.js';
|
|
3
|
+
/**
|
|
4
|
+
* 打开仅含确认操作的命令式消息框。
|
|
5
|
+
* Promise 在确认成功后 resolve;通过关闭按钮或 Escape 退出时以 `close` reject。
|
|
6
|
+
*/
|
|
7
|
+
export declare const alert: (content: ReactNode, options?: MessageBoxOptions) => Promise<MessageBoxAction>;
|
|
8
|
+
/**
|
|
9
|
+
* 打开同时提供确认与取消操作的命令式消息框。
|
|
10
|
+
* 取消按钮与其他关闭入口分别以 `cancel`、`close` reject,便于调用方保留不同业务分支。
|
|
11
|
+
*/
|
|
12
|
+
export declare const confirm: (content: ReactNode, options?: MessageBoxOptions) => Promise<MessageBoxAction>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MessageBox 消息弹框的声明式与命令式公共类型定义。
|
|
3
|
+
*
|
|
4
|
+
* 动作类型用于精确区分用户退出路径:
|
|
5
|
+
* - `'confirm'`: 用户点击确认按钮且异步任务成功;
|
|
6
|
+
* - `'cancel'`: 用户主动点击取消按钮;
|
|
7
|
+
* - `'close'`: 用户点击右上角关闭按钮、遮罩层或按下 Escape。
|
|
8
|
+
*/
|
|
9
|
+
import type { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
10
|
+
import type { ModalProps } from '../Modal/index.cjs';
|
|
11
|
+
/** 消息弹框语义类型:信息 (info) | 成功 (success) | 警告 (warning) | 错误 (error) */
|
|
12
|
+
export type MessageBoxType = 'info' | 'success' | 'warning' | 'error';
|
|
13
|
+
/** 弹框动作结算字面量 */
|
|
14
|
+
export type MessageBoxAction = 'confirm' | 'cancel' | 'close';
|
|
15
|
+
/** MessageBox 根 DOM 元素类型 */
|
|
16
|
+
export type MessageBoxRef = HTMLDivElement;
|
|
17
|
+
/**
|
|
18
|
+
* MessageBox 组件属性接口
|
|
19
|
+
*/
|
|
20
|
+
export interface MessageBoxProps extends Omit<ModalProps, 'children' | 'footer' | 'header' | 'onClose' | 'title'> {
|
|
21
|
+
/** 弹框标题,默认为 `'提示'` */
|
|
22
|
+
title?: ReactNode;
|
|
23
|
+
/** 提示消息正文内容 */
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
/** 消息提示类型,默认为 `'info'` */
|
|
26
|
+
type?: MessageBoxType;
|
|
27
|
+
/** 是否展示取消按钮,默认为 false */
|
|
28
|
+
showCancelButton?: boolean;
|
|
29
|
+
/** 确认按钮文案,默认为 `'确定'` */
|
|
30
|
+
confirmButtonText?: ReactNode;
|
|
31
|
+
/** 确认进行中时的按钮 loading 文案 */
|
|
32
|
+
confirmButtonLoadingText?: ReactNode;
|
|
33
|
+
/** 取消按钮文案,默认为 `'取消'` */
|
|
34
|
+
cancelButtonText?: ReactNode;
|
|
35
|
+
/** 点击确认按钮触发的回调函数,可返回 Promise 触发按钮 loading;任务失败时保持打开 */
|
|
36
|
+
onConfirm?: () => void | Promise<void>;
|
|
37
|
+
/** 点击取消按钮触发的回调函数 */
|
|
38
|
+
onCancel?: () => void;
|
|
39
|
+
/** 仅由 Escape、遮罩或右上角关闭按钮触发,取消按钮单独触发 onCancel */
|
|
40
|
+
onClose?: () => void;
|
|
41
|
+
/** onConfirm 抛错或 reject 时触发,错误不会自动关闭 MessageBox */
|
|
42
|
+
onConfirmError?: (error: unknown) => void;
|
|
43
|
+
}
|
|
44
|
+
/** 命令式调用配置选项类型 */
|
|
45
|
+
export type MessageBoxOptions = Omit<MessageBoxProps, 'children' | 'defaultOpen' | 'onChange' | 'open' | 'showCancelButton'>;
|
|
46
|
+
/** 带命令式 alert/confirm 方法的 MessageBox 组件类型 */
|
|
47
|
+
export interface MessageBoxComponent extends ForwardRefExoticComponent<MessageBoxProps & RefAttributes<MessageBoxRef>> {
|
|
48
|
+
/**
|
|
49
|
+
* 命令式唤起警告提示框(仅包含“确定”按钮)。
|
|
50
|
+
* @param content 提示文本或 ReactNode
|
|
51
|
+
* @param options 可选配置
|
|
52
|
+
* @returns 动作 Promise,用户确认时 resolve('confirm'),用户点击关闭或按 Esc 时 reject('close')
|
|
53
|
+
*/
|
|
54
|
+
alert: (content: ReactNode, options?: MessageBoxOptions) => Promise<MessageBoxAction>;
|
|
55
|
+
/**
|
|
56
|
+
* 命令式唤起操作确认框(包含“确定”与“取消”按钮)。
|
|
57
|
+
* @param content 提示文本或 ReactNode
|
|
58
|
+
* @param options 可选配置
|
|
59
|
+
* @returns 动作 Promise,用户确认时 resolve('confirm'),用户取消时 reject('cancel'),关闭/Esc 时 reject('close')
|
|
60
|
+
*/
|
|
61
|
+
confirm: (content: ReactNode, options?: MessageBoxOptions) => Promise<MessageBoxAction>;
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MessageBox 消息弹框的声明式与命令式公共类型定义。
|
|
3
|
+
*
|
|
4
|
+
* 动作类型用于精确区分用户退出路径:
|
|
5
|
+
* - `'confirm'`: 用户点击确认按钮且异步任务成功;
|
|
6
|
+
* - `'cancel'`: 用户主动点击取消按钮;
|
|
7
|
+
* - `'close'`: 用户点击右上角关闭按钮、遮罩层或按下 Escape。
|
|
8
|
+
*/
|
|
9
|
+
import type { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
10
|
+
import type { ModalProps } from '../Modal/index.js';
|
|
11
|
+
/** 消息弹框语义类型:信息 (info) | 成功 (success) | 警告 (warning) | 错误 (error) */
|
|
12
|
+
export type MessageBoxType = 'info' | 'success' | 'warning' | 'error';
|
|
13
|
+
/** 弹框动作结算字面量 */
|
|
14
|
+
export type MessageBoxAction = 'confirm' | 'cancel' | 'close';
|
|
15
|
+
/** MessageBox 根 DOM 元素类型 */
|
|
16
|
+
export type MessageBoxRef = HTMLDivElement;
|
|
17
|
+
/**
|
|
18
|
+
* MessageBox 组件属性接口
|
|
19
|
+
*/
|
|
20
|
+
export interface MessageBoxProps extends Omit<ModalProps, 'children' | 'footer' | 'header' | 'onClose' | 'title'> {
|
|
21
|
+
/** 弹框标题,默认为 `'提示'` */
|
|
22
|
+
title?: ReactNode;
|
|
23
|
+
/** 提示消息正文内容 */
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
/** 消息提示类型,默认为 `'info'` */
|
|
26
|
+
type?: MessageBoxType;
|
|
27
|
+
/** 是否展示取消按钮,默认为 false */
|
|
28
|
+
showCancelButton?: boolean;
|
|
29
|
+
/** 确认按钮文案,默认为 `'确定'` */
|
|
30
|
+
confirmButtonText?: ReactNode;
|
|
31
|
+
/** 确认进行中时的按钮 loading 文案 */
|
|
32
|
+
confirmButtonLoadingText?: ReactNode;
|
|
33
|
+
/** 取消按钮文案,默认为 `'取消'` */
|
|
34
|
+
cancelButtonText?: ReactNode;
|
|
35
|
+
/** 点击确认按钮触发的回调函数,可返回 Promise 触发按钮 loading;任务失败时保持打开 */
|
|
36
|
+
onConfirm?: () => void | Promise<void>;
|
|
37
|
+
/** 点击取消按钮触发的回调函数 */
|
|
38
|
+
onCancel?: () => void;
|
|
39
|
+
/** 仅由 Escape、遮罩或右上角关闭按钮触发,取消按钮单独触发 onCancel */
|
|
40
|
+
onClose?: () => void;
|
|
41
|
+
/** onConfirm 抛错或 reject 时触发,错误不会自动关闭 MessageBox */
|
|
42
|
+
onConfirmError?: (error: unknown) => void;
|
|
43
|
+
}
|
|
44
|
+
/** 命令式调用配置选项类型 */
|
|
45
|
+
export type MessageBoxOptions = Omit<MessageBoxProps, 'children' | 'defaultOpen' | 'onChange' | 'open' | 'showCancelButton'>;
|
|
46
|
+
/** 带命令式 alert/confirm 方法的 MessageBox 组件类型 */
|
|
47
|
+
export interface MessageBoxComponent extends ForwardRefExoticComponent<MessageBoxProps & RefAttributes<MessageBoxRef>> {
|
|
48
|
+
/**
|
|
49
|
+
* 命令式唤起警告提示框(仅包含“确定”按钮)。
|
|
50
|
+
* @param content 提示文本或 ReactNode
|
|
51
|
+
* @param options 可选配置
|
|
52
|
+
* @returns 动作 Promise,用户确认时 resolve('confirm'),用户点击关闭或按 Esc 时 reject('close')
|
|
53
|
+
*/
|
|
54
|
+
alert: (content: ReactNode, options?: MessageBoxOptions) => Promise<MessageBoxAction>;
|
|
55
|
+
/**
|
|
56
|
+
* 命令式唤起操作确认框(包含“确定”与“取消”按钮)。
|
|
57
|
+
* @param content 提示文本或 ReactNode
|
|
58
|
+
* @param options 可选配置
|
|
59
|
+
* @returns 动作 Promise,用户确认时 resolve('confirm'),用户取消时 reject('cancel'),关闭/Esc 时 reject('close')
|
|
60
|
+
*/
|
|
61
|
+
confirm: (content: ReactNode, options?: MessageBoxOptions) => Promise<MessageBoxAction>;
|
|
62
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Modal from './Modal.cjs';
|
|
2
|
+
/** Modal 对话框组件 */
|
|
3
|
+
export declare const VlModal: import("react").ForwardRefExoticComponent<import("./type.cjs").ModalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export type { ModalProps, ModalRef } from './type.cjs';
|
|
5
|
+
export default Modal;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Modal from './Modal.js';
|
|
2
|
+
/** Modal 对话框组件 */
|
|
3
|
+
export declare const VlModal: import("react").ForwardRefExoticComponent<import("./type.js").ModalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export type { ModalProps, ModalRef } from './type.js';
|
|
5
|
+
export default Modal;
|