diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 15d28256c..000000000 --- a/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -.env -packages/app/.env diff --git a/.dumi/theme/builtins/API.tsx b/.dumi/theme/builtins/API.tsx deleted file mode 100755 index ce815d396..000000000 --- a/.dumi/theme/builtins/API.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import React, { useContext } from 'react'; -import type { IApiComponentProps} from 'dumi/theme'; -import { context, useApiData, AnchorLink } from 'dumi/theme'; - -const LOCALE_TEXTS = { - 'zh-CN': { - name: '属性名', - description: '描述', - type: '类型', - default: '默认值', - required: '(必选)', - }, - 'en-US': { - name: 'Name', - description: 'Description', - type: 'Type', - default: 'Default', - required: '(required)', - }, -}; - -export default ({ identifier, export: expt }: IApiComponentProps) => { - const data = useApiData(identifier); - const { locale } = useContext(context); - const texts = /^zh|cn$/i.test(locale) ? LOCALE_TEXTS['zh-CN'] : LOCALE_TEXTS['en-US']; - - return ( - <> - {data && ( - - - - - - - - - - - {data[expt].map(row => ( - - - - - - - ))} - -
{texts.name}{texts.description}{texts.type}{texts.default}
{row.identifier}{row.description || '--'} - {row.type} - - {row.default || (row.required && texts.required) || '--'} -
- )} - - ); -}; diff --git a/.dumi/theme/builtins/Alert.less b/.dumi/theme/builtins/Alert.less deleted file mode 100755 index 988f32486..000000000 --- a/.dumi/theme/builtins/Alert.less +++ /dev/null @@ -1,68 +0,0 @@ -@import (reference) '../style/variables.less'; - -.@{prefix}-alert { - @s-border-right: 3px; - - position: relative; - margin: 24px 0; - padding: 15px; - color: @c-text; - font-size: 14px; - line-height: 20px; - border-left: 0; - background: #ffffff; - // box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.06); - border-radius: 1px; - - &::after { - content: ''; - position: absolute; - display: inline-block; - top: 0; - left: 0; - bottom: 0; - width: @s-border-right; - border-radius: 1px; - } - - &:first-child { - margin-top: 0; - } - - &:not([type]), - &[type='warning'] { - background-color: #fffbe6; - &::after { - background: #ffe58f; - } - } - - &[type='info'] { - background: rgba(105, 185, 255, .15); - &::after { - background: #69b9ff; - } - .@{prefix}-alert-title { - color: #69b9ff; - } - } - - &[type='success'] { - &::after { - background: #8cd225; - } - } - - &[type='error'] { - &::after { - background: #ff4646; - } - } - - .@{prefix}-alert-title { - margin-top: 0; - font-weight: 600; - color: #fab00e; - margin-bottom: .6em; - } -} diff --git a/.dumi/theme/builtins/Alert.tsx b/.dumi/theme/builtins/Alert.tsx deleted file mode 100755 index 9facc10b9..000000000 --- a/.dumi/theme/builtins/Alert.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import './Alert.less'; -import { Alert } from 'antd'; -import micromark from 'micromark' - -export default (props: any) => { - const { title, children, ...others } = props; - console.log({children}); - return ( -
- {title && ( -

{title}

- )} - {typeof children === 'string' ?
: children} -
- ) -}; diff --git a/.dumi/theme/builtins/Badge.less b/.dumi/theme/builtins/Badge.less deleted file mode 100755 index dc2de29c9..000000000 --- a/.dumi/theme/builtins/Badge.less +++ /dev/null @@ -1,31 +0,0 @@ -@import (reference) '../style/variables.less'; - -.@{prefix}-badge { - display: inline-block; - margin-left: 6px; - padding: 1px 7px; - color: #fff; - font-size: 13px; - line-height: 20px; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1); - box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.06); - border-radius: 1px; - vertical-align: top; - - &:not([type]), - &[type='info'] { - background: #4569d4; - } - - &[type='warning'] { - background: #ffc121; - } - - &[type='success'] { - background: #8cd225; - } - - &[type='error'] { - background: #ff4646; - } -} diff --git a/.dumi/theme/builtins/Badge.tsx b/.dumi/theme/builtins/Badge.tsx deleted file mode 100755 index 2572c291c..000000000 --- a/.dumi/theme/builtins/Badge.tsx +++ /dev/null @@ -1,4 +0,0 @@ -import React from 'react'; -import './Badge.less'; - -export default (props: any) => ; diff --git a/.dumi/theme/builtins/Example.less b/.dumi/theme/builtins/Example.less deleted file mode 100755 index cb829c52e..000000000 --- a/.dumi/theme/builtins/Example.less +++ /dev/null @@ -1,47 +0,0 @@ -@import (reference) '../style/variables.less'; - -.@{prefix}-example-wrapper { - padding-top: 16px; - height: calc(100vh - @s-nav-height - 2px); - - @media @mobile { - padding-top: 16px; - } - - &-toolbar { - display: flex; - color: @c-heading; - font-size: 16px; - font-weight: 500; - justify-content: space-between; - margin-bottom: 16px; - border-bottom: 1px solid @c-border; - - button, - a { - display: inline-block; - margin: 6px 0 6px 12px; - width: 16px; - height: 16px; - font-weight: 400; - border: 0; - outline: none; - vertical-align: middle; - cursor: pointer; - - &:first-child { - background-position-x: -144px; - } - - &:nth-child(2) { - background-position-x: -126px; - } - } - } - - iframe { - width: 100%; - min-height: 100%; - border: 0; - } -} diff --git a/.dumi/theme/builtins/Example.tsx b/.dumi/theme/builtins/Example.tsx deleted file mode 100755 index 7323cd68c..000000000 --- a/.dumi/theme/builtins/Example.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React, { useRef, useEffect, useState } from 'react'; -import './Example.less'; - -export default (props: { route: any }) => { - const elm = useRef(); - const [height, setHeight] = useState(0); - - useEffect(() => { - setHeight(elm.current.contentWindow.document.documentElement.scrollHeight); - }, [elm]); - - return ( - props.route.meta.examplePath && ( -
-
- {props.route.meta.description || props.route.meta.title} - -
-