目录结构调整

master
yutent 2023-11-24 15:50:48 +08:00
parent f281cd5dec
commit 0e66261757
50 changed files with 87 additions and 72 deletions

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, nextTick, styleMap } from 'wkit' import { css, html, Component, nextTick, styleMap } from 'wkit'
import '../icon/index.js' import './icon.js'
class Button extends Component { class Button extends Component {
static props = { static props = {

View File

@ -6,7 +6,7 @@
import { css, svg, html, Component, classMap } from 'wkit' 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 let dict = SVG_DICT
if (window.EXT_SVG_DICT) { if (window.EXT_SVG_DICT) {

View File

@ -16,7 +16,7 @@ import {
} from 'wkit' } from 'wkit'
import ICONS from './svg.js' import ICONS from './svg.js'
import '../form/input.js' import '../form/input.js'
import '../form/button.js' import '../base/button.js'
const ACTTION = { const ACTTION = {
bold: 'bold', bold: 'bold',

View File

@ -5,7 +5,7 @@
*/ */
import { nextTick, css, html, Component } from 'wkit' import { nextTick, css, html, Component } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class Checkbox extends Component { class Checkbox extends Component {
static props = { static props = {

View File

@ -1,13 +1,14 @@
import './button.js' import '../base/button.js'
import '../base/link.js'
import './checkbox.js' import './checkbox.js'
import './color.js'
import './input.js' import './input.js'
import './link.js'
import './number.js' import './number.js'
import './passwd.js' import './passwd.js'
import './radio.js' import './radio.js'
import './select.js' import './select.js'
import './slider.js'
import './star.js' import './star.js'
import './switch.js' import './switch.js'
import './textarea.js' import './textarea.js'
import './slider.js'
import './uploader.js' import './uploader.js'

View File

@ -5,7 +5,7 @@
*/ */
import { nextTick, css, html, Component, classMap, outsideClick } from 'wkit' import { nextTick, css, html, Component, classMap, outsideClick } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
const ANIMATION = { const ANIMATION = {
duration: 100, duration: 100,

View File

@ -4,7 +4,7 @@
* @date 2023/03/16 18:05:43 * @date 2023/03/16 18:05:43
*/ */
import { css, html, Component, bind, unbind, nextTick } from 'wkit' import { css, html, Component, bind, unbind, nextTick } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class Passwd extends Component { class Passwd extends Component {
static props = { static props = {

View File

@ -5,9 +5,9 @@
*/ */
import { nextTick, css, html, Component } from 'wkit' import { nextTick, css, html, Component } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
import '../form/input.js' import '../form/input.js'
import '../scroll/index.js' import '../other/scroll.js'
import '../option/index.js' import '../option/index.js'
class Select extends Component { class Select extends Component {

View File

@ -5,7 +5,7 @@
*/ */
import { nextTick, css, html, Component, classMap } from 'wkit' import { nextTick, css, html, Component, classMap } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class Star extends Component { class Star extends Component {
static props = { static props = {

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, bind, unbind } from 'wkit' import { css, html, Component, bind, unbind } from 'wkit'
import './button.js' import '../base/button.js'
class Uploader extends Component { class Uploader extends Component {
static props = { static props = {

View File

@ -1,26 +1,40 @@
import './avatar/index.js' import './base/button.js'
import './badge/index.js' import './base/icon.js'
import './breadcrumb/index.js' import './base/link.js'
import './card/index.js' import './base/space.js'
import './code/index.js'
import './collapse/index.js'
import './color/index.js'
import './drag/index.js'
import './drawer/index.js'
import './form/index.js' import './form/index.js'
import './icon/index.js'
import './image/index.js' import './views/avatar.js'
import './image-preview/index.js' import './views/badge.js'
import './layer/index.js' import './views/breadcrumb.js'
import './notify/index.js' import './views/code/index.js'
import './pager/index.js' import './views/card.js'
import './sandbox/index.js' import './views/collapse.js'
import './scroll/index.js' import './views/image.js'
import './space/index.js' import './views/image-preview.js'
import './steps/index.js' import './views/markd/index.js'
import './swipe/index.js' import './views/progress.js'
import './tabs/index.js' import './views/result.js'
import './timeline/index.js' import './views/swiper.js'
import './result/index.js' import './views/tabs.js'
import './progress/index.js' import './views/tag.js'
import './tag/index.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'

View File

@ -15,9 +15,9 @@ import {
clearOutsideClick clearOutsideClick
} from 'wkit' } from 'wkit'
import '../markd/index.js' import '../views/markd/index.js'
import '../form/input.js' import '../form/input.js'
import '../form/button.js' import '../base/button.js'
import { DEFAULT_TOOLS, html2md, Addon } from './helper.js' import { DEFAULT_TOOLS, html2md, Addon } from './helper.js'
import ICONS from './svg.js' import ICONS from './svg.js'

View File

@ -6,7 +6,7 @@
import { css, html, Component, nextTick, styleMap } from 'wkit' import { css, html, Component, nextTick, styleMap } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
const ANIMATION = { const ANIMATION = {
left: { left: {

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, bind, styleMap } from 'wkit' import { css, html, Component, bind, styleMap } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
const ANIMATION = [ const ANIMATION = [
{ transform: 'translateX(60%)', opacity: 0 }, { transform: 'translateX(60%)', opacity: 0 },

View File

@ -16,7 +16,7 @@ import {
clearOutsideClick clearOutsideClick
} from 'wkit' } from 'wkit'
import '../form/button.js' import '../base/button.js'
const DEFAULT_TIPS = '请确认你的操作!' const DEFAULT_TIPS = '请确认你的操作!'

View File

@ -5,7 +5,7 @@
*/ */
import { nextTick, css, html, Component, bind } from 'wkit' import { nextTick, css, html, Component, bind } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
import '../option/index.js' import '../option/index.js'
class Dropdown extends Component { class Dropdown extends Component {

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component } from 'wkit' import { css, html, Component } from 'wkit'
import '../form/button.js' import '../base/button.js'
const LAYOUT_DICT = { const LAYOUT_DICT = {
home: e => home: e =>

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, bind, styleMap, classMap } from 'wkit' import { css, html, Component, bind, styleMap, classMap } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class Steps extends Component { class Steps extends Component {
static props = { static props = {

View File

@ -5,7 +5,7 @@
*/ */
import { nextTick, css, html, Component, bind } from 'wkit' import { nextTick, css, html, Component, bind } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
const MACOS_KEYS = { const MACOS_KEYS = {
Cmd: '⌘', Cmd: '⌘',

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, classMap } from 'wkit' import { css, html, Component, classMap } from 'wkit'
import '../avatar/index.js' import '../views/avatar.js'
class Bubble extends Component { class Bubble extends Component {
static props = { static props = {

View File

@ -5,9 +5,9 @@
*/ */
import { css, html, raw, bind, Component, nextTick, classMap } from 'wkit' import { css, html, raw, bind, Component, nextTick, classMap } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
import { gzip } from '@bytedo/gzip' 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> const template = `<!doctype html>
<html lang="zh-CN"> <html lang="zh-CN">

View File

@ -4,7 +4,7 @@
* @date 2023/04/25 09:27:25 * @date 2023/04/25 09:27:25
*/ */
import { html, css, Component } from 'wkit' import { html, css, Component } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class Avatar extends Component { class Avatar extends Component {
static props = { static props = {

View File

@ -17,7 +17,7 @@ class Card extends Component {
border-radius: 3px; border-radius: 3px;
} }
.card-box { .container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
@ -50,18 +50,18 @@ class Card extends Component {
} }
} }
:host([shadow='never']) .card-box, :host([shadow='never']) .container,
:host([shadow='hover']) .card-box { :host([shadow='hover']) .container {
box-shadow: none; 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); box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
} }
` `
render() { render() {
return html` return html`
<main class="card-box"> <main class="container">
<header class="header"> <header class="header">
<slot name="header">${this.header}</slot> <slot name="header">${this.header}</slot>
</header> </header>

View File

@ -5,8 +5,8 @@
*/ */
import { html, raw, css, Component, nextTick } from 'wkit' import { html, raw, css, Component, nextTick } from 'wkit'
import { colorHtml, colorJs, colorCss, colorMd } from './colorful.js' import { colorHtml, colorJs, colorCss, colorMd } from './colorful.js'
import '../icon/index.js' import '../../base/icon.js'
import '../layer/index.js' import '../../modal/layer.js'
function trim(str) { function trim(str) {
return str return str
@ -35,7 +35,7 @@ class Code extends Component {
display: flex; display: flex;
border-radius: 3px; border-radius: 3px;
} }
.code-box { .container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
@ -251,7 +251,7 @@ class Code extends Component {
render() { render() {
return html` return html`
<div class="code-box"> <main class="container">
<header class="title"> <header class="title">
<section><i></i><i></i><i></i></section> <section><i></i><i></i><i></i></section>
<section>${this.lang}</section> <section>${this.lang}</section>
@ -262,10 +262,10 @@ class Code extends Component {
@click=${this.copyCode} @click=${this.copyCode}
></wc-icon> ></wc-icon>
</header> </header>
<div class="code-block"> <footer class="code-block">
${this.#code.map(s => html`<code>${raw(s)}</code>`)} ${this.#code.map(s => html`<code>${raw(s)}</code>`)}
</div> </footer>
</div> </main>
` `
} }
} }

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, styleMap, nextTick } from 'wkit' import { css, html, Component, styleMap, nextTick } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class Collapse extends Component { class Collapse extends Component {
static props = { static props = {

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, styleMap, bind, unbind } from 'wkit' import { css, html, Component, styleMap, bind, unbind } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class ImagePreview extends Component { class ImagePreview extends Component {
static props = { static props = {

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, styleMap } from 'wkit' import { css, html, Component, styleMap } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class Image extends Component { class Image extends Component {
static props = { static props = {

View File

@ -8,7 +8,7 @@ import { css, html, raw, Component, bind, styleMap, classMap } from 'wkit'
import md2html from './core.js' import md2html from './core.js'
import '../code/index.js' import '../code/index.js'
import '../form/checkbox.js' import '../../form/checkbox.js'
export default md2html export default md2html

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component } from 'wkit' import { css, html, Component } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class Result extends Component { class Result extends Component {
static props = { static props = {

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, nextTick, styleMap } from 'wkit' import { css, html, Component, nextTick, styleMap } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
const CARD_SCALE = 0.83 const CARD_SCALE = 0.83
function createWatcher(object, key, effect) { function createWatcher(object, key, effect) {

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, bind, Component, nextTick, styleMap, classMap } from 'wkit' import { css, html, bind, Component, nextTick, styleMap, classMap } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
class Tabs extends Component { class Tabs extends Component {
static props = { static props = {

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component } from 'wkit' import { css, html, Component } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
const ANIMATION = { type: 'scale' } const ANIMATION = { type: 'scale' }

View File

@ -5,7 +5,7 @@
*/ */
import { css, html, Component, bind, styleMap, classMap } from 'wkit' import { css, html, Component, bind, styleMap, classMap } from 'wkit'
import '../icon/index.js' import '../base/icon.js'
function pad(n) { function pad(n) {
return n < 10 ? '0' + n : n return n < 10 ? '0' + n : n