mdui 2.0.3 → 2.0.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.
Files changed (156) hide show
  1. package/components/avatar/index.d.ts +13 -13
  2. package/components/avatar/index.js +11 -6
  3. package/components/avatar/style.js +31 -1
  4. package/components/badge/index.d.ts +7 -6
  5. package/components/badge/index.js +6 -5
  6. package/components/badge/style.js +25 -1
  7. package/components/bottom-app-bar/index.d.ts +4 -3
  8. package/components/bottom-app-bar/index.js +3 -3
  9. package/components/bottom-app-bar/style.js +92 -1
  10. package/components/button/button-base-style.js +28 -1
  11. package/components/button/button-base.d.ts +43 -44
  12. package/components/button/button-base.js +28 -21
  13. package/components/button/index.d.ts +13 -13
  14. package/components/button/index.js +30 -20
  15. package/components/button/style.js +111 -2
  16. package/components/button-icon/index.d.ts +8 -8
  17. package/components/button-icon/index.js +29 -12
  18. package/components/button-icon/style.js +103 -2
  19. package/components/card/index.d.ts +8 -8
  20. package/components/card/index.js +12 -8
  21. package/components/card/style.js +72 -1
  22. package/components/checkbox/index.d.ts +20 -20
  23. package/components/checkbox/index.js +68 -25
  24. package/components/checkbox/style.js +131 -1
  25. package/components/chip/index.d.ts +19 -19
  26. package/components/chip/index.js +49 -25
  27. package/components/chip/style.js +205 -2
  28. package/components/circular-progress/index.d.ts +2 -2
  29. package/components/circular-progress/index.js +40 -6
  30. package/components/circular-progress/style.js +136 -1
  31. package/components/collapse/collapse-item-style.js +21 -1
  32. package/components/collapse/collapse-item.d.ts +4 -4
  33. package/components/collapse/collapse-item.js +12 -4
  34. package/components/collapse/collapse-style.js +5 -1
  35. package/components/collapse/collapse.d.ts +6 -9
  36. package/components/collapse/collapse.js +8 -5
  37. package/components/dialog/index.d.ts +13 -13
  38. package/components/dialog/index.js +48 -20
  39. package/components/dialog/style.js +116 -1
  40. package/components/divider/index.d.ts +3 -3
  41. package/components/divider/index.js +3 -3
  42. package/components/divider/style.js +18 -1
  43. package/components/dropdown/index.d.ts +35 -35
  44. package/components/dropdown/index.js +41 -34
  45. package/components/dropdown/style.js +11 -1
  46. package/components/fab/index.d.ts +6 -6
  47. package/components/fab/index.js +19 -11
  48. package/components/fab/style.js +153 -4
  49. package/components/icon/index.js +5 -1
  50. package/components/icon/style.js +29 -1
  51. package/components/layout/layout-item-style.js +6 -1
  52. package/components/layout/layout-item.d.ts +7 -7
  53. package/components/layout/layout-item.js +6 -6
  54. package/components/layout/layout-main-style.js +7 -1
  55. package/components/layout/layout-main.d.ts +2 -2
  56. package/components/layout/layout-main.js +2 -2
  57. package/components/layout/layout-style.js +11 -1
  58. package/components/layout/layout.d.ts +2 -2
  59. package/components/layout/layout.js +2 -2
  60. package/components/linear-progress/index.d.ts +4 -4
  61. package/components/linear-progress/index.js +9 -5
  62. package/components/linear-progress/style.js +73 -1
  63. package/components/list/list-item-style.js +153 -2
  64. package/components/list/list-item.d.ts +17 -17
  65. package/components/list/list-item.js +34 -15
  66. package/components/list/list-style.js +10 -1
  67. package/components/list/list-subheader-style.js +19 -1
  68. package/components/list/list-subheader.d.ts +2 -2
  69. package/components/list/list-subheader.js +2 -2
  70. package/components/list/list.d.ts +1 -1
  71. package/components/list/list.js +1 -1
  72. package/components/menu/menu-item-style.js +125 -1
  73. package/components/menu/menu-item.d.ts +4 -4
  74. package/components/menu/menu-item.js +57 -15
  75. package/components/menu/menu-style.js +19 -1
  76. package/components/menu/menu.d.ts +15 -18
  77. package/components/menu/menu.js +13 -9
  78. package/components/navigation-bar/navigation-bar-item-style.js +132 -1
  79. package/components/navigation-bar/navigation-bar-item.d.ts +5 -5
  80. package/components/navigation-bar/navigation-bar-item.js +27 -11
  81. package/components/navigation-bar/navigation-bar-style.js +28 -1
  82. package/components/navigation-bar/navigation-bar.d.ts +9 -8
  83. package/components/navigation-bar/navigation-bar.js +10 -7
  84. package/components/navigation-drawer/index.d.ts +19 -20
  85. package/components/navigation-drawer/index.js +56 -31
  86. package/components/navigation-drawer/style.js +66 -1
  87. package/components/navigation-rail/navigation-rail-item-style.js +122 -1
  88. package/components/navigation-rail/navigation-rail-item.d.ts +6 -6
  89. package/components/navigation-rail/navigation-rail-item.js +30 -11
  90. package/components/navigation-rail/navigation-rail-style.js +79 -1
  91. package/components/navigation-rail/navigation-rail.d.ts +10 -11
  92. package/components/navigation-rail/navigation-rail.js +19 -11
  93. package/components/radio/radio-group-style.js +20 -1
  94. package/components/radio/radio-group.d.ts +13 -13
  95. package/components/radio/radio-group.js +30 -12
  96. package/components/radio/radio-style.js +107 -1
  97. package/components/radio/radio.d.ts +3 -3
  98. package/components/radio/radio.js +26 -8
  99. package/components/range-slider/index.d.ts +5 -6
  100. package/components/range-slider/index.js +57 -10
  101. package/components/ripple/index.js +5 -2
  102. package/components/ripple/style.js +96 -1
  103. package/components/segmented-button/segmented-button-group-style.js +28 -1
  104. package/components/segmented-button/segmented-button-group.d.ts +17 -20
  105. package/components/segmented-button/segmented-button-group.js +32 -15
  106. package/components/segmented-button/segmented-button-style.js +81 -2
  107. package/components/segmented-button/segmented-button.d.ts +3 -3
  108. package/components/segmented-button/segmented-button.js +30 -14
  109. package/components/select/index.d.ts +31 -32
  110. package/components/select/index.js +106 -26
  111. package/components/select/style.js +27 -1
  112. package/components/slider/index.d.ts +1 -1
  113. package/components/slider/index.js +34 -3
  114. package/components/slider/slider-base-style.js +173 -1
  115. package/components/slider/slider-base.d.ts +15 -15
  116. package/components/slider/slider-base.js +19 -14
  117. package/components/slider/style.js +7 -1
  118. package/components/snackbar/index.d.ts +21 -21
  119. package/components/snackbar/index.js +47 -20
  120. package/components/snackbar/style.js +100 -1
  121. package/components/switch/index.d.ts +14 -14
  122. package/components/switch/index.js +51 -17
  123. package/components/switch/style.js +202 -1
  124. package/components/tabs/tab-panel-style.js +10 -1
  125. package/components/tabs/tab-panel.d.ts +3 -3
  126. package/components/tabs/tab-panel.js +2 -2
  127. package/components/tabs/tab-style.js +85 -1
  128. package/components/tabs/tab.d.ts +6 -6
  129. package/components/tabs/tab.js +29 -9
  130. package/components/tabs/tabs-style.js +138 -1
  131. package/components/tabs/tabs.d.ts +19 -19
  132. package/components/tabs/tabs.js +26 -18
  133. package/components/text-field/index.d.ts +51 -51
  134. package/components/text-field/index.js +185 -57
  135. package/components/text-field/style.js +362 -1
  136. package/components/tooltip/index.d.ts +31 -31
  137. package/components/tooltip/index.js +38 -29
  138. package/components/tooltip/style.js +57 -1
  139. package/components/top-app-bar/top-app-bar-style.js +78 -1
  140. package/components/top-app-bar/top-app-bar-title-style.js +81 -1
  141. package/components/top-app-bar/top-app-bar-title.d.ts +4 -4
  142. package/components/top-app-bar/top-app-bar-title.js +21 -7
  143. package/components/top-app-bar/top-app-bar.d.ts +5 -5
  144. package/components/top-app-bar/top-app-bar.js +4 -4
  145. package/css-data.en.json +2826 -0
  146. package/css-data.zh-cn.json +374 -367
  147. package/custom-elements.json +2049 -2049
  148. package/html-data.en.json +6560 -0
  149. package/html-data.zh-cn.json +1427 -1433
  150. package/jsx.en.d.ts +3303 -0
  151. package/jsx.zh-cn.d.ts +3351 -0
  152. package/package.json +6 -5
  153. package/web-types.en.json +11734 -0
  154. package/web-types.zh-cn.json +3227 -3221
  155. package/mdui.esm.js +0 -22
  156. package/mdui.global.js +0 -22
