From 10aa8b11be501702dc7c90a634267e29160a11bd Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 10 May 2024 15:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=B0=83=E6=95=B4=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/{views => avatar}/avatar.js | 2 +- src/{views => badge}/badge.js | 0 src/{views => breadcrumb}/breadcrumb.js | 0 src/{base => button}/button.js | 2 +- src/{views => card}/card.js | 0 src/{form => checkbox}/checkbox.js | 0 src/{views/code/index.js => code/code.js} | 4 +- src/{views => }/code/colorful.js | 0 src/{views => collapse}/collapse.js | 2 +- src/{form => color}/color.js | 0 src/{other => divider}/divider.js | 0 src/{modal => }/drag/core.js | 0 src/{modal => }/drag/index.js | 0 src/{modal => drawer}/drawer.js | 2 +- src/{nav => dropdown}/dropdown.js | 2 +- src/form/index.js | 15 ------- src/{base => icon}/icon.js | 0 src/{base => icon}/svg-path.js | 0 src/{views => image}/image.js | 2 +- .../image-preview.js => image/preview.js} | 2 +- .../image-uploader.js => image/uploader.js} | 2 +- src/index.js | 40 ------------------- src/{form => input}/input.js | 2 +- src/{form => input}/textarea.js | 0 src/{modal => layer}/layer.js | 0 src/{base => link}/link.js | 0 src/{modal => loading}/loading.js | 0 src/{views => }/markd/core.js | 0 src/{views => }/markd/index.js | 4 +- src/{modal => notify}/notify.js | 2 +- src/{form => number}/number.js | 0 src/other/sandbox.js | 4 +- src/{nav => pager}/pager.js | 2 +- src/{form => passwd}/passwd.js | 2 +- src/{modal => popconfirm}/popconfirm.js | 2 +- src/{views => progress}/progress.js | 0 src/{form => radio}/radio.js | 0 src/{views => result}/result.js | 2 +- src/{other => scroll}/scroll.js | 0 src/{form => select}/select.js | 6 +-- src/{form => slider}/slider.js | 0 src/{base => space}/space.js | 0 src/{form => star}/star.js | 2 +- src/{nav => steps}/steps.js | 2 +- src/{views => swiper}/swiper.js | 2 +- src/{form => switch}/switch.js | 0 src/{views => tabs}/tabs.js | 2 +- src/{views => tag}/tag.js | 2 +- src/{views => time}/time.js | 0 src/{views => timeline}/timeline.js | 2 +- src/{modal => tooltip}/tooltip.js | 0 src/{form => uploader}/uploader.js | 2 +- 52 files changed, 30 insertions(+), 85 deletions(-) rename src/{views => avatar}/avatar.js (98%) rename src/{views => badge}/badge.js (100%) rename src/{views => breadcrumb}/breadcrumb.js (100%) rename src/{base => button}/button.js (99%) rename src/{views => card}/card.js (100%) rename src/{form => checkbox}/checkbox.js (100%) rename src/{views/code/index.js => code/code.js} (99%) rename src/{views => }/code/colorful.js (100%) rename src/{views => collapse}/collapse.js (99%) rename src/{form => color}/color.js (100%) rename src/{other => divider}/divider.js (100%) rename src/{modal => }/drag/core.js (100%) rename src/{modal => }/drag/index.js (100%) rename src/{modal => drawer}/drawer.js (99%) rename src/{nav => dropdown}/dropdown.js (98%) delete mode 100644 src/form/index.js rename src/{base => icon}/icon.js (100%) rename src/{base => icon}/svg-path.js (100%) rename src/{views => image}/image.js (98%) rename src/{views/image-preview.js => image/preview.js} (99%) rename src/{form/image-uploader.js => image/uploader.js} (99%) delete mode 100644 src/index.js rename src/{form => input}/input.js (99%) rename src/{form => input}/textarea.js (100%) rename src/{modal => layer}/layer.js (100%) rename src/{base => link}/link.js (100%) rename src/{modal => loading}/loading.js (100%) rename src/{views => }/markd/core.js (100%) rename src/{views => }/markd/index.js (98%) rename src/{modal => notify}/notify.js (99%) rename src/{form => number}/number.js (100%) rename src/{nav => pager}/pager.js (99%) rename src/{form => passwd}/passwd.js (99%) rename src/{modal => popconfirm}/popconfirm.js (99%) rename src/{views => progress}/progress.js (100%) rename src/{form => radio}/radio.js (100%) rename src/{views => result}/result.js (98%) rename src/{other => scroll}/scroll.js (100%) rename src/{form => select}/select.js (95%) rename src/{form => slider}/slider.js (100%) rename src/{base => space}/space.js (100%) rename src/{form => star}/star.js (99%) rename src/{nav => steps}/steps.js (99%) rename src/{views => swiper}/swiper.js (99%) rename src/{form => switch}/switch.js (100%) rename src/{views => tabs}/tabs.js (99%) rename src/{views => tag}/tag.js (99%) rename src/{views => time}/time.js (100%) rename src/{views => timeline}/timeline.js (99%) rename src/{modal => tooltip}/tooltip.js (100%) rename src/{form => uploader}/uploader.js (99%) diff --git a/src/views/avatar.js b/src/avatar/avatar.js similarity index 98% rename from src/views/avatar.js rename to src/avatar/avatar.js index 1badf2a..7924ae8 100644 --- a/src/views/avatar.js +++ b/src/avatar/avatar.js @@ -4,7 +4,7 @@ * @date 2023/04/25 09:27:25 */ import { html, css, Component } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' class Avatar extends Component { static props = { diff --git a/src/views/badge.js b/src/badge/badge.js similarity index 100% rename from src/views/badge.js rename to src/badge/badge.js diff --git a/src/views/breadcrumb.js b/src/breadcrumb/breadcrumb.js similarity index 100% rename from src/views/breadcrumb.js rename to src/breadcrumb/breadcrumb.js diff --git a/src/base/button.js b/src/button/button.js similarity index 99% rename from src/base/button.js rename to src/button/button.js index d554f44..9d211fc 100644 --- a/src/base/button.js +++ b/src/button/button.js @@ -5,7 +5,7 @@ */ import { css, html, Component, nextTick, styleMap } from 'wkit' -import './icon.js' +import '../icon/icon.js' class Button extends Component { static props = { diff --git a/src/views/card.js b/src/card/card.js similarity index 100% rename from src/views/card.js rename to src/card/card.js diff --git a/src/form/checkbox.js b/src/checkbox/checkbox.js similarity index 100% rename from src/form/checkbox.js rename to src/checkbox/checkbox.js diff --git a/src/views/code/index.js b/src/code/code.js similarity index 99% rename from src/views/code/index.js rename to src/code/code.js index 9d164fa..a67db25 100644 --- a/src/views/code/index.js +++ b/src/code/code.js @@ -5,8 +5,8 @@ */ import { html, raw, css, Component, nextTick } from 'wkit' import { colorHtml, colorJs, colorCss, colorMd } from './colorful.js' -import '../../base/icon.js' -import '../../modal/layer.js' +import '../icon/icon.js' +import '../layer/layer.js' function trim(str) { return str diff --git a/src/views/code/colorful.js b/src/code/colorful.js similarity index 100% rename from src/views/code/colorful.js rename to src/code/colorful.js diff --git a/src/views/collapse.js b/src/collapse/collapse.js similarity index 99% rename from src/views/collapse.js rename to src/collapse/collapse.js index 7dfc42a..cfe48a2 100644 --- a/src/views/collapse.js +++ b/src/collapse/collapse.js @@ -5,7 +5,7 @@ */ import { css, html, Component, styleMap, nextTick } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' class Collapse extends Component { static props = { diff --git a/src/form/color.js b/src/color/color.js similarity index 100% rename from src/form/color.js rename to src/color/color.js diff --git a/src/other/divider.js b/src/divider/divider.js similarity index 100% rename from src/other/divider.js rename to src/divider/divider.js diff --git a/src/modal/drag/core.js b/src/drag/core.js similarity index 100% rename from src/modal/drag/core.js rename to src/drag/core.js diff --git a/src/modal/drag/index.js b/src/drag/index.js similarity index 100% rename from src/modal/drag/index.js rename to src/drag/index.js diff --git a/src/modal/drawer.js b/src/drawer/drawer.js similarity index 99% rename from src/modal/drawer.js rename to src/drawer/drawer.js index 948c565..c15eebc 100644 --- a/src/modal/drawer.js +++ b/src/drawer/drawer.js @@ -6,7 +6,7 @@ import { css, html, Component, nextTick, styleMap } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' const ANIMATION = { left: { diff --git a/src/nav/dropdown.js b/src/dropdown/dropdown.js similarity index 98% rename from src/nav/dropdown.js rename to src/dropdown/dropdown.js index c3ec220..2739ae9 100644 --- a/src/nav/dropdown.js +++ b/src/dropdown/dropdown.js @@ -5,7 +5,7 @@ */ import { nextTick, css, html, Component, bind } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' import '../option/index.js' class Dropdown extends Component { diff --git a/src/form/index.js b/src/form/index.js deleted file mode 100644 index aa175bc..0000000 --- a/src/form/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import '../base/button.js' -import '../base/link.js' -import './checkbox.js' -import './color.js' -import './input.js' -import './number.js' -import './passwd.js' -import './radio.js' -import './select.js' -import './slider.js' -import './star.js' -import './switch.js' -import './textarea.js' -import './uploader.js' -import './image-uploader.js' diff --git a/src/base/icon.js b/src/icon/icon.js similarity index 100% rename from src/base/icon.js rename to src/icon/icon.js diff --git a/src/base/svg-path.js b/src/icon/svg-path.js similarity index 100% rename from src/base/svg-path.js rename to src/icon/svg-path.js diff --git a/src/views/image.js b/src/image/image.js similarity index 98% rename from src/views/image.js rename to src/image/image.js index 0a98201..673206e 100644 --- a/src/views/image.js +++ b/src/image/image.js @@ -5,7 +5,7 @@ */ import { css, html, Component, styleMap } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' class Image extends Component { static props = { diff --git a/src/views/image-preview.js b/src/image/preview.js similarity index 99% rename from src/views/image-preview.js rename to src/image/preview.js index c68b2a1..fabefb3 100644 --- a/src/views/image-preview.js +++ b/src/image/preview.js @@ -5,7 +5,7 @@ */ import { css, html, Component, styleMap, bind, unbind } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' class ImagePreview extends Component { static props = { diff --git a/src/form/image-uploader.js b/src/image/uploader.js similarity index 99% rename from src/form/image-uploader.js rename to src/image/uploader.js index 2de83bf..33780eb 100644 --- a/src/form/image-uploader.js +++ b/src/image/uploader.js @@ -6,7 +6,7 @@ import { css, html, Component, offset, bind, unbind, styleMap } from 'wkit' import { parseSize } from '../base/fs.js' -import '../base/icon.js' +import '../icon/icon.js' const EV_OPTION = { once: true } const DOC = document diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 530d062..0000000 --- a/src/index.js +++ /dev/null @@ -1,40 +0,0 @@ -import './base/button.js' -import './base/icon.js' -import './base/link.js' -import './base/space.js' - -import './form/index.js' - -import './views/avatar.js' -import './views/badge.js' -import './views/breadcrumb.js' -import './views/code/index.js' -import './views/card.js' -import './views/collapse.js' -import './views/image.js' -import './views/image-preview.js' -import './views/markd/index.js' -import './views/progress.js' -import './views/result.js' -import './views/swiper.js' -import './views/tabs.js' -import './views/tag.js' -import './views/time.js' -import './views/timeline.js' - -import './nav/dropdown.js' -import './nav/pager.js' -import './nav/steps.js' - -import './modal/drag/index.js' -import './modal/drawer.js' -import './modal/layer.js' -import './modal/loading.js' -import './modal/notify.js' -import './modal/popconfirm.js' -import './modal/tooltip.js' - -import './other/chatbubble.js' -import './other/divider.js' -import './other/sandbox.js' -import './other/scroll.js' diff --git a/src/form/input.js b/src/input/input.js similarity index 99% rename from src/form/input.js rename to src/input/input.js index fa82bdb..56e66e0 100644 --- a/src/form/input.js +++ b/src/input/input.js @@ -5,7 +5,7 @@ */ import { nextTick, css, html, Component, classMap, outsideClick } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' const ANIMATION = { duration: 100, diff --git a/src/form/textarea.js b/src/input/textarea.js similarity index 100% rename from src/form/textarea.js rename to src/input/textarea.js diff --git a/src/modal/layer.js b/src/layer/layer.js similarity index 100% rename from src/modal/layer.js rename to src/layer/layer.js diff --git a/src/base/link.js b/src/link/link.js similarity index 100% rename from src/base/link.js rename to src/link/link.js diff --git a/src/modal/loading.js b/src/loading/loading.js similarity index 100% rename from src/modal/loading.js rename to src/loading/loading.js diff --git a/src/views/markd/core.js b/src/markd/core.js similarity index 100% rename from src/views/markd/core.js rename to src/markd/core.js diff --git a/src/views/markd/index.js b/src/markd/index.js similarity index 98% rename from src/views/markd/index.js rename to src/markd/index.js index 13bad61..1ed8ee9 100644 --- a/src/views/markd/index.js +++ b/src/markd/index.js @@ -7,8 +7,8 @@ import { css, html, raw, Component, bind, styleMap, classMap } from 'wkit' import md2html from './core.js' -import '../code/index.js' -import '../../form/checkbox.js' +import '../code/code.js' +import '../form/checkbox.js' export default md2html diff --git a/src/modal/notify.js b/src/notify/notify.js similarity index 99% rename from src/modal/notify.js rename to src/notify/notify.js index 504da32..c5f8a2d 100644 --- a/src/modal/notify.js +++ b/src/notify/notify.js @@ -5,7 +5,7 @@ */ import { css, html, Component, bind, styleMap } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' const ANIMATION = [ { transform: 'translateX(60%)', opacity: 0 }, diff --git a/src/form/number.js b/src/number/number.js similarity index 100% rename from src/form/number.js rename to src/number/number.js diff --git a/src/other/sandbox.js b/src/other/sandbox.js index 3c4df7c..885f59f 100644 --- a/src/other/sandbox.js +++ b/src/other/sandbox.js @@ -5,9 +5,9 @@ */ import { css, html, raw, bind, Component, nextTick, classMap } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' import { gzip } from '@bytedo/gzip' -import { colorHtml, colorJs, colorCss } from '../views/code/colorful.js' +import { colorHtml, colorJs, colorCss } from '../code/colorful.js' const template = ` diff --git a/src/nav/pager.js b/src/pager/pager.js similarity index 99% rename from src/nav/pager.js rename to src/pager/pager.js index d191efa..1041695 100644 --- a/src/nav/pager.js +++ b/src/pager/pager.js @@ -5,7 +5,7 @@ */ import { css, html, Component } from 'wkit' -import '../base/button.js' +import '../button/button.js' const LAYOUT_DICT = { home: e => diff --git a/src/form/passwd.js b/src/passwd/passwd.js similarity index 99% rename from src/form/passwd.js rename to src/passwd/passwd.js index e19d049..bda67c3 100644 --- a/src/form/passwd.js +++ b/src/passwd/passwd.js @@ -4,7 +4,7 @@ * @date 2023/03/16 18:05:43 */ import { css, html, Component, bind, unbind, nextTick } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' class Passwd extends Component { static props = { diff --git a/src/modal/popconfirm.js b/src/popconfirm/popconfirm.js similarity index 99% rename from src/modal/popconfirm.js rename to src/popconfirm/popconfirm.js index b174bc6..38cc066 100644 --- a/src/modal/popconfirm.js +++ b/src/popconfirm/popconfirm.js @@ -16,7 +16,7 @@ import { clearOutsideClick } from 'wkit' -import '../base/button.js' +import '../button/button.js' const DEFAULT_TIPS = '请确认你的操作!' diff --git a/src/views/progress.js b/src/progress/progress.js similarity index 100% rename from src/views/progress.js rename to src/progress/progress.js diff --git a/src/form/radio.js b/src/radio/radio.js similarity index 100% rename from src/form/radio.js rename to src/radio/radio.js diff --git a/src/views/result.js b/src/result/result.js similarity index 98% rename from src/views/result.js rename to src/result/result.js index 0ca36f2..421e684 100644 --- a/src/views/result.js +++ b/src/result/result.js @@ -5,7 +5,7 @@ */ import { css, html, Component } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' class Result extends Component { static props = { diff --git a/src/other/scroll.js b/src/scroll/scroll.js similarity index 100% rename from src/other/scroll.js rename to src/scroll/scroll.js diff --git a/src/form/select.js b/src/select/select.js similarity index 95% rename from src/form/select.js rename to src/select/select.js index 9aa64b0..699c543 100644 --- a/src/form/select.js +++ b/src/select/select.js @@ -5,9 +5,9 @@ */ import { nextTick, css, html, Component } from 'wkit' -import '../base/icon.js' -import '../form/input.js' -import '../other/scroll.js' +import '../icon/icon.js' +import '../input/input.js' +import '../scroll/scroll.js' import '../option/index.js' class Select extends Component { diff --git a/src/form/slider.js b/src/slider/slider.js similarity index 100% rename from src/form/slider.js rename to src/slider/slider.js diff --git a/src/base/space.js b/src/space/space.js similarity index 100% rename from src/base/space.js rename to src/space/space.js diff --git a/src/form/star.js b/src/star/star.js similarity index 99% rename from src/form/star.js rename to src/star/star.js index 02d7096..7ccb4bc 100644 --- a/src/form/star.js +++ b/src/star/star.js @@ -5,7 +5,7 @@ */ import { nextTick, css, html, Component, classMap } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' class Star extends Component { static props = { diff --git a/src/nav/steps.js b/src/steps/steps.js similarity index 99% rename from src/nav/steps.js rename to src/steps/steps.js index 2d2d6c8..73f54cc 100644 --- a/src/nav/steps.js +++ b/src/steps/steps.js @@ -5,7 +5,7 @@ */ import { css, html, Component, bind, styleMap, classMap } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' class Steps extends Component { static props = { diff --git a/src/views/swiper.js b/src/swiper/swiper.js similarity index 99% rename from src/views/swiper.js rename to src/swiper/swiper.js index a8bea37..978f612 100644 --- a/src/views/swiper.js +++ b/src/swiper/swiper.js @@ -5,7 +5,7 @@ */ import { css, html, Component, nextTick, styleMap } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' const CARD_SCALE = 0.83 function createWatcher(object, key, effect) { diff --git a/src/form/switch.js b/src/switch/switch.js similarity index 100% rename from src/form/switch.js rename to src/switch/switch.js diff --git a/src/views/tabs.js b/src/tabs/tabs.js similarity index 99% rename from src/views/tabs.js rename to src/tabs/tabs.js index be3b4d6..6c01f4c 100644 --- a/src/views/tabs.js +++ b/src/tabs/tabs.js @@ -5,7 +5,7 @@ */ import { css, html, bind, Component, nextTick, styleMap, classMap } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' class Tabs extends Component { static props = { diff --git a/src/views/tag.js b/src/tag/tag.js similarity index 99% rename from src/views/tag.js rename to src/tag/tag.js index 22263dd..a20a174 100644 --- a/src/views/tag.js +++ b/src/tag/tag.js @@ -5,7 +5,7 @@ */ import { css, html, Component } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' const ANIMATION = { type: 'scale' } diff --git a/src/views/time.js b/src/time/time.js similarity index 100% rename from src/views/time.js rename to src/time/time.js diff --git a/src/views/timeline.js b/src/timeline/timeline.js similarity index 99% rename from src/views/timeline.js rename to src/timeline/timeline.js index e7e9c8b..8577886 100644 --- a/src/views/timeline.js +++ b/src/timeline/timeline.js @@ -5,7 +5,7 @@ */ import { css, html, Component, bind, styleMap, classMap } from 'wkit' -import '../base/icon.js' +import '../icon/icon.js' function pad(n) { return n < 10 ? '0' + n : n diff --git a/src/modal/tooltip.js b/src/tooltip/tooltip.js similarity index 100% rename from src/modal/tooltip.js rename to src/tooltip/tooltip.js diff --git a/src/form/uploader.js b/src/uploader/uploader.js similarity index 99% rename from src/form/uploader.js rename to src/uploader/uploader.js index 8c60e4a..9f93efb 100644 --- a/src/form/uploader.js +++ b/src/uploader/uploader.js @@ -6,7 +6,7 @@ import { css, html, Component, bind, unbind, styleMap } from 'wkit' import { resolveFiles, parseSize, filename } from '../base/fs.js' -import '../base/icon.js' +import '../icon/icon.js' function uuid() { return Math.random().toString(16).slice(2)