@mdui/shared 1.0.4 → 1.0.6
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/helpers/motion.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ import '@mdui/jq/methods/css.js';
|
|
|
4
4
|
* @param element 在指定元素上获取值;若需要获取全局值,则传入 document.body
|
|
5
5
|
* @param name 缓动曲线名称
|
|
6
6
|
*/
|
|
7
|
-
export declare const getEasing: (element: HTMLElement, name:
|
|
7
|
+
export declare const getEasing: (element: HTMLElement, name: "linear" | "standard" | "standard-accelerate" | "standard-decelerate" | "emphasized" | "emphasized-accelerate" | "emphasized-decelerate") => string;
|
|
8
8
|
/**
|
|
9
9
|
* 获取由 CSS 变量定义的动画持续时间
|
|
10
10
|
* @param element 在指定元素上获取值;若需要获取全局值,则传入 document.body
|
|
11
11
|
* @param name 持续时间名称
|
|
12
12
|
*/
|
|
13
|
-
export declare const getDuration: (element: HTMLElement, name:
|
|
13
|
+
export declare const getDuration: (element: HTMLElement, name: "short1" | "short2" | "short3" | "short4" | "medium1" | "medium2" | "medium3" | "medium4" | "long1" | "long2" | "long3" | "long4" | "extra-long1" | "extra-long2" | "extra-long3" | "extra-long4") => number;
|
package/mixins/anchor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nothing } from 'lit';
|
|
2
|
-
import type { Constructor } from '@
|
|
2
|
+
import type { Constructor } from '@lit/reactive-element/decorators/base.js';
|
|
3
3
|
import type { LitElement, TemplateResult } from 'lit';
|
|
4
4
|
import type { DirectiveResult } from 'lit/directive.js';
|
|
5
5
|
import type { RefDirective } from 'lit/directives/ref.js';
|
package/mixins/focusable.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import '@mdui/jq/methods/attr.js';
|
|
|
2
2
|
import '@mdui/jq/methods/css.js';
|
|
3
3
|
import '@mdui/jq/methods/each.js';
|
|
4
4
|
import '@mdui/jq/methods/removeAttr.js';
|
|
5
|
-
import type { Constructor } from '@
|
|
5
|
+
import type { Constructor } from '@lit/reactive-element/decorators/base.js';
|
|
6
6
|
import type { LitElement } from 'lit';
|
|
7
7
|
export declare class FocusableMixinInterface {
|
|
8
8
|
autofocus: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@mdui/jq/methods/css.js';
|
|
2
2
|
import { DefinedController } from '../controllers/defined.js';
|
|
3
|
+
import type { Constructor } from '@lit/reactive-element/decorators/base.js';
|
|
3
4
|
import type { JQ } from '@mdui/jq/shared/core.js';
|
|
4
|
-
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
5
5
|
import type { LitElement } from 'lit';
|
|
6
6
|
type ScrollBehavior = 'hide' | 'shrink' | 'elevate';
|
|
7
7
|
export type ScrollPaddingPosition = 'top' | 'bottom';
|
package/mixins/scrollBehavior.js
CHANGED
|
@@ -48,7 +48,6 @@ export const ScrollBehaviorMixin = (superclass) => {
|
|
|
48
48
|
if ((oldValue && !newValue) || (!oldValue && newValue)) {
|
|
49
49
|
this.updateContainerPadding();
|
|
50
50
|
}
|
|
51
|
-
// @ts-ignore
|
|
52
51
|
if (!this.scrollBehavior) {
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
@@ -72,7 +71,6 @@ export const ScrollBehaviorMixin = (superclass) => {
|
|
|
72
71
|
if (!listening) {
|
|
73
72
|
return;
|
|
74
73
|
}
|
|
75
|
-
// @ts-ignore
|
|
76
74
|
if (this.scrollBehavior) {
|
|
77
75
|
this.updateScrollTop(listening);
|
|
78
76
|
listening.addEventListener('scroll', this.onListeningScroll);
|
|
@@ -100,7 +98,6 @@ export const ScrollBehaviorMixin = (superclass) => {
|
|
|
100
98
|
* @param behavior 为数组时,只要其中一个行为在 scrollBehavior 中,即返回 `true`
|
|
101
99
|
*/
|
|
102
100
|
hasScrollBehavior(behavior) {
|
|
103
|
-
// @ts-ignore
|
|
104
101
|
const behaviors = (this.scrollBehavior?.split(' ') ??
|
|
105
102
|
[]);
|
|
106
103
|
if (Array.isArray(behavior)) {
|
|
@@ -196,6 +193,9 @@ export const ScrollBehaviorMixin = (superclass) => {
|
|
|
196
193
|
__decorate([
|
|
197
194
|
property({ attribute: 'scroll-target' })
|
|
198
195
|
], ScrollBehaviorMixinClass.prototype, "scrollTarget", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
property({ reflect: true, attribute: 'scroll-behavior' })
|
|
198
|
+
], ScrollBehaviorMixinClass.prototype, "scrollBehavior", void 0);
|
|
199
199
|
__decorate([
|
|
200
200
|
property({ type: Number, reflect: true, attribute: 'scroll-threshold' })
|
|
201
201
|
], ScrollBehaviorMixinClass.prototype, "scrollThreshold", void 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdui/shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "mdui 项目的公共部分",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/zdhxiong/mdui#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@
|
|
31
|
-
"lit": "^3.
|
|
30
|
+
"@lit/reactive-element": "^2.0.4",
|
|
31
|
+
"lit": "^3.1.4",
|
|
32
32
|
"ssr-window": "^4.0.2",
|
|
33
|
-
"tslib": "^2.6.
|
|
34
|
-
"@mdui/jq": "^3.0.
|
|
33
|
+
"tslib": "^2.6.3",
|
|
34
|
+
"@mdui/jq": "^3.0.2"
|
|
35
35
|
}
|
|
36
36
|
}
|