diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..edf70ca --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 \ No newline at end of file diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 3b5bab8..0000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -.eslintrc.js -rollup.config.js -svelte.config.js -postcss.config.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index ec0c9c2..7774290 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,13 +5,10 @@ module.exports = { node: true, es6: true, }, - extends: ["eslint:recommended", "prettier"], + extends: ["plugin:cypress/recommended", "eslint:recommended", "prettier"], parserOptions: { ecmaVersion: 2020, sourceType: "module", - - project: "./tsconfig.json", - tsconfigRootDir: __dirname, extraFileExtensions: [".svelte"], }, plugins: ["svelte3"], diff --git a/.gitignore b/.gitignore index 3f89702..8b5c9af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,3 @@ -node_modules -package-lock.json - -*.zip -.Ds_store -*.tgz -*.log -.vscode -.idea - -public/demos -public/dist -public/stats.html \ No newline at end of file +dist +cypress/screenshots +cypress/videos diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..806d690 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@wx:registry=https://npm.svar.dev/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..1035161 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,15 @@ +{ + "useTabs": true, + "semi": true, + "singleQuote": false, + "quoteProps": "as-needed", + "trailingComma": "es5", + "bracketSpacing": true, + "arrowParens": "avoid", + "svelteSortOrder": "options-scripts-markup-styles", + "vueIndentScriptAndStyle": true, + "plugins": [ + "prettier-plugin-svelte" + ], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} \ No newline at end of file diff --git a/demos/common/Area.svelte b/demos/cases/Area.svelte similarity index 73% rename from demos/common/Area.svelte rename to demos/cases/Area.svelte index 15f76ad..e6c0f8a 100644 --- a/demos/common/Area.svelte +++ b/demos/cases/Area.svelte @@ -1,29 +1,32 @@
-

Area with a top label

+

Area with a top label

+ + + + title="It can't be empty" + />
-

Area with a side label

+

Area with a side label

diff --git a/demos/cases/Buttons.svelte b/demos/cases/Buttons.svelte new file mode 100644 index 0000000..72c1ab7 --- /dev/null +++ b/demos/cases/Buttons.svelte @@ -0,0 +1,83 @@ + + +
+

Default button

+ + +
+ +
+

Primary button

+ + +
+ +
+

Secondary button

+ + +
+ +
+

Danger button

+ + +
+ +
+

Link button

+

+ +

+

+ +

+

+ +

+
+ +
+

Block buttons

+

+ +

+

+ +

+
+ +   + +
+
+ +
+

Icon buttons

+ + + +
+ +
+

Multi-line button

+

+ +

+
diff --git a/demos/common/Calendar.svelte b/demos/cases/Calendar.svelte similarity index 92% rename from demos/common/Calendar.svelte rename to demos/cases/Calendar.svelte index 6559d0b..9db8a17 100644 --- a/demos/common/Calendar.svelte +++ b/demos/cases/Calendar.svelte @@ -11,11 +11,10 @@ v >= new Date(2022, 2, 8) && v <= new Date(2022, 2, 29) ? "inrange" : ""; -
-

Calendar

+

Calendar

@@ -24,7 +23,7 @@
-

Calendar with Locale

+

Calendar with Locale

@@ -36,6 +35,6 @@
-

Calendar without buttons

+

Calendar without buttons

diff --git a/demos/common/Checkbox.svelte b/demos/cases/Checkbox.svelte similarity index 82% rename from demos/common/Checkbox.svelte rename to demos/cases/Checkbox.svelte index 99b8e30..f91f05b 100644 --- a/demos/common/Checkbox.svelte +++ b/demos/cases/Checkbox.svelte @@ -10,8 +10,7 @@ ]; let v1 = true, - v2, - v3 = [3]; + v2; let valueGroup1 = [1, 2]; let valueGroup2 = [2, 3]; @@ -20,11 +19,10 @@ function print(v) { return v.join(", "); } -
-

Checkbox

+

Checkbox

Value: {v1}

@@ -38,7 +36,7 @@

-

Checkbox with a side label

+

Checkbox with a side label

@@ -46,26 +44,26 @@ - +
-

Checkbox group: {print(valueGroup1)}

+

Checkbox group: {print(valueGroup1)}

-

Checkbox group inline: {print(valueGroup2)}

