@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,143 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
var _excluded = ["children", "type", "danger", "title"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
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
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
import $i18n from "../../../i18n";
|
|
11
|
+
import { staticRenderer } from "../../..";
|
|
12
|
+
import { CheckCircleOutlined, CloseCircleOutlined, ExclamationCircleOutlined, InfoCircleOutlined } from "@agentscope-ai/icons-override-antd";
|
|
13
|
+
import { Flex, Modal } from 'antd';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import { uniqueId } from 'lodash-es';
|
|
16
|
+
import { getCommonConfig } from "../../../config";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
var AlertDialog = function AlertDialog(props) {
|
|
20
|
+
var children = props.children,
|
|
21
|
+
_props$type = props.type,
|
|
22
|
+
type = _props$type === void 0 ? 'info' : _props$type,
|
|
23
|
+
_props$danger = props.danger,
|
|
24
|
+
danger = _props$danger === void 0 ? false : _props$danger,
|
|
25
|
+
title = props.title,
|
|
26
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
27
|
+
var _getCommonConfig = getCommonConfig(),
|
|
28
|
+
antPrefix = _getCommonConfig.antPrefix;
|
|
29
|
+
var renderTitle = function renderTitle() {
|
|
30
|
+
switch (type) {
|
|
31
|
+
case 'success':
|
|
32
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
33
|
+
align: "center",
|
|
34
|
+
gap: 8,
|
|
35
|
+
className: "leading-[28px]",
|
|
36
|
+
children: [/*#__PURE__*/_jsx(CheckCircleOutlined, {
|
|
37
|
+
style: {
|
|
38
|
+
color: "var(--".concat(antPrefix, "-color-success)"),
|
|
39
|
+
fontSize: 18,
|
|
40
|
+
margin: '0 3px'
|
|
41
|
+
}
|
|
42
|
+
}), title]
|
|
43
|
+
});
|
|
44
|
+
case 'warning':
|
|
45
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
46
|
+
align: "center",
|
|
47
|
+
gap: 8,
|
|
48
|
+
className: "leading-[28px]",
|
|
49
|
+
children: [/*#__PURE__*/_jsx(ExclamationCircleOutlined, {
|
|
50
|
+
style: {
|
|
51
|
+
color: "var(--".concat(antPrefix, "-color-warning)"),
|
|
52
|
+
fontSize: 18,
|
|
53
|
+
margin: '0 3px'
|
|
54
|
+
}
|
|
55
|
+
}), title]
|
|
56
|
+
});
|
|
57
|
+
case 'info':
|
|
58
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
59
|
+
align: "center",
|
|
60
|
+
gap: 8,
|
|
61
|
+
className: "leading-[28px]",
|
|
62
|
+
children: [/*#__PURE__*/_jsx(InfoCircleOutlined, {
|
|
63
|
+
style: {
|
|
64
|
+
color: "var(--".concat(antPrefix, "-color-info)"),
|
|
65
|
+
fontSize: 18,
|
|
66
|
+
margin: '0 3px'
|
|
67
|
+
}
|
|
68
|
+
}), title]
|
|
69
|
+
});
|
|
70
|
+
case 'error':
|
|
71
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
72
|
+
align: "center",
|
|
73
|
+
gap: 8,
|
|
74
|
+
className: "leading-[28px]",
|
|
75
|
+
children: [/*#__PURE__*/_jsx(CloseCircleOutlined, {
|
|
76
|
+
style: {
|
|
77
|
+
color: "var(--".concat(antPrefix, "-color-error)"),
|
|
78
|
+
fontSize: 18,
|
|
79
|
+
margin: '0 3px'
|
|
80
|
+
}
|
|
81
|
+
}), title]
|
|
82
|
+
});
|
|
83
|
+
default:
|
|
84
|
+
return $i18n.get({
|
|
85
|
+
id: 'components.commonComponents.AlertDialog.Prompt',
|
|
86
|
+
dm: '提示'
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
|
|
91
|
+
width: 400,
|
|
92
|
+
transitionName: ""
|
|
93
|
+
}, restProps), {}, {
|
|
94
|
+
closeIcon: null,
|
|
95
|
+
title: renderTitle(),
|
|
96
|
+
okButtonProps: {
|
|
97
|
+
danger: type === 'error' || danger
|
|
98
|
+
},
|
|
99
|
+
styles: {
|
|
100
|
+
body: {
|
|
101
|
+
padding: '12px 0 12px 32px',
|
|
102
|
+
fontSize: '14px'
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
destroyOnClose: true,
|
|
106
|
+
getContainer: function getContainer() {
|
|
107
|
+
return document.getElementById('root');
|
|
108
|
+
},
|
|
109
|
+
className: classNames(props.className, 'animate-in'),
|
|
110
|
+
children: props.content || children
|
|
111
|
+
}));
|
|
112
|
+
};
|
|
113
|
+
var staticFns = ['success', 'info', 'warning', 'error'];
|
|
114
|
+
var _getCommonConfig2 = getCommonConfig(),
|
|
115
|
+
sparkPrefix = _getCommonConfig2.sparkPrefix;
|
|
116
|
+
staticFns.forEach(function (type) {
|
|
117
|
+
AlertDialog[type] = function (props) {
|
|
118
|
+
var id = uniqueId();
|
|
119
|
+
staticRenderer.show( /*#__PURE__*/_jsx(AlertDialog, _objectSpread(_objectSpread({}, props), {}, {
|
|
120
|
+
type: type,
|
|
121
|
+
open: true,
|
|
122
|
+
onOk: function onOk(e) {
|
|
123
|
+
var _props$onOk;
|
|
124
|
+
staticRenderer.hide(id);
|
|
125
|
+
(_props$onOk = props.onOk) === null || _props$onOk === void 0 || _props$onOk.call(props, e);
|
|
126
|
+
},
|
|
127
|
+
onCancel: function onCancel(e) {
|
|
128
|
+
var _props$onCancel;
|
|
129
|
+
staticRenderer.hide(id);
|
|
130
|
+
(_props$onCancel = props.onCancel) === null || _props$onCancel === void 0 || _props$onCancel.call(props, e);
|
|
131
|
+
},
|
|
132
|
+
onClose: function onClose(e) {
|
|
133
|
+
var _props$onClose;
|
|
134
|
+
staticRenderer.hide(id);
|
|
135
|
+
(_props$onClose = props.onClose) === null || _props$onClose === void 0 || _props$onClose.call(props, e);
|
|
136
|
+
},
|
|
137
|
+
getContainer: function getContainer() {
|
|
138
|
+
return document.querySelector("div[role=".concat(sparkPrefix, "-static").concat(id ? "-".concat(id) : '', "]")) || document.body;
|
|
139
|
+
}
|
|
140
|
+
})), id);
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
export default AlertDialog;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Avatar } from "../../../..";
|
|
2
|
+
import { Space } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
var App = function App() {
|
|
7
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
8
|
+
direction: "vertical",
|
|
9
|
+
size: 16,
|
|
10
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
11
|
+
wrap: true,
|
|
12
|
+
size: 16,
|
|
13
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
14
|
+
src: 'https://img.alicdn.com/imgextra/i2/O1CN01PbkG9o1tq4Q12GvNM_!!6000000005952-55-tps-32-32.svg'
|
|
15
|
+
}), /*#__PURE__*/_jsx(Avatar, {
|
|
16
|
+
src: 'https://img.alicdn.com/imgextra/i3/O1CN01BDtvaC21QRB33cguy_!!6000000006979-55-tps-32-32.svg'
|
|
17
|
+
}), /*#__PURE__*/_jsx(Avatar, {
|
|
18
|
+
children: "Micheal Jack"
|
|
19
|
+
}), /*#__PURE__*/_jsx(Avatar, {
|
|
20
|
+
children: "\u5F20\u4E09"
|
|
21
|
+
})]
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
export default App;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
var _excluded = ["children"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
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."); }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
import { Avatar } from 'antd';
|
|
17
|
+
import { forwardRef, useEffect, useState } from 'react';
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
var SparkAvatar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
20
|
+
var children = props.children,
|
|
21
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
22
|
+
var _useState = useState(props.children),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
modifiedChildren = _useState2[0],
|
|
25
|
+
setModifiedChildren = _useState2[1];
|
|
26
|
+
useEffect(function () {
|
|
27
|
+
if (typeof children === 'string') {
|
|
28
|
+
setModifiedChildren(children.slice(0, 1));
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
setModifiedChildren(children);
|
|
32
|
+
}, [children]);
|
|
33
|
+
return /*#__PURE__*/_jsx(Avatar, _objectSpread(_objectSpread({
|
|
34
|
+
ref: ref
|
|
35
|
+
}, restProps), {}, {
|
|
36
|
+
children: modifiedChildren
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
export default SparkAvatar;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Avatar, Badge } from "../../../..";
|
|
2
|
+
import { Space } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
var App = function App() {
|
|
7
|
+
return /*#__PURE__*/_jsxs(Space, {
|
|
8
|
+
size: "middle",
|
|
9
|
+
children: [/*#__PURE__*/_jsx(Badge, {
|
|
10
|
+
count: 5,
|
|
11
|
+
children: /*#__PURE__*/_jsx(Avatar, {
|
|
12
|
+
shape: "square",
|
|
13
|
+
size: "large"
|
|
14
|
+
})
|
|
15
|
+
}), /*#__PURE__*/_jsx(Badge, {
|
|
16
|
+
dot: true,
|
|
17
|
+
children: /*#__PURE__*/_jsx(Avatar, {
|
|
18
|
+
shape: "square",
|
|
19
|
+
size: "large"
|
|
20
|
+
})
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
export default App;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Button, IconFont } from "../../../..";
|
|
2
|
+
import { Flex } from 'antd';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
export default (function () {
|
|
6
|
+
var orderList = ['primary', 'primaryLess', 'default', 'text', 'textCompact', 'link'];
|
|
7
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
8
|
+
vertical: true,
|
|
9
|
+
gap: 24,
|
|
10
|
+
children: [/*#__PURE__*/_jsx(Flex, {
|
|
11
|
+
gap: 16,
|
|
12
|
+
children: orderList.map(function (order) {
|
|
13
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
14
|
+
vertical: true,
|
|
15
|
+
gap: 8,
|
|
16
|
+
align: "start",
|
|
17
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
18
|
+
type: order,
|
|
19
|
+
children: order
|
|
20
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
21
|
+
type: order,
|
|
22
|
+
danger: true,
|
|
23
|
+
children: order
|
|
24
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
25
|
+
type: order,
|
|
26
|
+
disabled: true,
|
|
27
|
+
children: order
|
|
28
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
29
|
+
type: order,
|
|
30
|
+
disabled: true,
|
|
31
|
+
children: order
|
|
32
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
33
|
+
type: order,
|
|
34
|
+
icon: /*#__PURE__*/_jsx(IconFont, {
|
|
35
|
+
type: "spark-plus-line"
|
|
36
|
+
}),
|
|
37
|
+
children: order
|
|
38
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
39
|
+
type: order,
|
|
40
|
+
danger: true,
|
|
41
|
+
icon: /*#__PURE__*/_jsx(IconFont, {
|
|
42
|
+
type: "spark-plus-line"
|
|
43
|
+
}),
|
|
44
|
+
children: order
|
|
45
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
46
|
+
type: order,
|
|
47
|
+
loading: true,
|
|
48
|
+
children: order
|
|
49
|
+
})]
|
|
50
|
+
}, order);
|
|
51
|
+
})
|
|
52
|
+
}), /*#__PURE__*/_jsx(Flex, {
|
|
53
|
+
gap: 16,
|
|
54
|
+
children: orderList.map(function (order) {
|
|
55
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
56
|
+
vertical: true,
|
|
57
|
+
gap: 8,
|
|
58
|
+
align: "start",
|
|
59
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
60
|
+
type: order,
|
|
61
|
+
size: "small",
|
|
62
|
+
children: order
|
|
63
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
64
|
+
type: order,
|
|
65
|
+
size: "small",
|
|
66
|
+
danger: true,
|
|
67
|
+
children: order
|
|
68
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
69
|
+
type: order,
|
|
70
|
+
size: "small",
|
|
71
|
+
disabled: true,
|
|
72
|
+
children: order
|
|
73
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
74
|
+
type: order,
|
|
75
|
+
size: "small",
|
|
76
|
+
disabled: true,
|
|
77
|
+
children: order
|
|
78
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
79
|
+
type: order,
|
|
80
|
+
size: "small",
|
|
81
|
+
icon: /*#__PURE__*/_jsx(IconFont, {
|
|
82
|
+
type: "spark-plus-line"
|
|
83
|
+
}),
|
|
84
|
+
children: order
|
|
85
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
86
|
+
size: "small",
|
|
87
|
+
type: order,
|
|
88
|
+
danger: true,
|
|
89
|
+
icon: /*#__PURE__*/_jsx(IconFont, {
|
|
90
|
+
type: "spark-plus-line"
|
|
91
|
+
}),
|
|
92
|
+
children: order
|
|
93
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
94
|
+
size: "small",
|
|
95
|
+
type: order,
|
|
96
|
+
loading: true,
|
|
97
|
+
children: order
|
|
98
|
+
})]
|
|
99
|
+
}, order);
|
|
100
|
+
})
|
|
101
|
+
})]
|
|
102
|
+
});
|
|
103
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Button } from "../../../..";
|
|
2
|
+
import { Flex } from 'antd';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
export default (function () {
|
|
6
|
+
return /*#__PURE__*/_jsxs(Flex, {
|
|
7
|
+
gap: 16,
|
|
8
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
9
|
+
iconType: "spark-plus-line",
|
|
10
|
+
children: "\u6309\u94AE"
|
|
11
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
12
|
+
disabled: true,
|
|
13
|
+
tooltipContent: "\u4E3A\u4EC0\u4E48\u88AB\u7981\u7528\u5462",
|
|
14
|
+
children: "\u88AB\u7981\u7528\u7684\u6309\u94AE"
|
|
15
|
+
})]
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ButtonProps } from 'antd';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
|
+
export interface SparkButtonProps extends ButtonProps {
|
|
4
|
+
/** 尺寸
|
|
5
|
+
* @default
|
|
6
|
+
*/
|
|
7
|
+
size?: 'small' | 'middle';
|
|
8
|
+
/** 类型
|
|
9
|
+
* @default 'deafult'
|
|
10
|
+
*/
|
|
11
|
+
type?: 'primary' | 'dashed' | 'link' | 'text' | 'default' | 'primaryLess' | 'textCompact';
|
|
12
|
+
/** hover上去Popover的内容 */
|
|
13
|
+
tooltipContent?: string | ReactNode;
|
|
14
|
+
/** 百炼图标iconfont的key,依赖百炼的iconFont,例如bl-icon-add */
|
|
15
|
+
iconType?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const Button: React.ForwardRefExoticComponent<SparkButtonProps & React.RefAttributes<any>>;
|
|
18
|
+
export default Button;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
import { Button as AntdButton, ConfigProvider } from 'antd';
|
|
8
|
+
import React, { forwardRef } from 'react';
|
|
9
|
+
import IconFont from "../IconFont";
|
|
10
|
+
import Popover from "../Popover";
|
|
11
|
+
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15
|
+
var buttonType = React.useMemo(function () {
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
if (props.type === 'primaryLess') return 'primary';
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
if (props.type === 'textCompact') return 'link';
|
|
20
|
+
return props.type;
|
|
21
|
+
}, [props.type]);
|
|
22
|
+
var icon = React.useMemo(function () {
|
|
23
|
+
if (props.iconType) return /*#__PURE__*/_jsx(IconFont, {
|
|
24
|
+
type: props.iconType,
|
|
25
|
+
size: props.size
|
|
26
|
+
}); // 注意 size 也需要传入下去
|
|
27
|
+
if (props.icon) return /*#__PURE__*/React.cloneElement(props.icon, {
|
|
28
|
+
size: props.size // 注意 size 也需要传入下去
|
|
29
|
+
});
|
|
30
|
+
return null;
|
|
31
|
+
}, [props.iconType, props.icon]);
|
|
32
|
+
var button = /*#__PURE__*/_jsx(AntdButton, _objectSpread(_objectSpread({}, props), {}, {
|
|
33
|
+
ref: ref,
|
|
34
|
+
type: buttonType,
|
|
35
|
+
icon: icon,
|
|
36
|
+
style: _objectSpread({
|
|
37
|
+
lineHeight: 1
|
|
38
|
+
}, props.style)
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
if (props.type === 'primaryLess') {
|
|
43
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
44
|
+
theme: {
|
|
45
|
+
token: {
|
|
46
|
+
colorPrimary: 'rgba(38, 36, 76, 0.88)',
|
|
47
|
+
colorPrimaryHover: 'rgba(38, 36, 76, 0.65)'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
children: /*#__PURE__*/_jsx(Popover, {
|
|
51
|
+
content: props.tooltipContent,
|
|
52
|
+
children: button
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
} else if (props.type === 'textCompact') {
|
|
57
|
+
return /*#__PURE__*/_jsx(Popover, {
|
|
58
|
+
content: props.tooltipContent,
|
|
59
|
+
children: /*#__PURE__*/_jsx(AntdButton, _objectSpread(_objectSpread({}, props), {}, {
|
|
60
|
+
ref: ref,
|
|
61
|
+
icon: icon,
|
|
62
|
+
color: "default",
|
|
63
|
+
variant: "link",
|
|
64
|
+
style: _objectSpread({
|
|
65
|
+
paddingLeft: 0,
|
|
66
|
+
paddingRight: 0,
|
|
67
|
+
lineHeight: 1
|
|
68
|
+
}, props.style)
|
|
69
|
+
}))
|
|
70
|
+
});
|
|
71
|
+
} else {
|
|
72
|
+
return /*#__PURE__*/_jsx(Popover, {
|
|
73
|
+
content: props.tooltipContent,
|
|
74
|
+
children: button
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
export default Button;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Card } from "../../../..";
|
|
2
|
+
import { Space, theme } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
var App = function App() {
|
|
6
|
+
var token = theme.useToken();
|
|
7
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
8
|
+
direction: "vertical",
|
|
9
|
+
size: 16,
|
|
10
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
11
|
+
title: "Card title",
|
|
12
|
+
info: "info here",
|
|
13
|
+
style: {
|
|
14
|
+
width: 300
|
|
15
|
+
},
|
|
16
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
17
|
+
style: {
|
|
18
|
+
width: '100%',
|
|
19
|
+
height: 120,
|
|
20
|
+
/* 主题色/color-primary-bg */
|
|
21
|
+
background: token.token.colorPrimaryBg,
|
|
22
|
+
display: 'flex',
|
|
23
|
+
justifyContent: 'center',
|
|
24
|
+
alignItems: 'center'
|
|
25
|
+
},
|
|
26
|
+
children: "Content here"
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export default App;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Card } from "../../../..";
|
|
2
|
+
import { Space } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
var App = function App() {
|
|
7
|
+
return /*#__PURE__*/_jsxs(Space, {
|
|
8
|
+
direction: "vertical",
|
|
9
|
+
size: 16,
|
|
10
|
+
children: [/*#__PURE__*/_jsxs(Card, {
|
|
11
|
+
title: "Default size card",
|
|
12
|
+
extra: /*#__PURE__*/_jsx("a", {
|
|
13
|
+
href: "#",
|
|
14
|
+
children: "More"
|
|
15
|
+
}),
|
|
16
|
+
style: {
|
|
17
|
+
width: 300
|
|
18
|
+
},
|
|
19
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
20
|
+
children: "Card content"
|
|
21
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
22
|
+
children: "Card content"
|
|
23
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
24
|
+
children: "Card content"
|
|
25
|
+
})]
|
|
26
|
+
}), /*#__PURE__*/_jsxs(Card, {
|
|
27
|
+
size: "small",
|
|
28
|
+
title: "Small size card",
|
|
29
|
+
extra: /*#__PURE__*/_jsx("a", {
|
|
30
|
+
href: "#",
|
|
31
|
+
children: "More"
|
|
32
|
+
}),
|
|
33
|
+
style: {
|
|
34
|
+
width: 300
|
|
35
|
+
},
|
|
36
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
37
|
+
children: "Card content"
|
|
38
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
39
|
+
children: "Card content"
|
|
40
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
41
|
+
children: "Card content"
|
|
42
|
+
})]
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
export default App;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CardProps } from 'antd';
|
|
3
|
+
export interface SparkCardProps extends CardProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description 副标题
|
|
6
|
+
* @default ReactNode
|
|
7
|
+
*/
|
|
8
|
+
info?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: (props: SparkCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
var _excluded = ["children"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
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
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { getCommonConfig } from "../../../config";
|
|
12
|
+
import { Card } from 'antd';
|
|
13
|
+
import useIndexStyle from "./index.style";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
export default (function (props) {
|
|
17
|
+
var children = props.children,
|
|
18
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
19
|
+
useIndexStyle();
|
|
20
|
+
var commonConfig = getCommonConfig();
|
|
21
|
+
var sparkPrefix = commonConfig.sparkPrefix;
|
|
22
|
+
return /*#__PURE__*/_jsx(Card, _objectSpread(_objectSpread({
|
|
23
|
+
className: "".concat(sparkPrefix, "-card")
|
|
24
|
+
}, restProps), {}, {
|
|
25
|
+
title: null,
|
|
26
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
27
|
+
className: "".concat(sparkPrefix, "-card-wrapper"),
|
|
28
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
29
|
+
className: "".concat(sparkPrefix, "-title"),
|
|
30
|
+
children: props.title
|
|
31
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
32
|
+
className: "".concat(sparkPrefix, "-info"),
|
|
33
|
+
children: props.info
|
|
34
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
35
|
+
className: "".concat(sparkPrefix, "-content"),
|
|
36
|
+
children: children
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
}));
|
|
40
|
+
});
|