mdui 2.1.4 → 2.1.5
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/README.md +49 -49
- package/components/avatar/index.d.ts +2 -2
- package/components/avatar/index.js +1 -1
- package/components/badge/index.d.ts +1 -1
- package/components/badge/index.js +1 -1
- package/components/bottom-app-bar/index.d.ts +2 -2
- package/components/bottom-app-bar/index.js +2 -2
- package/components/bottom-app-bar/style.js +1 -1
- package/components/button/index.d.ts +1 -1
- package/components/button/index.js +1 -1
- package/components/button/style.js +1 -1
- package/components/button-icon/index.d.ts +1 -1
- package/components/button-icon/index.js +3 -2
- package/components/card/index.d.ts +1 -1
- package/components/card/index.js +1 -1
- package/components/checkbox/index.d.ts +4 -4
- package/components/checkbox/index.js +4 -4
- package/components/chip/index.d.ts +8 -8
- package/components/chip/index.js +8 -8
- package/components/circular-progress/index.d.ts +3 -3
- package/components/circular-progress/index.js +2 -2
- package/components/collapse/collapse-item.d.ts +1 -1
- package/components/dialog/index.d.ts +1 -1
- package/components/dialog/index.js +1 -1
- package/components/divider/index.d.ts +2 -2
- package/components/divider/index.js +2 -2
- package/components/dropdown/index.d.ts +2 -2
- package/components/dropdown/index.js +10 -3
- package/components/fab/index.d.ts +3 -3
- package/components/fab/index.js +3 -3
- package/components/layout/layout-item-base.d.ts +1 -1
- package/components/layout/layout.d.ts +1 -1
- package/components/layout/layout.js +1 -1
- package/components/linear-progress/index.d.ts +4 -4
- package/components/linear-progress/index.js +3 -3
- package/components/list/list-item.d.ts +4 -4
- package/components/list/list-item.js +4 -4
- package/components/menu/menu-item.d.ts +2 -2
- package/components/menu/menu-item.js +4 -3
- package/components/menu/menu.d.ts +2 -2
- package/components/menu/menu.js +2 -3
- package/components/navigation-bar/navigation-bar-item.d.ts +1 -1
- package/components/navigation-bar/navigation-bar-item.js +1 -1
- package/components/navigation-bar/navigation-bar-style.js +1 -1
- package/components/navigation-bar/navigation-bar.d.ts +1 -1
- package/components/navigation-bar/navigation-bar.js +1 -1
- package/components/navigation-drawer/index.d.ts +15 -15
- package/components/navigation-drawer/index.js +15 -16
- package/components/navigation-rail/navigation-rail-item.d.ts +1 -1
- package/components/navigation-rail/navigation-rail-item.js +1 -1
- package/components/navigation-rail/navigation-rail.d.ts +3 -3
- package/components/navigation-rail/navigation-rail.js +3 -4
- package/components/radio/radio-group.d.ts +1 -1
- package/components/radio/radio-group.js +1 -1
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +2 -2
- package/components/range-slider/index.d.ts +1 -1
- package/components/range-slider/index.js +1 -1
- package/components/segmented-button/segmented-button-group.d.ts +1 -1
- package/components/segmented-button/segmented-button-group.js +1 -2
- package/components/segmented-button/segmented-button.d.ts +1 -1
- package/components/segmented-button/segmented-button.js +1 -1
- package/components/select/index.d.ts +2 -2
- package/components/select/index.js +2 -2
- package/components/slider/index.d.ts +1 -1
- package/components/slider/index.js +1 -1
- package/components/snackbar/index.d.ts +2 -2
- package/components/snackbar/index.js +2 -3
- package/components/switch/index.d.ts +4 -4
- package/components/switch/index.js +4 -4
- package/components/text-field/index.d.ts +4 -4
- package/components/text-field/index.js +5 -5
- package/components/tooltip/index.d.ts +2 -2
- package/components/tooltip/index.js +3 -2
- package/components/top-app-bar/top-app-bar-style.js +1 -1
- package/components/top-app-bar/top-app-bar.d.ts +1 -1
- package/components/top-app-bar/top-app-bar.js +1 -1
- package/css-data.en.json +128 -128
- package/css-data.zh-cn.json +111 -111
- package/custom-elements.json +183 -183
- package/html-data.en.json +491 -491
- package/html-data.zh-cn.json +28 -28
- package/jsx.en.d.ts +588 -588
- package/jsx.zh-cn.d.ts +28 -28
- package/mdui.esm.js +8 -8
- package/mdui.global.js +8 -8
- package/package.json +5 -4
- package/web-types.en.json +696 -696
- package/web-types.zh-cn.json +179 -179
|
@@ -3,11 +3,11 @@ import { html } from 'lit';
|
|
|
3
3
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
5
5
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
6
|
+
import '@mdui/icons-shared/circle.js';
|
|
7
|
+
import '@mdui/icons-shared/radio-button-unchecked.js';
|
|
6
8
|
import { MduiElement } from '@mdui/shared/base/mdui-element.js';
|
|
7
9
|
import { watch } from '@mdui/shared/decorators/watch.js';
|
|
8
10
|
import { booleanConverter } from '@mdui/shared/helpers/decorator.js';
|
|
9
|
-
import '@mdui/shared/icons/circle.js';
|
|
10
|
-
import '@mdui/shared/icons/radio-button-unchecked.js';
|
|
11
11
|
import { componentStyle } from '@mdui/shared/lit-styles/component-style.js';
|
|
12
12
|
import { FocusableMixin } from '@mdui/shared/mixins/focusable.js';
|
|
13
13
|
import '../icon.js';
|
|
@@ -40,7 +40,7 @@ export declare class RangeSlider extends SliderBase<RangeSliderEventMap> impleme
|
|
|
40
40
|
private readonly formController;
|
|
41
41
|
private _value;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* 滑块的值,为数组格式,将与表单数据一起提交。
|
|
44
44
|
*
|
|
45
45
|
* **NOTE**:该属性无法通过 HTML 属性设置初始值,如果要修改该值,只能通过修改 JavaScript 属性值实现。
|
|
46
46
|
*/
|
|
@@ -19,7 +19,7 @@ import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
|
19
19
|
*
|
|
20
20
|
* @slot - `<mdui-segmented-button>` 组件
|
|
21
21
|
*
|
|
22
|
-
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
22
|
+
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
23
23
|
*/
|
|
24
24
|
export declare class SegmentedButtonGroup extends MduiElement<SegmentedButtonGroupEventMap> implements FormControl {
|
|
25
25
|
static styles: CSSResultGroup;
|
|
@@ -34,7 +34,7 @@ import { segmentedButtonGroupStyle } from './segmented-button-group-style.js';
|
|
|
34
34
|
*
|
|
35
35
|
* @slot - `<mdui-segmented-button>` 组件
|
|
36
36
|
*
|
|
37
|
-
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
37
|
+
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
38
38
|
*/
|
|
39
39
|
let SegmentedButtonGroup = class SegmentedButtonGroup extends MduiElement {
|
|
40
40
|
constructor() {
|
|
@@ -342,7 +342,6 @@ __decorate([
|
|
|
342
342
|
], SegmentedButtonGroup.prototype, "fullWidth", void 0);
|
|
343
343
|
__decorate([
|
|
344
344
|
property({ reflect: true })
|
|
345
|
-
// eslint-disable-next-line prettier/prettier
|
|
346
345
|
], SegmentedButtonGroup.prototype, "selects", void 0);
|
|
347
346
|
__decorate([
|
|
348
347
|
property({
|
|
@@ -2,12 +2,12 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { customElement, property } from 'lit/decorators.js';
|
|
4
4
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
5
|
+
import '@mdui/icons-shared/check.js';
|
|
5
6
|
import cc from 'classcat';
|
|
6
7
|
import { HasSlotController } from '@mdui/shared/controllers/has-slot.js';
|
|
7
8
|
import { booleanConverter } from '@mdui/shared/helpers/decorator.js';
|
|
8
9
|
import { nothingTemplate } from '@mdui/shared/helpers/template.js';
|
|
9
10
|
import { uniqueId } from '@mdui/shared/helpers/uniqueId.js';
|
|
10
|
-
import '@mdui/shared/icons/check.js';
|
|
11
11
|
import { ButtonBase } from '../button/button-base.js';
|
|
12
12
|
import '../icon.js';
|
|
13
13
|
import { segmentedButtonStyle } from './segmented-button-style.js';
|
|
@@ -37,7 +37,7 @@ declare const Select_base: import("@lit/reactive-element/decorators/base.js").Co
|
|
|
37
37
|
* @csspart chip__button - chip 内部的 `<button>` 元素
|
|
38
38
|
* @csspart chip__label - chip 内部的文本
|
|
39
39
|
* @csspart chip__delete-icon - chip 内部的删除图标
|
|
40
|
-
* @csspart text-field - 文本框,即 [`<mdui-text-field>`](/docs/2/components/text-field) 元素
|
|
40
|
+
* @csspart text-field - 文本框,即 [`<mdui-text-field>`](/zh-cn/docs/2/components/text-field) 元素
|
|
41
41
|
* @csspart text-field__container - text-field 内部的文本框容器
|
|
42
42
|
* @csspart text-field__icon - text-field 内部的左侧图标
|
|
43
43
|
* @csspart text-field__end-icon - text-field 内部的右侧图标
|
|
@@ -51,7 +51,7 @@ declare const Select_base: import("@lit/reactive-element/decorators/base.js").Co
|
|
|
51
51
|
* @csspart text-field__supporting - text-field 内部的底部辅助信息容器,包括 helper 和 error
|
|
52
52
|
* @csspart text-field__helper - text-field 内部的底部帮助文本
|
|
53
53
|
* @csspart text-field__error - text-field 内部的底部错误描述文本
|
|
54
|
-
* @csspart menu - 下拉菜单,即 [`<mdui-menu>`](/docs/2/components/menu) 元素
|
|
54
|
+
* @csspart menu - 下拉菜单,即 [`<mdui-menu>`](/zh-cn/docs/2/components/menu) 元素
|
|
55
55
|
*/
|
|
56
56
|
export declare class Select extends Select_base<SelectEventMap> implements FormControl {
|
|
57
57
|
static styles: CSSResultGroup;
|
|
@@ -51,7 +51,7 @@ import { style } from './style.js';
|
|
|
51
51
|
* @csspart chip__button - chip 内部的 `<button>` 元素
|
|
52
52
|
* @csspart chip__label - chip 内部的文本
|
|
53
53
|
* @csspart chip__delete-icon - chip 内部的删除图标
|
|
54
|
-
* @csspart text-field - 文本框,即 [`<mdui-text-field>`](/docs/2/components/text-field) 元素
|
|
54
|
+
* @csspart text-field - 文本框,即 [`<mdui-text-field>`](/zh-cn/docs/2/components/text-field) 元素
|
|
55
55
|
* @csspart text-field__container - text-field 内部的文本框容器
|
|
56
56
|
* @csspart text-field__icon - text-field 内部的左侧图标
|
|
57
57
|
* @csspart text-field__end-icon - text-field 内部的右侧图标
|
|
@@ -65,7 +65,7 @@ import { style } from './style.js';
|
|
|
65
65
|
* @csspart text-field__supporting - text-field 内部的底部辅助信息容器,包括 helper 和 error
|
|
66
66
|
* @csspart text-field__helper - text-field 内部的底部帮助文本
|
|
67
67
|
* @csspart text-field__error - text-field 内部的底部错误描述文本
|
|
68
|
-
* @csspart menu - 下拉菜单,即 [`<mdui-menu>`](/docs/2/components/menu) 元素
|
|
68
|
+
* @csspart menu - 下拉菜单,即 [`<mdui-menu>`](/zh-cn/docs/2/components/menu) 元素
|
|
69
69
|
*/
|
|
70
70
|
let Select = class Select extends FocusableMixin(MduiElement) {
|
|
71
71
|
constructor() {
|
|
@@ -24,7 +24,7 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
|
24
24
|
export declare class Slider extends SliderBase<SliderEventMap> implements FormControl {
|
|
25
25
|
static styles: CSSResultGroup;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* 滑块的值,将与表单数据一起提交
|
|
28
28
|
*/
|
|
29
29
|
value: number;
|
|
30
30
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import '@mdui/icons-shared/clear.js';
|
|
1
2
|
import { MduiElement } from '@mdui/shared/base/mdui-element.js';
|
|
2
|
-
import '@mdui/shared/icons/clear.js';
|
|
3
3
|
import '../button-icon.js';
|
|
4
4
|
import '../button.js';
|
|
5
5
|
import '../icon.js';
|
|
@@ -27,7 +27,7 @@ import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
|
27
27
|
* @csspart close-button - 关闭按钮
|
|
28
28
|
* @csspart close-icon - 关闭按钮中的图标
|
|
29
29
|
*
|
|
30
|
-
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
30
|
+
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
31
31
|
* @cssprop --z-index - 组件的 CSS `z-index` 值
|
|
32
32
|
*/
|
|
33
33
|
export declare class Snackbar extends MduiElement<SnackbarEventMap> {
|
|
@@ -2,6 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { customElement, property } from 'lit/decorators.js';
|
|
4
4
|
import { when } from 'lit/directives/when.js';
|
|
5
|
+
import '@mdui/icons-shared/clear.js';
|
|
5
6
|
import { MduiElement } from '@mdui/shared/base/mdui-element.js';
|
|
6
7
|
import { watch } from '@mdui/shared/decorators/watch.js';
|
|
7
8
|
import { animateTo, stopAnimations } from '@mdui/shared/helpers/animate.js';
|
|
@@ -10,7 +11,6 @@ import { booleanConverter } from '@mdui/shared/helpers/decorator.js';
|
|
|
10
11
|
import { getDuration, getEasing } from '@mdui/shared/helpers/motion.js';
|
|
11
12
|
import { observeResize } from '@mdui/shared/helpers/observeResize.js';
|
|
12
13
|
import { nothingTemplate } from '@mdui/shared/helpers/template.js';
|
|
13
|
-
import '@mdui/shared/icons/clear.js';
|
|
14
14
|
import { componentStyle } from '@mdui/shared/lit-styles/component-style.js';
|
|
15
15
|
import '../button-icon.js';
|
|
16
16
|
import '../button.js';
|
|
@@ -43,7 +43,7 @@ let reordering = false;
|
|
|
43
43
|
* @csspart close-button - 关闭按钮
|
|
44
44
|
* @csspart close-icon - 关闭按钮中的图标
|
|
45
45
|
*
|
|
46
|
-
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
46
|
+
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
47
47
|
* @cssprop --z-index - 组件的 CSS `z-index` 值
|
|
48
48
|
*/
|
|
49
49
|
let Snackbar = class Snackbar extends MduiElement {
|
|
@@ -312,7 +312,6 @@ __decorate([
|
|
|
312
312
|
], Snackbar.prototype, "closeIcon", void 0);
|
|
313
313
|
__decorate([
|
|
314
314
|
property({ type: Number, reflect: true, attribute: 'message-line' })
|
|
315
|
-
// eslint-disable-next-line prettier/prettier
|
|
316
315
|
], Snackbar.prototype, "messageLine", void 0);
|
|
317
316
|
__decorate([
|
|
318
317
|
property({ type: Number, reflect: true, attribute: 'auto-close-delay' })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import '@mdui/icons-shared/check.js';
|
|
1
2
|
import { MduiElement } from '@mdui/shared/base/mdui-element.js';
|
|
2
|
-
import '@mdui/shared/icons/check.js';
|
|
3
3
|
import '../icon.js';
|
|
4
4
|
import type { Ripple } from '../ripple/index.js';
|
|
5
5
|
import type { FormControl } from '@mdui/jq/shared/form.js';
|
|
@@ -26,8 +26,8 @@ declare const Switch_base: import("@lit/reactive-element/decorators/base.js").Co
|
|
|
26
26
|
* @csspart unchecked-icon - 未选中状态的图标
|
|
27
27
|
* @csspart checked-icon 选中状态的图标
|
|
28
28
|
*
|
|
29
|
-
* @cssprop --shape-corner - 组件轨道的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
30
|
-
* @cssprop --shape-corner-thumb - 组件图标容器的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
29
|
+
* @cssprop --shape-corner - 组件轨道的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
30
|
+
* @cssprop --shape-corner-thumb - 组件图标容器的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
31
31
|
*/
|
|
32
32
|
export declare class Switch extends Switch_base<SwitchEventMap> implements FormControl {
|
|
33
33
|
static styles: CSSResultGroup;
|
|
@@ -68,7 +68,7 @@ export declare class Switch extends Switch_base<SwitchEventMap> implements FormC
|
|
|
68
68
|
*/
|
|
69
69
|
name: string;
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* 开关的值,将与表单数据一起提交
|
|
72
72
|
*/
|
|
73
73
|
value: string;
|
|
74
74
|
/**
|
|
@@ -5,6 +5,7 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
|
5
5
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
6
|
import { live } from 'lit/directives/live.js';
|
|
7
7
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
8
|
+
import '@mdui/icons-shared/check.js';
|
|
8
9
|
import { MduiElement } from '@mdui/shared/base/mdui-element.js';
|
|
9
10
|
import { FormController, formResets } from '@mdui/shared/controllers/form.js';
|
|
10
11
|
import { HasSlotController } from '@mdui/shared/controllers/has-slot.js';
|
|
@@ -12,7 +13,6 @@ import { defaultValue } from '@mdui/shared/decorators/default-value.js';
|
|
|
12
13
|
import { watch } from '@mdui/shared/decorators/watch.js';
|
|
13
14
|
import { booleanConverter } from '@mdui/shared/helpers/decorator.js';
|
|
14
15
|
import { nothingTemplate } from '@mdui/shared/helpers/template.js';
|
|
15
|
-
import '@mdui/shared/icons/check.js';
|
|
16
16
|
import { componentStyle } from '@mdui/shared/lit-styles/component-style.js';
|
|
17
17
|
import { FocusableMixin } from '@mdui/shared/mixins/focusable.js';
|
|
18
18
|
import '../icon.js';
|
|
@@ -39,8 +39,8 @@ import { style } from './style.js';
|
|
|
39
39
|
* @csspart unchecked-icon - 未选中状态的图标
|
|
40
40
|
* @csspart checked-icon 选中状态的图标
|
|
41
41
|
*
|
|
42
|
-
* @cssprop --shape-corner - 组件轨道的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
43
|
-
* @cssprop --shape-corner-thumb - 组件图标容器的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
42
|
+
* @cssprop --shape-corner - 组件轨道的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
43
|
+
* @cssprop --shape-corner-thumb - 组件图标容器的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
44
44
|
*/
|
|
45
45
|
let Switch = class Switch extends RippleMixin(FocusableMixin(MduiElement)) {
|
|
46
46
|
constructor() {
|
|
@@ -66,7 +66,7 @@ let Switch = class Switch extends RippleMixin(FocusableMixin(MduiElement)) {
|
|
|
66
66
|
*/
|
|
67
67
|
this.name = '';
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* 开关的值,将与表单数据一起提交
|
|
70
70
|
*/
|
|
71
71
|
this.value = 'on';
|
|
72
72
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import '@mdui/icons-shared/cancel--outlined.js';
|
|
2
|
+
import '@mdui/icons-shared/error.js';
|
|
3
|
+
import '@mdui/icons-shared/visibility-off.js';
|
|
4
|
+
import '@mdui/icons-shared/visibility.js';
|
|
1
5
|
import '@mdui/jq/methods/css.js';
|
|
2
6
|
import { MduiElement } from '@mdui/shared/base/mdui-element.js';
|
|
3
|
-
import '@mdui/shared/icons/cancel--outlined.js';
|
|
4
|
-
import '@mdui/shared/icons/error.js';
|
|
5
|
-
import '@mdui/shared/icons/visibility-off.js';
|
|
6
|
-
import '@mdui/shared/icons/visibility.js';
|
|
7
7
|
import '../button-icon.js';
|
|
8
8
|
import '../icon.js';
|
|
9
9
|
import type { FormControl } from '@mdui/jq/shared/form.js';
|
|
@@ -7,6 +7,10 @@ import { live } from 'lit/directives/live.js';
|
|
|
7
7
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
8
8
|
import { when } from 'lit/directives/when.js';
|
|
9
9
|
import { msg } from '@lit/localize';
|
|
10
|
+
import '@mdui/icons-shared/cancel--outlined.js';
|
|
11
|
+
import '@mdui/icons-shared/error.js';
|
|
12
|
+
import '@mdui/icons-shared/visibility-off.js';
|
|
13
|
+
import '@mdui/icons-shared/visibility.js';
|
|
10
14
|
import { $ } from '@mdui/jq/$.js';
|
|
11
15
|
import '@mdui/jq/methods/css.js';
|
|
12
16
|
import { MduiElement } from '@mdui/shared/base/mdui-element.js';
|
|
@@ -17,10 +21,6 @@ import { watch } from '@mdui/shared/decorators/watch.js';
|
|
|
17
21
|
import { booleanConverter } from '@mdui/shared/helpers/decorator.js';
|
|
18
22
|
import { observeResize } from '@mdui/shared/helpers/observeResize.js';
|
|
19
23
|
import { nothingTemplate } from '@mdui/shared/helpers/template.js';
|
|
20
|
-
import '@mdui/shared/icons/cancel--outlined.js';
|
|
21
|
-
import '@mdui/shared/icons/error.js';
|
|
22
|
-
import '@mdui/shared/icons/visibility-off.js';
|
|
23
|
-
import '@mdui/shared/icons/visibility.js';
|
|
24
24
|
import { componentStyle } from '@mdui/shared/lit-styles/component-style.js';
|
|
25
25
|
import { FocusableMixin } from '@mdui/shared/mixins/focusable.js';
|
|
26
26
|
import { onLocaleReady, offLocaleReady } from '../../internal/localize.js';
|
|
@@ -521,7 +521,7 @@ let TextField = class TextField extends FocusableMixin(MduiElement) {
|
|
|
521
521
|
? 'text'
|
|
522
522
|
: this.type}" name="${ifDefined(this.name)}" .value="${live(this.value)}" placeholder="${ifDefined(!this.label || this.isFocusedStyle || this.hasValue
|
|
523
523
|
? this.placeholder
|
|
524
|
-
: undefined)}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" ?required="${this.required}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" min="${ifDefined(this.min)}" max="${ifDefined(this.max)}" step="${ifDefined(this.step)}" autocapitalize="${ifDefined(this.type === 'password' ? 'off' : this.autocapitalize)}" autocomplete="${this.autocomplete}" autocorrect="${ifDefined(this.type === 'password' ? 'off' : this.autocorrect)}" spellcheck="${ifDefined(this.spellcheck)}" pattern="${ifDefined(this.pattern)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" @change="${this.onChange}" @input="${this.onInput}" @invalid="${this.onInvalid}" @keydown="${this.onKeyDown}">`;
|
|
524
|
+
: undefined)}" ?readonly="${this.readonly}" ?disabled="${this.disabled}" ?required="${this.required}" minlength="${ifDefined(this.minlength)}" maxlength="${ifDefined(this.maxlength)}" min="${ifDefined(this.min)}" max="${ifDefined(this.max)}" step="${ifDefined(this.step)}" autocapitalize="${ifDefined(this.type === 'password' ? 'off' : this.autocapitalize)}" autocomplete="${ifDefined(this.autocomplete)}" autocorrect="${ifDefined(this.type === 'password' ? 'off' : this.autocorrect)}" spellcheck="${ifDefined(this.spellcheck)}" pattern="${ifDefined(this.pattern)}" enterkeyhint="${ifDefined(this.enterkeyhint)}" inputmode="${ifDefined(this.inputmode)}" @change="${this.onChange}" @input="${this.onInput}" @invalid="${this.onInvalid}" @keydown="${this.onKeyDown}">`;
|
|
525
525
|
}
|
|
526
526
|
renderTextArea(hasInputSlot) {
|
|
527
527
|
return html `<textarea ${ref(this.inputRef)} part="input" class="input ${classMap({ 'hide-input': hasInputSlot })}" name="${ifDefined(this.name)}" .value="${live(this.value)}" placeholder="${ifDefined(!this.label || this.isFocusedStyle || this.hasValue
|
|
@@ -29,8 +29,8 @@ import type { CSSResultGroup, TemplateResult, PropertyValues } from 'lit';
|
|
|
29
29
|
* @csspart content - 正文
|
|
30
30
|
* @csspart action - 操作按钮
|
|
31
31
|
*
|
|
32
|
-
* @cssprop --shape-corner-plain - 当 variant="plain" 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
33
|
-
* @cssprop --shape-corner-rich - 当 variant="rich" 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
32
|
+
* @cssprop --shape-corner-plain - 当 variant="plain" 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
33
|
+
* @cssprop --shape-corner-rich - 当 variant="rich" 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
34
34
|
* @cssprop --z-index - 组件的 CSS `z-index` 值
|
|
35
35
|
*/
|
|
36
36
|
export declare class Tooltip extends MduiElement<TooltipEventMap> {
|
|
@@ -3,6 +3,7 @@ import { html } from 'lit';
|
|
|
3
3
|
import { customElement, property } from 'lit/decorators.js';
|
|
4
4
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
5
5
|
import { when } from 'lit/directives/when.js';
|
|
6
|
+
// eslint-disable-next-line import/extensions
|
|
6
7
|
import { getOverflowAncestors } from '@floating-ui/utils/dom';
|
|
7
8
|
import { $ } from '@mdui/jq/$.js';
|
|
8
9
|
import '@mdui/jq/methods/css.js';
|
|
@@ -45,8 +46,8 @@ import { style } from './style.js';
|
|
|
45
46
|
* @csspart content - 正文
|
|
46
47
|
* @csspart action - 操作按钮
|
|
47
48
|
*
|
|
48
|
-
* @cssprop --shape-corner-plain - 当 variant="plain" 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
49
|
-
* @cssprop --shape-corner-rich - 当 variant="rich" 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
49
|
+
* @cssprop --shape-corner-plain - 当 variant="plain" 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
50
|
+
* @cssprop --shape-corner-rich - 当 variant="rich" 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
50
51
|
* @cssprop --z-index - 组件的 CSS `z-index` 值
|
|
51
52
|
*/
|
|
52
53
|
let Tooltip = class Tooltip extends MduiElement {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const topAppBarStyle = css `:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;right:0;left:0;display:flex;flex:0 0 auto;align-items:flex-start;justify-content:flex-start;border-bottom-left-radius:var(--shape-corner);border-bottom-right-radius:var(--shape-corner);z-index:var(--z-index);transition:
|
|
2
|
+
export const topAppBarStyle = css `:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;right:0;left:0;display:flex;flex:0 0 auto;align-items:flex-start;justify-content:flex-start;border-bottom-left-radius:var(--shape-corner);border-bottom-right-radius:var(--shape-corner);z-index:var(--z-index);transition:transform var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear),background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);padding:.75rem .5rem;height:4rem;background-color:rgb(var(--mdui-color-surface))}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([scroll-behavior~=shrink]){transition-duration:var(--mdui-motion-duration-short4)}:host([scrolling]){background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}::slotted(mdui-button-icon){color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}::slotted(mdui-button-icon:first-child){color:rgb(var(--mdui-color-on-surface))}::slotted(mdui-avatar){width:1.875rem;height:1.875rem;margin-top:.3125rem;margin-bottom:.3125rem}::slotted(*){flex-shrink:0}::slotted(:not(:last-child)){margin-right:.5rem}:host([variant=medium]){height:7rem}:host([variant=large]){height:9.5rem}:host([hide]:not([hide=false i])){transition-duration:var(--mdui-motion-duration-short4);transform:translateY(-4.625rem)}:host([hide][variant=medium]:not([hide=false i])){transform:translateY(-7.625rem)}:host([hide][variant=large]:not([hide=false i])){transform:translateY(-10.125rem)}:host([shrink][variant=large]:not([shrink=false i])),:host([shrink][variant=medium]:not([shrink=false i])){transition-duration:var(--mdui-motion-duration-short4);height:4rem}`;
|
|
@@ -22,7 +22,7 @@ declare const TopAppBar_base: import("@lit/reactive-element/decorators/base.js")
|
|
|
22
22
|
*
|
|
23
23
|
* @slot - 顶部应用栏内部的元素
|
|
24
24
|
*
|
|
25
|
-
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
25
|
+
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
26
26
|
* @cssprop --z-index - 组件的 CSS `z-index` 值
|
|
27
27
|
*/
|
|
28
28
|
export declare class TopAppBar extends TopAppBar_base<TopAppBarEventMap> {
|
|
@@ -27,7 +27,7 @@ import { topAppBarStyle } from './top-app-bar-style.js';
|
|
|
27
27
|
*
|
|
28
28
|
* @slot - 顶部应用栏内部的元素
|
|
29
29
|
*
|
|
30
|
-
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
30
|
+
* @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/zh-cn/docs/2/styles/design-tokens#shape-corner)
|
|
31
31
|
* @cssprop --z-index - 组件的 CSS `z-index` 值
|
|
32
32
|
*/
|
|
33
33
|
let TopAppBar = class TopAppBar extends ScrollBehaviorMixin(LayoutItemBase) {
|