+

Checkbox group inline: {print(valueGroup2)}

-

Checkbox group grid: {print(valueGroup3)}

+

Checkbox group grid: {print(valueGroup3)}

diff --git a/demos/common/ColorPicker.svelte b/demos/cases/ColorPicker.svelte similarity index 78% rename from demos/common/ColorPicker.svelte rename to demos/cases/ColorPicker.svelte index 2b79943..dfe7aa2 100644 --- a/demos/common/ColorPicker.svelte +++ b/demos/cases/ColorPicker.svelte @@ -3,24 +3,24 @@ let value; let selectedColor; -
-

The current color: {value || ''}

+

The current color: {value || ""}

-

The selected form color: {selectedColor || ''}

+

The selected form color: {selectedColor || ""}

+ placeholder="Select a color..." + />
-

Custom color select forms:

+

Custom color select forms:

@@ -29,7 +29,8 @@ {id} placeholder="Select a color..." disabled - value="#65D3B3" /> + value="#65D3B3" + /> diff --git a/demos/common/ColorSelect.svelte b/demos/cases/ColorSelect.svelte similarity index 63% rename from demos/common/ColorSelect.svelte rename to demos/cases/ColorSelect.svelte index 5cd8e10..b3089d1 100644 --- a/demos/common/ColorSelect.svelte +++ b/demos/cases/ColorSelect.svelte @@ -2,40 +2,43 @@ import { ColorSelect, Field } from "../../src/index"; let color; -
-

The selected color: {color ? color : ''}

+

The selected color: {color ? color : ""}

+ title="Colors can be reconfigured" + />
-

Custom colors

+

Custom colors

+ colors={["#65D3B3", "#FFC975", "#58C3FE"]} + placeholder="Select a color..." + /> + value="#65D3B3" + /> + error + />
diff --git a/demos/common/Combo.svelte b/demos/cases/Combo.svelte similarity index 76% rename from demos/common/Combo.svelte rename to demos/cases/Combo.svelte index 0b45c3e..4daf043 100644 --- a/demos/common/Combo.svelte +++ b/demos/cases/Combo.svelte @@ -2,18 +2,17 @@ import { Field, Combo, Button } from "../../src/index"; import { users } from "../data/userlist"; - import UserOption from "../stubs/UserOption.svelte"; + import UserOption from "../custom/UserOption.svelte"; let value = ""; const values = [104, 103, 102, ""]; function changeValue() { value = values[(values.indexOf(value) + 1) % values.length]; } -
-

Combo with a simple list

+

Combo with a simple list

{option.name} @@ -31,13 +30,14 @@ error let:option value={104} - title="Invalid option"> + title="Invalid option" + > {option.name}
-

Combo with a dynamic value

+

Combo with a dynamic value

@@ -48,7 +48,7 @@
-

Combo with a side label

+

Combo with a side label

{option.name} @@ -57,7 +57,7 @@
-

Combo with a template

+

Combo with a template

@@ -66,15 +66,22 @@
-

Combo without a value

+

Combo without a value

-

Combo without options

+

Combo without options

+ +
+

Combo with clear button

+ + + +
diff --git a/demos/common/DatePicker.svelte b/demos/cases/DatePicker.svelte similarity index 74% rename from demos/common/DatePicker.svelte rename to demos/cases/DatePicker.svelte index f2b3ca7..6406bc4 100644 --- a/demos/common/DatePicker.svelte +++ b/demos/cases/DatePicker.svelte @@ -7,10 +7,14 @@ wh.showNotice({ text: `Date changed to ${ev.detail.selected}` }); } + function parseDate(string) { + const p = string.match(/(..)(..)(.+)/); + return p ? new Date(p.slice(1, 4).join("/")) : null; + }
-

Datepicker

+

Datepicker

@@ -20,6 +24,12 @@ + + + + + + diff --git a/demos/common/DateRangePicker.svelte b/demos/cases/DateRangePicker.svelte similarity index 72% rename from demos/common/DateRangePicker.svelte rename to demos/cases/DateRangePicker.svelte index 054dc02..53b8314 100644 --- a/demos/common/DateRangePicker.svelte +++ b/demos/cases/DateRangePicker.svelte @@ -14,10 +14,14 @@ }); } + function parseDate(string) { + const p = string.match(/(..)(..)(.+)/); + return p ? new Date(p.slice(1, 4).join("/")) : null; + }
-

