urnovl-web-components 0.0.92 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{button-base-427190c7.js → button-base-b9495438.js} +8 -9
- package/dist/{esm/button-base-0f666f4c.js.map → cjs/button-base-b9495438.js.map} +1 -1
- package/dist/cjs/{svg-tag-b79fd4d3.js → default-value-a0fe5e73.js} +2 -8
- package/dist/{urnovl-web-components/p-fbda9539.js.map → cjs/default-value-a0fe5e73.js.map} +1 -1
- package/dist/cjs/form-f69797f6.js +254 -0
- package/dist/cjs/form-f69797f6.js.map +1 -0
- package/dist/cjs/{index-9102e7a7.js → index-1b96a6de.js} +6 -5
- package/dist/cjs/index-1b96a6de.js.map +1 -0
- package/dist/cjs/{index-1a660a26.js → index-2b44aeb3.js} +5 -4
- package/dist/cjs/index-2b44aeb3.js.map +1 -0
- package/dist/cjs/{index-a4c44cdc.js → index-a79ff204.js} +11 -9
- package/dist/cjs/index-a79ff204.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{ripple-mixin-84c35458.js → ripple-mixin-232f09c1.js} +2 -249
- package/dist/cjs/ripple-mixin-232f09c1.js.map +1 -0
- package/dist/cjs/svg-tag-77d219ee.js +12 -0
- package/dist/cjs/svg-tag-77d219ee.js.map +1 -0
- package/dist/cjs/template-8782a890.js +9 -0
- package/dist/cjs/template-8782a890.js.map +1 -0
- package/dist/cjs/ur-button-arrow-left_2.cjs.entry.js +5 -3
- package/dist/cjs/ur-button-arrow-left_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ur-button-icon.cjs.entry.js +34 -0
- package/dist/cjs/ur-button-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/ur-button.cjs.entry.js +5 -3
- package/dist/cjs/ur-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ur-checkbox.cjs.entry.js +6 -4
- package/dist/cjs/ur-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ur-loader.cjs.entry.js +1 -1
- package/dist/cjs/ur-locale-filter-button.cjs.entry.js +6 -4
- package/dist/cjs/ur-locale-filter-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ur-locale-filter-panel.cjs.entry.js +10 -7
- package/dist/cjs/ur-locale-filter-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ur-novl-carousel.cjs.entry.js +1 -1
- package/dist/cjs/ur-novl.cjs.entry.js +3 -3
- package/dist/cjs/ur-profile.cjs.entry.js +8 -6
- package/dist/cjs/ur-profile.cjs.entry.js.map +1 -1
- package/dist/cjs/ur-radio-button.cjs.entry.js +186 -0
- package/dist/cjs/ur-radio-button.cjs.entry.js.map +1 -0
- package/dist/cjs/ur-switch.cjs.entry.js +264 -0
- package/dist/cjs/ur-switch.cjs.entry.js.map +1 -0
- package/dist/cjs/ur-text-field.cjs.entry.js +21 -18
- package/dist/cjs/ur-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ur-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/urnovl-web-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/ur-button-icon/ur-button-icon.css +0 -0
- package/dist/collection/components/ur-button-icon/ur-button-icon.js +140 -0
- package/dist/collection/components/ur-button-icon/ur-button-icon.js.map +1 -0
- package/dist/collection/components/ur-checkbox/ur-checkbox.css +1 -1
- package/dist/collection/components/ur-checkbox/ur-checkbox.js +1 -1
- package/dist/collection/components/ur-loader/ur-loader.js +1 -1
- package/dist/collection/components/ur-locale-filter-button/ur-locale-filter-button.js +1 -1
- package/dist/collection/components/ur-locale-filter-panel/ur-locale-filter-panel.js +2 -2
- package/dist/collection/components/ur-novl/ur-novl.js +3 -3
- package/dist/collection/components/ur-novl-carousel/ur-novl-carousel.js +1 -1
- package/dist/collection/components/ur-profile/ur-profile.js +3 -3
- package/dist/collection/components/ur-radio-button/ur-radio-button.css +4 -0
- package/dist/collection/components/ur-radio-button/ur-radio-button.js +83 -0
- package/dist/collection/components/ur-radio-button/ur-radio-button.js.map +1 -0
- package/dist/collection/components/ur-switch/ur-switch.css +4 -0
- package/dist/collection/components/ur-switch/ur-switch.js +64 -0
- package/dist/collection/components/ur-switch/ur-switch.js.map +1 -0
- package/dist/collection/components/ur-text-field/ur-text-field.js +1 -1
- package/dist/collection/components/ur-user-profile/ur-user-profile.js +1 -1
- package/dist/collection/stories/ButtonsIcon.stories.js +35 -0
- package/dist/collection/stories/ButtonsIcon.stories.js.map +1 -0
- package/dist/collection/stories/RadioButtons.stories.js +43 -0
- package/dist/collection/stories/RadioButtons.stories.js.map +1 -0
- package/dist/collection/stories/Switch.stories.js +40 -0
- package/dist/collection/stories/Switch.stories.js.map +1 -0
- package/dist/components/p-04431f91.js +250 -0
- package/dist/components/p-04431f91.js.map +1 -0
- package/dist/components/{p-fbda9539.js → p-064dd142.js} +3 -7
- package/dist/components/p-064dd142.js.map +1 -0
- package/dist/{esm/button-base-0f666f4c.js → components/p-101376f3.js} +5 -5
- package/dist/components/p-101376f3.js.map +1 -0
- package/dist/components/{p-2b5a96cc.js → p-16d89793.js} +5 -3
- package/dist/components/p-16d89793.js.map +1 -0
- package/dist/components/{p-63eff32a.js → p-2bac7774.js} +4 -4
- package/dist/components/{p-63eff32a.js.map → p-2bac7774.js.map} +1 -1
- package/dist/components/{p-7a085124.js → p-5a21f8a6.js} +2 -2
- package/dist/components/{p-7a085124.js.map → p-5a21f8a6.js.map} +1 -1
- package/dist/components/{p-a7b05814.js → p-81fd36ea.js} +4 -3
- package/dist/components/p-81fd36ea.js.map +1 -0
- package/dist/components/{p-21c58f72.js → p-a4851551.js} +2 -247
- package/dist/components/p-a4851551.js.map +1 -0
- package/dist/components/{p-e4b30a16.js → p-b2d449ab.js} +2 -2
- package/dist/components/{p-e4b30a16.js.map → p-b2d449ab.js.map} +1 -1
- package/dist/components/{p-84209759.js → p-c1f9fcd5.js} +4 -3
- package/dist/components/p-c1f9fcd5.js.map +1 -0
- package/dist/components/p-c705d968.js +9 -0
- package/dist/components/p-c705d968.js.map +1 -0
- package/dist/components/p-cbd16038.js +7 -0
- package/dist/components/p-cbd16038.js.map +1 -0
- package/dist/components/ur-button-arrow-left.js +1 -1
- package/dist/components/ur-button-arrow-right.js +1 -1
- package/dist/components/ur-button-icon.d.ts +11 -0
- package/dist/components/ur-button-icon.js +51 -0
- package/dist/components/ur-button-icon.js.map +1 -0
- package/dist/components/ur-button.js +1 -1
- package/dist/components/ur-checkbox.js +2 -2
- package/dist/components/ur-checkbox.js.map +1 -1
- package/dist/components/ur-loader.js +1 -1
- package/dist/components/ur-locale-filter-button.js +2 -2
- package/dist/components/ur-locale-filter-panel.js +4 -4
- package/dist/components/ur-novl-carousel.js +4 -4
- package/dist/components/ur-novl.js +1 -1
- package/dist/components/ur-profile.js +4 -4
- package/dist/components/ur-radio-button.d.ts +11 -0
- package/dist/components/ur-radio-button.js +205 -0
- package/dist/components/ur-radio-button.js.map +1 -0
- package/dist/components/ur-switch.d.ts +11 -0
- package/dist/components/ur-switch.js +282 -0
- package/dist/components/ur-switch.js.map +1 -0
- package/dist/components/ur-text-field.js +7 -5
- package/dist/components/ur-text-field.js.map +1 -1
- package/dist/components/ur-user-profile.js +1 -1
- package/dist/{components/p-c3789c70.js → esm/button-base-01b9724c.js} +5 -5
- package/dist/{components/p-c3789c70.js.map → esm/button-base-01b9724c.js.map} +1 -1
- package/dist/esm/{svg-tag-bd4c40aa.js → default-value-35b2c012.js} +3 -7
- package/dist/esm/default-value-35b2c012.js.map +1 -0
- package/dist/esm/form-d2503c7b.js +250 -0
- package/dist/esm/form-d2503c7b.js.map +1 -0
- package/dist/esm/{index-21ebef7a.js → index-61d54db8.js} +4 -3
- package/dist/esm/index-61d54db8.js.map +1 -0
- package/dist/esm/{index-f4443409.js → index-66dbf580.js} +5 -3
- package/dist/esm/index-66dbf580.js.map +1 -0
- package/dist/esm/{index-8cce9dda.js → index-784f8cf5.js} +4 -3
- package/dist/esm/index-784f8cf5.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{ripple-mixin-7af432a7.js → ripple-mixin-764b7f24.js} +2 -247
- package/dist/esm/ripple-mixin-764b7f24.js.map +1 -0
- package/dist/esm/svg-tag-bad0d28a.js +9 -0
- package/dist/esm/svg-tag-bad0d28a.js.map +1 -0
- package/dist/esm/template-6c6f6144.js +7 -0
- package/dist/esm/template-6c6f6144.js.map +1 -0
- package/dist/esm/ur-button-arrow-left_2.entry.js +5 -3
- package/dist/esm/ur-button-arrow-left_2.entry.js.map +1 -1
- package/dist/esm/ur-button-icon.entry.js +30 -0
- package/dist/esm/ur-button-icon.entry.js.map +1 -0
- package/dist/esm/ur-button.entry.js +5 -3
- package/dist/esm/ur-button.entry.js.map +1 -1
- package/dist/esm/ur-checkbox.entry.js +6 -4
- package/dist/esm/ur-checkbox.entry.js.map +1 -1
- package/dist/esm/ur-loader.entry.js +1 -1
- package/dist/esm/ur-locale-filter-button.entry.js +6 -4
- package/dist/esm/ur-locale-filter-button.entry.js.map +1 -1
- package/dist/esm/ur-locale-filter-panel.entry.js +10 -7
- package/dist/esm/ur-locale-filter-panel.entry.js.map +1 -1
- package/dist/esm/ur-novl-carousel.entry.js +1 -1
- package/dist/esm/ur-novl.entry.js +3 -3
- package/dist/esm/ur-profile.entry.js +8 -6
- package/dist/esm/ur-profile.entry.js.map +1 -1
- package/dist/esm/ur-radio-button.entry.js +182 -0
- package/dist/esm/ur-radio-button.entry.js.map +1 -0
- package/dist/esm/ur-switch.entry.js +260 -0
- package/dist/esm/ur-switch.entry.js.map +1 -0
- package/dist/esm/ur-text-field.entry.js +8 -5
- package/dist/esm/ur-text-field.entry.js.map +1 -1
- package/dist/esm/ur-user-profile.entry.js +1 -1
- package/dist/esm/urnovl-web-components.js +1 -1
- package/dist/types/components/ur-button-icon/ur-button-icon.d.ts +10 -0
- package/dist/types/components/ur-radio-button/ur-radio-button.d.ts +7 -0
- package/dist/types/components/ur-switch/ur-switch.d.ts +6 -0
- package/dist/types/components.d.ts +61 -0
- package/dist/types/stories/ButtonsIcon.stories.d.ts +26 -0
- package/dist/types/stories/RadioButtons.stories.d.ts +33 -0
- package/dist/types/stories/Switch.stories.d.ts +38 -0
- package/dist/urnovl-web-components/p-04431f91.js +7 -0
- package/dist/urnovl-web-components/p-04431f91.js.map +1 -0
- package/dist/urnovl-web-components/p-064dd142.js +7 -0
- package/dist/urnovl-web-components/p-064dd142.js.map +1 -0
- package/dist/urnovl-web-components/{p-7a783e8d.entry.js → p-0a9c4b8b.entry.js} +3 -3
- package/dist/urnovl-web-components/p-101376f3.js +2 -0
- package/dist/urnovl-web-components/p-101376f3.js.map +1 -0
- package/dist/urnovl-web-components/p-16d89793.js +2 -0
- package/dist/urnovl-web-components/{p-2b5a96cc.js.map → p-16d89793.js.map} +1 -1
- package/dist/urnovl-web-components/p-33618f5f.entry.js +2 -0
- package/dist/urnovl-web-components/{p-980a54e2.entry.js.map → p-33618f5f.entry.js.map} +1 -1
- package/dist/urnovl-web-components/p-44c8495a.entry.js +2 -0
- package/dist/urnovl-web-components/{p-b6ca03da.entry.js.map → p-44c8495a.entry.js.map} +1 -1
- package/dist/urnovl-web-components/p-482aa1bd.entry.js +2 -0
- package/dist/urnovl-web-components/{p-501ab38d.entry.js.map → p-482aa1bd.entry.js.map} +1 -1
- package/dist/urnovl-web-components/{p-d867747d.entry.js → p-49d13a39.entry.js} +2 -2
- package/dist/urnovl-web-components/p-6dfab278.entry.js +2 -0
- package/dist/urnovl-web-components/{p-25261ff4.entry.js.map → p-6dfab278.entry.js.map} +1 -1
- package/dist/urnovl-web-components/{p-a7b05814.js → p-81fd36ea.js} +3 -3
- package/dist/urnovl-web-components/{p-a7b05814.js.map → p-81fd36ea.js.map} +1 -1
- package/dist/urnovl-web-components/{p-b83b816f.entry.js → p-92da6cd8.entry.js} +2 -2
- package/dist/urnovl-web-components/p-9ab3fdef.entry.js +2 -0
- package/dist/urnovl-web-components/p-9ab3fdef.entry.js.map +1 -0
- package/dist/urnovl-web-components/p-9b8e9c99.entry.js +2 -0
- package/dist/urnovl-web-components/{p-d167b7ec.entry.js.map → p-9b8e9c99.entry.js.map} +1 -1
- package/dist/urnovl-web-components/p-9e68c368.entry.js +2 -0
- package/dist/urnovl-web-components/{p-21c58f72.js → p-a4851551.js} +15 -20
- package/dist/urnovl-web-components/p-a4851551.js.map +1 -0
- package/dist/urnovl-web-components/{p-163d6d1a.entry.js → p-aa3f5b74.entry.js} +2 -2
- package/dist/urnovl-web-components/p-b10b2b50.entry.js +2 -0
- package/dist/urnovl-web-components/p-b10b2b50.entry.js.map +1 -0
- package/dist/urnovl-web-components/p-ba0edb68.entry.js +2 -0
- package/dist/urnovl-web-components/p-ba0edb68.entry.js.map +1 -0
- package/dist/urnovl-web-components/{p-84209759.js → p-c1f9fcd5.js} +3 -3
- package/dist/urnovl-web-components/{p-84209759.js.map → p-c1f9fcd5.js.map} +1 -1
- package/dist/urnovl-web-components/p-c4aa9cdc.entry.js +2 -0
- package/dist/urnovl-web-components/p-c4aa9cdc.entry.js.map +1 -0
- package/dist/urnovl-web-components/p-c705d968.js +2 -0
- package/dist/urnovl-web-components/p-c705d968.js.map +1 -0
- package/dist/urnovl-web-components/p-cbd16038.js +2 -0
- package/dist/urnovl-web-components/p-cbd16038.js.map +1 -0
- package/dist/urnovl-web-components/urnovl-web-components.esm.js +1 -1
- package/dist/urnovl-web-components/urnovl-web-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/button-base-427190c7.js.map +0 -1
- package/dist/cjs/index-1a660a26.js.map +0 -1
- package/dist/cjs/index-9102e7a7.js.map +0 -1
- package/dist/cjs/index-a4c44cdc.js.map +0 -1
- package/dist/cjs/ripple-mixin-84c35458.js.map +0 -1
- package/dist/cjs/svg-tag-b79fd4d3.js.map +0 -1
- package/dist/components/p-21c58f72.js.map +0 -1
- package/dist/components/p-2b5a96cc.js.map +0 -1
- package/dist/components/p-84209759.js.map +0 -1
- package/dist/components/p-a7b05814.js.map +0 -1
- package/dist/components/p-fbda9539.js.map +0 -1
- package/dist/esm/index-21ebef7a.js.map +0 -1
- package/dist/esm/index-8cce9dda.js.map +0 -1
- package/dist/esm/index-f4443409.js.map +0 -1
- package/dist/esm/ripple-mixin-7af432a7.js.map +0 -1
- package/dist/esm/svg-tag-bd4c40aa.js.map +0 -1
- package/dist/urnovl-web-components/p-21c58f72.js.map +0 -1
- package/dist/urnovl-web-components/p-25261ff4.entry.js +0 -2
- package/dist/urnovl-web-components/p-2b5a96cc.js +0 -2
- package/dist/urnovl-web-components/p-501ab38d.entry.js +0 -2
- package/dist/urnovl-web-components/p-9650cea0.entry.js +0 -2
- package/dist/urnovl-web-components/p-9650cea0.entry.js.map +0 -1
- package/dist/urnovl-web-components/p-965cb7ac.entry.js +0 -2
- package/dist/urnovl-web-components/p-980a54e2.entry.js +0 -2
- package/dist/urnovl-web-components/p-b6ca03da.entry.js +0 -2
- package/dist/urnovl-web-components/p-c3789c70.js +0 -2
- package/dist/urnovl-web-components/p-c3789c70.js.map +0 -1
- package/dist/urnovl-web-components/p-d167b7ec.entry.js +0 -2
- package/dist/urnovl-web-components/p-fbda9539.js +0 -7
- /package/dist/urnovl-web-components/{p-7a783e8d.entry.js.map → p-0a9c4b8b.entry.js.map} +0 -0
- /package/dist/urnovl-web-components/{p-d867747d.entry.js.map → p-49d13a39.entry.js.map} +0 -0
- /package/dist/urnovl-web-components/{p-b83b816f.entry.js.map → p-92da6cd8.entry.js.map} +0 -0
- /package/dist/urnovl-web-components/{p-965cb7ac.entry.js.map → p-9e68c368.entry.js.map} +0 -0
- /package/dist/urnovl-web-components/{p-163d6d1a.entry.js.map → p-aa3f5b74.entry.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const rippleMixin = require('./ripple-mixin-
|
|
4
|
-
|
|
5
|
-
const
|
|
3
|
+
const rippleMixin = require('./ripple-mixin-232f09c1.js');
|
|
4
|
+
const form = require('./form-f69797f6.js');
|
|
5
|
+
const template = require('./template-8782a890.js');
|
|
6
6
|
|
|
7
7
|
function cc(names) {
|
|
8
8
|
if (typeof names === "string" || typeof names === "number") return "" + names
|
|
@@ -27,7 +27,7 @@ function cc(names) {
|
|
|
27
27
|
const AnchorMixin = (superclass) => {
|
|
28
28
|
class AnchorMixinClass extends superclass {
|
|
29
29
|
renderAnchor({ id, className, part, content = rippleMixin.ke `<slot></slot>`, refDirective, tabIndex, }) {
|
|
30
|
-
return rippleMixin.ke `<a ${refDirective} id="${
|
|
30
|
+
return rippleMixin.ke `<a ${refDirective} id="${form.to(id)}" class="_a ${className ? className : ''}" part="${form.to(part)}" href="${form.to(this.href)}" download="${form.to(this.download)}" target="${form.to(this.target)}" rel="${form.to(this.rel)}" tabindex="${form.to(tabIndex)}">${content}</a>`;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
rippleMixin.__decorate([
|
|
@@ -144,7 +144,7 @@ class ButtonBase extends AnchorMixin(rippleMixin.RippleMixin(rippleMixin.Focusab
|
|
|
144
144
|
* **Note**:仅在未设置 `href` 属性且 `type="submit"` 时,此属性才有效。
|
|
145
145
|
*/
|
|
146
146
|
this.formNoValidate = false;
|
|
147
|
-
this.formController = new
|
|
147
|
+
this.formController = new form.FormController(this);
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* 表单验证状态对象,具体参见 [`ValidityState`](https://developer.mozilla.org/zh-CN/docs/Web/API/ValidityState)
|
|
@@ -238,10 +238,10 @@ class ButtonBase extends AnchorMixin(rippleMixin.RippleMixin(rippleMixin.Focusab
|
|
|
238
238
|
renderLoading() {
|
|
239
239
|
return this.loading
|
|
240
240
|
? rippleMixin.ke `<mdui-circular-progress part="loading"></mdui-circular-progress>`
|
|
241
|
-
: nothingTemplate;
|
|
241
|
+
: template.nothingTemplate;
|
|
242
242
|
}
|
|
243
243
|
renderButton({ id, className, part, content = rippleMixin.ke `<slot></slot>`, }) {
|
|
244
|
-
return rippleMixin.ke `<button id="${
|
|
244
|
+
return rippleMixin.ke `<button id="${form.to(id)}" class="${cc(['_button', className])}" part="${form.to(part)}" ?disabled="${this.rippleDisabled || this.focusDisabled}">${content}</button>`;
|
|
245
245
|
}
|
|
246
246
|
isButton() {
|
|
247
247
|
return !this.href;
|
|
@@ -299,6 +299,5 @@ rippleMixin.__decorate([
|
|
|
299
299
|
], ButtonBase.prototype, "formTarget", void 0);
|
|
300
300
|
|
|
301
301
|
exports.ButtonBase = ButtonBase;
|
|
302
|
-
exports.nothingTemplate = nothingTemplate;
|
|
303
302
|
|
|
304
|
-
//# sourceMappingURL=button-base-
|
|
303
|
+
//# sourceMappingURL=button-base-b9495438.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"button-base-0f666f4c.js","mappings":";;AACY,MAAC,eAAe,GAAGA,EAAI,CAAC,CAAC,EAAEC,CAAO,CAAC;;ACDhC,SAAS,EAAE,CAAC,KAAK,EAAE;AAClC,EAAE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK;AAC/E;AACA,EAAE,IAAI,GAAG,GAAG,GAAE;AACd;AACA,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC5B,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAChD,MAAM,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE;AACvC,QAAQ,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,IAAG;AACjC,OAAO;AACP,KAAK;AACL,GAAG,MAAM;AACT,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,EAAE;AACzB,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI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AAC,CAAC,CAAC;AAC/C,UAAU,CAAC;AACX,IAAIA,CAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;AACzD,CAAC,EAAE,UAAU,CAAC,SAAS,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;AAChD,UAAU,CAAC;AACX,IAAIA,CAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACxD,CAAC,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/C,UAAU,CAAC;AACX,IAAIA,CAAQ,CAAC;AACb,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,OAAO,EAAE,IAAI;AACrB,QAAQ,SAAS,EAAE,gBAAgB;AACnC,QAAQ,SAAS,EAAE,gBAAgB;AACnC,KAAK,CAAC;AACN,CAAC,EAAE,UAAU,CAAC,SAAS,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;AACnD,UAAU,CAAC;AACX,IAAIA,CAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACxD,CAAC,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;;;;","names":["html","nothing","ifDefined","property","css","classMap","customElement"],"sources":["node_modules/@mdui/shared/helpers/template.js","node_modules/classcat/index.js","node_modules/@mdui/shared/mixins/anchor.js","node_modules/mdui/components/circular-progress/style.js","node_modules/mdui/components/circular-progress/index.js","node_modules/mdui/components/button/button-base-style.js","node_modules/mdui/components/button/button-base.js"],"sourcesContent":["import { html, nothing } from 'lit';\nexport const nothingTemplate = html `${nothing}`;\n","export default function cc(names) {\n if (typeof names === \"string\" || typeof names === \"number\") return \"\" + names\n\n let out = \"\"\n\n if (Array.isArray(names)) {\n for (let i = 0, tmp; i < names.length; i++) {\n if ((tmp = cc(names[i])) !== \"\") {\n out += (out && \" \") + tmp\n }\n }\n } else {\n for (let k in names) {\n if (names[k]) out += (out && \" \") + k\n }\n }\n\n return out\n}\n","import { __decorate } from \"tslib\";\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nexport const AnchorMixin = (superclass) => {\n class AnchorMixinClass extends superclass {\n renderAnchor({ id, className, part, content = html `<slot></slot>`, refDirective, tabIndex, }) {\n return html `<a ${refDirective} id=\"${ifDefined(id)}\" class=\"_a ${className ? className : ''}\" part=\"${ifDefined(part)}\" href=\"${ifDefined(this.href)}\" download=\"${ifDefined(this.download)}\" target=\"${ifDefined(this.target)}\" rel=\"${ifDefined(this.rel)}\" tabindex=\"${ifDefined(tabIndex)}\">${content}</a>`;\n }\n }\n __decorate([\n property({ reflect: true })\n ], AnchorMixinClass.prototype, \"href\", void 0);\n __decorate([\n property({ reflect: true })\n ], AnchorMixinClass.prototype, \"download\", void 0);\n __decorate([\n property({ reflect: true })\n ], AnchorMixinClass.prototype, \"target\", void 0);\n __decorate([\n property({ reflect: true })\n ], AnchorMixinClass.prototype, \"rel\", void 0);\n return AnchorMixinClass;\n};\n","import { css } from 'lit';\nexport const style = css `:host{position:relative;display:inline-block;flex-shrink:0;width:2.5rem;height:2.5rem;stroke:rgb(var(--mdui-color-primary))}.progress{position:relative;display:inline-block;width:100%;height:100%;text-align:left;transition:opacity var(--mdui-motion-duration-medium1) var(--mdui-motion-easing-linear)}.determinate svg{transform:rotate(-90deg);fill:transparent}.determinate .track{stroke:transparent}.determinate .circle{stroke:inherit;transition:stroke-dashoffset var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate{font-size:0;letter-spacing:0;white-space:nowrap;animation:mdui-comp-circular-progress-rotate 1568ms var(--mdui-motion-easing-linear) infinite}.indeterminate .circle,.indeterminate .layer{position:absolute;width:100%;height:100%}.indeterminate .layer{animation:mdui-comp-circular-progress-layer-rotate 5332ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .circle{fill:transparent;stroke:inherit}.indeterminate .gap-patch{position:absolute;top:0;left:47.5%;width:5%;height:100%;overflow:hidden}.indeterminate .gap-patch .circle{left:-900%;width:2000%;transform:rotate(180deg)}.indeterminate .clipper{position:relative;display:inline-block;width:50%;height:100%;overflow:hidden}.indeterminate .clipper .circle{width:200%}.indeterminate .clipper.left .circle{animation:mdui-comp-circular-progress-left-spin 1333ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .clipper.right .circle{left:-100%;animation:mdui-comp-circular-progress-right-spin 1333ms var(--mdui-motion-easing-standard) infinite both}@keyframes mdui-comp-circular-progress-rotate{to{transform:rotate(360deg)}}@keyframes mdui-comp-circular-progress-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdui-comp-circular-progress-left-spin{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes mdui-comp-circular-progress-right-spin{0%{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}100%{transform:rotate(-265deg)}}`;\n","import { __decorate } from \"tslib\";\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { isUndefined } from '@mdui/jq/shared/helper.js';\nimport { MduiElement } from '@mdui/shared/base/mdui-element.js';\nimport { componentStyle } from '@mdui/shared/lit-styles/component-style.js';\nimport { style } from './style.js';\n/**\n * @summary 圆形进度指示器组件\n *\n * ```html\n * <mdui-circular-progress></mdui-circular-progress>\n * ```\n */\nlet CircularProgress = class CircularProgress extends MduiElement {\n constructor() {\n super(...arguments);\n /**\n * 进度指示器的最大值。默认为 `1`\n */\n this.max = 1;\n }\n render() {\n const isDeterminate = !isUndefined(this.value);\n return html `<div class=\"progress ${classMap({\n determinate: isDeterminate,\n indeterminate: !isDeterminate,\n })}\">${isDeterminate ? this.renderDeterminate() : this.renderInDeterminate()}</div>`;\n }\n renderDeterminate() {\n const value = this.value;\n const strokeWidth = 4; // 圆环宽度\n const circleRadius = 18; // 圆环宽度中心点的半径\n const π = 3.1415926;\n const center = circleRadius + strokeWidth / 2;\n const circumference = 2 * π * circleRadius;\n const determinateStrokeDashOffset = (1 - value / Math.max(this.max ?? value, value)) * circumference;\n return html `<svg viewBox=\"0 0 ${center * 2} ${center * 2}\"><circle class=\"track\" cx=\"${center}\" cy=\"${center}\" r=\"${circleRadius}\" stroke-width=\"${strokeWidth}\"></circle><circle class=\"circle\" cx=\"${center}\" cy=\"${center}\" r=\"${circleRadius}\" stroke-dasharray=\"${2 * π * circleRadius}\" stroke-dashoffset=\"${determinateStrokeDashOffset}\" stroke-width=\"${strokeWidth}\"></circle></svg>`;\n }\n renderInDeterminate() {\n const strokeWidth = 4; // 圆环宽度\n const circleRadius = 18; // 圆环宽度中心点的半径\n const π = 3.1415926;\n const center = circleRadius + strokeWidth / 2;\n const circumference = 2 * π * circleRadius;\n const halfCircumference = 0.5 * circumference;\n const circle = (thisStrokeWidth) => html `<svg class=\"circle\" viewBox=\"0 0 ${center * 2} ${center * 2}\"><circle cx=\"${center}\" cy=\"${center}\" r=\"${circleRadius}\" stroke-dasharray=\"${circumference}\" stroke-dashoffset=\"${halfCircumference}\" stroke-width=\"${thisStrokeWidth}\"></circle></svg>`;\n return html `<div class=\"layer\"><div class=\"clipper left\">${circle(strokeWidth)}</div><div class=\"gap-patch\">${circle(strokeWidth * 0.8)}</div><div class=\"clipper right\">${circle(strokeWidth)}</div></div>`;\n }\n};\nCircularProgress.styles = [componentStyle, style];\n__decorate([\n property({ type: Number, reflect: true })\n], CircularProgress.prototype, \"max\", void 0);\n__decorate([\n property({ type: Number })\n], CircularProgress.prototype, \"value\", void 0);\nCircularProgress = __decorate([\n customElement('mdui-circular-progress')\n], CircularProgress);\nexport { CircularProgress };\n","import { css } from 'lit';\nexport const buttonBaseStyle = css `.button{position:relative;display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0;overflow:hidden;color:inherit;font-size:inherit;font-family:inherit;font-weight:inherit;letter-spacing:inherit;white-space:nowrap;text-align:center;text-decoration:none;vertical-align:middle;background:0 0;border:none;outline:0;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}`;\n","import { __decorate } from \"tslib\";\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport cc from 'classcat';\nimport { MduiElement } from '@mdui/shared/base/mdui-element.js';\nimport { FormController } from '@mdui/shared/controllers/form.js';\nimport { booleanConverter } from '@mdui/shared/helpers/decorator.js';\nimport { nothingTemplate } from '@mdui/shared/helpers/template.js';\nimport { componentStyle } from '@mdui/shared/lit-styles/component-style.js';\nimport { AnchorMixin } from '@mdui/shared/mixins/anchor.js';\nimport { FocusableMixin } from '@mdui/shared/mixins/focusable.js';\nimport '../circular-progress.js';\nimport { RippleMixin } from '../ripple/ripple-mixin.js';\nimport { buttonBaseStyle } from './button-base-style.js';\nexport class ButtonBase extends AnchorMixin(RippleMixin(FocusableMixin(MduiElement))) {\n constructor() {\n super(...arguments);\n /**\n * 是否禁用\n */\n this.disabled = false;\n /**\n * 是否处于加载中状态\n */\n this.loading = false;\n /**\n * 按钮的名称,将与表单数据一起提交。\n *\n * **Note**:仅在未设置 `href` 属性时,此属性才有效。\n */\n this.name = '';\n /**\n * 按钮的初始值,将与表单数据一起提交。\n *\n * **Note**:仅在未设置 `href` 属性时,此属性才有效。\n */\n this.value = '';\n /**\n * 按钮的类型。默认类型为 `button`。可选类型包括:\n *\n * * `submit`:点击按钮会提交表单数据到服务器\n * * `reset`:点击按钮会将表单中的所有字段重置为初始值\n * * `button`:此类型的按钮没有默认行为\n *\n * **Note**:仅在未指定 `href` 属性时,此属性才有效。\n */\n this.type = 'button';\n /**\n * 如果设置了此属性,表单提交时将不执行表单验证。\n *\n * 如果设置了此属性,将覆盖 `<form>` 元素的 `novalidate` 属性。\n *\n * **Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。\n */\n this.formNoValidate = false;\n this.formController = new FormController(this);\n }\n /**\n * 表单验证状态对象,具体参见 [`ValidityState`](https://developer.mozilla.org/zh-CN/docs/Web/API/ValidityState)\n */\n get validity() {\n if (this.isButton()) {\n return this.focusElement.validity;\n }\n }\n /**\n * 如果表单验证未通过,此属性将包含提示信息。如果验证通过,此属性将为空字符串\n */\n get validationMessage() {\n if (this.isButton()) {\n return this.focusElement.validationMessage;\n }\n }\n get rippleDisabled() {\n return this.disabled || this.loading;\n }\n get focusElement() {\n return this.isButton()\n ? this.renderRoot?.querySelector('._button')\n : !this.focusDisabled\n ? this.renderRoot?.querySelector('._a')\n : this;\n }\n get focusDisabled() {\n return this.disabled || this.loading;\n }\n /**\n * 检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`\n */\n checkValidity() {\n if (this.isButton()) {\n const valid = this.focusElement.checkValidity();\n if (!valid) {\n // @ts-ignore\n this.emit('invalid', {\n bubbles: false,\n cancelable: true,\n composed: false,\n });\n }\n return valid;\n }\n return true;\n }\n /**\n * 检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`。\n *\n * 如果验证未通过,还会在组件上显示验证失败的提示。\n */\n reportValidity() {\n if (this.isButton()) {\n const invalid = !this.focusElement.reportValidity();\n if (invalid) {\n // @ts-ignore\n this.emit('invalid', {\n bubbles: false,\n cancelable: true,\n composed: false,\n });\n // todo 考虑是否要支持 preventDefault() 方法,当前 invalid 状态没有样式\n }\n return !invalid;\n }\n return true;\n }\n /**\n * 设置自定义的错误提示文本。只要这个文本不为空,就表示字段未通过验证\n *\n * @param message 自定义的错误提示文本\n */\n setCustomValidity(message) {\n if (this.isButton()) {\n this.focusElement.setCustomValidity(message);\n }\n }\n firstUpdated(_changedProperties) {\n super.firstUpdated(_changedProperties);\n this.addEventListener('click', () => {\n if (this.type === 'submit') {\n this.formController.submit(this);\n }\n if (this.type === 'reset') {\n this.formController.reset(this);\n }\n });\n }\n renderLoading() {\n return this.loading\n ? html `<mdui-circular-progress part=\"loading\"></mdui-circular-progress>`\n : nothingTemplate;\n }\n renderButton({ id, className, part, content = html `<slot></slot>`, }) {\n return html `<button id=\"${ifDefined(id)}\" class=\"${cc(['_button', className])}\" part=\"${ifDefined(part)}\" ?disabled=\"${this.rippleDisabled || this.focusDisabled}\">${content}</button>`;\n }\n isButton() {\n return !this.href;\n }\n}\nButtonBase.styles = [\n componentStyle,\n buttonBaseStyle,\n];\n__decorate([\n property({\n type: Boolean,\n reflect: true,\n converter: booleanConverter,\n })\n], ButtonBase.prototype, \"disabled\", void 0);\n__decorate([\n property({\n type: Boolean,\n reflect: true,\n converter: booleanConverter,\n })\n], ButtonBase.prototype, \"loading\", void 0);\n__decorate([\n property({ reflect: true })\n], ButtonBase.prototype, \"name\", void 0);\n__decorate([\n property({ reflect: true })\n], ButtonBase.prototype, \"value\", void 0);\n__decorate([\n property({ reflect: true })\n], ButtonBase.prototype, \"type\", void 0);\n__decorate([\n property({ reflect: true })\n], ButtonBase.prototype, \"form\", void 0);\n__decorate([\n property({ reflect: true, attribute: 'formaction' })\n], ButtonBase.prototype, \"formAction\", void 0);\n__decorate([\n property({ reflect: true, attribute: 'formenctype' })\n], ButtonBase.prototype, \"formEnctype\", void 0);\n__decorate([\n property({ reflect: true, attribute: 'formmethod' })\n], ButtonBase.prototype, \"formMethod\", void 0);\n__decorate([\n property({\n type: Boolean,\n reflect: true,\n converter: booleanConverter,\n attribute: 'formnovalidate',\n })\n], ButtonBase.prototype, \"formNoValidate\", void 0);\n__decorate([\n property({ reflect: true, attribute: 'formtarget' })\n], ButtonBase.prototype, \"formTarget\", void 0);\n"],"version":3}
|
|
1
|
+
{"file":"button-base-b9495438.js","mappings":";;;;;;AAAe,SAAS,E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AQ,SAAS,EAAEW,4BAAgB;AACnC,QAAQ,SAAS,EAAE,gBAAgB;AACnC,KAAK,CAAC;AACN,CAAC,EAAE,UAAU,CAAC,SAAS,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;AACnDZ,sBAAU,CAAC;AACX,IAAIC,aAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACxD,CAAC,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;;;;","names":["html","ifDefined","__decorate","property","css","MduiElement","isUndefined","classMap","componentStyle","customElement","RippleMixin","FocusableMixin","FormController","nothingTemplate","booleanConverter"],"sources":["node_modules/classcat/index.js","node_modules/@mdui/shared/mixins/anchor.js","node_modules/mdui/components/circular-progress/style.js","node_modules/mdui/components/circular-progress/index.js","node_modules/mdui/components/button/button-base-style.js","node_modules/mdui/components/button/button-base.js"],"sourcesContent":["export default function cc(names) {\n if (typeof names === \"string\" || typeof names === \"number\") return \"\" + names\n\n let out = \"\"\n\n if (Array.isArray(names)) {\n for (let i = 0, tmp; i < names.length; i++) {\n if ((tmp = cc(names[i])) !== \"\") {\n out += (out && \" \") + tmp\n }\n }\n } else {\n for (let k in names) {\n if (names[k]) out += (out && \" \") + k\n }\n }\n\n return out\n}\n","import { __decorate } from \"tslib\";\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nexport const AnchorMixin = (superclass) => {\n class AnchorMixinClass extends superclass {\n renderAnchor({ id, className, part, content = html `<slot></slot>`, refDirective, tabIndex, }) {\n return html `<a ${refDirective} id=\"${ifDefined(id)}\" class=\"_a ${className ? className : ''}\" part=\"${ifDefined(part)}\" href=\"${ifDefined(this.href)}\" download=\"${ifDefined(this.download)}\" target=\"${ifDefined(this.target)}\" rel=\"${ifDefined(this.rel)}\" tabindex=\"${ifDefined(tabIndex)}\">${content}</a>`;\n }\n }\n __decorate([\n property({ reflect: true })\n ], AnchorMixinClass.prototype, \"href\", void 0);\n __decorate([\n property({ reflect: true })\n ], AnchorMixinClass.prototype, \"download\", void 0);\n __decorate([\n property({ reflect: true })\n ], AnchorMixinClass.prototype, \"target\", void 0);\n __decorate([\n property({ reflect: true })\n ], AnchorMixinClass.prototype, \"rel\", void 0);\n return AnchorMixinClass;\n};\n","import { css } from 'lit';\nexport const style = css `:host{position:relative;display:inline-block;flex-shrink:0;width:2.5rem;height:2.5rem;stroke:rgb(var(--mdui-color-primary))}.progress{position:relative;display:inline-block;width:100%;height:100%;text-align:left;transition:opacity var(--mdui-motion-duration-medium1) var(--mdui-motion-easing-linear)}.determinate svg{transform:rotate(-90deg);fill:transparent}.determinate .track{stroke:transparent}.determinate .circle{stroke:inherit;transition:stroke-dashoffset var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate{font-size:0;letter-spacing:0;white-space:nowrap;animation:mdui-comp-circular-progress-rotate 1568ms var(--mdui-motion-easing-linear) infinite}.indeterminate .circle,.indeterminate .layer{position:absolute;width:100%;height:100%}.indeterminate .layer{animation:mdui-comp-circular-progress-layer-rotate 5332ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .circle{fill:transparent;stroke:inherit}.indeterminate .gap-patch{position:absolute;top:0;left:47.5%;width:5%;height:100%;overflow:hidden}.indeterminate .gap-patch .circle{left:-900%;width:2000%;transform:rotate(180deg)}.indeterminate .clipper{position:relative;display:inline-block;width:50%;height:100%;overflow:hidden}.indeterminate .clipper .circle{width:200%}.indeterminate .clipper.left .circle{animation:mdui-comp-circular-progress-left-spin 1333ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .clipper.right .circle{left:-100%;animation:mdui-comp-circular-progress-right-spin 1333ms var(--mdui-motion-easing-standard) infinite both}@keyframes mdui-comp-circular-progress-rotate{to{transform:rotate(360deg)}}@keyframes mdui-comp-circular-progress-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdui-comp-circular-progress-left-spin{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes mdui-comp-circular-progress-right-spin{0%{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}100%{transform:rotate(-265deg)}}`;\n","import { __decorate } from \"tslib\";\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { isUndefined } from '@mdui/jq/shared/helper.js';\nimport { MduiElement } from '@mdui/shared/base/mdui-element.js';\nimport { componentStyle } from '@mdui/shared/lit-styles/component-style.js';\nimport { style } from './style.js';\n/**\n * @summary 圆形进度指示器组件\n *\n * ```html\n * <mdui-circular-progress></mdui-circular-progress>\n * ```\n */\nlet CircularProgress = class CircularProgress extends MduiElement {\n constructor() {\n super(...arguments);\n /**\n * 进度指示器的最大值。默认为 `1`\n */\n this.max = 1;\n }\n render() {\n const isDeterminate = !isUndefined(this.value);\n return html `<div class=\"progress ${classMap({\n determinate: isDeterminate,\n indeterminate: !isDeterminate,\n })}\">${isDeterminate ? this.renderDeterminate() : this.renderInDeterminate()}</div>`;\n }\n renderDeterminate() {\n const value = this.value;\n const strokeWidth = 4; // 圆环宽度\n const circleRadius = 18; // 圆环宽度中心点的半径\n const π = 3.1415926;\n const center = circleRadius + strokeWidth / 2;\n const circumference = 2 * π * circleRadius;\n const determinateStrokeDashOffset = (1 - value / Math.max(this.max ?? value, value)) * circumference;\n return html `<svg viewBox=\"0 0 ${center * 2} ${center * 2}\"><circle class=\"track\" cx=\"${center}\" cy=\"${center}\" r=\"${circleRadius}\" stroke-width=\"${strokeWidth}\"></circle><circle class=\"circle\" cx=\"${center}\" cy=\"${center}\" r=\"${circleRadius}\" stroke-dasharray=\"${2 * π * circleRadius}\" stroke-dashoffset=\"${determinateStrokeDashOffset}\" stroke-width=\"${strokeWidth}\"></circle></svg>`;\n }\n renderInDeterminate() {\n const strokeWidth = 4; // 圆环宽度\n const circleRadius = 18; // 圆环宽度中心点的半径\n const π = 3.1415926;\n const center = circleRadius + strokeWidth / 2;\n const circumference = 2 * π * circleRadius;\n const halfCircumference = 0.5 * circumference;\n const circle = (thisStrokeWidth) => html `<svg class=\"circle\" viewBox=\"0 0 ${center * 2} ${center * 2}\"><circle cx=\"${center}\" cy=\"${center}\" r=\"${circleRadius}\" stroke-dasharray=\"${circumference}\" stroke-dashoffset=\"${halfCircumference}\" stroke-width=\"${thisStrokeWidth}\"></circle></svg>`;\n return html `<div class=\"layer\"><div class=\"clipper left\">${circle(strokeWidth)}</div><div class=\"gap-patch\">${circle(strokeWidth * 0.8)}</div><div class=\"clipper right\">${circle(strokeWidth)}</div></div>`;\n }\n};\nCircularProgress.styles = [componentStyle, style];\n__decorate([\n property({ type: Number, reflect: true })\n], CircularProgress.prototype, \"max\", void 0);\n__decorate([\n property({ type: Number })\n], CircularProgress.prototype, \"value\", void 0);\nCircularProgress = __decorate([\n customElement('mdui-circular-progress')\n], CircularProgress);\nexport { CircularProgress };\n","import { css } from 'lit';\nexport const buttonBaseStyle = css `.button{position:relative;display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0;overflow:hidden;color:inherit;font-size:inherit;font-family:inherit;font-weight:inherit;letter-spacing:inherit;white-space:nowrap;text-align:center;text-decoration:none;vertical-align:middle;background:0 0;border:none;outline:0;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}`;\n","import { __decorate } from \"tslib\";\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport cc from 'classcat';\nimport { MduiElement } from '@mdui/shared/base/mdui-element.js';\nimport { FormController } from '@mdui/shared/controllers/form.js';\nimport { booleanConverter } from '@mdui/shared/helpers/decorator.js';\nimport { nothingTemplate } from '@mdui/shared/helpers/template.js';\nimport { componentStyle } from '@mdui/shared/lit-styles/component-style.js';\nimport { AnchorMixin } from '@mdui/shared/mixins/anchor.js';\nimport { FocusableMixin } from '@mdui/shared/mixins/focusable.js';\nimport '../circular-progress.js';\nimport { RippleMixin } from '../ripple/ripple-mixin.js';\nimport { buttonBaseStyle } from './button-base-style.js';\nexport class ButtonBase extends AnchorMixin(RippleMixin(FocusableMixin(MduiElement))) {\n constructor() {\n super(...arguments);\n /**\n * 是否禁用\n */\n this.disabled = false;\n /**\n * 是否处于加载中状态\n */\n this.loading = false;\n /**\n * 按钮的名称,将与表单数据一起提交。\n *\n * **Note**:仅在未设置 `href` 属性时,此属性才有效。\n */\n this.name = '';\n /**\n * 按钮的初始值,将与表单数据一起提交。\n *\n * **Note**:仅在未设置 `href` 属性时,此属性才有效。\n */\n this.value = '';\n /**\n * 按钮的类型。默认类型为 `button`。可选类型包括:\n *\n * * `submit`:点击按钮会提交表单数据到服务器\n * * `reset`:点击按钮会将表单中的所有字段重置为初始值\n * * `button`:此类型的按钮没有默认行为\n *\n * **Note**:仅在未指定 `href` 属性时,此属性才有效。\n */\n this.type = 'button';\n /**\n * 如果设置了此属性,表单提交时将不执行表单验证。\n *\n * 如果设置了此属性,将覆盖 `<form>` 元素的 `novalidate` 属性。\n *\n * **Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。\n */\n this.formNoValidate = false;\n this.formController = new FormController(this);\n }\n /**\n * 表单验证状态对象,具体参见 [`ValidityState`](https://developer.mozilla.org/zh-CN/docs/Web/API/ValidityState)\n */\n get validity() {\n if (this.isButton()) {\n return this.focusElement.validity;\n }\n }\n /**\n * 如果表单验证未通过,此属性将包含提示信息。如果验证通过,此属性将为空字符串\n */\n get validationMessage() {\n if (this.isButton()) {\n return this.focusElement.validationMessage;\n }\n }\n get rippleDisabled() {\n return this.disabled || this.loading;\n }\n get focusElement() {\n return this.isButton()\n ? this.renderRoot?.querySelector('._button')\n : !this.focusDisabled\n ? this.renderRoot?.querySelector('._a')\n : this;\n }\n get focusDisabled() {\n return this.disabled || this.loading;\n }\n /**\n * 检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`\n */\n checkValidity() {\n if (this.isButton()) {\n const valid = this.focusElement.checkValidity();\n if (!valid) {\n // @ts-ignore\n this.emit('invalid', {\n bubbles: false,\n cancelable: true,\n composed: false,\n });\n }\n return valid;\n }\n return true;\n }\n /**\n * 检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`。\n *\n * 如果验证未通过,还会在组件上显示验证失败的提示。\n */\n reportValidity() {\n if (this.isButton()) {\n const invalid = !this.focusElement.reportValidity();\n if (invalid) {\n // @ts-ignore\n this.emit('invalid', {\n bubbles: false,\n cancelable: true,\n composed: false,\n });\n // todo 考虑是否要支持 preventDefault() 方法,当前 invalid 状态没有样式\n }\n return !invalid;\n }\n return true;\n }\n /**\n * 设置自定义的错误提示文本。只要这个文本不为空,就表示字段未通过验证\n *\n * @param message 自定义的错误提示文本\n */\n setCustomValidity(message) {\n if (this.isButton()) {\n this.focusElement.setCustomValidity(message);\n }\n }\n firstUpdated(_changedProperties) {\n super.firstUpdated(_changedProperties);\n this.addEventListener('click', () => {\n if (this.type === 'submit') {\n this.formController.submit(this);\n }\n if (this.type === 'reset') {\n this.formController.reset(this);\n }\n });\n }\n renderLoading() {\n return this.loading\n ? html `<mdui-circular-progress part=\"loading\"></mdui-circular-progress>`\n : nothingTemplate;\n }\n renderButton({ id, className, part, content = html `<slot></slot>`, }) {\n return html `<button id=\"${ifDefined(id)}\" class=\"${cc(['_button', className])}\" part=\"${ifDefined(part)}\" ?disabled=\"${this.rippleDisabled || this.focusDisabled}\">${content}</button>`;\n }\n isButton() {\n return !this.href;\n }\n}\nButtonBase.styles = [\n componentStyle,\n buttonBaseStyle,\n];\n__decorate([\n property({\n type: Boolean,\n reflect: true,\n converter: booleanConverter,\n })\n], ButtonBase.prototype, \"disabled\", void 0);\n__decorate([\n property({\n type: Boolean,\n reflect: true,\n converter: booleanConverter,\n })\n], ButtonBase.prototype, \"loading\", void 0);\n__decorate([\n property({ reflect: true })\n], ButtonBase.prototype, \"name\", void 0);\n__decorate([\n property({ reflect: true })\n], ButtonBase.prototype, \"value\", void 0);\n__decorate([\n property({ reflect: true })\n], ButtonBase.prototype, \"type\", void 0);\n__decorate([\n property({ reflect: true })\n], ButtonBase.prototype, \"form\", void 0);\n__decorate([\n property({ reflect: true, attribute: 'formaction' })\n], ButtonBase.prototype, \"formAction\", void 0);\n__decorate([\n property({ reflect: true, attribute: 'formenctype' })\n], ButtonBase.prototype, \"formEnctype\", void 0);\n__decorate([\n property({ reflect: true, attribute: 'formmethod' })\n], ButtonBase.prototype, \"formMethod\", void 0);\n__decorate([\n property({\n type: Boolean,\n reflect: true,\n converter: booleanConverter,\n attribute: 'formnovalidate',\n })\n], ButtonBase.prototype, \"formNoValidate\", void 0);\n__decorate([\n property({ reflect: true, attribute: 'formtarget' })\n], ButtonBase.prototype, \"formTarget\", void 0);\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const rippleMixin = require('./ripple-mixin-
|
|
3
|
+
const rippleMixin = require('./ripple-mixin-232f09c1.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
@@ -46,13 +46,7 @@ function defaultValue(propertyName = 'value') {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const style = rippleMixin.i `:host{display:inline-block;width:1em;height:1em;line-height:1;font-size:1.5rem}`;
|
|
50
|
-
|
|
51
|
-
const svgTag = (svgPaths) => rippleMixin.ke `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="currentColor">${rippleMixin.fe(svgPaths)}</svg>`;
|
|
52
|
-
|
|
53
49
|
exports.Ft = Ft;
|
|
54
50
|
exports.defaultValue =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AAiB;AACjB,aAAa;AACb,YAAY,wBAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAClE,SAAS,CAAC;AACV,KAAK,CAAC;AACN;;;;;","names":["e","i","t","rt","R","D","dt","isString","defaultConverter","isFunction"],"sources":["node_modules/lit-html/directives/live.js","node_modules/@mdui/shared/decorators/default-value.js"],"sourcesContent":["import{noChange as R,nothing as D}from\"../lit-html.js\";import{directive as e,Directive as i,PartType as t}from\"../directive.js\";import{isSingleExpression as rt,setCommittedValue as dt}from\"../directive-helpers.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const Ft=e(class extends i{constructor(r){if(super(r),r.type!==t.PROPERTY&&r.type!==t.ATTRIBUTE&&r.type!==t.BOOLEAN_ATTRIBUTE)throw Error(\"The `live` directive is not allowed on child or event bindings\");if(!rt(r))throw Error(\"`live` bindings can only contain a single expression\")}render(r){return r}update(r,[e]){if(e===R||e===D)return e;const i=r.element,n=r.name;if(r.type===t.PROPERTY){if(e===i[n])return R}else if(r.type===t.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(n))return R}else if(r.type===t.ATTRIBUTE&&i.getAttribute(n)===e+\"\")return R;return dt(r),e}});export{Ft as live};\n//# sourceMappingURL=live.js.map\n","/**\n * defaultValue 装饰器。在 attribute 属性变更时,若值和 property 值不一致,则会保存新的 attribute 值\n *\n * 用于在调用表单的 reset() 方法时,还原成初始值\n *\n * @property({ reflect: true }) value = '';\n * @defaultValue() defaultValue = '';\n *\n * @property({ type: Boolean, reflect: true }) checked = false;\n * @defaultValue('checked') defaultChecked = false;\n */\nimport { defaultConverter } from 'lit';\nimport { isFunction, isString } from '@mdui/jq/shared/helper.js';\n/**\n * @param propertyName 对应的属性名\n */\nexport function defaultValue(propertyName = 'value') {\n return (proto, key) => {\n const constructor = proto.constructor;\n const attributeChangedCallback = constructor.prototype.attributeChangedCallback;\n constructor.prototype.attributeChangedCallback = function (name, old, value) {\n const options = constructor.getPropertyOptions(propertyName);\n const attributeName = isString(options.attribute)\n ? options.attribute\n : propertyName;\n if (name === attributeName) {\n const converter = options.converter || defaultConverter;\n const fromAttribute = isFunction(converter)\n ? converter\n : converter?.fromAttribute ?? defaultConverter.fromAttribute;\n const newValue = fromAttribute(value, options.type);\n if (this[propertyName] !== newValue) {\n this[key] = newValue;\n }\n }\n attributeChangedCallback.call(this, name, old, value);\n };\n };\n}\n"],"version":3}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const rippleMixin = require('./ripple-mixin-232f09c1.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2018 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const to=t=>t??rippleMixin.D;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 使用该 WeakMap 来存储指定表单中所有的 mdui 表单控件
|
|
13
|
+
* 在每个表单控件的 hostConnected 中添加、hostDisconnected 中移除对应表单的 mdui 表单控件,
|
|
14
|
+
* 然后在 getFormControls 方法中就能获取到表单中所有的 mdui 表单控件
|
|
15
|
+
*/
|
|
16
|
+
const formCollections = new WeakMap();
|
|
17
|
+
/**
|
|
18
|
+
* 获取表单中的所有表单控件,包含原生和 mdui 表单控件
|
|
19
|
+
* 原生的 `HTMLFormElement.elements` 仅返回原生表单控件,不包含 mdui 表单控件
|
|
20
|
+
*/
|
|
21
|
+
const getFormControls = (form) => {
|
|
22
|
+
const nativeFormControls = [...form.elements];
|
|
23
|
+
const formControls = formCollections.get(form) || [];
|
|
24
|
+
const comparePosition = (a, b) => {
|
|
25
|
+
const position = a.compareDocumentPosition(b);
|
|
26
|
+
return position & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
27
|
+
};
|
|
28
|
+
// 按 DOM 元素的顺序排序
|
|
29
|
+
return [...nativeFormControls, ...formControls].sort(comparePosition);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 参考:https://github.com/shoelace-style/shoelace/blob/next/src/internal/form.ts
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* 在执行 `<form>` 元素的 reportValidity() 时,不会执行 mdui 组件的 reportValidity() 方法,
|
|
37
|
+
* 因此在 mdui 表单控件的 hostConnected 中把 `<form>` 的 reportValidity 替换为自定义方法,
|
|
38
|
+
* hostDisconnected 中恢复为 原生 reportValidity 方法
|
|
39
|
+
*
|
|
40
|
+
* 该 WeakMap 用于存储指定 `<form>` 的原生 reportValidity 方法
|
|
41
|
+
*
|
|
42
|
+
* 日后使用 ElementInternals 可不再进行该处理,但当前 safari 浏览器不支持。
|
|
43
|
+
*/
|
|
44
|
+
const reportValidityOverloads = new WeakMap();
|
|
45
|
+
/**
|
|
46
|
+
* 在执行表单的 reset() 方法后,使用该 WeakMap 存储指定表单中所有的表单控件
|
|
47
|
+
* 在表单控件中监听值变更后,需要从该 WeakMap 中判断是否存在该表单控件,
|
|
48
|
+
* 若存在,则 invalid 设置为 false(不显示验证不通过样式),同时从 WeakMap 中移除该表单控件
|
|
49
|
+
*/
|
|
50
|
+
const formResets = new WeakMap();
|
|
51
|
+
class FormController {
|
|
52
|
+
constructor(host, options) {
|
|
53
|
+
(this.host = host).addController(this);
|
|
54
|
+
this.definedController = new rippleMixin.DefinedController(host, {
|
|
55
|
+
needDomReady: true,
|
|
56
|
+
});
|
|
57
|
+
this.options = {
|
|
58
|
+
form: (control) => {
|
|
59
|
+
const formId = rippleMixin.$(control).attr('form');
|
|
60
|
+
if (formId) {
|
|
61
|
+
const root = control.getRootNode();
|
|
62
|
+
return root.getElementById(formId);
|
|
63
|
+
}
|
|
64
|
+
return control.closest('form');
|
|
65
|
+
},
|
|
66
|
+
name: (control) => control.name,
|
|
67
|
+
value: (control) => control.value,
|
|
68
|
+
defaultValue: (control) => control.defaultValue,
|
|
69
|
+
setValue: (control, value) => (control.value = value),
|
|
70
|
+
disabled: (control) => control.disabled,
|
|
71
|
+
reportValidity: (control) => rippleMixin.isFunction(control.reportValidity) ? control.reportValidity() : true,
|
|
72
|
+
...options,
|
|
73
|
+
};
|
|
74
|
+
this.onFormData = this.onFormData.bind(this);
|
|
75
|
+
this.onFormSubmit = this.onFormSubmit.bind(this);
|
|
76
|
+
this.onFormReset = this.onFormReset.bind(this);
|
|
77
|
+
this.reportFormValidity = this.reportFormValidity.bind(this);
|
|
78
|
+
}
|
|
79
|
+
hostConnected() {
|
|
80
|
+
this.definedController.whenDefined().then(() => {
|
|
81
|
+
this.form = this.options.form(this.host);
|
|
82
|
+
if (this.form) {
|
|
83
|
+
this.attachForm(this.form);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
hostDisconnected() {
|
|
88
|
+
this.detachForm();
|
|
89
|
+
}
|
|
90
|
+
hostUpdated() {
|
|
91
|
+
this.definedController.whenDefined().then(() => {
|
|
92
|
+
const form = this.options.form(this.host);
|
|
93
|
+
if (!form) {
|
|
94
|
+
this.detachForm();
|
|
95
|
+
}
|
|
96
|
+
if (form && this.form !== form) {
|
|
97
|
+
this.detachForm();
|
|
98
|
+
this.attachForm(form);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 获取当前表单控件关联的 `<form>` 元素
|
|
104
|
+
*/
|
|
105
|
+
getForm() {
|
|
106
|
+
return this.form ?? null;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* 重置整个表单,所有表单控件恢复成默认值
|
|
110
|
+
*/
|
|
111
|
+
reset(invoker) {
|
|
112
|
+
this.doAction('reset', invoker);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* 提交整个表单
|
|
116
|
+
*/
|
|
117
|
+
submit(invoker) {
|
|
118
|
+
this.doAction('submit', invoker);
|
|
119
|
+
}
|
|
120
|
+
attachForm(form) {
|
|
121
|
+
if (!form) {
|
|
122
|
+
this.form = undefined;
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
this.form = form;
|
|
126
|
+
if (formCollections.has(this.form)) {
|
|
127
|
+
formCollections.get(this.form).add(this.host);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
formCollections.set(this.form, new Set([this.host]));
|
|
131
|
+
}
|
|
132
|
+
this.form.addEventListener('formdata', this.onFormData);
|
|
133
|
+
this.form.addEventListener('submit', this.onFormSubmit);
|
|
134
|
+
this.form.addEventListener('reset', this.onFormReset);
|
|
135
|
+
if (!reportValidityOverloads.has(this.form)) {
|
|
136
|
+
reportValidityOverloads.set(this.form, this.form.reportValidity);
|
|
137
|
+
this.form.reportValidity = () => this.reportFormValidity();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
detachForm() {
|
|
141
|
+
if (this.form) {
|
|
142
|
+
formCollections.get(this.form).delete(this.host);
|
|
143
|
+
this.form.removeEventListener('formdata', this.onFormData);
|
|
144
|
+
this.form.removeEventListener('submit', this.onFormSubmit);
|
|
145
|
+
this.form.removeEventListener('reset', this.onFormReset);
|
|
146
|
+
if (reportValidityOverloads.has(this.form) &&
|
|
147
|
+
!formCollections.get(this.form).size) {
|
|
148
|
+
this.form.reportValidity = reportValidityOverloads.get(this.form);
|
|
149
|
+
reportValidityOverloads.delete(this.form);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
doAction(type, invoker) {
|
|
154
|
+
if (!this.form) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const $button = rippleMixin.$(`<button type="${type}">`).css({
|
|
158
|
+
position: 'absolute',
|
|
159
|
+
width: 0,
|
|
160
|
+
height: 0,
|
|
161
|
+
clipPath: 'inset(50%)',
|
|
162
|
+
overflow: 'hidden',
|
|
163
|
+
whiteSpace: 'nowrap',
|
|
164
|
+
});
|
|
165
|
+
const button = $button[0];
|
|
166
|
+
if (invoker) {
|
|
167
|
+
button.name = invoker.name;
|
|
168
|
+
button.value = invoker.value;
|
|
169
|
+
[
|
|
170
|
+
'formaction',
|
|
171
|
+
'formenctype',
|
|
172
|
+
'formmethod',
|
|
173
|
+
'formnovalidate',
|
|
174
|
+
'formtarget',
|
|
175
|
+
].forEach((attr) => {
|
|
176
|
+
$button.attr(attr, rippleMixin.$(invoker).attr(attr));
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
this.form.append(button);
|
|
180
|
+
button.click();
|
|
181
|
+
button.remove();
|
|
182
|
+
}
|
|
183
|
+
onFormData(event) {
|
|
184
|
+
const disabled = this.options.disabled(this.host);
|
|
185
|
+
const name = this.options.name(this.host);
|
|
186
|
+
const value = this.options.value(this.host);
|
|
187
|
+
// 对于按钮,仅在 type="submit" 时,才提交值。已在 doAction() 方法中把 name、value 注入到 <button> 元素上
|
|
188
|
+
const isButton = [
|
|
189
|
+
'mdui-button',
|
|
190
|
+
'mdui-button-icon',
|
|
191
|
+
'mdui-chip',
|
|
192
|
+
'mdui-fab',
|
|
193
|
+
'mdui-segmented-button',
|
|
194
|
+
].includes(this.host.tagName.toLowerCase());
|
|
195
|
+
if (!disabled &&
|
|
196
|
+
!isButton &&
|
|
197
|
+
rippleMixin.isString(name) &&
|
|
198
|
+
name &&
|
|
199
|
+
!rippleMixin.isUndefined(value)) {
|
|
200
|
+
if (Array.isArray(value)) {
|
|
201
|
+
value.forEach((val) => {
|
|
202
|
+
event.formData.append(name, val.toString());
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
event.formData.append(name, value.toString());
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
// todo: 当前组件进行验证的顺序,取决于组件的注册顺序,而不会按在 DOM 中的顺序从上到下验证。如何按 DOM 顺序验证?
|
|
211
|
+
onFormSubmit(event) {
|
|
212
|
+
const disabled = this.options.disabled(this.host);
|
|
213
|
+
const reportValidity = this.options.reportValidity;
|
|
214
|
+
if (this.form &&
|
|
215
|
+
!this.form.noValidate &&
|
|
216
|
+
!disabled &&
|
|
217
|
+
!reportValidity(this.host)) {
|
|
218
|
+
event.preventDefault();
|
|
219
|
+
event.stopImmediatePropagation();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
onFormReset() {
|
|
223
|
+
if (this.form) {
|
|
224
|
+
this.options.setValue(this.host, this.options.defaultValue(this.host));
|
|
225
|
+
// 取消 invalid 状态。
|
|
226
|
+
// 此外,还需要在各个组件内,监听值的变更,判断 formResets 中是否存在当前表单控件。若存在则 invalid 设为 false;不存在则设置为 checkValidity() 的值
|
|
227
|
+
// @ts-ignore
|
|
228
|
+
this.host.invalid = false;
|
|
229
|
+
if (formResets.has(this.form)) {
|
|
230
|
+
formResets.get(this.form).add(this.host);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
formResets.set(this.form, new Set([this.host]));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
reportFormValidity() {
|
|
238
|
+
if (this.form && !this.form.noValidate) {
|
|
239
|
+
const elements = getFormControls(this.form);
|
|
240
|
+
for (const element of elements) {
|
|
241
|
+
if (rippleMixin.isFunction(element.reportValidity) && !element.reportValidity()) {
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
exports.FormController = FormController;
|
|
251
|
+
exports.formResets = formResets;
|
|
252
|
+
exports.to = to;
|
|
253
|
+
|
|
254
|
+
//# sourceMappingURL=form-f69797f6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"form-f69797f6.js","mappings":";;;;AACA;AACA;AACA;AACA;AACA,GAAQ,MAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAEA;;ACLlB;AACA;AACA;AACA;AACA;AACO,MAAM,eAAe,GAAG,IAAI,OAAO,EAAE,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IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;AACtC,YAAY,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAC3C,gBAAgB,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzD,aAAa;AACb,iBAAiB;AACjB,gBAAgB,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAChE,aAAa;AACb,SAAS;AACT,KAAK;AACL,IAAI,kBAAkB,GAAG;AACzB,QAAQ,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;AAChD,YAAY,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxD,YAAY,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;AAC5C,gBAAgB,IAAIF,sBAAU,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE;AACrF,oBAAoB,OAAO,KAAK,CAAC;AACjC,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK;AACL;;;;;;","names":["D","DefinedController","$","isFunction","isString","isUndefined"],"sources":["node_modules/lit-html/directives/if-defined.js","node_modules/@mdui/jq/shared/form.js","node_modules/@mdui/shared/controllers/form.js"],"sourcesContent":["import{nothing as D}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const to=t=>t??D;export{to as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","/**\n * 使用该 WeakMap 来存储指定表单中所有的 mdui 表单控件\n * 在每个表单控件的 hostConnected 中添加、hostDisconnected 中移除对应表单的 mdui 表单控件,\n * 然后在 getFormControls 方法中就能获取到表单中所有的 mdui 表单控件\n */\nexport const formCollections = new WeakMap();\n/**\n * 获取表单中的所有表单控件,包含原生和 mdui 表单控件\n * 原生的 `HTMLFormElement.elements` 仅返回原生表单控件,不包含 mdui 表单控件\n */\nexport const getFormControls = (form) => {\n const nativeFormControls = [...form.elements];\n const formControls = formCollections.get(form) || [];\n const comparePosition = (a, b) => {\n const position = a.compareDocumentPosition(b);\n return position & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n };\n // 按 DOM 元素的顺序排序\n return [...nativeFormControls, ...formControls].sort(comparePosition);\n};\n","/**\n * 参考:https://github.com/shoelace-style/shoelace/blob/next/src/internal/form.ts\n */\nimport { $ } from '@mdui/jq/$.js';\nimport '@mdui/jq/methods/attr.js';\nimport '@mdui/jq/methods/css.js';\nimport { formCollections, getFormControls } from '@mdui/jq/shared/form.js';\nimport { isFunction, isString, isUndefined } from '@mdui/jq/shared/helper.js';\nimport { DefinedController } from './defined.js';\n/**\n * 在执行 `<form>` 元素的 reportValidity() 时,不会执行 mdui 组件的 reportValidity() 方法,\n * 因此在 mdui 表单控件的 hostConnected 中把 `<form>` 的 reportValidity 替换为自定义方法,\n * hostDisconnected 中恢复为 原生 reportValidity 方法\n *\n * 该 WeakMap 用于存储指定 `<form>` 的原生 reportValidity 方法\n *\n * 日后使用 ElementInternals 可不再进行该处理,但当前 safari 浏览器不支持。\n */\nconst reportValidityOverloads = new WeakMap();\n/**\n * 在执行表单的 reset() 方法后,使用该 WeakMap 存储指定表单中所有的表单控件\n * 在表单控件中监听值变更后,需要从该 WeakMap 中判断是否存在该表单控件,\n * 若存在,则 invalid 设置为 false(不显示验证不通过样式),同时从 WeakMap 中移除该表单控件\n */\nexport const formResets = new WeakMap();\nexport class FormController {\n constructor(host, options) {\n (this.host = host).addController(this);\n this.definedController = new DefinedController(host, {\n needDomReady: true,\n });\n this.options = {\n form: (control) => {\n const formId = $(control).attr('form');\n if (formId) {\n const root = control.getRootNode();\n return root.getElementById(formId);\n }\n return control.closest('form');\n },\n name: (control) => control.name,\n value: (control) => control.value,\n defaultValue: (control) => control.defaultValue,\n setValue: (control, value) => (control.value = value),\n disabled: (control) => control.disabled,\n reportValidity: (control) => isFunction(control.reportValidity) ? control.reportValidity() : true,\n ...options,\n };\n this.onFormData = this.onFormData.bind(this);\n this.onFormSubmit = this.onFormSubmit.bind(this);\n this.onFormReset = this.onFormReset.bind(this);\n this.reportFormValidity = this.reportFormValidity.bind(this);\n }\n hostConnected() {\n this.definedController.whenDefined().then(() => {\n this.form = this.options.form(this.host);\n if (this.form) {\n this.attachForm(this.form);\n }\n });\n }\n hostDisconnected() {\n this.detachForm();\n }\n hostUpdated() {\n this.definedController.whenDefined().then(() => {\n const form = this.options.form(this.host);\n if (!form) {\n this.detachForm();\n }\n if (form && this.form !== form) {\n this.detachForm();\n this.attachForm(form);\n }\n });\n }\n /**\n * 获取当前表单控件关联的 `<form>` 元素\n */\n getForm() {\n return this.form ?? null;\n }\n /**\n * 重置整个表单,所有表单控件恢复成默认值\n */\n reset(invoker) {\n this.doAction('reset', invoker);\n }\n /**\n * 提交整个表单\n */\n submit(invoker) {\n this.doAction('submit', invoker);\n }\n attachForm(form) {\n if (!form) {\n this.form = undefined;\n return;\n }\n this.form = form;\n if (formCollections.has(this.form)) {\n formCollections.get(this.form).add(this.host);\n }\n else {\n formCollections.set(this.form, new Set([this.host]));\n }\n this.form.addEventListener('formdata', this.onFormData);\n this.form.addEventListener('submit', this.onFormSubmit);\n this.form.addEventListener('reset', this.onFormReset);\n if (!reportValidityOverloads.has(this.form)) {\n reportValidityOverloads.set(this.form, this.form.reportValidity);\n this.form.reportValidity = () => this.reportFormValidity();\n }\n }\n detachForm() {\n if (this.form) {\n formCollections.get(this.form).delete(this.host);\n this.form.removeEventListener('formdata', this.onFormData);\n this.form.removeEventListener('submit', this.onFormSubmit);\n this.form.removeEventListener('reset', this.onFormReset);\n if (reportValidityOverloads.has(this.form) &&\n !formCollections.get(this.form).size) {\n this.form.reportValidity = reportValidityOverloads.get(this.form);\n reportValidityOverloads.delete(this.form);\n }\n }\n }\n doAction(type, invoker) {\n if (!this.form) {\n return;\n }\n const $button = $(`<button type=\"${type}\">`).css({\n position: 'absolute',\n width: 0,\n height: 0,\n clipPath: 'inset(50%)',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n });\n const button = $button[0];\n if (invoker) {\n button.name = invoker.name;\n button.value = invoker.value;\n [\n 'formaction',\n 'formenctype',\n 'formmethod',\n 'formnovalidate',\n 'formtarget',\n ].forEach((attr) => {\n $button.attr(attr, $(invoker).attr(attr));\n });\n }\n this.form.append(button);\n button.click();\n button.remove();\n }\n onFormData(event) {\n const disabled = this.options.disabled(this.host);\n const name = this.options.name(this.host);\n const value = this.options.value(this.host);\n // 对于按钮,仅在 type=\"submit\" 时,才提交值。已在 doAction() 方法中把 name、value 注入到 <button> 元素上\n const isButton = [\n 'mdui-button',\n 'mdui-button-icon',\n 'mdui-chip',\n 'mdui-fab',\n 'mdui-segmented-button',\n ].includes(this.host.tagName.toLowerCase());\n if (!disabled &&\n !isButton &&\n isString(name) &&\n name &&\n !isUndefined(value)) {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n event.formData.append(name, val.toString());\n });\n }\n else {\n event.formData.append(name, value.toString());\n }\n }\n }\n // todo: 当前组件进行验证的顺序,取决于组件的注册顺序,而不会按在 DOM 中的顺序从上到下验证。如何按 DOM 顺序验证?\n onFormSubmit(event) {\n const disabled = this.options.disabled(this.host);\n const reportValidity = this.options.reportValidity;\n if (this.form &&\n !this.form.noValidate &&\n !disabled &&\n !reportValidity(this.host)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n onFormReset() {\n if (this.form) {\n this.options.setValue(this.host, this.options.defaultValue(this.host));\n // 取消 invalid 状态。\n // 此外,还需要在各个组件内,监听值的变更,判断 formResets 中是否存在当前表单控件。若存在则 invalid 设为 false;不存在则设置为 checkValidity() 的值\n // @ts-ignore\n this.host.invalid = false;\n if (formResets.has(this.form)) {\n formResets.get(this.form).add(this.host);\n }\n else {\n formResets.set(this.form, new Set([this.host]));\n }\n }\n }\n reportFormValidity() {\n if (this.form && !this.form.noValidate) {\n const elements = getFormControls(this.form);\n for (const element of elements) {\n if (isFunction(element.reportValidity) && !element.reportValidity()) {\n return false;\n }\n }\n }\n return true;\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const rippleMixin = require('./ripple-mixin-
|
|
4
|
-
const
|
|
3
|
+
const rippleMixin = require('./ripple-mixin-232f09c1.js');
|
|
4
|
+
const template = require('./template-8782a890.js');
|
|
5
|
+
const buttonBase = require('./button-base-b9495438.js');
|
|
5
6
|
|
|
6
7
|
const style = rippleMixin.i `:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);min-width:3rem;height:2.5rem;color:rgb(var(--mdui-color-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{width:100%;padding:0 1rem}:host([full-width]){display:block}:host([variant=elevated]){box-shadow:var(--mdui-elevation-level1);background-color:rgb(var(--mdui-color-surface-container-low));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
|
|
7
8
|
--mdui-color-on-secondary-container
|
|
@@ -73,7 +74,7 @@ let Button = class Button extends buttonBase.ButtonBase {
|
|
|
73
74
|
}
|
|
74
75
|
return rippleMixin.ke `<slot name="icon" part="icon" class="icon">${this.icon
|
|
75
76
|
? rippleMixin.ke `<mdui-icon name="${this.icon}"></mdui-icon>`
|
|
76
|
-
:
|
|
77
|
+
: template.nothingTemplate}</slot>`;
|
|
77
78
|
}
|
|
78
79
|
renderLabel() {
|
|
79
80
|
return rippleMixin.ke `<slot part="label" class="label"></slot>`;
|
|
@@ -81,7 +82,7 @@ let Button = class Button extends buttonBase.ButtonBase {
|
|
|
81
82
|
renderEndIcon() {
|
|
82
83
|
return rippleMixin.ke `<slot name="end-icon" part="end-icon" class="end-icon">${this.endIcon
|
|
83
84
|
? rippleMixin.ke `<mdui-icon name="${this.endIcon}"></mdui-icon>`
|
|
84
|
-
:
|
|
85
|
+
: template.nothingTemplate}</slot>`;
|
|
85
86
|
}
|
|
86
87
|
renderInner() {
|
|
87
88
|
return [this.renderIcon(), this.renderLabel(), this.renderEndIcon()];
|
|
@@ -109,4 +110,4 @@ Button = rippleMixin.__decorate([
|
|
|
109
110
|
rippleMixin.t('mdui-button')
|
|
110
111
|
], Button);
|
|
111
112
|
|
|
112
|
-
//# sourceMappingURL=index-
|
|
113
|
+
//# sourceMappingURL=index-1b96a6de.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"index-1b96a6de.js","mappings":";;;;;;AACO,MAAM,KAAK,GAAGA,aAAG,CAAC,CAAC;AAC1B;AACA,i9CAAi9C,CAAC;;ACMl9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,GAAG,MAAM,MAAM,SAASC,qBAAU,CAAC;AAC7C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ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AE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AACrCD,sBAAU,CAAC;AACX,IAAIC,aAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AACtD,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;AACxC,MAAM,GAAGD,sBAAU,CAAC;AACpB,IAAIG,aAAa,CAAC,aAAa,CAAC;AAChC,CAAC,EAAE,MAAM,CAAC;;","names":["css","ButtonBase","createRef","html","ref","nothingTemplate","__decorate","property","booleanConverter","customElement"],"sources":["node_modules/mdui/components/button/style.js","node_modules/mdui/components/button/index.js"],"sourcesContent":["import { css } from 'lit';\nexport const style = css `:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);min-width:3rem;height:2.5rem;color:rgb(var(--mdui-color-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{width:100%;padding:0 1rem}:host([full-width]){display:block}:host([variant=elevated]){box-shadow:var(--mdui-elevation-level1);background-color:rgb(var(--mdui-color-surface-container-low));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(\n --mdui-color-on-secondary-container\n )}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=text]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=outlined][focus-visible]){border-color:rgb(var(--mdui-color-primary))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=tonal][hover]){box-shadow:var(--mdui-elevation-level1)}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([variant=elevated][disabled]),:host([variant=filled][disabled]),:host([variant=tonal][disabled]){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([variant=outlined][disabled]){border-color:rgba(var(--mdui-color-on-surface),12%)}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon{display:inline-flex;font-size:1.28571429em}.end-icon mdui-icon,.icon mdui-icon,::slotted([slot=end-icon]),::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([variant=filled]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([variant=tonal]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;\n","import { __decorate } from \"tslib\";\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { booleanConverter } from '@mdui/shared/helpers/decorator.js';\nimport { nothingTemplate } from '@mdui/shared/helpers/template.js';\nimport '../icon.js';\nimport { ButtonBase } from './button-base.js';\nimport { style } from './style.js';\n/**\n * @summary 按钮组件\n *\n * ```html\n * <mdui-button>Button</mdui-button>\n * ```\n *\n * @event focus - 获得焦点时触发\n * @event blur - 失去焦点时触发\n * @event invalid - 表单字段验证未通过时触发\n *\n * @slot - 按钮的文本\n * @slot icon - 按钮左侧的元素\n * @slot end-icon - 按钮右侧的元素\n *\n * @csspart button - 内部的 `<button>` 或 `<a>` 元素\n * @csspart label - 按钮的文本\n * @csspart icon - 按钮左侧的图标\n * @csspart end-icon - 按钮右侧的图标\n * @csspart loading - 加载中状态的 `<mdui-circular-progress>` 元素\n *\n * @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)\n */\nlet Button = class Button extends ButtonBase {\n constructor() {\n super(...arguments);\n /**\n * 按钮的形状。可选值包括:\n *\n * * `elevated`:带阴影的按钮,适用于需要将按钮与背景视觉分离的场景\n * * `filled`:视觉效果强烈,适用于重要流程的最终操作,如“保存”、“确认”等\n * * `tonal`:视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作,如流程中的“下一步”\n * * `outlined`:带边框的按钮,适用于中等优先级,且次要的操作,如“返回”\n * * `text`:文本按钮,适用于最低优先级的操作\n */\n this.variant = 'filled';\n /**\n * 是否填满父元素宽度\n */\n this.fullWidth = false;\n this.rippleRef = createRef();\n }\n get rippleElement() {\n return this.rippleRef.value;\n }\n render() {\n return html `<mdui-ripple ${ref(this.rippleRef)} .noRipple=\"${this.noRipple}\"></mdui-ripple>${this.isButton()\n ? this.renderButton({\n className: 'button',\n part: 'button',\n content: this.renderInner(),\n })\n : this.disabled || this.loading\n ? html `<span part=\"button\" class=\"button _a\">${this.renderInner()}</span>`\n : this.renderAnchor({\n className: 'button',\n part: 'button',\n content: this.renderInner(),\n })}`;\n }\n renderIcon() {\n if (this.loading) {\n return this.renderLoading();\n }\n return html `<slot name=\"icon\" part=\"icon\" class=\"icon\">${this.icon\n ? html `<mdui-icon name=\"${this.icon}\"></mdui-icon>`\n : nothingTemplate}</slot>`;\n }\n renderLabel() {\n return html `<slot part=\"label\" class=\"label\"></slot>`;\n }\n renderEndIcon() {\n return html `<slot name=\"end-icon\" part=\"end-icon\" class=\"end-icon\">${this.endIcon\n ? html `<mdui-icon name=\"${this.endIcon}\"></mdui-icon>`\n : nothingTemplate}</slot>`;\n }\n renderInner() {\n return [this.renderIcon(), this.renderLabel(), this.renderEndIcon()];\n }\n};\nButton.styles = [ButtonBase.styles, style];\n__decorate([\n property({ reflect: true })\n], Button.prototype, \"variant\", void 0);\n__decorate([\n property({\n type: Boolean,\n reflect: true,\n converter: booleanConverter,\n attribute: 'full-width',\n })\n], Button.prototype, \"fullWidth\", void 0);\n__decorate([\n property({ reflect: true })\n], Button.prototype, \"icon\", void 0);\n__decorate([\n property({ reflect: true, attribute: 'end-icon' })\n], Button.prototype, \"endIcon\", void 0);\nButton = __decorate([\n customElement('mdui-button')\n], Button);\nexport { Button };\n"],"version":3}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const rippleMixin = require('./ripple-mixin-
|
|
3
|
+
const rippleMixin = require('./ripple-mixin-232f09c1.js');
|
|
4
4
|
const watch = require('./watch-fc873d99.js');
|
|
5
|
-
const
|
|
5
|
+
const template = require('./template-8782a890.js');
|
|
6
|
+
const buttonBase = require('./button-base-b9495438.js');
|
|
6
7
|
|
|
7
8
|
const style = rippleMixin.i `:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;font-size:1.5rem;width:2.5rem;height:2.5rem}:host([variant=standard]){color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=filled]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined][pressed]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([variant=standard][selected]){color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]:not([selectable])),:host([variant=filled][selected]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]:not([selectable])),:host([variant=tonal][selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
|
|
8
9
|
--mdui-color-on-secondary-container
|
|
@@ -88,7 +89,7 @@ let ButtonIcon = class ButtonIcon extends buttonBase.ButtonBase {
|
|
|
88
89
|
? rippleMixin.ke `<slot></slot>`
|
|
89
90
|
: this.icon
|
|
90
91
|
? rippleMixin.ke `<mdui-icon part="icon" class="icon" name="${this.icon}"></mdui-icon>`
|
|
91
|
-
:
|
|
92
|
+
: template.nothingTemplate;
|
|
92
93
|
const selectedIcon = () => this.hasSlotController.test('selected-icon') || this.selectedIcon
|
|
93
94
|
? rippleMixin.ke `<slot name="selected-icon" part="selected-icon" class="selected-icon"><mdui-icon name="${this.selectedIcon}"></mdui-icon></slot>`
|
|
94
95
|
: icon();
|
|
@@ -126,4 +127,4 @@ ButtonIcon = rippleMixin.__decorate([
|
|
|
126
127
|
rippleMixin.t('mdui-button-icon')
|
|
127
128
|
], ButtonIcon);
|
|
128
129
|
|
|
129
|
-
//# sourceMappingURL=index-
|
|
130
|
+
//# sourceMappingURL=index-2b44aeb3.js.map
|