@mdui/shared 1.0.5 → 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.
@@ -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: 'linear' | 'standard' | 'standard-accelerate' | 'standard-decelerate' | 'emphasized' | 'emphasized-accelerate' | 'emphasized-decelerate') => string;
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: 'short1' | 'short2' | 'short3' | 'short4' | 'medium1' | 'medium2' | 'medium3' | 'medium4' | 'long1' | 'long2' | 'long3' | 'long4' | 'extra-long1' | 'extra-long2' | 'extra-long3' | 'extra-long4') => number;
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;
@@ -1,10 +1,2 @@
1
1
  import { css } from 'lit';
2
- export const style = css `
3
- :host {
4
- display: inline-block;
5
- width: 1em;
6
- height: 1em;
7
- line-height: 1;
8
- font-size: 1.5rem;
9
- }
10
- `;
2
+ export const style = css `:host{display:inline-block;width:1em;height:1em;line-height:1;font-size:1.5rem}`;
@@ -1,11 +1,3 @@
1
1
  import { html } from 'lit';
2
2
  import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
3
- export const svgTag = (svgPaths) => html `<svg
4
- xmlns="http://www.w3.org/2000/svg"
5
- width="100%"
6
- height="100%"
7
- viewBox="0 0 24 24"
8
- fill="currentColor"
9
- >
10
- ${unsafeSVG(svgPaths)}
11
- </svg>`;
3
+ export const svgTag = (svgPaths) => html `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="currentColor">${unsafeSVG(svgPaths)}</svg>`;
@@ -1,20 +1,2 @@
1
1
  import { css } from 'lit';
2
- export const componentStyle = css `
3
- :host {
4
- box-sizing: border-box;
5
- }
6
- :host *,
7
- :host *::before,
8
- :host *::after {
9
- box-sizing: inherit;
10
- }
11
- :host(:focus),
12
- :host(:focus-visible),
13
- :host *:focus,
14
- :host *:focus-visible {
15
- outline: none;
16
- }
17
- [hidden] {
18
- display: none !important;
19
- }
20
- `;
2
+ export const componentStyle = css `:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}:host :focus,:host :focus-visible,:host(:focus),:host(:focus-visible){outline:0}[hidden]{display:none!important}`;
@@ -1,5 +1,5 @@
1
1
  import { nothing } from 'lit';
2
- import type { Constructor } from '@open-wc/dedupe-mixin';
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/anchor.js CHANGED
@@ -5,19 +5,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
5
5
  export const AnchorMixin = (superclass) => {
6
6
  class AnchorMixinClass extends superclass {
7
7
  renderAnchor({ id, className, part, content = html `<slot></slot>`, refDirective, tabIndex, }) {
8
- return html `<a
9
- ${refDirective}
10
- id=${ifDefined(id)}
11
- class="_a ${className ? className : ''}"
12
- part=${ifDefined(part)}
13
- href=${ifDefined(this.href)}
14
- download=${ifDefined(this.download)}
15
- target=${ifDefined(this.target)}
16
- rel=${ifDefined(this.rel)}
17
- tabindex=${ifDefined(tabIndex)}
18
- >
19
- ${content}
20
- </a>`;
8
+ 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>`;
21
9
  }
22
10
  }
23
11
  __decorate([
@@ -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 '@open-wc/dedupe-mixin';
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdui/shared",
3
- "version": "1.0.5",
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
- "@open-wc/dedupe-mixin": "^1.4.0",
31
- "lit": "^3.0.0",
30
+ "@lit/reactive-element": "^2.0.4",
31
+ "lit": "^3.1.4",
32
32
  "ssr-window": "^4.0.2",
33
- "tslib": "^2.6.2",
34
- "@mdui/jq": "^3.0.1"
33
+ "tslib": "^2.6.3",
34
+ "@mdui/jq": "^3.0.2"
35
35
  }
36
36
  }