DateRangePicker

+

DateRangePicker

@@ -27,6 +31,17 @@ + + + + + + diff --git a/demos/common/Field.svelte b/demos/cases/Field.svelte similarity index 86% rename from demos/common/Field.svelte rename to demos/cases/Field.svelte index 88380e4..bc09e0d 100644 --- a/demos/common/Field.svelte +++ b/demos/cases/Field.svelte @@ -1,25 +1,24 @@
-

Left Field

+

Left Field

-

Top Field

+

Top Field

-

Top Field

+

Top Field

diff --git a/demos/cases/Icon.svelte b/demos/cases/Icon.svelte new file mode 100644 index 0000000..b8f7f46 --- /dev/null +++ b/demos/cases/Icon.svelte @@ -0,0 +1,21 @@ + + +
+

Icons

+ {#each arrs as subset} +
+ {#each subset as icon} + + {/each} +
+ {/each} +
diff --git a/demos/common/List.svelte b/demos/cases/List.svelte similarity index 65% rename from demos/common/List.svelte rename to demos/cases/List.svelte index 73568ed..07e5a68 100644 --- a/demos/common/List.svelte +++ b/demos/cases/List.svelte @@ -21,53 +21,72 @@ d2 = false; if (typeof id != "object") showNotice({ text: `click on ${id}` }); } -
-

List

+

List

+ data={[ + { id: 1, label: "First" }, + { id: 2, label: "Second" }, + { id: 3, label: "Third" }, + ]} + />
-

List with template

+

List with template

+ data={[ + { id: 1, label: "First" }, + { id: 2, label: "Second" }, + { id: 3, label: "Third" }, + ]} + let:obj + >
- {obj.label}
-

List DropDown

+

List DropDown

{#if d1} + data={[ + { id: 1, label: "First" }, + { id: 2, label: "Second" }, + { id: 3, label: "Third" }, + ]} + /> {/if}
-

List Popup

+

List Popup

{#if d2} + data={[ + { id: 1, label: "First" }, + { id: 2, label: "Second" }, + { id: 3, label: "Third" }, + ]} + /> {/if} diff --git a/demos/common/Locales.svelte b/demos/cases/Locales.svelte similarity index 77% rename from demos/common/Locales.svelte rename to demos/cases/Locales.svelte index 976b097..368d393 100644 --- a/demos/common/Locales.svelte +++ b/demos/cases/Locales.svelte @@ -16,46 +16,46 @@ ]; const value = new Date(2022, 2, 18); - - -
+
+ +
- {#if lang === 'en'} + {#if lang === "en"} - {:else if lang === 'cn'} + {:else if lang === "cn"} - {:else if lang === 'de'} + {:else if lang === "de"} - {:else if lang === 'es'} + {:else if lang === "es"} - {:else if lang === 'fr'} + {:else if lang === "fr"} - {:else if lang === 'it'} + {:else if lang === "it"} - {:else if lang === 'ja'} + {:else if lang === "ja"} - {:else if lang === 'pt'} + {:else if lang === "pt"} - {:else if lang === 'ru'} + {:else if lang === "ru"} diff --git a/demos/common/Messages.svelte b/demos/cases/Messages.svelte similarity index 77% rename from demos/common/Messages.svelte rename to demos/cases/Messages.svelte index 2081d07..37321a8 100644 --- a/demos/common/Messages.svelte +++ b/demos/cases/Messages.svelte @@ -30,30 +30,31 @@ function hideAll() { custom1 = custom2 = false; } -
-

Notice

- - - - - +

Notice

+ + + + +
-

Confirm / Alert

+

Confirm / Alert

-

Custom dialog

+

Custom dialog

@@ -85,5 +86,4 @@ .relative { position: relative; } - diff --git a/demos/cases/ModalArea.svelte b/demos/cases/ModalArea.svelte new file mode 100644 index 0000000..af115f1 --- /dev/null +++ b/demos/cases/ModalArea.svelte @@ -0,0 +1,26 @@ + + +
+

Modal Area

+

Click button to show the modal area

+ + {#if show} + (show = false)}> +
+

Some content

+

To close the modal, click the button below

+ +
+
+ {/if} +
+ + diff --git a/demos/common/Month.svelte b/demos/cases/Month.svelte similarity index 95% rename from demos/common/Month.svelte rename to demos/cases/Month.svelte index 928471c..48853f7 100644 --- a/demos/common/Month.svelte +++ b/demos/cases/Month.svelte @@ -19,11 +19,10 @@ }); }, }; -
-

Month view

+

Month view

@@ -38,7 +37,7 @@
-

Calendar with custom size

+

Calendar with custom size

@@ -65,5 +64,4 @@ margin: 20px; min-width: 220px; } - diff --git a/demos/common/MultiCombo.svelte b/demos/cases/MultiCombo.svelte similarity index 77% rename from demos/common/MultiCombo.svelte rename to demos/cases/MultiCombo.svelte index 892a886..f328169 100644 --- a/demos/common/MultiCombo.svelte +++ b/demos/cases/MultiCombo.svelte @@ -2,37 +2,38 @@ import { Field, MultiCombo } from "../../src/index"; import { users } from "../data/userlist"; - import UserOption from "../stubs/UserOption.svelte"; - + import UserOption from "../custom/UserOption.svelte";
-

