@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,201 @@
|
|
|
1
|
+
import { t as e } from "./effect-nifYL_rH.js";
|
|
2
|
+
import { n as t, t as n } from "./state-oH-YwB7_.js";
|
|
3
|
+
import { t as r } from "./client-pj_wzx28.js";
|
|
4
|
+
import { n as i } from "./refs-D5IYOBaf.js";
|
|
5
|
+
import { n as a, t as o } from "./number-BN2jHM6Z.js";
|
|
6
|
+
import { t as s } from "./id-CHixuHb7.js";
|
|
7
|
+
import { n as ee, r as te, t as ne } from "./dialog-shell-DehX3PNh.js";
|
|
8
|
+
import { X as re } from "lucide-react";
|
|
9
|
+
import { forwardRef as c, useCallback as l, useEffect as u, useMemo as ie, useRef as d, useState as ae } from "react";
|
|
10
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
+
//#region components/Modal/Modal.tsx
|
|
12
|
+
var oe = -24, m = c((c, m) => {
|
|
13
|
+
let { open: h, defaultOpen: g = !1, title: _, width: se = 520, offsetY: v = oe, center: ce = !1, mask: le = !0, closeOnClickOverlay: ue = !0, closeOnPressEscape: de = !0, showClose: y = !0, lockScroll: fe = !0, destroyOnClose: b = !1, draggable: x = !0, fullscreen: S = !1, zIndex: C, header: w, footer: T, className: pe, style: me, children: he, onClick: ge, onChange: _e, onOpen: E, onClose: D, onAfterClose: ve, "aria-label": ye, "aria-labelledby": be, "aria-describedby": xe, ...Se } = c, O = r(), k = d(null), Ce = ie(() => i(k, m), [m]), we = n(c, "open"), [A, j] = t({
|
|
14
|
+
value: !!h,
|
|
15
|
+
defaultValue: g,
|
|
16
|
+
controlled: we,
|
|
17
|
+
onChange: _e
|
|
18
|
+
}), [Te, M] = ae(!1), N = d({
|
|
19
|
+
x: 0,
|
|
20
|
+
y: 0
|
|
21
|
+
}), P = d(!1), F = d(!1), I = d({
|
|
22
|
+
x: 0,
|
|
23
|
+
y: 0
|
|
24
|
+
}), L = d(null), R = d(!1), z = s("vl-modal-title"), B = l(() => j(!1), [j]), { isTopLayer: V } = te({
|
|
25
|
+
active: O && A,
|
|
26
|
+
containerRef: k,
|
|
27
|
+
closeOnPressEscape: de,
|
|
28
|
+
lockScroll: fe,
|
|
29
|
+
onRequestClose: B
|
|
30
|
+
}), H = l((e) => {
|
|
31
|
+
k.current && (k.current.style.visibility = e ? "visible" : "hidden");
|
|
32
|
+
}, []), U = l((e, t) => {
|
|
33
|
+
N.current = {
|
|
34
|
+
x: e,
|
|
35
|
+
y: t
|
|
36
|
+
}, k.current && (k.current.style.left = `${e}px`, k.current.style.top = `${t}px`);
|
|
37
|
+
}, []), W = l((e, t) => {
|
|
38
|
+
let n = e.getBoundingClientRect();
|
|
39
|
+
return {
|
|
40
|
+
rect: n,
|
|
41
|
+
maxX: Math.max(t, window.innerWidth - n.width - t),
|
|
42
|
+
maxY: Math.max(t, window.innerHeight - n.height - t)
|
|
43
|
+
};
|
|
44
|
+
}, []), G = l(() => {
|
|
45
|
+
let e = k.current;
|
|
46
|
+
if (!e) return;
|
|
47
|
+
if (S) {
|
|
48
|
+
U(0, 0);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
let { rect: t, maxX: n, maxY: r } = W(e, 16), i = (window.innerHeight - t.height) / 2 + v;
|
|
52
|
+
U(Math.round(o((window.innerWidth - t.width) / 2, 16, n)), Math.round(o(i, 16, r)));
|
|
53
|
+
}, [
|
|
54
|
+
S,
|
|
55
|
+
W,
|
|
56
|
+
v,
|
|
57
|
+
U
|
|
58
|
+
]), K = l(() => {
|
|
59
|
+
let e = k.current;
|
|
60
|
+
if (!e) return;
|
|
61
|
+
let { maxX: t, maxY: n } = W(e, 8);
|
|
62
|
+
U(Math.round(o(N.current.x, 8, t)), Math.round(o(N.current.y, 8, n)));
|
|
63
|
+
}, [W, U]), q = l((e, t) => {
|
|
64
|
+
let n = k.current;
|
|
65
|
+
if (!n || S) return;
|
|
66
|
+
let { maxX: r, maxY: i } = W(n, 8), a = o(e - I.current.x, 8, r), s = o(t - I.current.y, 8, i);
|
|
67
|
+
U(Math.round(a), Math.round(s)), P.current = !0;
|
|
68
|
+
}, [
|
|
69
|
+
S,
|
|
70
|
+
W,
|
|
71
|
+
U
|
|
72
|
+
]), J = d(q);
|
|
73
|
+
e(() => {
|
|
74
|
+
J.current = q;
|
|
75
|
+
}, [q]);
|
|
76
|
+
let Y = l((e) => {
|
|
77
|
+
F.current && J.current(e.clientX, e.clientY);
|
|
78
|
+
}, []), X = l(() => {
|
|
79
|
+
window.removeEventListener("pointermove", Y), L.current?.(), L.current = null;
|
|
80
|
+
}, [Y]), Z = l(() => {
|
|
81
|
+
F.current && (F.current = !1, M(!1), X());
|
|
82
|
+
}, [X]), Ee = (e) => {
|
|
83
|
+
if (!x || S || !A || !V() || e.button !== 0 || e.target.closest(".vl-modal__close")) return;
|
|
84
|
+
let t = k.current;
|
|
85
|
+
if (!t) return;
|
|
86
|
+
let n = t.getBoundingClientRect();
|
|
87
|
+
I.current = {
|
|
88
|
+
x: e.clientX - n.left,
|
|
89
|
+
y: e.clientY - n.top
|
|
90
|
+
}, F.current = !0, M(!0), L.current = ee(), window.addEventListener("pointermove", Y), window.addEventListener("pointerup", Z, { once: !0 });
|
|
91
|
+
};
|
|
92
|
+
u(() => {
|
|
93
|
+
let e = R.current;
|
|
94
|
+
A && !e ? E?.() : !A && e && D?.(), R.current = A;
|
|
95
|
+
}, [
|
|
96
|
+
A,
|
|
97
|
+
E,
|
|
98
|
+
D
|
|
99
|
+
]), e(() => {
|
|
100
|
+
!A || !O || (H(!1), S ? U(0, 0) : !b && P.current ? K() : G(), H(!0));
|
|
101
|
+
}, [
|
|
102
|
+
A,
|
|
103
|
+
O,
|
|
104
|
+
S,
|
|
105
|
+
b,
|
|
106
|
+
G,
|
|
107
|
+
K,
|
|
108
|
+
U,
|
|
109
|
+
H
|
|
110
|
+
]), u(() => {
|
|
111
|
+
A || Z();
|
|
112
|
+
}, [A, Z]), u(() => {
|
|
113
|
+
if (!A) return;
|
|
114
|
+
let e = () => {
|
|
115
|
+
F.current || (P.current ? K() : G());
|
|
116
|
+
};
|
|
117
|
+
return window.addEventListener("resize", e, { passive: !0 }), () => window.removeEventListener("resize", e);
|
|
118
|
+
}, [
|
|
119
|
+
A,
|
|
120
|
+
G,
|
|
121
|
+
K
|
|
122
|
+
]), u(() => () => {
|
|
123
|
+
window.removeEventListener("pointerup", Z), X();
|
|
124
|
+
}, [Z, X]);
|
|
125
|
+
let De = () => {
|
|
126
|
+
ue && V() && B();
|
|
127
|
+
}, Oe = (e) => {
|
|
128
|
+
e.stopPropagation(), ge?.(e);
|
|
129
|
+
}, ke = [
|
|
130
|
+
"vl-modal",
|
|
131
|
+
Te ? "is-dragging" : "",
|
|
132
|
+
ce ? "is-center" : "",
|
|
133
|
+
S ? "is-fullscreen" : "",
|
|
134
|
+
pe || ""
|
|
135
|
+
].filter(Boolean).join(" "), Ae = ["vl-modal__header", x && !S ? "is-draggable" : ""].filter(Boolean).join(" "), Q = { ...me };
|
|
136
|
+
C !== void 0 && (Q.zIndex = C), S ? (Q.width = "100vw", Q.height = "100vh") : Q.width = a(se) ?? "520px";
|
|
137
|
+
let $ = w ?? (_ ? /* @__PURE__ */ f("div", {
|
|
138
|
+
id: z,
|
|
139
|
+
className: "vl-modal__title",
|
|
140
|
+
children: _
|
|
141
|
+
}) : null), je = be ?? (!w && _ ? z : void 0), Me = ye ?? (je ? void 0 : typeof _ == "string" ? _ : "对话框");
|
|
142
|
+
return /* @__PURE__ */ p(ne, {
|
|
143
|
+
clientReady: O,
|
|
144
|
+
open: A,
|
|
145
|
+
mask: le,
|
|
146
|
+
destroyOnClose: b,
|
|
147
|
+
maskTransitionName: "vl-modal-mask",
|
|
148
|
+
transitionName: "vl-modal",
|
|
149
|
+
maskClassName: "vl-modal__mask",
|
|
150
|
+
panelClassName: ke,
|
|
151
|
+
panelStyle: Q,
|
|
152
|
+
maskStyle: C === void 0 ? void 0 : { zIndex: C - 1 },
|
|
153
|
+
panelRef: Ce,
|
|
154
|
+
role: "dialog",
|
|
155
|
+
ariaLabel: Me,
|
|
156
|
+
ariaLabelledBy: je,
|
|
157
|
+
ariaDescribedBy: xe,
|
|
158
|
+
onMaskClick: De,
|
|
159
|
+
onPanelClick: Oe,
|
|
160
|
+
onAfterLeave: () => {
|
|
161
|
+
Z(), b && (P.current = !1), ve?.();
|
|
162
|
+
},
|
|
163
|
+
panelProps: Se,
|
|
164
|
+
children: [
|
|
165
|
+
$ || y ? /* @__PURE__ */ f("div", {
|
|
166
|
+
className: Ae,
|
|
167
|
+
onPointerDown: Ee,
|
|
168
|
+
children: /* @__PURE__ */ p("div", {
|
|
169
|
+
className: "vl-modal__headerInner",
|
|
170
|
+
children: [/* @__PURE__ */ f("div", {
|
|
171
|
+
className: "vl-modal__headerMain",
|
|
172
|
+
children: $
|
|
173
|
+
}), y ? /* @__PURE__ */ f("button", {
|
|
174
|
+
type: "button",
|
|
175
|
+
className: "vl-modal__close",
|
|
176
|
+
"aria-label": "关闭对话框",
|
|
177
|
+
onClick: B,
|
|
178
|
+
children: /* @__PURE__ */ f(re, {
|
|
179
|
+
size: 20,
|
|
180
|
+
"aria-hidden": "true"
|
|
181
|
+
})
|
|
182
|
+
}) : null]
|
|
183
|
+
})
|
|
184
|
+
}) : null,
|
|
185
|
+
/* @__PURE__ */ f("div", {
|
|
186
|
+
className: "vl-modal__body",
|
|
187
|
+
children: he
|
|
188
|
+
}),
|
|
189
|
+
T ? /* @__PURE__ */ f("div", {
|
|
190
|
+
className: "vl-modal__footer",
|
|
191
|
+
children: T
|
|
192
|
+
}) : null
|
|
193
|
+
]
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
m.displayName = "VlModal";
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region components/Modal/index.ts
|
|
199
|
+
var h = m, g = m;
|
|
200
|
+
//#endregion
|
|
201
|
+
export { h as n, g as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./effect-BpNxm_06.cjs"),t=require("./state-ZBA75xZ_.cjs"),n=require("./client-BkoqeUs3.cjs"),r=require("./refs-DCqd87V8.cjs"),i=require("./number-B7qJF_ZY.cjs"),a=require("./id-CF0zOP1G.cjs"),o=require("./dialog-shell-DT1EoKQG.cjs");let s=require("lucide-react"),c=require("react"),l=require("react/jsx-runtime");var ee=-24,u=(0,c.forwardRef)((u,d)=>{let{open:f,defaultOpen:te=!1,title:p,width:ne=520,offsetY:m=ee,center:re=!1,mask:ie=!0,closeOnClickOverlay:h=!0,closeOnPressEscape:g=!0,showClose:_=!0,lockScroll:ae=!0,destroyOnClose:v=!1,draggable:y=!0,fullscreen:b=!1,zIndex:x,header:S,footer:C,className:oe,style:se,children:ce,onClick:le,onChange:ue,onOpen:w,onClose:T,onAfterClose:de,"aria-label":fe,"aria-labelledby":pe,"aria-describedby":me,...he}=u,E=n.t(),D=(0,c.useRef)(null),ge=(0,c.useMemo)(()=>r.n(D,d),[d]),_e=t.t(u,`open`),[O,k]=t.n({value:!!f,defaultValue:te,controlled:_e,onChange:ue}),[ve,A]=(0,c.useState)(!1),j=(0,c.useRef)({x:0,y:0}),M=(0,c.useRef)(!1),N=(0,c.useRef)(!1),P=(0,c.useRef)({x:0,y:0}),F=(0,c.useRef)(null),I=(0,c.useRef)(!1),L=a.t(`vl-modal-title`),R=(0,c.useCallback)(()=>k(!1),[k]),{isTopLayer:z}=o.r({active:E&&O,containerRef:D,closeOnPressEscape:g,lockScroll:ae,onRequestClose:R}),B=(0,c.useCallback)(e=>{D.current&&(D.current.style.visibility=e?`visible`:`hidden`)},[]),V=(0,c.useCallback)((e,t)=>{j.current={x:e,y:t},D.current&&(D.current.style.left=`${e}px`,D.current.style.top=`${t}px`)},[]),H=(0,c.useCallback)((e,t)=>{let n=e.getBoundingClientRect();return{rect:n,maxX:Math.max(t,window.innerWidth-n.width-t),maxY:Math.max(t,window.innerHeight-n.height-t)}},[]),U=(0,c.useCallback)(()=>{let e=D.current;if(!e)return;if(b){V(0,0);return}let{rect:t,maxX:n,maxY:r}=H(e,16),a=(window.innerHeight-t.height)/2+m;V(Math.round(i.t((window.innerWidth-t.width)/2,16,n)),Math.round(i.t(a,16,r)))},[b,H,m,V]),W=(0,c.useCallback)(()=>{let e=D.current;if(!e)return;let{maxX:t,maxY:n}=H(e,8);V(Math.round(i.t(j.current.x,8,t)),Math.round(i.t(j.current.y,8,n)))},[H,V]),G=(0,c.useCallback)((e,t)=>{let n=D.current;if(!n||b)return;let{maxX:r,maxY:a}=H(n,8),o=i.t(e-P.current.x,8,r),s=i.t(t-P.current.y,8,a);V(Math.round(o),Math.round(s)),M.current=!0},[b,H,V]),K=(0,c.useRef)(G);e.t(()=>{K.current=G},[G]);let q=(0,c.useCallback)(e=>{N.current&&K.current(e.clientX,e.clientY)},[]),J=(0,c.useCallback)(()=>{window.removeEventListener(`pointermove`,q),F.current?.(),F.current=null},[q]),Y=(0,c.useCallback)(()=>{N.current&&(N.current=!1,A(!1),J())},[J]),ye=e=>{if(!y||b||!O||!z()||e.button!==0||e.target.closest(`.vl-modal__close`))return;let t=D.current;if(!t)return;let n=t.getBoundingClientRect();P.current={x:e.clientX-n.left,y:e.clientY-n.top},N.current=!0,A(!0),F.current=o.n(),window.addEventListener(`pointermove`,q),window.addEventListener(`pointerup`,Y,{once:!0})};(0,c.useEffect)(()=>{let e=I.current;O&&!e?w?.():!O&&e&&T?.(),I.current=O},[O,w,T]),e.t(()=>{!O||!E||(B(!1),b?V(0,0):!v&&M.current?W():U(),B(!0))},[O,E,b,v,U,W,V,B]),(0,c.useEffect)(()=>{O||Y()},[O,Y]),(0,c.useEffect)(()=>{if(!O)return;let e=()=>{N.current||(M.current?W():U())};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},[O,U,W]),(0,c.useEffect)(()=>()=>{window.removeEventListener(`pointerup`,Y),J()},[Y,J]);let X=()=>{h&&z()&&R()},be=e=>{e.stopPropagation(),le?.(e)},xe=[`vl-modal`,ve?`is-dragging`:``,re?`is-center`:``,b?`is-fullscreen`:``,oe||``].filter(Boolean).join(` `),Se=[`vl-modal__header`,y&&!b?`is-draggable`:``].filter(Boolean).join(` `),Z={...se};x!==void 0&&(Z.zIndex=x),b?(Z.width=`100vw`,Z.height=`100vh`):Z.width=i.n(ne)??`520px`;let Q=S??(p?(0,l.jsx)(`div`,{id:L,className:`vl-modal__title`,children:p}):null),$=pe??(!S&&p?L:void 0),Ce=fe??($?void 0:typeof p==`string`?p:`对话框`);return(0,l.jsxs)(o.t,{clientReady:E,open:O,mask:ie,destroyOnClose:v,maskTransitionName:`vl-modal-mask`,transitionName:`vl-modal`,maskClassName:`vl-modal__mask`,panelClassName:xe,panelStyle:Z,maskStyle:x===void 0?void 0:{zIndex:x-1},panelRef:ge,role:`dialog`,ariaLabel:Ce,ariaLabelledBy:$,ariaDescribedBy:me,onMaskClick:X,onPanelClick:be,onAfterLeave:()=>{Y(),v&&(M.current=!1),de?.()},panelProps:he,children:[Q||_?(0,l.jsx)(`div`,{className:Se,onPointerDown:ye,children:(0,l.jsxs)(`div`,{className:`vl-modal__headerInner`,children:[(0,l.jsx)(`div`,{className:`vl-modal__headerMain`,children:Q}),_?(0,l.jsx)(`button`,{type:`button`,className:`vl-modal__close`,"aria-label":`关闭对话框`,onClick:R,children:(0,l.jsx)(s.X,{size:20,"aria-hidden":`true`})}):null]})}):null,(0,l.jsx)(`div`,{className:`vl-modal__body`,children:ce}),C?(0,l.jsx)(`div`,{className:`vl-modal__footer`,children:C}):null]})});u.displayName=`VlModal`;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}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./state-ZBA75xZ_.cjs"),t=require("./refs-DCqd87V8.cjs"),n=require("./number-B7qJF_ZY.cjs");let r=require("react"),i=require("react/jsx-runtime");var a=(0,r.forwardRef)((a,o)=>{let{value:s,defaultValue:c=null,min:l=-1/0,max:u=1/0,step:d=1,precision:f,placeholder:p,disabled:m=!1,readonly:h=!1,controls:g=!0,size:_=`md`,inputmode:ee=`decimal`,className:v,style:y,onChange:b,onFocus:x,onBlur:S,onKeyDown:C,...w}=a,T=(0,r.useRef)(null),E=(0,r.useMemo)(()=>t.n(T,o),[o]),D=e.t(a,`value`),[O,k]=(0,r.useState)(c),[A,j]=(0,r.useState)(``),[M,N]=(0,r.useState)(!1),P=D?s??null:O,[F,I]=(0,r.useMemo)(()=>{let e=Number.isNaN(l)?-1/0:l,t=Number.isNaN(u)?1/0:u;return[Math.min(e,t),Math.max(e,t)]},[l,u]),L=(0,r.useCallback)(e=>n.t(e,F,I),[F,I]),R=(0,r.useCallback)(e=>{if(typeof f==`number`&&f>=0){let t=Math.min(20,Math.floor(f));return Number(e.toFixed(t))}return e},[f]),z=(0,r.useCallback)(e=>e==null||Number.isNaN(e)?``:`${R(L(e))}`,[R,L]),B=(0,r.useMemo)(()=>P==null||!Number.isFinite(P)?null:R(L(P)),[P,R,L]),V=(0,r.useRef)(B??null);(0,r.useEffect)(()=>{D&&(V.current=B??null)},[D,B]);let H=(0,r.useMemo)(()=>z(B),[z,B]),U=D?H:M?A:H,W=(0,r.useCallback)(e=>{V.current!==e&&(V.current=e,b?.(e))},[b]),G=(e,t=!0)=>{let n=e===null?null:R(L(e));D||k(n),W(n),t&&j(z(n))},K=(e,t=!0)=>{let n=e.trim();if(!n)return null;if(t&&/^[+-]?(?:\.|\d+\.?\d*[eE][+-]?)?$/.test(n))return;let r=Number(n);if(Number.isFinite(r))return R(L(r))},q=e=>{if(m||h)return;let t=e.target.value;M||N(!0),j(t);let n=K(t);if(n===void 0){t.trim()||G(null,!1);return}G(n,!1)},J=e=>{if(h){S?.(e);return}let t=K(A,!1);t===void 0?j(H):G(t),N(!1),S?.(e)},Y=e=>{M||(j(H),N(!0)),x?.(e)},X=(0,r.useMemo)(()=>Number.isFinite(d)&&d>0?d:1,[d]),Z=e=>{if(m||h)return;let t=(B??L(0))+e*X;T.current?.focus(),G(t)},Q=()=>Z(1),$=()=>Z(-1),te=e=>{e.key===`ArrowUp`?(e.preventDefault(),Q()):e.key===`ArrowDown`&&(e.preventDefault(),$()),C?.(e)},ne=[`vl-number-input`,_?`size-${_}`:``,g?`has-controls`:``,m?`is-disabled`:``,h?`is-readonly`:``,v||``].filter(Boolean).join(` `),re=(0,r.useMemo)(()=>m||h?!1:B===null||B<I,[m,h,B,I]),ie=(0,r.useMemo)(()=>m||h?!1:B===null||B>F,[m,h,B,F]);return(0,i.jsxs)(`div`,{className:ne,style:y,children:[g?(0,i.jsx)(`button`,{className:`control-btn is-decrease`,type:`button`,disabled:!ie,"aria-label":`减少数值`,onMouseDown:e=>e.preventDefault(),onClick:$,children:(0,i.jsx)(`span`,{"aria-hidden":`true`,children:`-`})}):null,(0,i.jsx)(`input`,{ref:E,type:`text`,value:U,placeholder:p,disabled:m,readOnly:h,inputMode:ee,role:`spinbutton`,"aria-valuenow":B??void 0,"aria-valuemin":Number.isFinite(F)?F:void 0,"aria-valuemax":Number.isFinite(I)?I:void 0,autoComplete:`off`,onInput:q,onBlur:J,onFocus:Y,onKeyDown:te,...w}),g?(0,i.jsx)(`button`,{className:`control-btn is-increase`,type:`button`,disabled:!re,"aria-label":`增加数值`,onMouseDown:e=>e.preventDefault(),onClick:Q,children:(0,i.jsx)(`span`,{"aria-hidden":`true`,children:`+`})}):null]})});a.displayName=`VlNumberInput`;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}});
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { t as e } from "./state-oH-YwB7_.js";
|
|
2
|
+
import { n as t } from "./refs-D5IYOBaf.js";
|
|
3
|
+
import { t as n } from "./number-BN2jHM6Z.js";
|
|
4
|
+
import { forwardRef as r, useCallback as i, useEffect as ee, useMemo as a, useRef as o, useState as s } from "react";
|
|
5
|
+
import { jsx as c, jsxs as te } from "react/jsx-runtime";
|
|
6
|
+
//#region components/NumberInput/NumberInput.tsx
|
|
7
|
+
var l = r((r, l) => {
|
|
8
|
+
let { value: u, defaultValue: d = null, min: f = -Infinity, max: p = Infinity, step: m = 1, precision: h, placeholder: g, disabled: _ = !1, readonly: v = !1, controls: y = !0, size: b = "md", inputmode: ne = "decimal", className: x, style: S, onChange: C, onFocus: w, onBlur: T, onKeyDown: E, ...D } = r, O = o(null), k = a(() => t(O, l), [l]), A = e(r, "value"), [j, M] = s(d), [N, P] = s(""), [F, I] = s(!1), L = A ? u ?? null : j, [R, z] = a(() => {
|
|
9
|
+
let e = Number.isNaN(f) ? -Infinity : f, t = Number.isNaN(p) ? Infinity : p;
|
|
10
|
+
return [Math.min(e, t), Math.max(e, t)];
|
|
11
|
+
}, [f, p]), B = i((e) => n(e, R, z), [R, z]), V = i((e) => {
|
|
12
|
+
if (typeof h == "number" && h >= 0) {
|
|
13
|
+
let t = Math.min(20, Math.floor(h));
|
|
14
|
+
return Number(e.toFixed(t));
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
17
|
+
}, [h]), H = i((e) => e == null || Number.isNaN(e) ? "" : `${V(B(e))}`, [V, B]), U = a(() => L == null || !Number.isFinite(L) ? null : V(B(L)), [
|
|
18
|
+
L,
|
|
19
|
+
V,
|
|
20
|
+
B
|
|
21
|
+
]), W = o(U ?? null);
|
|
22
|
+
ee(() => {
|
|
23
|
+
A && (W.current = U ?? null);
|
|
24
|
+
}, [A, U]);
|
|
25
|
+
let G = a(() => H(U), [H, U]), K = A ? G : F ? N : G, q = i((e) => {
|
|
26
|
+
W.current !== e && (W.current = e, C?.(e));
|
|
27
|
+
}, [C]), J = (e, t = !0) => {
|
|
28
|
+
let n = e === null ? null : V(B(e));
|
|
29
|
+
A || M(n), q(n), t && P(H(n));
|
|
30
|
+
}, Y = (e, t = !0) => {
|
|
31
|
+
let n = e.trim();
|
|
32
|
+
if (!n) return null;
|
|
33
|
+
if (t && /^[+-]?(?:\.|\d+\.?\d*[eE][+-]?)?$/.test(n)) return;
|
|
34
|
+
let r = Number(n);
|
|
35
|
+
if (Number.isFinite(r)) return V(B(r));
|
|
36
|
+
}, X = (e) => {
|
|
37
|
+
if (_ || v) return;
|
|
38
|
+
let t = e.target.value;
|
|
39
|
+
F || I(!0), P(t);
|
|
40
|
+
let n = Y(t);
|
|
41
|
+
if (n === void 0) {
|
|
42
|
+
t.trim() || J(null, !1);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
J(n, !1);
|
|
46
|
+
}, re = (e) => {
|
|
47
|
+
if (v) {
|
|
48
|
+
T?.(e);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
let t = Y(N, !1);
|
|
52
|
+
t === void 0 ? P(G) : J(t), I(!1), T?.(e);
|
|
53
|
+
}, ie = (e) => {
|
|
54
|
+
F || (P(G), I(!0)), w?.(e);
|
|
55
|
+
}, ae = a(() => Number.isFinite(m) && m > 0 ? m : 1, [m]), Z = (e) => {
|
|
56
|
+
if (_ || v) return;
|
|
57
|
+
let t = (U ?? B(0)) + e * ae;
|
|
58
|
+
O.current?.focus(), J(t);
|
|
59
|
+
}, Q = () => Z(1), $ = () => Z(-1), oe = (e) => {
|
|
60
|
+
e.key === "ArrowUp" ? (e.preventDefault(), Q()) : e.key === "ArrowDown" && (e.preventDefault(), $()), E?.(e);
|
|
61
|
+
}, se = [
|
|
62
|
+
"vl-number-input",
|
|
63
|
+
b ? `size-${b}` : "",
|
|
64
|
+
y ? "has-controls" : "",
|
|
65
|
+
_ ? "is-disabled" : "",
|
|
66
|
+
v ? "is-readonly" : "",
|
|
67
|
+
x || ""
|
|
68
|
+
].filter(Boolean).join(" "), ce = a(() => _ || v ? !1 : U === null || U < z, [
|
|
69
|
+
_,
|
|
70
|
+
v,
|
|
71
|
+
U,
|
|
72
|
+
z
|
|
73
|
+
]), le = a(() => _ || v ? !1 : U === null || U > R, [
|
|
74
|
+
_,
|
|
75
|
+
v,
|
|
76
|
+
U,
|
|
77
|
+
R
|
|
78
|
+
]);
|
|
79
|
+
return /* @__PURE__ */ te("div", {
|
|
80
|
+
className: se,
|
|
81
|
+
style: S,
|
|
82
|
+
children: [
|
|
83
|
+
y ? /* @__PURE__ */ c("button", {
|
|
84
|
+
className: "control-btn is-decrease",
|
|
85
|
+
type: "button",
|
|
86
|
+
disabled: !le,
|
|
87
|
+
"aria-label": "减少数值",
|
|
88
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
89
|
+
onClick: $,
|
|
90
|
+
children: /* @__PURE__ */ c("span", {
|
|
91
|
+
"aria-hidden": "true",
|
|
92
|
+
children: "-"
|
|
93
|
+
})
|
|
94
|
+
}) : null,
|
|
95
|
+
/* @__PURE__ */ c("input", {
|
|
96
|
+
ref: k,
|
|
97
|
+
type: "text",
|
|
98
|
+
value: K,
|
|
99
|
+
placeholder: g,
|
|
100
|
+
disabled: _,
|
|
101
|
+
readOnly: v,
|
|
102
|
+
inputMode: ne,
|
|
103
|
+
role: "spinbutton",
|
|
104
|
+
"aria-valuenow": U ?? void 0,
|
|
105
|
+
"aria-valuemin": Number.isFinite(R) ? R : void 0,
|
|
106
|
+
"aria-valuemax": Number.isFinite(z) ? z : void 0,
|
|
107
|
+
autoComplete: "off",
|
|
108
|
+
onInput: X,
|
|
109
|
+
onBlur: re,
|
|
110
|
+
onFocus: ie,
|
|
111
|
+
onKeyDown: oe,
|
|
112
|
+
...D
|
|
113
|
+
}),
|
|
114
|
+
y ? /* @__PURE__ */ c("button", {
|
|
115
|
+
className: "control-btn is-increase",
|
|
116
|
+
type: "button",
|
|
117
|
+
disabled: !ce,
|
|
118
|
+
"aria-label": "增加数值",
|
|
119
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
120
|
+
onClick: Q,
|
|
121
|
+
children: /* @__PURE__ */ c("span", {
|
|
122
|
+
"aria-hidden": "true",
|
|
123
|
+
children: "+"
|
|
124
|
+
})
|
|
125
|
+
}) : null
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
l.displayName = "VlNumberInput";
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region components/NumberInput/index.ts
|
|
132
|
+
var u = l, d = l;
|
|
133
|
+
//#endregion
|
|
134
|
+
export { u as n, d as t };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { t as e } from "./state-oH-YwB7_.js";
|
|
2
|
+
import { t } from "./number-BN2jHM6Z.js";
|
|
3
|
+
import { ChevronLeft as n, ChevronRight as r, ChevronsLeft as i, ChevronsRight as a } from "lucide-react";
|
|
4
|
+
import { createElement as o, forwardRef as s, useEffect as c, useMemo as l, useState as u } from "react";
|
|
5
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
6
|
+
//#region components/Pagination/Pagination.tsx
|
|
7
|
+
var p = [
|
|
8
|
+
10,
|
|
9
|
+
20,
|
|
10
|
+
50,
|
|
11
|
+
100
|
|
12
|
+
], m = (e, t) => typeof e != "number" || !Number.isFinite(e) ? t : Math.max(1, Math.floor(e)), h = (e) => typeof e != "number" || !Number.isFinite(e) ? 0 : Math.max(0, Math.floor(e)), g = (e, t) => {
|
|
13
|
+
let n = [...e ?? p].filter((e) => typeof e == "number" && Number.isFinite(e) && e > 0).map((e) => Math.floor(e)).filter((e) => e > 0).filter((e, t, n) => n.indexOf(e) === t).sort((e, t) => e - t);
|
|
14
|
+
return n.length ? n : [t];
|
|
15
|
+
}, _ = (e, t) => {
|
|
16
|
+
if (e <= 7) return Array.from({ length: e }, (e, t) => t + 1);
|
|
17
|
+
let n = Math.max(2, t - 1), r = Math.min(e - 1, t + 1), i = n > 2, a = r < e - 1;
|
|
18
|
+
return i ? a ? [
|
|
19
|
+
1,
|
|
20
|
+
"ellipsis-start",
|
|
21
|
+
n,
|
|
22
|
+
t,
|
|
23
|
+
r,
|
|
24
|
+
"ellipsis-end",
|
|
25
|
+
e
|
|
26
|
+
] : [
|
|
27
|
+
1,
|
|
28
|
+
"ellipsis-start",
|
|
29
|
+
e - 4,
|
|
30
|
+
e - 3,
|
|
31
|
+
e - 2,
|
|
32
|
+
e - 1,
|
|
33
|
+
e
|
|
34
|
+
] : [
|
|
35
|
+
1,
|
|
36
|
+
2,
|
|
37
|
+
3,
|
|
38
|
+
4,
|
|
39
|
+
5,
|
|
40
|
+
"ellipsis-end",
|
|
41
|
+
e
|
|
42
|
+
];
|
|
43
|
+
}, v = s((s, p) => {
|
|
44
|
+
let { current: v, defaultCurrent: y = 1, total: b = 0, pageSize: x, defaultPageSize: S = 10, pageSizeOptions: C, showTotal: w = !1, showSizeChanger: T = !1, showQuickJumper: ee = !1, size: E = "md", disabled: D = !1, className: te, id: O, "aria-label": k = "分页导航", onChange: A, onPageSizeChange: j, ...M } = s, N = e(s, "current"), P = e(s, "pageSize"), F = m(S, 10), [I, L] = u(() => m(y, 1)), [R, z] = u(F), [B, V] = u(""), H = h(b), U = m(P ? x : R, F), W = Math.max(1, Math.ceil(H / U)), G = t(m(N ? v : I, 1), 1, W), K = l(() => g(C, U), [C, U]), q = l(() => _(W, G), [W, G]), J = H === 0 ? [0, 0] : [(G - 1) * U + 1, Math.min(G * U, H)];
|
|
45
|
+
c(() => {
|
|
46
|
+
V(String(G));
|
|
47
|
+
}, [G]), c(() => {
|
|
48
|
+
!N && I !== G && L(G);
|
|
49
|
+
}, [
|
|
50
|
+
G,
|
|
51
|
+
N,
|
|
52
|
+
I
|
|
53
|
+
]);
|
|
54
|
+
let Y = [
|
|
55
|
+
"vl-pagination",
|
|
56
|
+
`size-${E}`,
|
|
57
|
+
D ? "is-disabled" : "",
|
|
58
|
+
te || ""
|
|
59
|
+
].filter(Boolean).join(" "), X = (e, t = U) => {
|
|
60
|
+
N || L(e), A?.(e, t);
|
|
61
|
+
}, Z = (e) => {
|
|
62
|
+
if (D) return;
|
|
63
|
+
let n = t(e, 1, W);
|
|
64
|
+
n !== G && X(n);
|
|
65
|
+
}, ne = (e) => {
|
|
66
|
+
if (D) return;
|
|
67
|
+
let n = m(Number(e.target.value), U);
|
|
68
|
+
if (n === U) return;
|
|
69
|
+
let r = Math.max(1, Math.ceil(H / n)), i = t(G, 1, r);
|
|
70
|
+
P || z(n), N || L(i), j?.(n, i), A?.(i, n);
|
|
71
|
+
}, Q = () => {
|
|
72
|
+
if (D) return;
|
|
73
|
+
let e = B.trim();
|
|
74
|
+
if (!/^\d+$/.test(e)) return;
|
|
75
|
+
let t = Number(e);
|
|
76
|
+
!Number.isSafeInteger(t) || t < 1 || t > W || Z(t);
|
|
77
|
+
}, re = (e) => {
|
|
78
|
+
e.key === "Enter" && (e.preventDefault(), Q());
|
|
79
|
+
}, $ = (e, t, n, r) => /* @__PURE__ */ d("button", {
|
|
80
|
+
type: "button",
|
|
81
|
+
className: "vl-pagination__button vl-pagination__nav-button",
|
|
82
|
+
"aria-label": t,
|
|
83
|
+
disabled: D || (e === "first" || e === "previous" ? G <= 1 : G >= W),
|
|
84
|
+
onClick: () => Z(n),
|
|
85
|
+
children: o(r, {
|
|
86
|
+
"aria-hidden": !0,
|
|
87
|
+
focusable: !1
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
return /* @__PURE__ */ f("nav", {
|
|
91
|
+
ref: p,
|
|
92
|
+
id: O,
|
|
93
|
+
className: Y,
|
|
94
|
+
"aria-label": k,
|
|
95
|
+
"aria-disabled": D || void 0,
|
|
96
|
+
...M,
|
|
97
|
+
children: [w ? /* @__PURE__ */ d("span", {
|
|
98
|
+
className: "vl-pagination__total",
|
|
99
|
+
children: typeof w == "function" ? w(H, J) : `第 ${J[0]}-${J[1]} 条,共 ${H} 条`
|
|
100
|
+
}) : null, /* @__PURE__ */ f("div", {
|
|
101
|
+
className: "vl-pagination__controls",
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ f("div", {
|
|
104
|
+
className: "vl-pagination__pages",
|
|
105
|
+
children: [
|
|
106
|
+
$("first", "第一页", 1, i),
|
|
107
|
+
$("previous", "上一页", G - 1, n),
|
|
108
|
+
q.map((e) => typeof e == "number" ? /* @__PURE__ */ d("button", {
|
|
109
|
+
type: "button",
|
|
110
|
+
className: `vl-pagination__button ${e === G ? "is-active" : ""}`,
|
|
111
|
+
"aria-label": `第 ${e} 页`,
|
|
112
|
+
"aria-current": e === G ? "page" : void 0,
|
|
113
|
+
disabled: D,
|
|
114
|
+
onClick: () => Z(e),
|
|
115
|
+
children: e
|
|
116
|
+
}, e) : /* @__PURE__ */ d("span", {
|
|
117
|
+
className: "vl-pagination__ellipsis",
|
|
118
|
+
"aria-hidden": "true",
|
|
119
|
+
children: "…"
|
|
120
|
+
}, e)),
|
|
121
|
+
$("next", "下一页", G + 1, r),
|
|
122
|
+
$("last", "最后一页", W, a)
|
|
123
|
+
]
|
|
124
|
+
}),
|
|
125
|
+
T ? /* @__PURE__ */ f("label", {
|
|
126
|
+
className: "vl-pagination__size-changer",
|
|
127
|
+
children: [/* @__PURE__ */ d("span", {
|
|
128
|
+
className: "vl-pagination__visually-hidden",
|
|
129
|
+
children: "每页条数"
|
|
130
|
+
}), /* @__PURE__ */ d("select", {
|
|
131
|
+
value: U,
|
|
132
|
+
disabled: D,
|
|
133
|
+
"aria-label": "每页条数",
|
|
134
|
+
onChange: ne,
|
|
135
|
+
children: K.map((e) => /* @__PURE__ */ f("option", {
|
|
136
|
+
value: e,
|
|
137
|
+
children: [e, " 条/页"]
|
|
138
|
+
}, e))
|
|
139
|
+
})]
|
|
140
|
+
}) : null,
|
|
141
|
+
ee ? /* @__PURE__ */ f("label", {
|
|
142
|
+
className: "vl-pagination__quick-jumper",
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ d("span", { children: "跳至" }),
|
|
145
|
+
/* @__PURE__ */ d("input", {
|
|
146
|
+
value: B,
|
|
147
|
+
type: "text",
|
|
148
|
+
inputMode: "numeric",
|
|
149
|
+
"aria-label": "跳转到页码",
|
|
150
|
+
disabled: D,
|
|
151
|
+
onChange: (e) => V(e.target.value),
|
|
152
|
+
onKeyDown: re,
|
|
153
|
+
onBlur: Q
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ d("span", { children: "页" })
|
|
156
|
+
]
|
|
157
|
+
}) : null
|
|
158
|
+
]
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
v.displayName = "VlPagination";
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region components/Pagination/index.ts
|
|
165
|
+
var y = v, b = v;
|
|
166
|
+
//#endregion
|
|
167
|
+
export { y as n, b as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./state-ZBA75xZ_.cjs"),t=require("./number-B7qJF_ZY.cjs");let n=require("lucide-react"),r=require("react"),i=require("react/jsx-runtime");var a=[10,20,50,100],o=(e,t)=>typeof e!=`number`||!Number.isFinite(e)?t:Math.max(1,Math.floor(e)),s=e=>typeof e!=`number`||!Number.isFinite(e)?0:Math.max(0,Math.floor(e)),c=(e,t)=>{let n=[...e??a].filter(e=>typeof e==`number`&&Number.isFinite(e)&&e>0).map(e=>Math.floor(e)).filter(e=>e>0).filter((e,t,n)=>n.indexOf(e)===t).sort((e,t)=>e-t);return n.length?n:[t]},l=(e,t)=>{if(e<=7)return Array.from({length:e},(e,t)=>t+1);let n=Math.max(2,t-1),r=Math.min(e-1,t+1),i=n>2,a=r<e-1;return i?a?[1,`ellipsis-start`,n,t,r,`ellipsis-end`,e]:[1,`ellipsis-start`,e-4,e-3,e-2,e-1,e]:[1,2,3,4,5,`ellipsis-end`,e]},u=(0,r.forwardRef)((a,u)=>{let{current:d,defaultCurrent:f=1,total:p=0,pageSize:m,defaultPageSize:h=10,pageSizeOptions:g,showTotal:_=!1,showSizeChanger:v=!1,showQuickJumper:y=!1,size:b=`md`,disabled:x=!1,className:S,id:C,"aria-label":w=`分页导航`,onChange:T,onPageSizeChange:E,...D}=a,O=e.t(a,`current`),k=e.t(a,`pageSize`),A=o(h,10),[j,M]=(0,r.useState)(()=>o(f,1)),[N,P]=(0,r.useState)(A),[F,I]=(0,r.useState)(``),L=s(p),R=o(k?m:N,A),z=Math.max(1,Math.ceil(L/R)),B=t.t(o(O?d:j,1),1,z),V=(0,r.useMemo)(()=>c(g,R),[g,R]),H=(0,r.useMemo)(()=>l(z,B),[z,B]),U=L===0?[0,0]:[(B-1)*R+1,Math.min(B*R,L)];(0,r.useEffect)(()=>{I(String(B))},[B]),(0,r.useEffect)(()=>{!O&&j!==B&&M(B)},[B,O,j]);let W=[`vl-pagination`,`size-${b}`,x?`is-disabled`:``,S||``].filter(Boolean).join(` `),G=(e,t=R)=>{O||M(e),T?.(e,t)},K=e=>{if(x)return;let n=t.t(e,1,z);n!==B&&G(n)},q=e=>{if(x)return;let n=o(Number(e.target.value),R);if(n===R)return;let r=Math.max(1,Math.ceil(L/n)),i=t.t(B,1,r);k||P(n),O||M(i),E?.(n,i),T?.(i,n)},J=()=>{if(x)return;let e=F.trim();if(!/^\d+$/.test(e))return;let t=Number(e);!Number.isSafeInteger(t)||t<1||t>z||K(t)},Y=e=>{e.key===`Enter`&&(e.preventDefault(),J())},X=(e,t,n,a)=>{let o=e===`first`||e===`previous`?B<=1:B>=z;return(0,i.jsx)(`button`,{type:`button`,className:`vl-pagination__button vl-pagination__nav-button`,"aria-label":t,disabled:x||o,onClick:()=>K(n),children:(0,r.createElement)(a,{"aria-hidden":!0,focusable:!1})})};return(0,i.jsxs)(`nav`,{ref:u,id:C,className:W,"aria-label":w,"aria-disabled":x||void 0,...D,children:[_?(0,i.jsx)(`span`,{className:`vl-pagination__total`,children:typeof _==`function`?_(L,U):`第 ${U[0]}-${U[1]} 条,共 ${L} 条`}):null,(0,i.jsxs)(`div`,{className:`vl-pagination__controls`,children:[(0,i.jsxs)(`div`,{className:`vl-pagination__pages`,children:[X(`first`,`第一页`,1,n.ChevronsLeft),X(`previous`,`上一页`,B-1,n.ChevronLeft),H.map(e=>typeof e==`number`?(0,i.jsx)(`button`,{type:`button`,className:`vl-pagination__button ${e===B?`is-active`:``}`,"aria-label":`第 ${e} 页`,"aria-current":e===B?`page`:void 0,disabled:x,onClick:()=>K(e),children:e},e):(0,i.jsx)(`span`,{className:`vl-pagination__ellipsis`,"aria-hidden":`true`,children:`…`},e)),X(`next`,`下一页`,B+1,n.ChevronRight),X(`last`,`最后一页`,z,n.ChevronsRight)]}),v?(0,i.jsxs)(`label`,{className:`vl-pagination__size-changer`,children:[(0,i.jsx)(`span`,{className:`vl-pagination__visually-hidden`,children:`每页条数`}),(0,i.jsx)(`select`,{value:R,disabled:x,"aria-label":`每页条数`,onChange:q,children:V.map(e=>(0,i.jsxs)(`option`,{value:e,children:[e,` 条/页`]},e))})]}):null,y?(0,i.jsxs)(`label`,{className:`vl-pagination__quick-jumper`,children:[(0,i.jsx)(`span`,{children:`跳至`}),(0,i.jsx)(`input`,{value:F,type:`text`,inputMode:`numeric`,"aria-label":`跳转到页码`,disabled:x,onChange:e=>I(e.target.value),onKeyDown:Y,onBlur:J}),(0,i.jsx)(`span`,{children:`页`})]}):null]})]})});u.displayName=`VlPagination`;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}});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region components/Progress/Progress.tsx
|
|
4
|
+
var r = 100, i = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 ? e : r, a = (e, t) => typeof e != "number" || !Number.isFinite(e) ? 0 : Math.min(t, Math.max(0, e)), o = (e, t) => Number((e / t * 100).toFixed(3)), s = e((e, s) => {
|
|
5
|
+
let { value: c = 0, max: l = r, indeterminate: u = !1, status: d = "primary", size: f = "md", showText: p = !1, format: m, className: h, style: g, "aria-label": _, "aria-valuenow": v, "aria-valuemin": y, "aria-valuemax": b, role: x, ...S } = e, C = i(l), w = a(c, C), T = o(w, C), E = [
|
|
6
|
+
"vl-progress",
|
|
7
|
+
`size-${f}`,
|
|
8
|
+
`is-${d}`,
|
|
9
|
+
u ? "is-indeterminate" : "",
|
|
10
|
+
h || ""
|
|
11
|
+
].filter(Boolean).join(" "), D = u ? void 0 : { width: `${T}%` }, O = p ? m ? m(w, C) : `${T}%` : null;
|
|
12
|
+
return /* @__PURE__ */ n("div", {
|
|
13
|
+
ref: s,
|
|
14
|
+
...S,
|
|
15
|
+
className: E,
|
|
16
|
+
style: g,
|
|
17
|
+
role: "progressbar",
|
|
18
|
+
"aria-label": _ ?? "进度",
|
|
19
|
+
"aria-valuemin": 0,
|
|
20
|
+
"aria-valuemax": C,
|
|
21
|
+
...u ? {} : { "aria-valuenow": w },
|
|
22
|
+
children: [/* @__PURE__ */ t("div", {
|
|
23
|
+
className: "vl-progress__track",
|
|
24
|
+
"aria-hidden": "true",
|
|
25
|
+
children: /* @__PURE__ */ t("div", {
|
|
26
|
+
className: "vl-progress__fill",
|
|
27
|
+
style: D
|
|
28
|
+
})
|
|
29
|
+
}), O === null ? null : /* @__PURE__ */ t("span", {
|
|
30
|
+
className: "vl-progress__text",
|
|
31
|
+
children: O
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
s.displayName = "VlProgress";
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region components/Progress/index.ts
|
|
38
|
+
var c = s, l = s;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { c as n, l as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("react"),t=require("react/jsx-runtime");var n=100,r=e=>typeof e==`number`&&Number.isFinite(e)&&e>0?e:n,i=(e,t)=>typeof e!=`number`||!Number.isFinite(e)?0:Math.min(t,Math.max(0,e)),a=(e,t)=>Number((e/t*100).toFixed(3)),o=(0,e.forwardRef)((e,o)=>{let{value:s=0,max:c=n,indeterminate:l=!1,status:u=`primary`,size:d=`md`,showText:f=!1,format:p,className:m,style:h,"aria-label":g,"aria-valuenow":_,"aria-valuemin":v,"aria-valuemax":y,role:b,...x}=e,S=r(c),C=i(s,S),w=a(C,S),T=[`vl-progress`,`size-${d}`,`is-${u}`,l?`is-indeterminate`:``,m||``].filter(Boolean).join(` `),E=l?void 0:{width:`${w}%`},D=f?p?p(C,S):`${w}%`:null;return(0,t.jsxs)(`div`,{ref:o,...x,className:T,style:h,role:`progressbar`,"aria-label":g??`进度`,"aria-valuemin":0,"aria-valuemax":S,...l?{}:{"aria-valuenow":C},children:[(0,t.jsx)(`div`,{className:`vl-progress__track`,"aria-hidden":`true`,children:(0,t.jsx)(`div`,{className:`vl-progress__fill`,style:E})}),D===null?null:(0,t.jsx)(`span`,{className:`vl-progress__text`,children:D})]})});o.displayName=`VlProgress`;var s=o,c=o;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { n as e, t } from "./state-oH-YwB7_.js";
|
|
2
|
+
import { t as n } from "./id-CHixuHb7.js";
|
|
3
|
+
import { createContext as r, forwardRef as i, useCallback as a, useContext as o, useMemo as s } from "react";
|
|
4
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
//#region components/Radio/context.ts
|
|
6
|
+
var u = r(null), d = u.Provider, f = () => o(u), p = i((n, r) => {
|
|
7
|
+
let { checked: i, defaultChecked: a = !1, value: o, label: s, disabled: u, bordered: d, name: p, size: m, className: h, style: g, children: _, onChange: v, ...y } = n, b = f(), x = t(n, "checked"), [S, C] = e({
|
|
8
|
+
value: !!i,
|
|
9
|
+
defaultValue: a,
|
|
10
|
+
controlled: x
|
|
11
|
+
}), w = b !== null && o !== void 0, T = w ? Object.is(b.value, o) : S, E = u ?? b?.disabled ?? !1, D = d ?? b?.bordered ?? !1, O = p ?? (w ? b.name : void 0), k = m ?? b?.size ?? "md", A = [
|
|
12
|
+
"vl-radio",
|
|
13
|
+
k ? `size-${k}` : "",
|
|
14
|
+
E ? "is-disabled" : "",
|
|
15
|
+
D ? "is-bordered" : "",
|
|
16
|
+
T ? "is-checked" : "",
|
|
17
|
+
h || ""
|
|
18
|
+
].filter(Boolean).join(" "), j = s != null || _ != null;
|
|
19
|
+
return /* @__PURE__ */ l("label", {
|
|
20
|
+
className: A,
|
|
21
|
+
style: g,
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ c("input", {
|
|
24
|
+
ref: r,
|
|
25
|
+
className: "vl-radio__input",
|
|
26
|
+
type: "radio",
|
|
27
|
+
name: O,
|
|
28
|
+
value: typeof o == "boolean" ? String(o) : o,
|
|
29
|
+
checked: T,
|
|
30
|
+
disabled: E,
|
|
31
|
+
"aria-checked": T ? "true" : "false",
|
|
32
|
+
onChange: () => {
|
|
33
|
+
if (!(E || T)) {
|
|
34
|
+
if (w) {
|
|
35
|
+
b.selectValue(o), v?.(o, !0);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
C(!0), v?.(o, !0);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
...y
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ c("span", {
|
|
44
|
+
className: "vl-radio__control",
|
|
45
|
+
"aria-hidden": "true",
|
|
46
|
+
children: /* @__PURE__ */ c("span", { className: "vl-radio__icon" })
|
|
47
|
+
}),
|
|
48
|
+
j ? /* @__PURE__ */ c("span", {
|
|
49
|
+
className: "vl-radio__label",
|
|
50
|
+
children: _ ?? s
|
|
51
|
+
}) : null
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
p.displayName = "VlRadio";
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region components/Radio/RadioGroup.tsx
|
|
58
|
+
var m = i((r, i) => {
|
|
59
|
+
let { value: o, defaultValue: l = null, disabled: u, bordered: f, name: p, size: m, children: h, className: g, onChange: _, ...v } = r, y = n("vl-radio-group"), b = t(r, "value"), [x, S] = e({
|
|
60
|
+
value: o ?? null,
|
|
61
|
+
defaultValue: l,
|
|
62
|
+
controlled: b,
|
|
63
|
+
onChange: (e) => {
|
|
64
|
+
e !== null && _?.(e);
|
|
65
|
+
}
|
|
66
|
+
}), C = a((e) => {
|
|
67
|
+
Object.is(x, e) || S(e);
|
|
68
|
+
}, [S, x]), w = s(() => ({
|
|
69
|
+
value: x,
|
|
70
|
+
disabled: u,
|
|
71
|
+
bordered: f,
|
|
72
|
+
name: p ?? y,
|
|
73
|
+
size: m,
|
|
74
|
+
selectValue: C
|
|
75
|
+
}), [
|
|
76
|
+
x,
|
|
77
|
+
u,
|
|
78
|
+
f,
|
|
79
|
+
p,
|
|
80
|
+
y,
|
|
81
|
+
m,
|
|
82
|
+
C
|
|
83
|
+
]), T = ["vl-radio-group", g || ""].filter(Boolean).join(" ");
|
|
84
|
+
return /* @__PURE__ */ c(d, {
|
|
85
|
+
value: w,
|
|
86
|
+
children: /* @__PURE__ */ c("div", {
|
|
87
|
+
ref: i,
|
|
88
|
+
className: T,
|
|
89
|
+
role: "radiogroup",
|
|
90
|
+
"aria-disabled": u || void 0,
|
|
91
|
+
...v,
|
|
92
|
+
children: h
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
m.displayName = "VlRadioGroup";
|
|
97
|
+
//#endregion
|
|
98
|
+
export { p as n, m as t };
|