Skip to content

Commit

Permalink
Use esm.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mantou132 committed Dec 16, 2023
1 parent 7dbc05e commit f79920b
Show file tree
Hide file tree
Showing 161 changed files with 193 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"editor.formatOnSave": false
},
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
}
}
4 changes: 2 additions & 2 deletions packages/duoyun-ui/docs/en/01-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ Toast.open('error', 'An error occurred');
DuoyunUI supports an ESM method independently uses an element, such as adding a keyboard access to your website(press <kbd>f</kbd> list all focusable elements):

```ts
import('https://jspm.dev/duoyun-ui/elements/keyboard-access').then(({ DuoyunKeyboardAccessElement }) =>
import('https://esm.sh/duoyun-ui/elements/keyboard-access').then(({ DuoyunKeyboardAccessElement }) =>
document.body.append(new DuoyunKeyboardAccessElement()),
);
```

For example, enable input recording mode:

```ts
import('https://jspm.dev/duoyun-ui/elements/input-capture').then(({ DuoyunInputCaptureElement }) =>
import('https://esm.sh/duoyun-ui/elements/input-capture').then(({ DuoyunInputCaptureElement }) =>
document.body.append(new DuoyunInputCaptureElement()),
);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ when `loading` is true, show a loader above the element, e.g:
name="dy-card"
props='{"style": "width: 250px;", "loading": true, "avatar": "https://api.dicebear.com/5.x/bottts-neutral/svg", "preview": "https://picsum.photos/400/300", "header": "This is Card"}'
html="Fugiat do laboris ad officia in anim qui mollit nulla reprehenderit pariatur anim sunt."
src="https://jspm.dev/duoyun-ui/elements/card"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/card"></gbp-example>
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/action-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name="dy-action-text"
html="Action Text"
props='{"tooltip":"Tooltip text", "color": "negative"}'
src="https://jspm.dev/duoyun-ui/elements/action-text"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/action-text"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name="dy-alert"
props='{"style": "width: 300px", "status": "negative", "header": "This is alert title", "action": {"text": "View"}}'
html="Occaecat tempor amet fugiat ad fugiat sunt irure veniam consequat aute."
src="https://jspm.dev/duoyun-ui/elements/alert"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/alert"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/area-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-area-chart"
props='{"style": "width: 100%;", "fill": true, "smooth": true, "chartzoom": true, "@zoom": "(e) => e.target.range = e.detail", "sequences": [{"label": "Label", "values": [[10, 3], [15, 3], [20, 5], [25, 4], [30, 8], [35, 5], [40, 4]] }]}'
src="https://jspm.dev/duoyun-ui/elements/area-chart"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/area-chart"></gbp-example>

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/duoyun-ui/docs/en/02-elements/avatar.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-avatar" src="https://jspm.dev/duoyun-ui/elements/avatar">
<gbp-example name="dy-avatar" src="https://esm.sh/duoyun-ui/elements/avatar">

```json
{
Expand All @@ -15,7 +15,7 @@

</gbp-example>

<gbp-example name="dy-avatar-group" src="https://jspm.dev/duoyun-ui/elements/avatar">
<gbp-example name="dy-avatar-group" src="https://esm.sh/duoyun-ui/elements/avatar">

```json
{
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/banner.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name="dy-banner"
props='{"style": "width: 100%", "closable": true, "status": "positive", "action": {"text": "View"}}'
html="This is banner"
src="https://jspm.dev/duoyun-ui/elements/banner"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/banner"></gbp-example>

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/duoyun-ui/docs/en/02-elements/bar-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<gbp-example
name="dy-bar-chart"
props='{"style": "width: 100%;", "gutter": 0.05, "series": ["Series 1", "Series 2", "Series 3"], "sequences": [{"label": "Label", "values": [100, 190, 60] }, {"label": "Label2", "values": [40, 130, 160] }] }'
src="https://jspm.dev/duoyun-ui/elements/bar-chart"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/bar-chart"></gbp-example>

<gbp-example
name="dy-bar-chart"
props='{"style": "width: 100%;", "stack": true, "series": ["Series 1", "Series 2", "Series 3"], "sequences": [{"label": "Label", "values": [100, 190, 60] }, {"label": "Label2", "values": [40, 130, 160] }] }'
src="https://jspm.dev/duoyun-ui/elements/bar-chart"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/bar-chart"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/breadcrumbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-breadcrumbs"
props='{"list": [{"title": "Level 1"}, {"title": "Level 2"}]}'
src="https://jspm.dev/duoyun-ui/elements/breadcrumbs"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/breadcrumbs"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-button" src="https://jspm.dev/duoyun-ui/elements/button">
<gbp-example name="dy-button" src="https://esm.sh/duoyun-ui/elements/button">

```json
[
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-calendar"
props='{"style": "width: 60%;", "position": 1644464255420, "highlights": [[1644464299373, 1644595299373]]}'
src="https://jspm.dev/duoyun-ui/elements/calendar"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/calendar"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name="dy-card"
props='{"style": "width: 250px;", "avatar": "https://api.dicebear.com/5.x/bottts-neutral/svg", "preview": "https://picsum.photos/400/300", "header": "This is Card"}'
html="Fugiat do laboris ad officia in anim qui mollit nulla reprehenderit pariatur anim sunt."
src="https://jspm.dev/duoyun-ui/elements/card"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/card"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/carousel.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-carousel"
props='{"style": "width: 100%; color: white;", "data": [{"img": "https://picsum.photos/400/300?grayscale", "title": "Title 1", "description": "This is description section 1"}, {"img": "https://picsum.photos/400/301?grayscale", "title": "Title 2", "description": "This is description section 2"}]}'
src="https://jspm.dev/duoyun-ui/elements/carousel"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/carousel"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/cascader-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-cascader-picker"
props='{"placeholder": "Please choose", "multiple": true, "value": [["Option 2"]], "options": [{"label": "Option 1", "children": [{"label": "Option 1.1"}]}, {"label": "Option 2"}, {"label": "Option 3"}], "@change": "(evt) => evt.target.value = evt.detail"}'
src="https://jspm.dev/duoyun-ui/elements/cascader-picker"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/cascader-picker"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/cascader.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-cascader"
props='{"style": "width: 100%;", "placeholder": "Please choose", "value": ["Option 2"], "options": [{"label": "Option 1", "children": [{"label": "Option 1.1"}]}, {"label": "Option 2"}, {"label": "Option 3"}]}'
src="https://jspm.dev/duoyun-ui/elements/cascader"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/cascader"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-checkbox" src="https://jspm.dev/duoyun-ui/elements/checkbox">
<gbp-example name="dy-checkbox" src="https://esm.sh/duoyun-ui/elements/checkbox">

```json
[
Expand Down
7 changes: 4 additions & 3 deletions packages/duoyun-ui/docs/en/02-elements/code-block.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
&amp;lt;a&amp;gt;The freeCodeCamp Contribution Page&amp;lt;/a&amp;gt; shows you how and where you can contribute to freeCodeCamps community and growth.
&amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;'
props='{"style": "width: 100%", "codelang": "html"}'
src="https://jspm.dev/duoyun-ui/elements/code-block"></gbp-example>
&amp;lt;/html&amp;gt;
Test'
props='{"style": "width: 100%", "codelang": "html", "range": "-11", "highlight": "8"}'
src="https://esm.sh/duoyun-ui/elements/code-block"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/collapse.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-collapse" src="https://jspm.dev/duoyun-ui/elements/collapse">
<gbp-example name="dy-collapse" src="https://esm.sh/duoyun-ui/elements/collapse">

```json
{
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/color-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-color-panel"
props='{"alpha": true, "value": "#e5e", "@change": "(evt) => evt.target.value = evt.detail"}'
src="https://jspm.dev/duoyun-ui/elements/color-panel"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/color-panel"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/color-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-color-picker" src="https://jspm.dev/duoyun-ui/elements/color-picker">
<gbp-example name="dy-color-picker" src="https://esm.sh/duoyun-ui/elements/color-picker">

```json
[
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name="dy-copy"
props='{"style": "width: 100%; align-self: flex-start;"}'
html="Hover Text Copy!"
src="https://jspm.dev/duoyun-ui/elements/copy"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/copy"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/date-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-date-panel"
props='{"style": "width: 300px;"}'
src="https://jspm.dev/duoyun-ui/elements/date-panel"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/date-panel"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-date-picker" src="https://jspm.dev/duoyun-ui/elements/date-picker">
<gbp-example name="dy-date-picker" src="https://esm.sh/duoyun-ui/elements/date-picker">

```json
[
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/date-range-panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-date-range-panel"
props='{"style": "width: 360px;"}'
src="https://jspm.dev/duoyun-ui/elements/date-range-panel"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/date-range-panel"></gbp-example>

## API

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-date-range-picker" src="https://jspm.dev/duoyun-ui/elements/date-range-picker">
<gbp-example name="dy-date-range-picker" src="https://esm.sh/duoyun-ui/elements/date-range-picker">

```json
[
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/divider.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-divider"
props='{"style": "width: 100%; align-self: center;", "size": "large", "color": "currentColor"}'
src="https://jspm.dev/duoyun-ui/elements/divider"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/divider"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/donut-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-donut-chart"
props='{"style": "width: 100px;", "label": "Title", "total": "60", "sequences": [{"label": "Label 1", "value": 20}, {"label": "Label 2", "value": 10}, {"label": "Label 3", "value": 30}]}'
src="https://jspm.dev/duoyun-ui/elements/donut-chart"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/donut-chart"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name="dy-drawer"
props='{"header": "Title", "open": true, "@ok": "(evt) => evt.target.open = false", "@close": "(evt) => evt.target.open = false", "@maskclick": "(evt) => evt.target.open = false"}'
html='<div slot="body">Drawer</div>'
src="https://jspm.dev/duoyun-ui/elements/drawer">Current page auto open drawer</gbp-example>
src="https://esm.sh/duoyun-ui/elements/drawer">Current page auto open drawer</gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/drop-area.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name="dy-drop-area"
props='{"style": "width: 100%; height: 200px;"}'
html='Drop File To Here'
src="https://jspm.dev/duoyun-ui/elements/drop-area"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/drop-area"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/empty.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<gbp-example
name="dy-empty"
src="https://jspm.dev/duoyun-ui/elements/empty"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/empty"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/file-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-file-picker" src="https://jspm.dev/duoyun-ui/elements/file-picker">
<gbp-example name="dy-file-picker" src="https://esm.sh/duoyun-ui/elements/file-picker">

```json
[
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<gbp-example
name="dy-flow"
props='{"style": "width: 100%", "graph": {"id":"root","children":[{"id":"n1","data":"Node 1"},{"id":"n2","data":"Node 2"},{"id":"n3","data":"Node 3"},{"id":"n4","data":"Node 4"},{"id":"n5","data":"Node 5"}],"edges":[{"id":"e1","sources":["n1"],"targets":["n2"]},{"id":"e2","sources":["n1"],"targets":["n3"]},{"id":"e3","sources":["n1"],"targets":["n4"]},{"id":"e4","sources":["n4"],"targets":["n5"]}]} }'
src="https://jspm.dev/duoyun-ui/elements/flow"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/flow"></gbp-example>

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/duoyun-ui/docs/en/02-elements/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<dy-form-item name="phone" label="Phone"></dy-form-item>
<dy-form-item name="date" label="Date" type="date" time></dy-form-item>
<dy-form-item name="range" label="Date Range" type="date-range" time></dy-form-item>'
src="https://jspm.dev/duoyun-ui/elements/form"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/form"></gbp-example>

<gbp-example
name="dy-form"
props='{"style": "width: 100%;", "inline": true, "@change": "(evt) => {Object.keys(evt.detail).forEach(key => evt.target.querySelector(`[name=${key}]`).value = evt.detail[key])}"}'
html='<dy-form-item name="name" label="Name" multiple></dy-form-item>
<dy-form-item name="email" label="Email"></dy-form-item>
<dy-form-item name="phone" label="Phone"></dy-form-item>'
src="https://jspm.dev/duoyun-ui/elements/form"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/form"></gbp-example>

## `<dy-form>` API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/heading.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-heading" html='Heading 3' src="https://jspm.dev/duoyun-ui/elements/heading">
<gbp-example name="dy-heading" html='Heading 3' src="https://esm.sh/duoyun-ui/elements/heading">

```json
[
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/help-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-help-text" html='Help Text' src="https://jspm.dev/duoyun-ui/elements/help-text">
<gbp-example name="dy-help-text" html='Help Text' src="https://esm.sh/duoyun-ui/elements/help-text">

```json
[
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All build-in icons, click copy code.
<gbp-example
name="dy-icons"
props='{"style": "width: 100%;"}'
src="https://jspm.dev/duoyun-ui/elements/icons"></gbp-example>
src="https://esm.sh/duoyun-ui/elements/icons"></gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/input-capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<gbp-example
name="dy-input-capture"
src="https://jspm.dev/duoyun-ui/elements/input-capture">Try click or keypress</gbp-example>
src="https://esm.sh/duoyun-ui/elements/input-capture">Try click or keypress</gbp-example>

## API

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Example

<gbp-example name="dy-input" direction="column" src="https://jspm.dev/duoyun-ui/elements/input">
<gbp-example name="dy-input" direction="column" src="https://esm.sh/duoyun-ui/elements/input">

```json
[
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/02-elements/keyboard-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<gbp-example
name="dy-keyboard-access"
src="https://jspm.dev/duoyun-ui/elements/keyboard-access">Try press <kbd>f</kbd></gbp-example>
src="https://esm.sh/duoyun-ui/elements/keyboard-access">Try press <kbd>f</kbd></gbp-example>

## API

Expand Down
Loading

0 comments on commit f79920b

Please sign in to comment.