MultiCombo with a simple list

+

MultiCombo with a simple list

{option.name}
-

MultiCombo with checkboxes

+

MultiCombo with checkboxes

+ value={[104]} + > {option.name}
-

MultiCombo with a side label

+

MultiCombo with a side label

+ value={[104]} + > {option.name} @@ -43,7 +44,8 @@ disabled {id} let:option - value={[104]}> + value={[104]} + > {option.name} @@ -55,25 +57,26 @@ error {id} let:option - value={[104]}> + value={[104]} + > {option.name}
-

MultiCombo with a template

+

MultiCombo with a template

-

MultiCombo without a value

+

MultiCombo without a value

-

MultiCombo without options

+

MultiCombo without options

diff --git a/demos/common/Pager.svelte b/demos/cases/Pager.svelte similarity index 80% rename from demos/common/Pager.svelte rename to demos/cases/Pager.svelte index a1fbf36..8fa9996 100644 --- a/demos/common/Pager.svelte +++ b/demos/cases/Pager.svelte @@ -2,10 +2,9 @@ import { Pager } from "../../src/index"; let v1 = 2; -
-

100 rows (active = {v1})

+

100 rows (active = {v1})

diff --git a/demos/common/Popup.svelte b/demos/cases/Popup.svelte similarity index 97% rename from demos/common/Popup.svelte rename to demos/cases/Popup.svelte index 233b639..c081b73 100644 --- a/demos/common/Popup.svelte +++ b/demos/cases/Popup.svelte @@ -11,11 +11,10 @@ function cancel() { area = null; } -
-

Popup

+

Popup

@@ -38,5 +37,4 @@ .popup { padding: 10px 30px; } - diff --git a/demos/common/Radio.svelte b/demos/cases/Radio.svelte similarity index 66% rename from demos/common/Radio.svelte rename to demos/cases/Radio.svelte index 989c78e..2981bdc 100644 --- a/demos/common/Radio.svelte +++ b/demos/cases/Radio.svelte @@ -10,11 +10,10 @@ { value: 4, label: "Option 4" }, { value: 5, label: "Option 5" }, ]; -
-

RadioButton

+

RadioButton

@@ -22,37 +21,37 @@
-

RadioButton with a side label

- - +

RadioButton with side label

+ + - - + + - + - - + +
-

RadioButton group ( {value} )

+

RadioButton group ( {value} )

-

RadioButton group: inline

+

RadioButton group: inline

-

RadioButton group: grid

+

RadioButton group: grid

diff --git a/demos/common/RangeCalendar.svelte b/demos/cases/RangeCalendar.svelte similarity index 83% rename from demos/common/RangeCalendar.svelte rename to demos/cases/RangeCalendar.svelte index 16aeb3c..ad39d37 100644 --- a/demos/common/RangeCalendar.svelte +++ b/demos/cases/RangeCalendar.svelte @@ -1,21 +1,20 @@
-

Range Calendar

+

Range Calendar

-

Range Calendar without buttons

+

Range Calendar without buttons

-

Single month

+

Single month

