目录结构调整
parent
f281cd5dec
commit
0e66261757
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component, nextTick, styleMap } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import './icon.js'
|
||||
|
||||
class Button extends Component {
|
||||
static props = {
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { css, svg, html, Component, classMap } from 'wkit'
|
||||
|
||||
import SVG_DICT from './svg.js'
|
||||
import SVG_DICT from './svg-path.js'
|
||||
|
||||
let dict = SVG_DICT
|
||||
if (window.EXT_SVG_DICT) {
|
|
@ -16,7 +16,7 @@ import {
|
|||
} from 'wkit'
|
||||
import ICONS from './svg.js'
|
||||
import '../form/input.js'
|
||||
import '../form/button.js'
|
||||
import '../base/button.js'
|
||||
|
||||
const ACTTION = {
|
||||
bold: 'bold',
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { nextTick, css, html, Component } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class Checkbox extends Component {
|
||||
static props = {
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import './button.js'
|
||||
import '../base/button.js'
|
||||
import '../base/link.js'
|
||||
import './checkbox.js'
|
||||
import './color.js'
|
||||
import './input.js'
|
||||
import './link.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 './slider.js'
|
||||
import './uploader.js'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { nextTick, css, html, Component, classMap, outsideClick } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
const ANIMATION = {
|
||||
duration: 100,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @date 2023/03/16 18:05:43
|
||||
*/
|
||||
import { css, html, Component, bind, unbind, nextTick } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class Passwd extends Component {
|
||||
static props = {
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
*/
|
||||
|
||||
import { nextTick, css, html, Component } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
import '../form/input.js'
|
||||
import '../scroll/index.js'
|
||||
import '../other/scroll.js'
|
||||
import '../option/index.js'
|
||||
|
||||
class Select extends Component {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { nextTick, css, html, Component, classMap } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class Star extends Component {
|
||||
static props = {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component, bind, unbind } from 'wkit'
|
||||
import './button.js'
|
||||
import '../base/button.js'
|
||||
|
||||
class Uploader extends Component {
|
||||
static props = {
|
||||
|
|
64
src/index.js
64
src/index.js
|
@ -1,26 +1,40 @@
|
|||
import './avatar/index.js'
|
||||
import './badge/index.js'
|
||||
import './breadcrumb/index.js'
|
||||
import './card/index.js'
|
||||
import './code/index.js'
|
||||
import './collapse/index.js'
|
||||
import './color/index.js'
|
||||
import './drag/index.js'
|
||||
import './drawer/index.js'
|
||||
import './base/button.js'
|
||||
import './base/icon.js'
|
||||
import './base/link.js'
|
||||
import './base/space.js'
|
||||
|
||||
import './form/index.js'
|
||||
import './icon/index.js'
|
||||
import './image/index.js'
|
||||
import './image-preview/index.js'
|
||||
import './layer/index.js'
|
||||
import './notify/index.js'
|
||||
import './pager/index.js'
|
||||
import './sandbox/index.js'
|
||||
import './scroll/index.js'
|
||||
import './space/index.js'
|
||||
import './steps/index.js'
|
||||
import './swipe/index.js'
|
||||
import './tabs/index.js'
|
||||
import './timeline/index.js'
|
||||
import './result/index.js'
|
||||
import './progress/index.js'
|
||||
import './tag/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'
|
||||
|
|
|
@ -15,9 +15,9 @@ import {
|
|||
clearOutsideClick
|
||||
} from 'wkit'
|
||||
|
||||
import '../markd/index.js'
|
||||
import '../views/markd/index.js'
|
||||
import '../form/input.js'
|
||||
import '../form/button.js'
|
||||
import '../base/button.js'
|
||||
|
||||
import { DEFAULT_TOOLS, html2md, Addon } from './helper.js'
|
||||
import ICONS from './svg.js'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { css, html, Component, nextTick, styleMap } from 'wkit'
|
||||
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
const ANIMATION = {
|
||||
left: {
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component, bind, styleMap } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
const ANIMATION = [
|
||||
{ transform: 'translateX(60%)', opacity: 0 },
|
|
@ -16,7 +16,7 @@ import {
|
|||
clearOutsideClick
|
||||
} from 'wkit'
|
||||
|
||||
import '../form/button.js'
|
||||
import '../base/button.js'
|
||||
|
||||
const DEFAULT_TIPS = '请确认你的操作!'
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { nextTick, css, html, Component, bind } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
import '../option/index.js'
|
||||
|
||||
class Dropdown extends Component {
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component } from 'wkit'
|
||||
import '../form/button.js'
|
||||
import '../base/button.js'
|
||||
|
||||
const LAYOUT_DICT = {
|
||||
home: e =>
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component, bind, styleMap, classMap } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class Steps extends Component {
|
||||
static props = {
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { nextTick, css, html, Component, bind } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
const MACOS_KEYS = {
|
||||
Cmd: '⌘',
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
import { css, html, Component, classMap } from 'wkit'
|
||||
|
||||
import '../avatar/index.js'
|
||||
import '../views/avatar.js'
|
||||
|
||||
class Bubble extends Component {
|
||||
static props = {
|
|
@ -5,9 +5,9 @@
|
|||
*/
|
||||
|
||||
import { css, html, raw, bind, Component, nextTick, classMap } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
import { gzip } from '@bytedo/gzip'
|
||||
import { colorHtml, colorJs, colorCss } from '../code/colorful.js'
|
||||
import { colorHtml, colorJs, colorCss } from '../views/code/colorful.js'
|
||||
|
||||
const template = `<!doctype html>
|
||||
<html lang="zh-CN">
|
|
@ -4,7 +4,7 @@
|
|||
* @date 2023/04/25 09:27:25
|
||||
*/
|
||||
import { html, css, Component } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class Avatar extends Component {
|
||||
static props = {
|
|
@ -17,7 +17,7 @@ class Card extends Component {
|
|||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.card-box {
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
@ -50,18 +50,18 @@ class Card extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
:host([shadow='never']) .card-box,
|
||||
:host([shadow='hover']) .card-box {
|
||||
:host([shadow='never']) .container,
|
||||
:host([shadow='hover']) .container {
|
||||
box-shadow: none;
|
||||
}
|
||||
:host([shadow='hover']:hover) .card-box {
|
||||
:host([shadow='hover']:hover) .container {
|
||||
box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
`
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<main class="card-box">
|
||||
<main class="container">
|
||||
<header class="header">
|
||||
<slot name="header">${this.header}</slot>
|
||||
</header>
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
import { html, raw, css, Component, nextTick } from 'wkit'
|
||||
import { colorHtml, colorJs, colorCss, colorMd } from './colorful.js'
|
||||
import '../icon/index.js'
|
||||
import '../layer/index.js'
|
||||
import '../../base/icon.js'
|
||||
import '../../modal/layer.js'
|
||||
|
||||
function trim(str) {
|
||||
return str
|
||||
|
@ -35,7 +35,7 @@ class Code extends Component {
|
|||
display: flex;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.code-box {
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
@ -251,7 +251,7 @@ class Code extends Component {
|
|||
|
||||
render() {
|
||||
return html`
|
||||
<div class="code-box">
|
||||
<main class="container">
|
||||
<header class="title">
|
||||
<section><i></i><i></i><i></i></section>
|
||||
<section>${this.lang}</section>
|
||||
|
@ -262,10 +262,10 @@ class Code extends Component {
|
|||
@click=${this.copyCode}
|
||||
></wc-icon>
|
||||
</header>
|
||||
<div class="code-block">
|
||||
<footer class="code-block">
|
||||
${this.#code.map(s => html`<code>${raw(s)}</code>`)}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</main>
|
||||
`
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component, styleMap, nextTick } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class Collapse extends Component {
|
||||
static props = {
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component, styleMap, bind, unbind } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class ImagePreview extends Component {
|
||||
static props = {
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component, styleMap } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class Image extends Component {
|
||||
static props = {
|
|
@ -8,7 +8,7 @@ import { css, html, raw, Component, bind, styleMap, classMap } from 'wkit'
|
|||
|
||||
import md2html from './core.js'
|
||||
import '../code/index.js'
|
||||
import '../form/checkbox.js'
|
||||
import '../../form/checkbox.js'
|
||||
|
||||
export default md2html
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class Result extends Component {
|
||||
static props = {
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component, nextTick, styleMap } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
const CARD_SCALE = 0.83
|
||||
|
||||
function createWatcher(object, key, effect) {
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, bind, Component, nextTick, styleMap, classMap } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
class Tabs extends Component {
|
||||
static props = {
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
const ANIMATION = { type: 'scale' }
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { css, html, Component, bind, styleMap, classMap } from 'wkit'
|
||||
import '../icon/index.js'
|
||||
import '../base/icon.js'
|
||||
|
||||
function pad(n) {
|
||||
return n < 10 ? '0' + n : n
|
Loading…
Reference in New Issue