@agentscope-ai/design 1.0.4
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/LICENSE +21 -0
- package/README.md +85 -0
- package/dist/antd/styles/button.style.d.ts +47 -0
- package/dist/antd/styles/button.style.js +32 -0
- package/dist/antd/styles/dropdown.style.d.ts +15 -0
- package/dist/antd/styles/dropdown.style.js +16 -0
- package/dist/antd/styles/index.style.d.ts +19 -0
- package/dist/antd/styles/index.style.js +50 -0
- package/dist/antd/styles/message.style.d.ts +5 -0
- package/dist/antd/styles/message.style.js +10 -0
- package/dist/antd/styles/notification.style.d.ts +46 -0
- package/dist/antd/styles/notification.style.js +29 -0
- package/dist/antd/styles/popover.style.d.ts +13 -0
- package/dist/antd/styles/popover.style.js +14 -0
- package/dist/antd/styles/radio.style.d.ts +7 -0
- package/dist/antd/styles/radio.style.js +10 -0
- package/dist/antd/styles/segment.style.d.ts +7 -0
- package/dist/antd/styles/segment.style.js +12 -0
- package/dist/antd/styles/select.style.d.ts +6 -0
- package/dist/antd/styles/select.style.js +11 -0
- package/dist/antd/styles/slider.style.d.ts +22 -0
- package/dist/antd/styles/slider.style.js +21 -0
- package/dist/antd/styles/table.style.d.ts +5 -0
- package/dist/antd/styles/table.style.js +10 -0
- package/dist/antd/styles/tooltip.style.d.ts +8 -0
- package/dist/antd/styles/tooltip.style.js +11 -0
- package/dist/antd/themes/bailianDarkTheme.json +173 -0
- package/dist/antd/themes/bailianTheme.json +170 -0
- package/dist/antd/themes/blackTheme.json +12 -0
- package/dist/antd/themes/carbonDarkTheme.json +172 -0
- package/dist/antd/themes/carbonTheme.json +170 -0
- package/dist/antd/themes/xConsoleTheme.json +26 -0
- package/dist/components/CComponents/Alert/demo/index.d.ts +2 -0
- package/dist/components/CComponents/Alert/demo/index.js +99 -0
- package/dist/components/commonComponents/Alert/demo/index.d.ts +2 -0
- package/dist/components/commonComponents/Alert/demo/index.js +87 -0
- package/dist/components/commonComponents/AlertDialog/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/AlertDialog/demo/demo1.js +86 -0
- package/dist/components/commonComponents/AlertDialog/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/AlertDialog/demo/demo2.js +70 -0
- package/dist/components/commonComponents/AlertDialog/index.d.ts +25 -0
- package/dist/components/commonComponents/AlertDialog/index.js +143 -0
- package/dist/components/commonComponents/Avatar/demo/index.d.ts +3 -0
- package/dist/components/commonComponents/Avatar/demo/index.js +25 -0
- package/dist/components/commonComponents/Avatar/index.d.ts +4 -0
- package/dist/components/commonComponents/Avatar/index.js +39 -0
- package/dist/components/commonComponents/Badge/demo/index.d.ts +3 -0
- package/dist/components/commonComponents/Badge/demo/index.js +24 -0
- package/dist/components/commonComponents/Button/demo/demo1.d.ts +2 -0
- package/dist/components/commonComponents/Button/demo/demo1.js +103 -0
- package/dist/components/commonComponents/Button/demo/demo2.d.ts +2 -0
- package/dist/components/commonComponents/Button/demo/demo2.js +17 -0
- package/dist/components/commonComponents/Button/index.d.ts +18 -0
- package/dist/components/commonComponents/Button/index.js +78 -0
- package/dist/components/commonComponents/Card/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Card/demo/demo1.js +31 -0
- package/dist/components/commonComponents/Card/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Card/demo/demo2.js +46 -0
- package/dist/components/commonComponents/Card/index.d.ts +11 -0
- package/dist/components/commonComponents/Card/index.js +40 -0
- package/dist/components/commonComponents/Card/index.style.d.ts +58 -0
- package/dist/components/commonComponents/Card/index.style.js +44 -0
- package/dist/components/commonComponents/Checkbox/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Checkbox/demo/demo1.js +21 -0
- package/dist/components/commonComponents/Checkbox/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Checkbox/demo/demo2.js +25 -0
- package/dist/components/commonComponents/CodeBlock/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/CodeBlock/demo/demo1.js +34 -0
- package/dist/components/commonComponents/CodeBlock/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/CodeBlock/demo/demo2.js +14 -0
- package/dist/components/commonComponents/CodeBlock/index.d.ts +11 -0
- package/dist/components/commonComponents/CodeBlock/index.js +88 -0
- package/dist/components/commonComponents/CodeBlock/index.style.d.ts +46 -0
- package/dist/components/commonComponents/CodeBlock/index.style.js +59 -0
- package/dist/components/commonComponents/CollapsePanel/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/CollapsePanel/demo/demo1.js +27 -0
- package/dist/components/commonComponents/CollapsePanel/index.d.ts +38 -0
- package/dist/components/commonComponents/CollapsePanel/index.js +116 -0
- package/dist/components/commonComponents/CollapsePanel/index.style.d.ts +329 -0
- package/dist/components/commonComponents/CollapsePanel/index.style.js +96 -0
- package/dist/components/commonComponents/ConfigProvider/index.d.ts +25 -0
- package/dist/components/commonComponents/ConfigProvider/index.js +152 -0
- package/dist/components/commonComponents/Drawer/demo/demo1.d.ts +2 -0
- package/dist/components/commonComponents/Drawer/demo/demo1.js +106 -0
- package/dist/components/commonComponents/Drawer/demo/demo2.d.ts +2 -0
- package/dist/components/commonComponents/Drawer/demo/demo2.js +66 -0
- package/dist/components/commonComponents/Drawer/index.d.ts +3 -0
- package/dist/components/commonComponents/Drawer/index.js +30 -0
- package/dist/components/commonComponents/Drawer/index.style.d.ts +38 -0
- package/dist/components/commonComponents/Drawer/index.style.js +40 -0
- package/dist/components/commonComponents/Dropdown/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Dropdown/demo/demo1.js +33 -0
- package/dist/components/commonComponents/Dropdown/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Dropdown/demo/demo2.js +38 -0
- package/dist/components/commonComponents/Dropdown/index.d.ts +5 -0
- package/dist/components/commonComponents/Dropdown/index.js +20 -0
- package/dist/components/commonComponents/Dropdown/index.style.d.ts +7 -0
- package/dist/components/commonComponents/Dropdown/index.style.js +21 -0
- package/dist/components/commonComponents/Ellipsis/demo/index.d.ts +2 -0
- package/dist/components/commonComponents/Ellipsis/demo/index.js +11 -0
- package/dist/components/commonComponents/EllipsisTip/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/EllipsisTip/demo/demo1.js +25 -0
- package/dist/components/commonComponents/EllipsisTip/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/EllipsisTip/demo/demo2.js +35 -0
- package/dist/components/commonComponents/EllipsisTip/index.d.ts +13 -0
- package/dist/components/commonComponents/EllipsisTip/index.js +30 -0
- package/dist/components/commonComponents/EllipsisTip/index.style.d.ts +10 -0
- package/dist/components/commonComponents/EllipsisTip/index.style.js +24 -0
- package/dist/components/commonComponents/Empty/demo/index.css +11 -0
- package/dist/components/commonComponents/Empty/demo/index.d.ts +3 -0
- package/dist/components/commonComponents/Empty/demo/index.js +186 -0
- package/dist/components/commonComponents/Empty/index.d.ts +57 -0
- package/dist/components/commonComponents/Empty/index.js +112 -0
- package/dist/components/commonComponents/Empty/index.style.d.ts +80 -0
- package/dist/components/commonComponents/Empty/index.style.js +43 -0
- package/dist/components/commonComponents/FileIcon/demo/index.d.ts +1 -0
- package/dist/components/commonComponents/FileIcon/demo/index.js +42 -0
- package/dist/components/commonComponents/FileIcon/icons/common.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/epub.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/excel.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/html.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/image.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/md.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/mobi.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/pdf.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/ppt.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/txt.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/web.svg +1 -0
- package/dist/components/commonComponents/FileIcon/icons/word.svg +1 -0
- package/dist/components/commonComponents/FileIcon/index.d.ts +19 -0
- package/dist/components/commonComponents/FileIcon/index.js +89 -0
- package/dist/components/commonComponents/FileIcon/index.style.d.ts +61 -0
- package/dist/components/commonComponents/FileIcon/index.style.js +42 -0
- package/dist/components/commonComponents/Form/demo/api.d.ts +2 -0
- package/dist/components/commonComponents/Form/demo/api.js +22 -0
- package/dist/components/commonComponents/Form/demo/demo1.d.ts +2 -0
- package/dist/components/commonComponents/Form/demo/demo1.js +107 -0
- package/dist/components/commonComponents/Form/demo/demo2.d.ts +2 -0
- package/dist/components/commonComponents/Form/demo/demo2.js +52 -0
- package/dist/components/commonComponents/Form/demo/demo3.d.ts +2 -0
- package/dist/components/commonComponents/Form/demo/demo3.js +28 -0
- package/dist/components/commonComponents/Form/demo/demo4.d.ts +2 -0
- package/dist/components/commonComponents/Form/demo/demo4.js +29 -0
- package/dist/components/commonComponents/Form/demo/index.module.less +0 -0
- package/dist/components/commonComponents/Form/index.d.ts +27 -0
- package/dist/components/commonComponents/Form/index.js +84 -0
- package/dist/components/commonComponents/Form/index.style.d.ts +49 -0
- package/dist/components/commonComponents/Form/index.style.js +37 -0
- package/dist/components/commonComponents/HelpIcon/demo/index.d.ts +2 -0
- package/dist/components/commonComponents/HelpIcon/demo/index.js +17 -0
- package/dist/components/commonComponents/HelpIcon/index.d.ts +9 -0
- package/dist/components/commonComponents/HelpIcon/index.js +35 -0
- package/dist/components/commonComponents/HelpIcon/index.style.d.ts +12 -0
- package/dist/components/commonComponents/HelpIcon/index.style.js +26 -0
- package/dist/components/commonComponents/IconButton/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/IconButton/demo/demo1.js +66 -0
- package/dist/components/commonComponents/IconButton/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/IconButton/demo/demo2.js +61 -0
- package/dist/components/commonComponents/IconButton/demo/demo3.d.ts +3 -0
- package/dist/components/commonComponents/IconButton/demo/demo3.js +53 -0
- package/dist/components/commonComponents/IconButton/demo/demo4.d.ts +3 -0
- package/dist/components/commonComponents/IconButton/demo/demo4.js +55 -0
- package/dist/components/commonComponents/IconButton/index.d.ts +22 -0
- package/dist/components/commonComponents/IconButton/index.js +43 -0
- package/dist/components/commonComponents/IconFont/demo/demo1.d.ts +2 -0
- package/dist/components/commonComponents/IconFont/demo/demo1.js +49 -0
- package/dist/components/commonComponents/IconFont/demo/demo2.d.ts +2 -0
- package/dist/components/commonComponents/IconFont/demo/demo2.js +17 -0
- package/dist/components/commonComponents/IconFont/demo/demo3.d.ts +2 -0
- package/dist/components/commonComponents/IconFont/demo/demo3.js +17 -0
- package/dist/components/commonComponents/IconFont/demo/demo4.d.ts +2 -0
- package/dist/components/commonComponents/IconFont/demo/demo4.js +23 -0
- package/dist/components/commonComponents/IconFont/index.d.ts +29 -0
- package/dist/components/commonComponents/IconFont/index.js +57 -0
- package/dist/components/commonComponents/IconFont/index.style.d.ts +67 -0
- package/dist/components/commonComponents/IconFont/index.style.js +44 -0
- package/dist/components/commonComponents/Image/demo/demo1.d.ts +1 -0
- package/dist/components/commonComponents/Image/demo/demo1.js +8 -0
- package/dist/components/commonComponents/Image/index.d.ts +8 -0
- package/dist/components/commonComponents/Image/index.js +37 -0
- package/dist/components/commonComponents/Input/demo/index.d.ts +2 -0
- package/dist/components/commonComponents/Input/demo/index.js +117 -0
- package/dist/components/commonComponents/Input/index.d.ts +13 -0
- package/dist/components/commonComponents/Input/index.js +34 -0
- package/dist/components/commonComponents/Input/index.style.d.ts +36 -0
- package/dist/components/commonComponents/Input/index.style.js +32 -0
- package/dist/components/commonComponents/InputNumber/demo/index.d.ts +3 -0
- package/dist/components/commonComponents/InputNumber/demo/index.js +38 -0
- package/dist/components/commonComponents/InputSearch/demo/index.d.ts +2 -0
- package/dist/components/commonComponents/InputSearch/demo/index.js +43 -0
- package/dist/components/commonComponents/Message/demo.d.ts +2 -0
- package/dist/components/commonComponents/Message/demo.js +53 -0
- package/dist/components/commonComponents/Message/index.d.ts +20 -0
- package/dist/components/commonComponents/Message/index.js +66 -0
- package/dist/components/commonComponents/Modal/demo/demo1.d.ts +2 -0
- package/dist/components/commonComponents/Modal/demo/demo1.js +137 -0
- package/dist/components/commonComponents/Modal/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Modal/demo/demo2.js +77 -0
- package/dist/components/commonComponents/Modal/demo/demo3.d.ts +2 -0
- package/dist/components/commonComponents/Modal/demo/demo3.js +57 -0
- package/dist/components/commonComponents/Modal/demo/demo4.d.ts +3 -0
- package/dist/components/commonComponents/Modal/demo/demo4.js +65 -0
- package/dist/components/commonComponents/Modal/index.css +1 -0
- package/dist/components/commonComponents/Modal/index.d.ts +15 -0
- package/dist/components/commonComponents/Modal/index.js +46 -0
- package/dist/components/commonComponents/Modal/index.style.d.ts +80 -0
- package/dist/components/commonComponents/Modal/index.style.js +58 -0
- package/dist/components/commonComponents/Notification/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Notification/demo/demo1.js +76 -0
- package/dist/components/commonComponents/Notification/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Notification/demo/demo2.js +50 -0
- package/dist/components/commonComponents/Notification/demo/demo3.d.ts +3 -0
- package/dist/components/commonComponents/Notification/demo/demo3.js +46 -0
- package/dist/components/commonComponents/Notification/index.d.ts +20 -0
- package/dist/components/commonComponents/Notification/index.js +106 -0
- package/dist/components/commonComponents/Pagination/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Pagination/demo/demo1.js +14 -0
- package/dist/components/commonComponents/Pagination/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Pagination/demo/demo2.js +16 -0
- package/dist/components/commonComponents/Pagination/index.d.ts +12 -0
- package/dist/components/commonComponents/Pagination/index.js +59 -0
- package/dist/components/commonComponents/Pagination/index.style.d.ts +12 -0
- package/dist/components/commonComponents/Pagination/index.style.js +24 -0
- package/dist/components/commonComponents/Popconfirm/demo/index.d.ts +3 -0
- package/dist/components/commonComponents/Popconfirm/demo/index.js +155 -0
- package/dist/components/commonComponents/Popconfirm/index.d.ts +5 -0
- package/dist/components/commonComponents/Popconfirm/index.js +29 -0
- package/dist/components/commonComponents/Popover/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Popover/demo/demo1.js +34 -0
- package/dist/components/commonComponents/Popover/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Popover/demo/demo2.js +183 -0
- package/dist/components/commonComponents/Popover/index.d.ts +4 -0
- package/dist/components/commonComponents/Popover/index.js +27 -0
- package/dist/components/commonComponents/Progress/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Progress/demo/demo1.js +15 -0
- package/dist/components/commonComponents/Radio/demo.d.ts +3 -0
- package/dist/components/commonComponents/Radio/demo.js +20 -0
- package/dist/components/commonComponents/Radio/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Radio/demo2.js +115 -0
- package/dist/components/commonComponents/RadioButton/demo/demo.d.ts +3 -0
- package/dist/components/commonComponents/RadioButton/demo/demo.js +166 -0
- package/dist/components/commonComponents/RadioButton/index.d.ts +21 -0
- package/dist/components/commonComponents/RadioButton/index.js +32 -0
- package/dist/components/commonComponents/RadioButton/index.style.d.ts +62 -0
- package/dist/components/commonComponents/RadioButton/index.style.js +49 -0
- package/dist/components/commonComponents/Select/demo/demo.d.ts +3 -0
- package/dist/components/commonComponents/Select/demo/demo.js +29 -0
- package/dist/components/commonComponents/Select/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Select/demo/demo2.js +30 -0
- package/dist/components/commonComponents/Skeleton/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Skeleton/demo/demo1.js +9 -0
- package/dist/components/commonComponents/SlateEditor/demo/index.d.ts +2 -0
- package/dist/components/commonComponents/SlateEditor/demo/index.js +21 -0
- package/dist/components/commonComponents/SlateEditor/elements/S.d.ts +2 -0
- package/dist/components/commonComponents/SlateEditor/elements/S.js +18 -0
- package/dist/components/commonComponents/SlateEditor/elements/Var.d.ts +3 -0
- package/dist/components/commonComponents/SlateEditor/elements/Var.js +20 -0
- package/dist/components/commonComponents/SlateEditor/elements/index.d.ts +2 -0
- package/dist/components/commonComponents/SlateEditor/elements/index.js +2 -0
- package/dist/components/commonComponents/SlateEditor/elements/index.less +10 -0
- package/dist/components/commonComponents/SlateEditor/index.d.ts +39 -0
- package/dist/components/commonComponents/SlateEditor/index.js +272 -0
- package/dist/components/commonComponents/SlateEditor/index.style.d.ts +28 -0
- package/dist/components/commonComponents/SlateEditor/index.style.js +36 -0
- package/dist/components/commonComponents/SlateEditor/types.d.ts +56 -0
- package/dist/components/commonComponents/SlateEditor/types.js +1 -0
- package/dist/components/commonComponents/SlateEditor/utils/constant.d.ts +7 -0
- package/dist/components/commonComponents/SlateEditor/utils/constant.js +36 -0
- package/dist/components/commonComponents/SlateEditor/utils/editor.d.ts +68 -0
- package/dist/components/commonComponents/SlateEditor/utils/editor.js +558 -0
- package/dist/components/commonComponents/SlateEditor/utils/functions.d.ts +41 -0
- package/dist/components/commonComponents/SlateEditor/utils/functions.js +179 -0
- package/dist/components/commonComponents/SlateEditor/utils/index.d.ts +4 -0
- package/dist/components/commonComponents/SlateEditor/utils/index.js +4 -0
- package/dist/components/commonComponents/SlateEditor/utils/withEditor.d.ts +2 -0
- package/dist/components/commonComponents/SlateEditor/utils/withEditor.js +109 -0
- package/dist/components/commonComponents/Slider/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Slider/demo/demo1.js +35 -0
- package/dist/components/commonComponents/Slider/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Slider/demo/demo2.js +48 -0
- package/dist/components/commonComponents/SliderSelector/demo/index.d.ts +2 -0
- package/dist/components/commonComponents/SliderSelector/demo/index.js +41 -0
- package/dist/components/commonComponents/SliderSelector/index.d.ts +16 -0
- package/dist/components/commonComponents/SliderSelector/index.js +67 -0
- package/dist/components/commonComponents/SliderSelector/index.style.d.ts +38 -0
- package/dist/components/commonComponents/SliderSelector/index.style.js +37 -0
- package/dist/components/commonComponents/Spin/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Spin/demo1.js +30 -0
- package/dist/components/commonComponents/Spinner/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Spinner/demo/demo1.js +46 -0
- package/dist/components/commonComponents/Spinner/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Spinner/demo/demo2.js +69 -0
- package/dist/components/commonComponents/Spinner/demo/demo3.d.ts +3 -0
- package/dist/components/commonComponents/Spinner/demo/demo3.js +59 -0
- package/dist/components/commonComponents/Spinner/index.d.ts +16 -0
- package/dist/components/commonComponents/Spinner/index.js +77 -0
- package/dist/components/commonComponents/Spinner/index.style.d.ts +82 -0
- package/dist/components/commonComponents/Spinner/index.style.js +60 -0
- package/dist/components/commonComponents/Switch/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Switch/demo/demo1.js +26 -0
- package/dist/components/commonComponents/Switch/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Switch/demo/demo2.js +27 -0
- package/dist/components/commonComponents/Switch/index.d.ts +11 -0
- package/dist/components/commonComponents/Switch/index.js +29 -0
- package/dist/components/commonComponents/Switch/index.style.d.ts +8 -0
- package/dist/components/commonComponents/Switch/index.style.js +23 -0
- package/dist/components/commonComponents/Table/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Table/demo/demo1.js +87 -0
- package/dist/components/commonComponents/Table/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Table/demo/demo2.js +98 -0
- package/dist/components/commonComponents/Table/demo/demo3.d.ts +3 -0
- package/dist/components/commonComponents/Table/demo/demo3.js +378 -0
- package/dist/components/commonComponents/Tabs/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Tabs/demo/demo1.js +45 -0
- package/dist/components/commonComponents/Tabs/demo/demo2.d.ts +3 -0
- package/dist/components/commonComponents/Tabs/demo/demo2.js +43 -0
- package/dist/components/commonComponents/Tabs/demo/demo3.d.ts +3 -0
- package/dist/components/commonComponents/Tabs/demo/demo3.js +32 -0
- package/dist/components/commonComponents/Tabs/index.d.ts +14 -0
- package/dist/components/commonComponents/Tabs/index.js +67 -0
- package/dist/components/commonComponents/Tabs/index.style.d.ts +23 -0
- package/dist/components/commonComponents/Tabs/index.style.js +30 -0
- package/dist/components/commonComponents/Tag/demo.d.ts +2 -0
- package/dist/components/commonComponents/Tag/demo.js +30 -0
- package/dist/components/commonComponents/Tag/index.d.ts +7 -0
- package/dist/components/commonComponents/Tag/index.js +36 -0
- package/dist/components/commonComponents/Tag/index.style.d.ts +26 -0
- package/dist/components/commonComponents/Tag/index.style.js +48 -0
- package/dist/components/commonComponents/Textarea/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Textarea/demo/demo1.js +36 -0
- package/dist/components/commonComponents/Tooltip/demo/index.d.ts +3 -0
- package/dist/components/commonComponents/Tooltip/demo/index.js +254 -0
- package/dist/components/commonComponents/Tooltip/index.d.ts +11 -0
- package/dist/components/commonComponents/Tooltip/index.js +35 -0
- package/dist/components/commonComponents/Tooltip/index.style.d.ts +24 -0
- package/dist/components/commonComponents/Tooltip/index.style.js +32 -0
- package/dist/components/commonComponents/Upload/demo/demo1.d.ts +3 -0
- package/dist/components/commonComponents/Upload/demo/demo1.js +43 -0
- package/dist/components/commonComponents/Upload/demo/demo2.d.ts +2 -0
- package/dist/components/commonComponents/Upload/demo/demo2.js +15 -0
- package/dist/components/commonComponents/Upload/demo/demo3.d.ts +3 -0
- package/dist/components/commonComponents/Upload/demo/demo3.js +145 -0
- package/dist/components/commonComponents/spark.style.d.ts +45 -0
- package/dist/components/commonComponents/spark.style.js +62 -0
- package/dist/config.d.ts +27 -0
- package/dist/config.js +56 -0
- package/dist/hooks/useGlobalStyle/demo/demo.d.ts +2 -0
- package/dist/hooks/useGlobalStyle/demo/demo.js +47 -0
- package/dist/hooks/useGlobalStyle/index.d.ts +8 -0
- package/dist/hooks/useGlobalStyle/index.js +51 -0
- package/dist/i18n/index.d.ts +33 -0
- package/dist/i18n/index.js +62 -0
- package/dist/i18n/strings/en-US.json +13 -0
- package/dist/i18n/strings/index.js +12 -0
- package/dist/i18n/strings/zh-CN.json +13 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +70 -0
- package/dist/libs/cookie.d.ts +9 -0
- package/dist/libs/cookie.js +19 -0
- package/dist/libs/createStyle/index.d.ts +1 -0
- package/dist/libs/createStyle/index.js +76 -0
- package/dist/libs/data/index.d.ts +15 -0
- package/dist/libs/data/index.js +76 -0
- package/dist/libs/delay/index.d.ts +6 -0
- package/dist/libs/delay/index.js +31 -0
- package/dist/libs/dom.d.ts +8 -0
- package/dist/libs/dom.js +37 -0
- package/dist/libs/env/index.d.ts +10 -0
- package/dist/libs/env/index.js +16 -0
- package/dist/libs/generateCssVars/index.d.ts +19 -0
- package/dist/libs/generateCssVars/index.js +39 -0
- package/dist/libs/loadStyle.d.ts +7 -0
- package/dist/libs/loadStyle.js +41 -0
- package/dist/libs/region/constant.d.ts +6 -0
- package/dist/libs/region/constant.js +154 -0
- package/dist/libs/region/index.d.ts +2 -0
- package/dist/libs/region/index.js +18 -0
- package/dist/libs/requestPop/index.d.ts +52 -0
- package/dist/libs/requestPop/index.js +89 -0
- package/dist/libs/requestPopSse/index.d.ts +35 -0
- package/dist/libs/requestPopSse/index.js +159 -0
- package/dist/libs/requestSse/index.d.ts +47 -0
- package/dist/libs/requestSse/index.js +196 -0
- package/dist/libs/requestSse/parse.d.ts +36 -0
- package/dist/libs/requestSse/parse.js +190 -0
- package/dist/libs/staticRenderer/index.d.ts +8 -0
- package/dist/libs/staticRenderer/index.js +58 -0
- package/dist/libs/string/index.d.ts +19 -0
- package/dist/libs/string/index.js +63 -0
- package/dist/libs/tokens.json +3 -0
- package/dist/libs/utils/index.d.ts +7 -0
- package/dist/libs/utils/index.js +69 -0
- package/dist/libs/waitFor/index.d.ts +25 -0
- package/dist/libs/waitFor/index.js +39 -0
- package/dist/typings.d.ts +14 -0
- package/package.json +173 -0
- package/scripts/init-migrate-config.js +68 -0
- package/scripts/migrate-from-bl.js +78 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { getCommonConfig } from "../../../config";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import common from "./icons/common.svg";
|
|
4
|
+
import epub from "./icons/epub.svg";
|
|
5
|
+
import excel from "./icons/excel.svg";
|
|
6
|
+
import html from "./icons/html.svg";
|
|
7
|
+
import image from "./icons/image.svg";
|
|
8
|
+
import md from "./icons/md.svg";
|
|
9
|
+
import mobi from "./icons/mobi.svg";
|
|
10
|
+
import pdf from "./icons/pdf.svg";
|
|
11
|
+
import ppt from "./icons/ppt.svg";
|
|
12
|
+
import txt from "./icons/txt.svg";
|
|
13
|
+
import web from "./icons/web.svg";
|
|
14
|
+
import word from "./icons/word.svg";
|
|
15
|
+
import useIndexStyle from "./index.style";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
var maps = {
|
|
19
|
+
common: common,
|
|
20
|
+
epub: epub,
|
|
21
|
+
excel: excel,
|
|
22
|
+
html: html,
|
|
23
|
+
image: image,
|
|
24
|
+
md: md,
|
|
25
|
+
mobi: mobi,
|
|
26
|
+
pdf: pdf,
|
|
27
|
+
ppt: ppt,
|
|
28
|
+
txt: txt,
|
|
29
|
+
web: web,
|
|
30
|
+
word: word
|
|
31
|
+
};
|
|
32
|
+
function getSize(size) {
|
|
33
|
+
var retSize = size;
|
|
34
|
+
var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'];
|
|
35
|
+
var unitIndex = 0;
|
|
36
|
+
while (retSize >= 1024 && unitIndex < units.length - 1) {
|
|
37
|
+
retSize /= 1024;
|
|
38
|
+
unitIndex++;
|
|
39
|
+
}
|
|
40
|
+
return "".concat(retSize.toFixed(0), " ").concat(units[unitIndex]);
|
|
41
|
+
}
|
|
42
|
+
export function FileCard(props) {
|
|
43
|
+
var commonConfig = getCommonConfig();
|
|
44
|
+
var sparkPrefix = commonConfig.sparkPrefix;
|
|
45
|
+
useIndexStyle();
|
|
46
|
+
var _props$width = props.width,
|
|
47
|
+
width = _props$width === void 0 ? 140 : _props$width,
|
|
48
|
+
_props$iconSize = props.iconSize,
|
|
49
|
+
iconSize = _props$iconSize === void 0 ? 32 : _props$iconSize;
|
|
50
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
51
|
+
className: "".concat(sparkPrefix, "-file-card"),
|
|
52
|
+
style: {
|
|
53
|
+
width: width
|
|
54
|
+
},
|
|
55
|
+
children: [/*#__PURE__*/_jsx(FileIcon, {
|
|
56
|
+
type: props.type,
|
|
57
|
+
size: iconSize,
|
|
58
|
+
src: props.src
|
|
59
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
60
|
+
className: "".concat(sparkPrefix, "-file-card-info"),
|
|
61
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
62
|
+
className: "".concat(sparkPrefix, "-file-card-name"),
|
|
63
|
+
children: props.name
|
|
64
|
+
}), (props.size || props.desc) && /*#__PURE__*/_jsx("div", {
|
|
65
|
+
className: "".concat(sparkPrefix, "-file-card-size"),
|
|
66
|
+
children: props.desc || getSize(props.size)
|
|
67
|
+
})]
|
|
68
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
69
|
+
style: {
|
|
70
|
+
flex: 1
|
|
71
|
+
}
|
|
72
|
+
}), props.children]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
export default function FileIcon(props) {
|
|
76
|
+
var _props$size = props.size,
|
|
77
|
+
size = _props$size === void 0 ? 40 : _props$size,
|
|
78
|
+
_props$type = props.type,
|
|
79
|
+
type = _props$type === void 0 ? 'common' : _props$type,
|
|
80
|
+
src = props.src;
|
|
81
|
+
return /*#__PURE__*/_jsx("img", {
|
|
82
|
+
style: {
|
|
83
|
+
display: 'block',
|
|
84
|
+
width: size,
|
|
85
|
+
height: size
|
|
86
|
+
},
|
|
87
|
+
src: src || maps[type] || 'common'
|
|
88
|
+
});
|
|
89
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare function getIndexStyleData(params: any): {
|
|
2
|
+
[x: string]: {
|
|
3
|
+
display: string;
|
|
4
|
+
alignItems: string;
|
|
5
|
+
gap: number;
|
|
6
|
+
padding: number;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
background: string;
|
|
9
|
+
border: string;
|
|
10
|
+
fontSize?: undefined;
|
|
11
|
+
color?: undefined;
|
|
12
|
+
overflow?: undefined;
|
|
13
|
+
textOverflow?: undefined;
|
|
14
|
+
whiteSpace?: undefined;
|
|
15
|
+
maxWidth?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
fontSize: number;
|
|
18
|
+
color: string;
|
|
19
|
+
display?: undefined;
|
|
20
|
+
alignItems?: undefined;
|
|
21
|
+
gap?: undefined;
|
|
22
|
+
padding?: undefined;
|
|
23
|
+
borderRadius?: undefined;
|
|
24
|
+
background?: undefined;
|
|
25
|
+
border?: undefined;
|
|
26
|
+
overflow?: undefined;
|
|
27
|
+
textOverflow?: undefined;
|
|
28
|
+
whiteSpace?: undefined;
|
|
29
|
+
maxWidth?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
overflow: string;
|
|
32
|
+
textOverflow: string;
|
|
33
|
+
whiteSpace: string;
|
|
34
|
+
maxWidth: string;
|
|
35
|
+
display?: undefined;
|
|
36
|
+
alignItems?: undefined;
|
|
37
|
+
gap?: undefined;
|
|
38
|
+
padding?: undefined;
|
|
39
|
+
borderRadius?: undefined;
|
|
40
|
+
background?: undefined;
|
|
41
|
+
border?: undefined;
|
|
42
|
+
fontSize?: undefined;
|
|
43
|
+
color?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
overflow: string;
|
|
46
|
+
textOverflow: string;
|
|
47
|
+
whiteSpace: string;
|
|
48
|
+
maxWidth: string;
|
|
49
|
+
color: string;
|
|
50
|
+
display?: undefined;
|
|
51
|
+
alignItems?: undefined;
|
|
52
|
+
gap?: undefined;
|
|
53
|
+
padding?: undefined;
|
|
54
|
+
borderRadius?: undefined;
|
|
55
|
+
background?: undefined;
|
|
56
|
+
border?: undefined;
|
|
57
|
+
fontSize?: undefined;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
|
|
61
|
+
export default useIndexStyle;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var _excluded = ["css"];
|
|
2
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
import createStyle from "../../../libs/createStyle";
|
|
9
|
+
export function getIndexStyleData(params) {
|
|
10
|
+
var sparkPrefix = params.sparkPrefix,
|
|
11
|
+
antPrefix = params.antPrefix;
|
|
12
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(sparkPrefix, "-file-card"), {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
gap: 8,
|
|
16
|
+
padding: 8,
|
|
17
|
+
borderRadius: 8,
|
|
18
|
+
background: "var(--".concat(antPrefix, "-color-bg-container)"),
|
|
19
|
+
border: "1px solid var(--".concat(antPrefix, "-color-border-secondary)")
|
|
20
|
+
}), ".".concat(sparkPrefix, "-file-card-info"), {
|
|
21
|
+
fontSize: 12,
|
|
22
|
+
color: "var(--".concat(antPrefix, "-color-text)")
|
|
23
|
+
}), ".".concat(sparkPrefix, "-file-card-name"), {
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
textOverflow: 'ellipsis',
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
27
|
+
maxWidth: '100%'
|
|
28
|
+
}), ".".concat(sparkPrefix, "-file-card-size"), {
|
|
29
|
+
overflow: 'hidden',
|
|
30
|
+
textOverflow: 'ellipsis',
|
|
31
|
+
whiteSpace: 'nowrap',
|
|
32
|
+
maxWidth: '100%',
|
|
33
|
+
color: "var(--".concat(antPrefix, "-color-text-quaternary)")
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
var useIndexStyle = createStyle(function (_ref2) {
|
|
37
|
+
var css = _ref2.css,
|
|
38
|
+
params = _objectWithoutProperties(_ref2, _excluded);
|
|
39
|
+
var result = css(getIndexStyleData(params));
|
|
40
|
+
return result;
|
|
41
|
+
});
|
|
42
|
+
export default useIndexStyle;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inline: true
|
|
3
|
+
*/
|
|
4
|
+
import API from ".dumi/theme/DemoComponents/APITable";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
var dataSource = [{
|
|
9
|
+
name: 'labelMarginRight',
|
|
10
|
+
description: 'labelMarginRight的尺寸,有两种',
|
|
11
|
+
type: "'default' | 'small",
|
|
12
|
+
default: 'default'
|
|
13
|
+
}];
|
|
14
|
+
export default (function () {
|
|
15
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
16
|
+
children: [/*#__PURE__*/_jsx(API, {
|
|
17
|
+
dataSource: dataSource
|
|
18
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
19
|
+
children: "\u5176\u4ED6API\u540CAntD\u7684Form"
|
|
20
|
+
})]
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { Button, Form, Input, Radio } from "../../../..";
|
|
8
|
+
import { DemoBlock } from ".dumi/theme/DemoComponents/DemoBlock";
|
|
9
|
+
import { useState } from 'react';
|
|
10
|
+
import styles from "./index.module.less";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
export default (function () {
|
|
15
|
+
var _useState = useState('horizontal'),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
layout = _useState2[0],
|
|
18
|
+
setLayout = _useState2[1];
|
|
19
|
+
var _useState3 = useState('default'),
|
|
20
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21
|
+
labelMarginRight = _useState4[0],
|
|
22
|
+
setLabelMarginRight = _useState4[1];
|
|
23
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
24
|
+
children: /*#__PURE__*/_jsxs(DemoBlock, {
|
|
25
|
+
title: "\u4E09\u79CD\u5E03\u5C40",
|
|
26
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
27
|
+
children: "\u5E03\u5C40"
|
|
28
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
29
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
|
30
|
+
value: layout,
|
|
31
|
+
onChange: function onChange(e) {
|
|
32
|
+
setLayout(e.target.value);
|
|
33
|
+
},
|
|
34
|
+
style: {
|
|
35
|
+
marginBottom: 12
|
|
36
|
+
},
|
|
37
|
+
children: [/*#__PURE__*/_jsx(Radio.Button, {
|
|
38
|
+
value: 'horizontal',
|
|
39
|
+
children: "horizontal"
|
|
40
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
|
41
|
+
value: 'vertical',
|
|
42
|
+
children: "vertical"
|
|
43
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
|
44
|
+
value: 'inline',
|
|
45
|
+
children: "inline"
|
|
46
|
+
})]
|
|
47
|
+
})
|
|
48
|
+
}), layout === 'inline' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
49
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
50
|
+
children: "labelMarginRight"
|
|
51
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
52
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
|
53
|
+
value: labelMarginRight,
|
|
54
|
+
onChange: function onChange(e) {
|
|
55
|
+
setLabelMarginRight(e.target.value);
|
|
56
|
+
},
|
|
57
|
+
style: {
|
|
58
|
+
marginBottom: 12
|
|
59
|
+
},
|
|
60
|
+
children: [/*#__PURE__*/_jsx(Radio.Button, {
|
|
61
|
+
value: 'default',
|
|
62
|
+
children: "default"
|
|
63
|
+
}), /*#__PURE__*/_jsx(Radio.Button, {
|
|
64
|
+
value: 'small',
|
|
65
|
+
children: "small"
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
})]
|
|
69
|
+
}), /*#__PURE__*/_jsxs(Form, {
|
|
70
|
+
className: styles.form,
|
|
71
|
+
labelCol: layout === 'horizontal' ? {
|
|
72
|
+
flex: '120px'
|
|
73
|
+
} : undefined,
|
|
74
|
+
labelMarginRight: layout === 'inline' ? labelMarginRight : undefined,
|
|
75
|
+
layout: layout,
|
|
76
|
+
children: [/*#__PURE__*/_jsx(Form.Item, {
|
|
77
|
+
label: "\u5BFC\u5165\u7C7B\u76EE",
|
|
78
|
+
name: "id",
|
|
79
|
+
layout: "horizontal",
|
|
80
|
+
tooltip: '导入类目的解释',
|
|
81
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
82
|
+
children: "\u53E4\u51CC\u6D4B\u8BD5"
|
|
83
|
+
})
|
|
84
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
|
85
|
+
label: "\u7528\u6237\u540D",
|
|
86
|
+
name: "username",
|
|
87
|
+
tooltip: "\u8BF7\u8F93\u5165\u7528\u6237\u540D",
|
|
88
|
+
rules: [{
|
|
89
|
+
required: true,
|
|
90
|
+
message: 'Please input your username!'
|
|
91
|
+
}],
|
|
92
|
+
children: /*#__PURE__*/_jsx(Input, {})
|
|
93
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
|
94
|
+
label: "\u5BC6\u7801",
|
|
95
|
+
name: "password",
|
|
96
|
+
children: /*#__PURE__*/_jsx(Input.Password, {})
|
|
97
|
+
}), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx(Form.Item, {
|
|
98
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
99
|
+
type: "primary",
|
|
100
|
+
htmlType: "submit",
|
|
101
|
+
children: "Submit"
|
|
102
|
+
})
|
|
103
|
+
})]
|
|
104
|
+
})]
|
|
105
|
+
})
|
|
106
|
+
});
|
|
107
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Form, Input } from "../../../..";
|
|
2
|
+
import { DemoBlock } from ".dumi/theme/DemoComponents/DemoBlock";
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import styles from "./index.module.less";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
export default (function () {
|
|
9
|
+
var formRef = useRef();
|
|
10
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
11
|
+
children: /*#__PURE__*/_jsxs(DemoBlock, {
|
|
12
|
+
title: "\u8BED\u8A00\u4E3A\u82F1\u8BED\u65F6\u7684\u4E00\u4E9B\u8BBE\u8BA1\u89C4\u8303",
|
|
13
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
14
|
+
children: "1. \u4E00\u4E9B\u8868\u5355\u9879\u9700\u8981\u624B\u52A8\u8BBE\u7F6E\u4E3A\u5782\u76F4\u5E03\u5C40\u6765\u7B26\u5408\u8BBE\u8BA1\u89C4\u8303\uFF0C\u5177\u4F53\u53C2\u8003\u8BBE\u8BA1\u7A3F\uFF1B"
|
|
15
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
16
|
+
children: "2. \u90E8\u5206\u6587\u6848\u8FC7\u957F\u7684label\u5141\u8BB8\u6362\u884C\uFF1B"
|
|
17
|
+
}), /*#__PURE__*/_jsxs(Form, {
|
|
18
|
+
ref: formRef,
|
|
19
|
+
className: styles.form,
|
|
20
|
+
labelCol: {
|
|
21
|
+
flex: '120px'
|
|
22
|
+
},
|
|
23
|
+
children: [/*#__PURE__*/_jsx(Form.Item, {
|
|
24
|
+
label: "Category of xxxxxxxxxxxxxxxx",
|
|
25
|
+
name: "id",
|
|
26
|
+
layout: "horizontal",
|
|
27
|
+
tooltip: "One world, one dream. \u5317\u4EAC\u6B22\u8FCE\u60A8",
|
|
28
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
29
|
+
children: "Guling Test"
|
|
30
|
+
})
|
|
31
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
|
32
|
+
label: "Username of xxx",
|
|
33
|
+
name: "username",
|
|
34
|
+
tooltip: "One world, one dream. \u5317\u4EAC\u6B22\u8FCE\u60A8",
|
|
35
|
+
layout: "vertical",
|
|
36
|
+
labelCol: {
|
|
37
|
+
flex: 'unset'
|
|
38
|
+
},
|
|
39
|
+
children: /*#__PURE__*/_jsx(Input, {})
|
|
40
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
|
41
|
+
label: "Password",
|
|
42
|
+
name: "password",
|
|
43
|
+
layout: "vertical",
|
|
44
|
+
labelCol: {
|
|
45
|
+
flex: 'unset'
|
|
46
|
+
},
|
|
47
|
+
children: /*#__PURE__*/_jsx(Input.Password, {})
|
|
48
|
+
})]
|
|
49
|
+
})]
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Form } from "../../../..";
|
|
2
|
+
import { DemoBlock } from ".dumi/theme/DemoComponents/DemoBlock";
|
|
3
|
+
import styles from "./index.module.less";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
export default (function () {
|
|
8
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
9
|
+
children: /*#__PURE__*/_jsxs(DemoBlock, {
|
|
10
|
+
title: "\u7279\u6B8A\u60C5\u51B5\u4E0B\uFF0CLabel\u548C\u8868\u5355\u63A7\u4EF6\u7684\u95F4\u8DDD\u4E3A8px'",
|
|
11
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
12
|
+
children: "\u8BBE\u7F6ElabelMarginRight='small'"
|
|
13
|
+
}), /*#__PURE__*/_jsx(Form, {
|
|
14
|
+
className: styles.form,
|
|
15
|
+
labelMarginRight: "small",
|
|
16
|
+
children: /*#__PURE__*/_jsx(Form.Item, {
|
|
17
|
+
label: "\u5BFC\u5165\u7C7B\u76EE",
|
|
18
|
+
name: "id",
|
|
19
|
+
layout: "horizontal",
|
|
20
|
+
tooltip: "One world, one dream. \u5317\u4EAC\u6B22\u8FCE\u60A8",
|
|
21
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
22
|
+
children: "\u53E4\u51CC\u6D4B\u8BD5"
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
})]
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Form } from "../../../..";
|
|
2
|
+
import { QuestionCircleOutlined } from "@agentscope-ai/icons-override-antd";
|
|
3
|
+
import { DemoBlock } from ".dumi/theme/DemoComponents/DemoBlock";
|
|
4
|
+
import styles from "./index.module.less";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
export default (function () {
|
|
8
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
9
|
+
children: /*#__PURE__*/_jsx(DemoBlock, {
|
|
10
|
+
title: "\u81EA\u5B9A\u4E49tooltip\u7684icon",
|
|
11
|
+
children: /*#__PURE__*/_jsx(Form, {
|
|
12
|
+
className: styles.form,
|
|
13
|
+
labelMarginRight: "small",
|
|
14
|
+
children: /*#__PURE__*/_jsx(Form.Item, {
|
|
15
|
+
label: "\u5BFC\u5165\u7C7B\u76EE",
|
|
16
|
+
name: "id",
|
|
17
|
+
layout: "horizontal",
|
|
18
|
+
tooltip: {
|
|
19
|
+
title: '古凌测试的解释文案',
|
|
20
|
+
icon: /*#__PURE__*/_jsx(QuestionCircleOutlined, {})
|
|
21
|
+
},
|
|
22
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
23
|
+
children: "\u53E4\u51CC\u6D4B\u8BD5"
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FormProps } from 'antd';
|
|
2
|
+
import ErrorList from 'antd/es/form/ErrorList';
|
|
3
|
+
import { useForm, useWatch } from 'antd/es/form/Form';
|
|
4
|
+
import FormItem from 'antd/es/form/FormItem';
|
|
5
|
+
import FormList from 'antd/es/form/FormList';
|
|
6
|
+
import { FormProvider } from 'antd/es/form/context';
|
|
7
|
+
import useFormInstance from 'antd/es/form/hooks/useFormInstance';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export type SparkFormProps = FormProps & {
|
|
10
|
+
labelMarginRight?: 'default' | 'small';
|
|
11
|
+
};
|
|
12
|
+
export type SparkFormRef = {
|
|
13
|
+
formRef: React.MutableRefObject<any>;
|
|
14
|
+
};
|
|
15
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<SparkFormProps & React.RefAttributes<SparkFormRef>> & {
|
|
16
|
+
useForm: typeof useForm;
|
|
17
|
+
useFormInstance: typeof useFormInstance;
|
|
18
|
+
useWatch: typeof useWatch;
|
|
19
|
+
Item: typeof FormItem;
|
|
20
|
+
List: typeof FormList;
|
|
21
|
+
ErrorList: typeof ErrorList;
|
|
22
|
+
Provider: typeof FormProvider;
|
|
23
|
+
/** @deprecated Only for warning usage. Do not use. */
|
|
24
|
+
create: () => void;
|
|
25
|
+
};
|
|
26
|
+
declare const SparkForm: CompoundedComponent;
|
|
27
|
+
export default SparkForm;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
var _excluded = ["tooltip"];
|
|
2
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
+
import { getCommonConfig } from "../../../config";
|
|
11
|
+
import { QuestionCircleOutlined } from "@agentscope-ai/icons-override-antd";
|
|
12
|
+
import { Form } from 'antd';
|
|
13
|
+
import FormItem from 'antd/es/form/FormItem';
|
|
14
|
+
import classnames from 'classnames';
|
|
15
|
+
import React, { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
16
|
+
import useIndexStyle from "./index.style";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
var InternalForm = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
|
+
var _props$labelMarginRig = props.labelMarginRight,
|
|
22
|
+
labelMarginRight = _props$labelMarginRig === void 0 ? undefined : _props$labelMarginRig;
|
|
23
|
+
var formRef = useRef(null);
|
|
24
|
+
var _getCommonConfig = getCommonConfig(),
|
|
25
|
+
sparkPrefix = _getCommonConfig.sparkPrefix;
|
|
26
|
+
useIndexStyle();
|
|
27
|
+
useImperativeHandle(ref, function () {
|
|
28
|
+
return formRef.current;
|
|
29
|
+
});
|
|
30
|
+
return (
|
|
31
|
+
/*#__PURE__*/
|
|
32
|
+
//@ts-ignore
|
|
33
|
+
_jsx(Form, _objectSpread(_objectSpread({}, props), {}, {
|
|
34
|
+
className: classnames(props.className, "".concat(sparkPrefix, "-form"), labelMarginRight === 'small' && "".concat(sparkPrefix, "-form-label-margin-small")),
|
|
35
|
+
ref: formRef,
|
|
36
|
+
requiredMark: function requiredMark(label, info) {
|
|
37
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
38
|
+
children: [label, info.required && /*#__PURE__*/_jsx("span", {
|
|
39
|
+
className: "".concat(sparkPrefix, "-required-mark"),
|
|
40
|
+
children: "*"
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}))
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
var InternalFormItem = function InternalFormItem(props) {
|
|
48
|
+
var tooltip = props.tooltip,
|
|
49
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
50
|
+
var defaultTooltipIcon = /*#__PURE__*/_jsx(QuestionCircleOutlined, {});
|
|
51
|
+
function getTooltip() {
|
|
52
|
+
if (!tooltip) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
var _tooltip = _typeof(tooltip) === 'object' && ! /*#__PURE__*/React.isValidElement(tooltip) ? _objectSpread(_objectSpread({}, tooltip), {}, {
|
|
56
|
+
icon: tooltip.icon || defaultTooltipIcon
|
|
57
|
+
}) : {
|
|
58
|
+
title: tooltip,
|
|
59
|
+
icon: defaultTooltipIcon
|
|
60
|
+
};
|
|
61
|
+
return _tooltip;
|
|
62
|
+
}
|
|
63
|
+
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
64
|
+
tooltip: getTooltip(),
|
|
65
|
+
labelCol: props.labelCol || (props.layout === 'vertical' ? {
|
|
66
|
+
flex: 'unset'
|
|
67
|
+
} : undefined)
|
|
68
|
+
}));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// 继承antd的Form.Item
|
|
72
|
+
var SparkFormItem = InternalFormItem;
|
|
73
|
+
SparkFormItem.useStatus = FormItem.useStatus;
|
|
74
|
+
|
|
75
|
+
// 继承antd的Form
|
|
76
|
+
var SparkForm = InternalForm;
|
|
77
|
+
SparkForm.Item = SparkFormItem;
|
|
78
|
+
SparkForm.List = Form.List;
|
|
79
|
+
SparkForm.ErrorList = Form.ErrorList;
|
|
80
|
+
SparkForm.Provider = Form.Provider;
|
|
81
|
+
SparkForm.useForm = Form.useForm;
|
|
82
|
+
SparkForm.useFormInstance = Form.useFormInstance;
|
|
83
|
+
SparkForm.useWatch = Form.useWatch;
|
|
84
|
+
export default SparkForm;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare function getIndexStyleData(params: any): {
|
|
2
|
+
[x: string]: {
|
|
3
|
+
[x: string]: {
|
|
4
|
+
color: string;
|
|
5
|
+
marginLeft: string;
|
|
6
|
+
lineHeight: number;
|
|
7
|
+
marginTop: string;
|
|
8
|
+
textAlign?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
textAlign: string;
|
|
11
|
+
color?: undefined;
|
|
12
|
+
marginLeft?: undefined;
|
|
13
|
+
lineHeight?: undefined;
|
|
14
|
+
marginTop?: undefined;
|
|
15
|
+
};
|
|
16
|
+
fontWeight?: undefined;
|
|
17
|
+
whiteSpace?: undefined;
|
|
18
|
+
fontSize?: undefined;
|
|
19
|
+
lineHeight?: undefined;
|
|
20
|
+
color?: undefined;
|
|
21
|
+
minHeight?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
fontWeight: number;
|
|
24
|
+
whiteSpace: string;
|
|
25
|
+
fontSize: string;
|
|
26
|
+
lineHeight: string;
|
|
27
|
+
color: string;
|
|
28
|
+
minHeight?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
[x: string]: {
|
|
31
|
+
marginRight: string;
|
|
32
|
+
};
|
|
33
|
+
fontWeight?: undefined;
|
|
34
|
+
whiteSpace?: undefined;
|
|
35
|
+
fontSize?: undefined;
|
|
36
|
+
lineHeight?: undefined;
|
|
37
|
+
color?: undefined;
|
|
38
|
+
minHeight?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
minHeight: string;
|
|
41
|
+
fontWeight?: undefined;
|
|
42
|
+
whiteSpace?: undefined;
|
|
43
|
+
fontSize?: undefined;
|
|
44
|
+
lineHeight?: undefined;
|
|
45
|
+
color?: undefined;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
declare const useIndexStyle: (props?: {}) => import("../../../config").CommonConfig;
|
|
49
|
+
export default useIndexStyle;
|