diff --git a/demos/common/RichSelect.svelte b/demos/cases/RichSelect.svelte similarity index 80% rename from demos/common/RichSelect.svelte rename to demos/cases/RichSelect.svelte index 189f335..7cb6eab 100644 --- a/demos/common/RichSelect.svelte +++ b/demos/cases/RichSelect.svelte @@ -2,12 +2,11 @@ import { Field, RichSelect } from "../../src/index"; import { users } from "../data/userlist"; - import UserOption from "../stubs/UserOption.svelte"; - + import UserOption from "../custom/UserOption.svelte";
-

RichSelect with a simple list

+

RichSelect with a simple list

{option.name} @@ -16,7 +15,7 @@
-

RichSelect with a side label

+

RichSelect with a side label

{option.name} @@ -34,14 +33,15 @@ error let:option value={104} - title="Invalid option"> + title="Invalid option" + > {option.name}
-

RichSelect overflow

+

RichSelect overflow


@@ -52,7 +52,7 @@
-

RichSelect with a template

+

RichSelect with a template

@@ -61,11 +61,11 @@
-

RichSelect without a value

+

RichSelect without a value

-

RichSelect without options

+

RichSelect without options

diff --git a/demos/common/Segmented.svelte b/demos/cases/Segmented.svelte similarity index 99% rename from demos/common/Segmented.svelte rename to demos/cases/Segmented.svelte index 223dcad..3afe0ab 100644 --- a/demos/common/Segmented.svelte +++ b/demos/cases/Segmented.svelte @@ -16,7 +16,6 @@ const optionsText = options.map(a => ({ ...a, icon: null })); let value = 2; -
@@ -62,5 +61,4 @@ text-align: center; margin-left: 10px; } - diff --git a/demos/common/Select.svelte b/demos/cases/Select.svelte similarity index 68% rename from demos/common/Select.svelte rename to demos/cases/Select.svelte index d83f7c9..cf979e8 100644 --- a/demos/common/Select.svelte +++ b/demos/cases/Select.svelte @@ -3,30 +3,30 @@ import { users } from "../data/userlist"; let v1, v2; -
-

Select with a top label

+

Select with a top label

-
-

Select with a side label

+

Select with a side label

+ + label={"name"} + title="Invalid option" + />
diff --git a/demos/cases/SideArea.svelte b/demos/cases/SideArea.svelte new file mode 100644 index 0000000..6264c1e --- /dev/null +++ b/demos/cases/SideArea.svelte @@ -0,0 +1,23 @@ + + +
+

Side Area

+

Click button to show the side area

+ + {#if show} + (show = false)}> + +

Some content

+
+
+ {/if} +
+ + diff --git a/demos/cases/Slider.svelte b/demos/cases/Slider.svelte new file mode 100644 index 0000000..87801f7 --- /dev/null +++ b/demos/cases/Slider.svelte @@ -0,0 +1,61 @@ + + +
+

Slider

+ + + + + + + + + + + + + + + +
diff --git a/demos/common/Switch.svelte b/demos/cases/Switch.svelte similarity index 86% rename from demos/common/Switch.svelte rename to demos/cases/Switch.svelte index d62a476..1196f2d 100644 --- a/demos/common/Switch.svelte +++ b/demos/cases/Switch.svelte @@ -3,18 +3,17 @@ let v1 = false; let v2 = false; -
-

Switch Button

+

Switch Button

-

Switch Button with a side label

+

Switch Button with a side label

diff --git a/demos/common/Tabs.svelte b/demos/cases/Tabs.svelte similarity index 75% rename from demos/common/Tabs.svelte rename to demos/cases/Tabs.svelte index 181170e..b54690a 100644 --- a/demos/common/Tabs.svelte +++ b/demos/cases/Tabs.svelte @@ -1,5 +1,8 @@
-

Tabs

+

Tabs

@@ -30,10 +37,10 @@ {:else}
Check
{/if} - +
-

on:change

+

on:change

@@ -46,5 +53,4 @@ border-left: var(--wx-border); margin-left: 20px; } - diff --git a/demos/common/Text.svelte b/demos/cases/Text.svelte similarity index 85% rename from demos/common/Text.svelte rename to demos/cases/Text.svelte index 18e21bc..4f12e28 100644 --- a/demos/common/Text.svelte +++ b/demos/cases/Text.svelte @@ -2,11 +2,10 @@ import { Text, Field } from "../../src/index"; let text2, password2; -
-