@@ -1,2 +1,79 @@
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:top 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]){transition-duration:var(--mdui-motion-duration-short4);top:-4.625rem}:host([hide][variant=medium]){top:-7.625rem}:host([hide][variant=large]){top:-10.125rem}:host([shrink][variant=large]),:host([shrink][variant=medium]){transition-duration:var(--mdui-motion-duration-short4);height:4rem}`;
2
+ export const topAppBarStyle = css `
3
+ :host {
4
+ --shape-corner: var(--mdui-shape-corner-none);
5
+ --z-index: 2000;
6
+ position: fixed;
7
+ top: 0;
8
+ right: 0;
9
+ left: 0;
10
+ display: flex;
11
+ flex: 0 0 auto;
12
+ align-items: flex-start;
13
+ justify-content: flex-start;
14
+ border-bottom-left-radius: var(--shape-corner);
15
+ border-bottom-right-radius: var(--shape-corner);
16
+ z-index: var(--z-index);
17
+ transition:
18
+ top var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),
19
+ height var(--mdui-motion-duration-long2)
20
+ var(--mdui-motion-easing-standard),
21
+ box-shadow var(--mdui-motion-duration-short4)
22
+ var(--mdui-motion-easing-linear),
23
+ background-color var(--mdui-motion-duration-short4)
24
+ var(--mdui-motion-easing-linear);
25
+ padding: 0.75rem 0.5rem;
26
+ height: 4rem;
27
+ background-color: rgb(var(--mdui-color-surface));
28
+ }
29
+ :host([scroll-target]:not([scroll-target=''])) {
30
+ position: absolute;
31
+ }
32
+ :host([scroll-behavior~='shrink']) {
33
+ transition-duration: var(--mdui-motion-duration-short4);
34
+ }
35
+ :host([scrolling]) {
36
+ background-color: rgb(var(--mdui-color-surface-container));
37
+ box-shadow: var(--mdui-elevation-level2);
38
+ }
39
+ ::slotted(mdui-button-icon) {
40
+ color: rgb(var(--mdui-color-on-surface-variant));
41
+ font-size: 1.5rem;
42
+ }
43
+ ::slotted(mdui-button-icon:first-child) {
44
+ color: rgb(var(--mdui-color-on-surface));
45
+ }
46
+ ::slotted(mdui-avatar) {
47
+ width: 1.875rem;
48
+ height: 1.875rem;
49
+ margin-top: 0.3125rem;
50
+ margin-bottom: 0.3125rem;
51
+ }
52
+ ::slotted(*) {
53
+ flex-shrink: 0;
54
+ }
55
+ ::slotted(:not(:last-child)) {
56
+ margin-right: 0.5rem;
57
+ }
58
+ :host([variant='medium']) {
59
+ height: 7rem;
60
+ }
61
+ :host([variant='large']) {
62
+ height: 9.5rem;
63
+ }
64
+ :host([hide]) {
65
+ transition-duration: var(--mdui-motion-duration-short4);
66
+ top: -4.625rem;
67
+ }
68
+ :host([hide][variant='medium']) {
69
+ top: -7.625rem;
70
+ }
71
+ :host([hide][variant='large']) {
72
+ top: -10.125rem;
73
+ }
74
+ :host([shrink][variant='medium']),
75
+ :host([shrink][variant='large']) {
76
+ transition-duration: var(--mdui-motion-duration-short4);
77
+ height: 4rem;
78
+ }
79
+ `;
@@ -1,2 +1,82 @@
1
1
  import { css } from 'lit';
2
- export const topAppBarTitleStyle = css `:host{display:block;width:100%;flex-shrink:initial!important;overflow:hidden;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-title-large-size);font-weight:var(--mdui-typescale-title-large-weight);letter-spacing:var(--mdui-typescale-title-large-tracking);line-height:var(--mdui-typescale-title-large-line-height);line-height:2.5rem}.label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:1;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label.variant-center-aligned{text-align:center}.label.variant-large:not(.shrink),.label.variant-medium:not(.shrink){opacity:0}.label.variant-large.shrink,.label.variant-medium.shrink{transition-delay:var(--mdui-motion-duration-short2)}.label-large{display:none;position:absolute;width:100%;left:0;margin-right:0;padding:0 1rem;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label-large.variant-large,.label-large.variant-medium{display:block}.label-large.variant-medium{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;bottom:.75rem;font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.label-large.variant-large{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;bottom:1.25rem;font-size:var(--mdui-typescale-headline-medium-size);font-weight:var(--mdui-typescale-headline-medium-weight);letter-spacing:var(--mdui-typescale-headline-medium-tracking);line-height:var(--mdui-typescale-headline-medium-line-height)}.label-large.variant-large:not(.shrink),.label-large.variant-medium:not(.shrink){opacity:1;transition-delay:var(--mdui-motion-duration-short2)}.label-large.variant-large.shrink,.label-large.variant-medium.shrink{opacity:0;z-index:-1}`;
2
+ export const topAppBarTitleStyle = css `
3
+ :host {
4
+ display: block;
5
+ width: 100%;
6
+ flex-shrink: initial !important;
7
+ overflow: hidden;
8
+ color: rgb(var(--mdui-color-on-surface));
9
+ font-size: var(--mdui-typescale-title-large-size);
10
+ font-weight: var(--mdui-typescale-title-large-weight);
11
+ letter-spacing: var(--mdui-typescale-title-large-tracking);
12
+ line-height: var(--mdui-typescale-title-large-line-height);
13
+ line-height: 2.5rem;
14
+ }
15
+ .label {
16
+ display: block;
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ white-space: nowrap;
20
+ opacity: 1;
21
+ transition: opacity var(--mdui-motion-duration-short2)
22
+ var(--mdui-motion-easing-linear);
23
+ }
24
+ .label.variant-center-aligned {
25
+ text-align: center;
26
+ }
27
+ .label.variant-medium:not(.shrink),
28
+ .label.variant-large:not(.shrink) {
29
+ opacity: 0;
30
+ }
31
+ .label.variant-medium.shrink,
32
+ .label.variant-large.shrink {
33
+ transition-delay: var(--mdui-motion-duration-short2);
34
+ }
35
+ .label-large {
36
+ display: none;
37
+ position: absolute;
38
+ width: 100%;
39
+ left: 0;
40
+ margin-right: 0;
41
+ padding: 0rem 1rem;
42
+ transition: opacity var(--mdui-motion-duration-short2)
43
+ var(--mdui-motion-easing-linear);
44
+ }
45
+ .label-large.variant-medium,
46
+ .label-large.variant-large {
47
+ display: block;
48
+ }
49
+ .label-large.variant-medium {
50
+ overflow: hidden;
51
+ text-overflow: ellipsis;
52
+ white-space: nowrap;
53
+ bottom: 0.75rem;
54
+ font-size: var(--mdui-typescale-headline-small-size);
55
+ font-weight: var(--mdui-typescale-headline-small-weight);
56
+ letter-spacing: var(--mdui-typescale-headline-small-tracking);
57
+ line-height: var(--mdui-typescale-headline-small-line-height);
58
+ }
59
+ .label-large.variant-large {
60
+ display: -webkit-box;
61
+ /* stylelint-disable-line value-no-vendor-prefix */
62
+ overflow: hidden;
63
+ white-space: normal;
64
+ -webkit-box-orient: vertical;
65
+ -webkit-line-clamp: 2;
66
+ bottom: 1.25rem;
67
+ font-size: var(--mdui-typescale-headline-medium-size);
68
+ font-weight: var(--mdui-typescale-headline-medium-weight);
69
+ letter-spacing: var(--mdui-typescale-headline-medium-tracking);
70
+ line-height: var(--mdui-typescale-headline-medium-line-height);
71
+ }
72
+ .label-large.variant-medium:not(.shrink),
73
+ .label-large.variant-large:not(.shrink) {
74
+ opacity: 1;
75
+ transition-delay: var(--mdui-motion-duration-short2);
76
+ }
77
+ .label-large.variant-medium.shrink,
78
+ .label-large.variant-large.shrink {
79
+ opacity: 0;
80
+ z-index: -1;
81
+ }
82
+ `;
@@ -1,7 +1,7 @@
1
1
  import { MduiElement } from '@mdui/shared/base/mdui-element.js';
2
2
  import type { CSSResultGroup, TemplateResult } from 'lit';
3
3
  /**
4
- * @summary 顶部应用栏标题组件。需与 `<mdui-top-app-bar>` 组件配合使用
4
+ * @summary 顶部应用栏标题组件。需配合 `<mdui-top-app-bar>` 组件使用
5
5
  *
6
6
  * ```html
7
7
  * <mdui-top-app-bar>
@@ -13,10 +13,10 @@ import type { CSSResultGroup, TemplateResult } from 'lit';
13
13
  * ```
14
14
  *
15
15
  * @slot - 顶部应用栏的标题文本
16
- * @slot label-large - 展开状态的标题文本
16
+ * @slot label-large - 展开状态下的标题文本
17
17
  *
18
- * @csspart label 文本内容
19
- * @csspart label-large 展开状态的文本内容
18
+ * @csspart label 标题文本
19
+ * @csspart label-large 展开状态下的标题文本
20
20
  */
21
21
  export declare class TopAppBarTitle extends MduiElement<TopAppBarTitleEventMap> {
22
22
  static styles: CSSResultGroup;
@@ -9,7 +9,7 @@ import { getInnerHtmlFromSlot } from '@mdui/shared/helpers/slot.js';
9
9
  import { componentStyle } from '@mdui/shared/lit-styles/component-style.js';
10
10
  import { topAppBarTitleStyle } from './top-app-bar-title-style.js';
11
11
  /**
12
- * @summary 顶部应用栏标题组件。需与 `<mdui-top-app-bar>` 组件配合使用
12
+ * @summary 顶部应用栏标题组件。需配合 `<mdui-top-app-bar>` 组件使用
13
13
  *
14
14
  * ```html
15
15
  * <mdui-top-app-bar>
@@ -21,10 +21,10 @@ import { topAppBarTitleStyle } from './top-app-bar-title-style.js';
21
21
  * ```
22
22
  *
23
23
  * @slot - 顶部应用栏的标题文本
24
- * @slot label-large - 展开状态的标题文本
24
+ * @slot label-large - 展开状态下的标题文本
25
25
  *
26
- * @csspart label 文本内容
27
- * @csspart label-large 展开状态的文本内容
26
+ * @csspart label 标题文本
27
+ * @csspart label-large 展开状态下的标题文本
28
28
  */
29
29
  let TopAppBarTitle = class TopAppBarTitle extends MduiElement {
30
30
  constructor() {
@@ -50,9 +50,23 @@ let TopAppBarTitle = class TopAppBarTitle extends MduiElement {
50
50
  'variant-medium': this.variant === 'medium',
51
51
  'variant-large': this.variant === 'large',
52
52
  });
53
- return html `<slot part="label" class="label ${className}" ${ref(this.defaultSlotRef)} @slotchange="${() => this.onSlotChange(hasLabelLargeSlot)}"></slot>${hasLabelLargeSlot
54
- ? html `<slot name="label-large" part="label-large" class="label-large ${className}"></slot>`
55
- : html `<div ${ref(this.labelLargeRef)} part="label-large" class="label-large ${className}"></div>`}`;
53
+ return html `<slot
54
+ part="label"
55
+ class="label ${className}"
56
+ ${ref(this.defaultSlotRef)}
57
+ @slotchange="${() => this.onSlotChange(hasLabelLargeSlot)}"
58
+ ></slot>
59
+ ${hasLabelLargeSlot
60
+ ? html `<slot
61
+ name="label-large"
62
+ part="label-large"
63
+ class="label-large ${className}"
64
+ ></slot>`
65
+ : html `<div
66
+ ${ref(this.labelLargeRef)}
67
+ part="label-large"
68
+ class="label-large ${className}"
69
+ ></div>`}`;
56
70
  }
57
71
  /**
58
72
  * default slot 变化时,同步到 label-large 中
@@ -22,13 +22,13 @@ declare const TopAppBar_base: import("@open-wc/dedupe-mixin").Constructor<import
22
22
  *
23
23
  * @slot - 顶部应用栏内部的元素
24
24
  *
25
- * @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](/docs/2/styles/design-tokens#shape-corner)
26
- * @cssprop --z-index - 组件的 CSS `z-index` 值
25
+ * @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
26
+ * @cssprop --z-index - 组件的 CSS `z-index` 值
27
27
  */
28
28
  export declare class TopAppBar extends TopAppBar_base<TopAppBarEventMap> {
29
29
  static styles: CSSResultGroup;
30
30
  /**
31
- * 顶部应用栏形状。默认为 `small`。可选值为:
31
+ * 顶部应用栏的形状。默认为 `small`。可选值包括:
32
32
  *
33
33
  * * `center-aligned`:小型应用栏,标题居中
34
34
  * * `small`:小型应用栏
@@ -41,11 +41,11 @@ export declare class TopAppBar extends TopAppBar_base<TopAppBarEventMap> {
41
41
  */
42
42
  hide: boolean;
43
43
  /**
44
- * 是否缩小成 `variant="small"` 的样式,仅在 `variant="medium"` 或 `variant="large"` 时生效
44
+ * 是否缩小为 `variant="small"` 的样式,仅在 `variant="medium"` 或 `variant="large"` 时生效
45
45
  */
46
46
  shrink: boolean;
47
47
  /**
48
- * 滚动行为。可同时使用多个值,多个值之间用空格分割。可选值为:
48
+ * 滚动行为。可同时使用多个值,用空格分隔。可选值包括:
49
49
  *
50
50
  * * `hide`:滚动时隐藏
51
51
  * * `shrink`:在中型、大型应用栏中可使用,滚动时缩小成小型应用栏的样式
@@ -26,14 +26,14 @@ import { topAppBarStyle } from './top-app-bar-style.js';
26
26
  *
27
27
  * @slot - 顶部应用栏内部的元素
28
28
  *
29
- * @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](/docs/2/styles/design-tokens#shape-corner)
30
- * @cssprop --z-index - 组件的 CSS `z-index` 值
29
+ * @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
30
+ * @cssprop --z-index - 组件的 CSS `z-index` 值
31
31
  */
32
32
  let TopAppBar = class TopAppBar extends ScrollBehaviorMixin(LayoutItemBase) {
33
33
  constructor() {
34
34
  super(...arguments);
35
35
  /**
36
- * 顶部应用栏形状。默认为 `small`。可选值为:
36
+ * 顶部应用栏的形状。默认为 `small`。可选值包括:
37
37
  *
38
38
  * * `center-aligned`:小型应用栏,标题居中
39
39
  * * `small`:小型应用栏
@@ -46,7 +46,7 @@ let TopAppBar = class TopAppBar extends ScrollBehaviorMixin(LayoutItemBase) {
46
46
  */
47
47
  this.hide = false;
48
48
  /**
49
- * 是否缩小成 `variant="small"` 的样式,仅在 `variant="medium"` 或 `variant="large"` 时生效
49
+ * 是否缩小为 `variant="small"` 的样式,仅在 `variant="medium"` 或 `variant="large"` 时生效
50
50
  */
51
51
  this.shrink = false;
52
52
  /**