Text with a top label

+

Text with a top label

@@ -22,12 +21,13 @@ {id} error placeholder="Type here" - title="Invalid value" /> + title="Invalid value" + />
-

Text with a side label

+

Text with a side label

@@ -37,21 +37,21 @@
-

Number input with a side label

+

Number input with a side label

-

Password input with a side label

+

Password input with a side label

-

Icon inside of the text control

+

Icon inside of the text control

diff --git a/demos/common/Timepicker.svelte b/demos/cases/Timepicker.svelte similarity index 88% rename from demos/common/Timepicker.svelte rename to demos/cases/Timepicker.svelte index d0e6407..9e95b4f 100644 --- a/demos/common/Timepicker.svelte +++ b/demos/cases/Timepicker.svelte @@ -3,11 +3,10 @@ import { cn } from "@wx/core-locales"; let value = null; -
-

TimePicker

+

TimePicker

@@ -17,7 +16,7 @@
-

TimePicker with a side label

+

TimePicker with a side label

@@ -30,14 +29,14 @@
-

12-hour TimePicker

+

12-hour TimePicker

-

CN locale

+

CN locale

diff --git a/demos/cases/TwoState.svelte b/demos/cases/TwoState.svelte new file mode 100644 index 0000000..b866550 --- /dev/null +++ b/demos/cases/TwoState.svelte @@ -0,0 +1,89 @@ + + +
+

Default TwoState Button

+ Click MeWorking... + Click Me +
+ +
+

Primary TwoState Button

+ Click Me + Click Me +
+ +
+

Secondary TwoState Button

+ Click Me + Click Me +
+ +
+

Danger TwoState Button

+ Click Me + Click Me +
+ +
+

Icon TwoState Buttons

+ With Icon + + With Icon + + With Icon + + + + + +
+ +
+

Inactive

+

+ ev.preventDefault()} + > + Inactive + + ev.preventDefault()} + > + Inactive + +

+

+ ev.preventDefault()} + > + Inactive + + ev.preventDefault()} + > + Inactive + +

+
diff --git a/demos/uploader/Upload.svelte b/demos/cases/Upload.svelte similarity index 85% rename from demos/uploader/Upload.svelte rename to demos/cases/Upload.svelte index e04feb1..55fdcd7 100644 --- a/demos/uploader/Upload.svelte +++ b/demos/cases/Upload.svelte @@ -28,31 +28,31 @@ }); }); } -
-

Uploader with default drop zone

+

Uploader with default drop zone

-

Uploader with custom handler (no server side)

+

Uploader with custom handler (no server side)

{#each store3 as obj (obj.id)} - {#if obj.status === 'server'} + {#if obj.status === "server"} + style="width:50px;height:50px;object-fit:cover;" + /> {/if} {/each}
-

Uploader with custom controls

+

Uploader with custom controls

@@ -74,5 +74,4 @@ flex-direction: column; gap: 10px; } - diff --git a/demos/common/Buttons.svelte b/demos/common/Buttons.svelte deleted file mode 100644 index 5978772..0000000 --- a/demos/common/Buttons.svelte +++ /dev/null @@ -1,84 +0,0 @@ - - -
-

Default button

- - -
- -
-

Primary button

- - -
- -
-

Secondary button

- - -
- -
-

Danger button

- - -
- -
-

Link button

-

- -

-

- -

-

- -

-
- -
-

Block buttons

-

- -

-

- -

-
- -   - -
-
- -
-

Icon buttons

- - - -
- -
-

Multi-line button

-

- -

-
diff --git a/demos/Index.svelte b/demos/common/Index.svelte similarity index 76% rename from demos/Index.svelte rename to demos/common/Index.svelte index a0f6b32..ba77944 100644 --- a/demos/Index.svelte +++ b/demos/common/Index.svelte @@ -6,7 +6,7 @@ Globals, Locale, popupContainer, - } from "../src/index"; + } from "../../src/index.js"; import Router from "./Router.svelte"; import Link from "./Link.svelte"; @@ -60,7 +60,6 @@ const links = getLinks(); $: document.body.className = `wx-${skin}-theme`; - @@ -69,21 +68,27 @@
-