persagy-vant 0.0.30 → 0.0.31

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 (210) hide show
  1. package/es/cell/Cell.d.ts +34 -1
  2. package/es/cell/Cell.mjs +48 -12
  3. package/es/cell/index.css +1 -1
  4. package/es/cell/index.d.ts +20 -1
  5. package/es/cell/index.less +19 -0
  6. package/es/cell/var.less +1 -1
  7. package/es/collapse-item/CollapseItem.d.ts +25 -0
  8. package/es/collapse-item/index.d.ts +18 -0
  9. package/es/content-panel/ContentPanel.d.ts +46 -0
  10. package/es/content-panel/ContentPanel.mjs +72 -0
  11. package/es/content-panel/index.css +1 -0
  12. package/es/content-panel/index.d.ts +33 -0
  13. package/es/content-panel/index.less +54 -0
  14. package/es/content-panel/index.mjs +8 -0
  15. package/es/content-panel/style/index.mjs +11 -0
  16. package/es/content-panel/style/less.mjs +11 -0
  17. package/es/content-panel/var.css +0 -0
  18. package/es/content-panel/var.less +3 -0
  19. package/es/dialog/Dialog.d.ts +4 -0
  20. package/es/dialog/Dialog.mjs +14 -1
  21. package/es/dialog/function-call.d.ts +2 -0
  22. package/es/dialog/types.d.ts +2 -0
  23. package/es/field/Field.d.ts +25 -0
  24. package/es/field/Field.mjs +1 -1
  25. package/es/field/index.d.ts +18 -0
  26. package/es/index.d.ts +6 -1
  27. package/es/index.mjs +16 -1
  28. package/es/info-card/InfoCard.d.ts +1 -0
  29. package/es/info-card/InfoCard.mjs +1 -0
  30. package/es/label/Label.d.ts +67 -0
  31. package/es/label/Label.mjs +22 -7
  32. package/es/label/index.css +1 -1
  33. package/es/label/index.d.ts +45 -0
  34. package/es/label/index.less +19 -0
  35. package/es/label/var.less +4 -1
  36. package/es/loading/Loading.mjs +18 -21
  37. package/es/material-action-bar/MaterialActionBar.d.ts +66 -0
  38. package/es/material-action-bar/MaterialActionBar.mjs +132 -0
  39. package/es/material-action-bar/index.css +1 -0
  40. package/es/material-action-bar/index.d.ts +58 -0
  41. package/es/material-action-bar/index.less +33 -0
  42. package/es/material-action-bar/index.mjs +8 -0
  43. package/es/material-action-bar/style/index.mjs +19 -0
  44. package/es/material-action-bar/style/less.mjs +19 -0
  45. package/es/material-add/MaterialAdd.mjs +12 -7
  46. package/es/material-add/index.css +1 -1
  47. package/es/material-add/index.less +7 -5
  48. package/es/material-add/style/index.mjs +7 -0
  49. package/es/material-add/style/less.mjs +7 -0
  50. package/es/material-detail/MaterialDetail.d.ts +64 -0
  51. package/es/material-detail/MaterialDetail.mjs +192 -0
  52. package/es/material-detail/index.css +1 -0
  53. package/es/material-detail/index.d.ts +40 -0
  54. package/es/material-detail/index.less +20 -0
  55. package/es/material-detail/index.mjs +8 -0
  56. package/es/material-detail/style/index.mjs +11 -0
  57. package/es/material-detail/style/less.mjs +11 -0
  58. package/es/material-display-bar/MaterialDisplayBar.d.ts +159 -0
  59. package/es/material-display-bar/MaterialDisplayBar.mjs +109 -0
  60. package/es/material-display-bar/index.css +1 -0
  61. package/es/material-display-bar/index.d.ts +103 -0
  62. package/es/material-display-bar/index.less +113 -0
  63. package/es/material-display-bar/index.mjs +8 -0
  64. package/es/material-display-bar/style/index.mjs +11 -0
  65. package/es/material-display-bar/style/less.mjs +11 -0
  66. package/es/material-display-bar/var.css +0 -0
  67. package/es/material-display-bar/var.less +12 -0
  68. package/es/rate/RateCell.mjs +4 -1
  69. package/es/rate/index.css +1 -1
  70. package/es/rate/index.less +16 -3
  71. package/es/search/Search.d.ts +14 -1
  72. package/es/search/Search.mjs +5 -3
  73. package/es/search/index.css +1 -1
  74. package/es/search/index.d.ts +9 -0
  75. package/es/search/index.less +10 -0
  76. package/es/search/types.d.ts +1 -0
  77. package/es/step/index.css +1 -1
  78. package/es/step/var.less +2 -2
  79. package/es/style/base.css +1 -1
  80. package/es/style/css-variables.css +1 -1
  81. package/es/style/var.less +1 -1
  82. package/es/title-bar/TitleBar.d.ts +85 -0
  83. package/es/title-bar/TitleBar.mjs +62 -0
  84. package/es/title-bar/index.css +1 -0
  85. package/es/title-bar/index.d.ts +60 -0
  86. package/es/title-bar/index.less +25 -0
  87. package/es/title-bar/index.mjs +8 -0
  88. package/es/title-bar/style/index.mjs +4 -0
  89. package/es/title-bar/style/less.mjs +4 -0
  90. package/es/title-bar/var.css +0 -0
  91. package/es/title-bar/var.less +6 -0
  92. package/es/tree-select/TreeSelect.d.ts +13 -0
  93. package/es/tree-select/TreeSelect.mjs +4 -2
  94. package/es/tree-select/index.css +1 -1
  95. package/es/tree-select/index.d.ts +9 -0
  96. package/es/tree-select/index.less +6 -0
  97. package/lib/cell/Cell.d.ts +34 -1
  98. package/lib/cell/Cell.js +46 -10
  99. package/lib/cell/index.css +1 -1
  100. package/lib/cell/index.d.ts +20 -1
  101. package/lib/cell/index.less +19 -0
  102. package/lib/cell/var.less +1 -1
  103. package/lib/collapse-item/CollapseItem.d.ts +25 -0
  104. package/lib/collapse-item/index.d.ts +18 -0
  105. package/lib/content-panel/ContentPanel.d.ts +46 -0
  106. package/lib/content-panel/ContentPanel.js +91 -0
  107. package/lib/content-panel/index.css +1 -0
  108. package/lib/content-panel/index.d.ts +33 -0
  109. package/lib/content-panel/index.js +37 -0
  110. package/lib/content-panel/index.less +54 -0
  111. package/lib/content-panel/style/index.js +11 -0
  112. package/lib/content-panel/style/less.js +11 -0
  113. package/lib/content-panel/var.css +0 -0
  114. package/lib/content-panel/var.less +3 -0
  115. package/lib/dialog/Dialog.d.ts +4 -0
  116. package/lib/dialog/Dialog.js +13 -0
  117. package/lib/dialog/function-call.d.ts +2 -0
  118. package/lib/dialog/types.d.ts +2 -0
  119. package/lib/dog1.jpg +0 -0
  120. package/lib/dog2.jpg +0 -0
  121. package/lib/dog3.jpg +0 -0
  122. package/lib/field/Field.d.ts +25 -0
  123. package/lib/field/Field.js +1 -1
  124. package/lib/field/index.d.ts +18 -0
  125. package/lib/index.css +1 -1
  126. package/lib/index.d.ts +6 -1
  127. package/lib/index.js +16 -1
  128. package/lib/index.less +6 -1
  129. package/lib/info-card/InfoCard.d.ts +1 -0
  130. package/lib/info-card/InfoCard.js +1 -0
  131. package/lib/label/Label.d.ts +67 -0
  132. package/lib/label/Label.js +21 -6
  133. package/lib/label/index.css +1 -1
  134. package/lib/label/index.d.ts +45 -0
  135. package/lib/label/index.less +19 -0
  136. package/lib/label/var.less +4 -1
  137. package/lib/loading/Loading.js +18 -21
  138. package/lib/material-action-bar/MaterialActionBar.d.ts +66 -0
  139. package/lib/material-action-bar/MaterialActionBar.js +151 -0
  140. package/lib/material-action-bar/index.css +1 -0
  141. package/lib/material-action-bar/index.d.ts +58 -0
  142. package/lib/material-action-bar/index.js +37 -0
  143. package/lib/material-action-bar/index.less +33 -0
  144. package/lib/material-action-bar/style/index.js +19 -0
  145. package/lib/material-action-bar/style/less.js +19 -0
  146. package/lib/material-add/MaterialAdd.js +12 -7
  147. package/lib/material-add/index.css +1 -1
  148. package/lib/material-add/index.less +7 -5
  149. package/lib/material-add/style/index.js +7 -0
  150. package/lib/material-add/style/less.js +7 -0
  151. package/lib/material-detail/MaterialDetail.d.ts +64 -0
  152. package/lib/material-detail/MaterialDetail.js +211 -0
  153. package/lib/material-detail/index.css +1 -0
  154. package/lib/material-detail/index.d.ts +40 -0
  155. package/lib/material-detail/index.js +37 -0
  156. package/lib/material-detail/index.less +20 -0
  157. package/lib/material-detail/style/index.js +11 -0
  158. package/lib/material-detail/style/less.js +11 -0
  159. package/lib/material-display-bar/MaterialDisplayBar.d.ts +159 -0
  160. package/lib/material-display-bar/MaterialDisplayBar.js +128 -0
  161. package/lib/material-display-bar/index.css +1 -0
  162. package/lib/material-display-bar/index.d.ts +103 -0
  163. package/lib/material-display-bar/index.js +37 -0
  164. package/lib/material-display-bar/index.less +113 -0
  165. package/lib/material-display-bar/style/index.js +11 -0
  166. package/lib/material-display-bar/style/less.js +11 -0
  167. package/lib/material-display-bar/var.css +0 -0
  168. package/lib/material-display-bar/var.less +12 -0
  169. package/lib/rate/RateCell.js +4 -1
  170. package/lib/rate/index.css +1 -1
  171. package/lib/rate/index.less +16 -3
  172. package/lib/search/Search.d.ts +14 -1
  173. package/lib/search/Search.js +5 -3
  174. package/lib/search/index.css +1 -1
  175. package/lib/search/index.d.ts +9 -0
  176. package/lib/search/index.less +10 -0
  177. package/lib/search/types.d.ts +1 -0
  178. package/lib/step/index.css +1 -1
  179. package/lib/step/var.less +2 -2
  180. package/lib/style/base.css +1 -1
  181. package/lib/style/css-variables.css +1 -1
  182. package/lib/style/var.less +1 -1
  183. package/lib/title-bar/TitleBar.d.ts +85 -0
  184. package/lib/title-bar/TitleBar.js +81 -0
  185. package/lib/title-bar/index.css +1 -0
  186. package/lib/title-bar/index.d.ts +60 -0
  187. package/lib/title-bar/index.js +37 -0
  188. package/lib/title-bar/index.less +25 -0
  189. package/lib/title-bar/style/index.js +4 -0
  190. package/lib/title-bar/style/less.js +4 -0
  191. package/lib/title-bar/var.css +0 -0
  192. package/lib/title-bar/var.less +6 -0
  193. package/lib/tree-select/TreeSelect.d.ts +13 -0
  194. package/lib/tree-select/TreeSelect.js +3 -1
  195. package/lib/tree-select/index.css +1 -1
  196. package/lib/tree-select/index.d.ts +9 -0
  197. package/lib/tree-select/index.less +6 -0
  198. package/lib/vant.cjs.js +1641 -1218
  199. package/lib/vant.es.js +1641 -1218
  200. package/lib/vant.js +1641 -1218
  201. package/lib/vant.min.js +1 -1
  202. package/lib/web-types.json +1 -1
  203. package/package.json +1 -1
  204. package/skills/use-persagy-vant/references/business-component-catalog.md +8 -3
  205. package/skills/use-persagy-vant/references/component-catalog.md +7 -4
  206. package/skills/use-persagy-vant/references/component-documentation.md +1 -1
  207. package/skills/use-persagy-vant/references/design-interaction-baseline.md +3 -3
  208. package/skills/use-persagy-vant/references/page-recipes.md +18 -5
  209. package/skills/use-persagy-vant/references/reuse-policy.md +1 -1
  210. package/skills/use-persagy-vant/references/usage-patterns.md +9 -1
@@ -1,5 +1,7 @@
1
1
  import { type ExtractPropTypes, type PropType } from 'vue';
2
2
  export declare type LabelType = 'default' | 'bold' | 'link' | 'tag' | 'media';
3
+ export declare type LabelSize = 'default' | 'mini';
4
+ export declare type LabelContentAlign = 'follow' | 'right';
3
5
  export declare type LabelMediaType = 'image' | 'video';
4
6
  export declare type LabelMedia = {
5
7
  url: string;
@@ -12,6 +14,18 @@ declare const labelProps: {
12
14
  type: PropType<string>;
13
15
  default: string;
14
16
  };
17
+ showLabel: {
18
+ type: BooleanConstructor;
19
+ default: true;
20
+ };
21
+ showContent: {
22
+ type: BooleanConstructor;
23
+ default: true;
24
+ };
25
+ showColon: {
26
+ type: PropType<boolean | undefined>;
27
+ default: undefined;
28
+ };
15
29
  content: {
16
30
  type: PropType<string>;
17
31
  default: string;
@@ -20,6 +34,14 @@ declare const labelProps: {
20
34
  type: PropType<LabelType>;
21
35
  default: LabelType;
22
36
  };
37
+ size: {
38
+ type: PropType<LabelSize>;
39
+ default: LabelSize;
40
+ };
41
+ contentAlign: {
42
+ type: PropType<LabelContentAlign>;
43
+ default: LabelContentAlign;
44
+ };
23
45
  vertical: BooleanConstructor;
24
46
  href: StringConstructor;
25
47
  location: StringConstructor;
@@ -38,6 +60,18 @@ declare const _default: import("vue").DefineComponent<{
38
60
  type: PropType<string>;
39
61
  default: string;
40
62
  };
63
+ showLabel: {
64
+ type: BooleanConstructor;
65
+ default: true;
66
+ };
67
+ showContent: {
68
+ type: BooleanConstructor;
69
+ default: true;
70
+ };
71
+ showColon: {
72
+ type: PropType<boolean | undefined>;
73
+ default: undefined;
74
+ };
41
75
  content: {
42
76
  type: PropType<string>;
43
77
  default: string;
@@ -46,6 +80,14 @@ declare const _default: import("vue").DefineComponent<{
46
80
  type: PropType<LabelType>;
47
81
  default: LabelType;
48
82
  };
83
+ size: {
84
+ type: PropType<LabelSize>;
85
+ default: LabelSize;
86
+ };
87
+ contentAlign: {
88
+ type: PropType<LabelContentAlign>;
89
+ default: LabelContentAlign;
90
+ };
49
91
  vertical: BooleanConstructor;
50
92
  href: StringConstructor;
51
93
  location: StringConstructor;
@@ -62,6 +104,18 @@ declare const _default: import("vue").DefineComponent<{
62
104
  type: PropType<string>;
63
105
  default: string;
64
106
  };
107
+ showLabel: {
108
+ type: BooleanConstructor;
109
+ default: true;
110
+ };
111
+ showContent: {
112
+ type: BooleanConstructor;
113
+ default: true;
114
+ };
115
+ showColon: {
116
+ type: PropType<boolean | undefined>;
117
+ default: undefined;
118
+ };
65
119
  content: {
66
120
  type: PropType<string>;
67
121
  default: string;
@@ -70,6 +124,14 @@ declare const _default: import("vue").DefineComponent<{
70
124
  type: PropType<LabelType>;
71
125
  default: LabelType;
72
126
  };
127
+ size: {
128
+ type: PropType<LabelSize>;
129
+ default: LabelSize;
130
+ };
131
+ contentAlign: {
132
+ type: PropType<LabelContentAlign>;
133
+ default: LabelContentAlign;
134
+ };
73
135
  vertical: BooleanConstructor;
74
136
  href: StringConstructor;
75
137
  location: StringConstructor;
@@ -88,8 +150,13 @@ declare const _default: import("vue").DefineComponent<{
88
150
  type: LabelType;
89
151
  label: string;
90
152
  content: string;
153
+ size: LabelSize;
91
154
  tags: string[];
92
155
  media: LabelMedia[];
93
156
  vertical: boolean;
157
+ showLabel: boolean;
158
+ showContent: boolean;
159
+ showColon: boolean | undefined;
160
+ contentAlign: LabelContentAlign;
94
161
  }>;
95
162
  export default _default;
@@ -1,13 +1,21 @@
1
1
  import { computed, defineComponent, createVNode as _createVNode } from "vue";
2
- import { createNamespace, makeStringProp } from "../utils/index.mjs";
2
+ import { createNamespace, makeStringProp, truthProp } from "../utils/index.mjs";
3
3
  import { Image } from "../image/index.mjs";
4
4
  import { Icon } from "../icon/index.mjs";
5
5
  import { Tag } from "../tag/index.mjs";
6
6
  const [name, bem] = createNamespace("label");
7
7
  const labelProps = {
8
8
  label: makeStringProp(""),
9
+ showLabel: truthProp,
10
+ showContent: truthProp,
11
+ showColon: {
12
+ type: Boolean,
13
+ default: void 0
14
+ },
9
15
  content: makeStringProp(""),
10
16
  type: makeStringProp("default"),
17
+ size: makeStringProp("default"),
18
+ contentAlign: makeStringProp("follow"),
11
19
  vertical: Boolean,
12
20
  href: String,
13
21
  location: String,
@@ -29,6 +37,14 @@ var stdin_default = defineComponent({
29
37
  emit
30
38
  }) {
31
39
  const vertical = computed(() => props.vertical || props.type === "media");
40
+ const displayLabel = computed(() => {
41
+ var _a;
42
+ const showColon = (_a = props.showColon) != null ? _a : !vertical.value && props.contentAlign !== "right";
43
+ if (!showColon || !props.label || /[::]$/.test(props.label)) {
44
+ return props.label;
45
+ }
46
+ return `${props.label}\uFF1A`;
47
+ });
32
48
  const showLocation = computed(() => props.vertical && (props.type === "bold" || props.type === "link") && !!props.location);
33
49
  const renderText = () => {
34
50
  var _a;
@@ -66,9 +82,6 @@ var stdin_default = defineComponent({
66
82
  }, [_createVNode(Image, {
67
83
  "src": item.type === "video" ? item.poster || item.url : item.url,
68
84
  "alt": item.alt,
69
- "width": "64",
70
- "height": "64",
71
- "radius": "4",
72
85
  "fit": "cover"
73
86
  }, null), item.type === "video" && _createVNode(Icon, {
74
87
  "name": "play-circle-o",
@@ -83,12 +96,14 @@ var stdin_default = defineComponent({
83
96
  };
84
97
  return () => _createVNode("div", {
85
98
  "class": bem([props.type, {
99
+ mini: props.size === "mini",
86
100
  vertical: vertical.value,
87
- location: showLocation.value
101
+ location: showLocation.value,
102
+ "content-right": props.contentAlign === "right"
88
103
  }])
89
- }, [_createVNode("span", {
104
+ }, [props.showLabel && _createVNode("span", {
90
105
  "class": bem("label")
91
- }, [props.label]), _createVNode("div", {
106
+ }, [displayLabel.value]), props.showContent && _createVNode("div", {
92
107
  "class": bem("value")
93
108
  }, [renderContent(), showLocation.value && _createVNode("div", {
94
109
  "class": bem("location")
@@ -1 +1 @@
1
- :root{--van-label-font-size: var(--van-font-size-md);--van-label-line-height: var(--van-line-height-lg);--van-label-label-color: var(--van-gray-7);--van-label-value-color: var(--van-black);--van-label-bold-color: var(--van-gray-8);--van-label-link-color: var(--van-primary-color);--van-label-gap: 2px;--van-label-tags-gap: 4px;--van-label-media-gap: 6px;--van-label-media-size: 64px;--van-label-media-radius: 4px;--van-label-location-color: var(--van-gray-7);--van-label-location-font-size: var(--van-font-size-sm);--van-label-location-line-height: var(--van-line-height-md);--van-label-location-icon-size: 12px;--van-label-location-gap: 2px}.van-label{display:flex;align-items:flex-start;gap:var(--van-label-gap);color:var(--van-label-value-color);font-size:var(--van-label-font-size);line-height:var(--van-label-line-height)}.van-label--vertical{flex-direction:column}.van-label__label{flex:none;color:var(--van-label-label-color);white-space:nowrap}.van-label__value{flex:1;min-width:0;color:inherit;overflow-wrap:anywhere}.van-label__text{display:block}.van-label--location .van-label__value{display:flex;flex-direction:column;gap:var(--van-label-location-gap);width:100%}.van-label--location .van-label__link{align-self:flex-start;text-align:left}.van-label__location{display:inline-flex;gap:var(--van-label-location-gap);align-items:center;width:-moz-fit-content;width:fit-content;max-width:100%;color:var(--van-label-location-color);font-size:var(--van-label-location-font-size);font-weight:400;line-height:var(--van-label-location-line-height);overflow-wrap:anywhere}.van-label__location .van-icon{flex:none;font-size:var(--van-label-location-icon-size)}.van-label--bold .van-label__value{color:var(--van-label-bold-color);font-weight:var(--van-font-weight-bold)}.van-label__link{display:inline;padding:0;color:var(--van-label-link-color);font:inherit;font-weight:var(--van-font-weight-bold);text-decoration:none;background:transparent;border:0;cursor:pointer;transition:opacity var(--van-animation-duration-fast)}.van-label__link:active{opacity:var(--van-active-opacity)}.van-label__tags,.van-label__media{display:flex;flex-wrap:wrap;align-items:flex-start}.van-label__tags{gap:var(--van-label-tags-gap);min-height:var(--van-label-line-height);align-items:center}.van-label__media{gap:var(--van-label-media-gap);width:100%}.van-label__media-item{position:relative;flex:none;width:var(--van-label-media-size);height:var(--van-label-media-size);padding:0;overflow:hidden;background:transparent;border:0;border-radius:var(--van-label-media-radius);cursor:pointer;transition:opacity var(--van-animation-duration-fast)}.van-label__media-item:active{opacity:var(--van-active-opacity)}.van-label__play{position:absolute;top:50%;left:50%;color:var(--van-white);font-size:24px;transform:translate(-50%,-50%);text-shadow:0 1px 2px rgba(0,0,0,.45)}
1
+ :root{--van-label-font-size: var(--van-font-size-md);--van-label-line-height: var(--van-line-height-lg);--van-label-mini-font-size: var(--van-font-size-sm);--van-label-mini-line-height: var(--van-line-height-md);--van-label-label-color: var(--van-gray-6);--van-label-value-color: var(--van-black);--van-label-bold-color: var(--van-gray-8);--van-label-link-color: var(--van-primary-color);--van-label-gap: 2px;--van-label-tags-gap: 4px;--van-label-media-gap: 6px;--van-label-media-size: 64px;--van-label-mini-media-size: 48px;--van-label-media-radius: 4px;--van-label-location-color: var(--van-gray-7);--van-label-location-font-size: var(--van-font-size-sm);--van-label-location-line-height: var(--van-line-height-md);--van-label-location-icon-size: 12px;--van-label-location-gap: 2px}.van-label{display:flex;align-items:flex-start;gap:var(--van-label-gap);color:var(--van-label-value-color);font-size:var(--van-label-font-size);line-height:var(--van-label-line-height)}.van-label--vertical{flex-direction:column}.van-label--content-right .van-label__value{text-align:right}.van-label--mini{--van-label-font-size: var(--van-label-mini-font-size);--van-label-line-height: var(--van-label-mini-line-height);--van-label-media-size: var(--van-label-mini-media-size)}.van-label__label{flex:none;color:var(--van-label-label-color);white-space:nowrap}.van-label__value{flex:1;min-width:0;color:inherit;overflow-wrap:anywhere}.van-label__text{display:block}.van-label--location .van-label__value{display:flex;flex-direction:column;gap:var(--van-label-location-gap);width:100%}.van-label--location .van-label__link{align-self:flex-start;text-align:left}.van-label__location{display:inline-flex;gap:var(--van-label-location-gap);align-items:center;width:-moz-fit-content;width:fit-content;max-width:100%;color:var(--van-label-location-color);font-size:var(--van-label-location-font-size);font-weight:400;line-height:var(--van-label-location-line-height);overflow-wrap:anywhere}.van-label__location .van-icon{flex:none;font-size:var(--van-label-location-icon-size)}.van-label--bold .van-label__value{color:var(--van-label-bold-color);font-weight:var(--van-font-weight-bold)}.van-label__link{display:inline;padding:0;color:var(--van-label-link-color);font:inherit;font-weight:var(--van-font-weight-bold);text-decoration:none;background:transparent;border:0;cursor:pointer;transition:opacity var(--van-animation-duration-fast)}.van-label__link:active{opacity:var(--van-active-opacity)}.van-label__tags,.van-label__media{display:flex;flex-wrap:wrap;align-items:flex-start}.van-label__tags{gap:var(--van-label-tags-gap);min-height:var(--van-label-line-height);align-items:center}.van-label__media{gap:var(--van-label-media-gap);width:100%}.van-label__media-item{position:relative;flex:none;width:var(--van-label-media-size);height:var(--van-label-media-size);padding:0;overflow:hidden;background:transparent;border:0;border-radius:var(--van-label-media-radius);cursor:pointer;transition:opacity var(--van-animation-duration-fast)}.van-label__media-item:active{opacity:var(--van-active-opacity)}.van-label__media-item .van-image{display:block;width:100%;height:100%}.van-label__play{position:absolute;top:50%;left:50%;color:var(--van-white);font-size:24px;transform:translate(-50%,-50%);text-shadow:0 1px 2px rgba(0,0,0,.45)}
@@ -3,6 +3,18 @@ export declare const Label: import("../utils").WithInstall<import("vue").DefineC
3
3
  type: import("vue").PropType<string>;
4
4
  default: string;
5
5
  };
6
+ showLabel: {
7
+ type: BooleanConstructor;
8
+ default: true;
9
+ };
10
+ showContent: {
11
+ type: BooleanConstructor;
12
+ default: true;
13
+ };
14
+ showColon: {
15
+ type: import("vue").PropType<boolean | undefined>;
16
+ default: undefined;
17
+ };
6
18
  content: {
7
19
  type: import("vue").PropType<string>;
8
20
  default: string;
@@ -11,6 +23,14 @@ export declare const Label: import("../utils").WithInstall<import("vue").DefineC
11
23
  type: import("vue").PropType<import("./Label").LabelType>;
12
24
  default: import("./Label").LabelType;
13
25
  };
26
+ size: {
27
+ type: import("vue").PropType<import("./Label").LabelSize>;
28
+ default: import("./Label").LabelSize;
29
+ };
30
+ contentAlign: {
31
+ type: import("vue").PropType<import("./Label").LabelContentAlign>;
32
+ default: import("./Label").LabelContentAlign;
33
+ };
14
34
  vertical: BooleanConstructor;
15
35
  href: StringConstructor;
16
36
  location: StringConstructor;
@@ -27,6 +47,18 @@ export declare const Label: import("../utils").WithInstall<import("vue").DefineC
27
47
  type: import("vue").PropType<string>;
28
48
  default: string;
29
49
  };
50
+ showLabel: {
51
+ type: BooleanConstructor;
52
+ default: true;
53
+ };
54
+ showContent: {
55
+ type: BooleanConstructor;
56
+ default: true;
57
+ };
58
+ showColon: {
59
+ type: import("vue").PropType<boolean | undefined>;
60
+ default: undefined;
61
+ };
30
62
  content: {
31
63
  type: import("vue").PropType<string>;
32
64
  default: string;
@@ -35,6 +67,14 @@ export declare const Label: import("../utils").WithInstall<import("vue").DefineC
35
67
  type: import("vue").PropType<import("./Label").LabelType>;
36
68
  default: import("./Label").LabelType;
37
69
  };
70
+ size: {
71
+ type: import("vue").PropType<import("./Label").LabelSize>;
72
+ default: import("./Label").LabelSize;
73
+ };
74
+ contentAlign: {
75
+ type: import("vue").PropType<import("./Label").LabelContentAlign>;
76
+ default: import("./Label").LabelContentAlign;
77
+ };
38
78
  vertical: BooleanConstructor;
39
79
  href: StringConstructor;
40
80
  location: StringConstructor;
@@ -53,9 +93,14 @@ export declare const Label: import("../utils").WithInstall<import("vue").DefineC
53
93
  type: import("./Label").LabelType;
54
94
  label: string;
55
95
  content: string;
96
+ size: import("./Label").LabelSize;
56
97
  tags: string[];
57
98
  media: import("./Label").LabelMedia[];
58
99
  vertical: boolean;
100
+ showLabel: boolean;
101
+ showContent: boolean;
102
+ showColon: boolean | undefined;
103
+ contentAlign: import("./Label").LabelContentAlign;
59
104
  }>>;
60
105
  export default Label;
61
106
  export type { LabelMedia, LabelMediaType, LabelProps, LabelType } from './Label';
@@ -3,6 +3,8 @@
3
3
  :root {
4
4
  --van-label-font-size: @label-font-size;
5
5
  --van-label-line-height: @label-line-height;
6
+ --van-label-mini-font-size: @label-mini-font-size;
7
+ --van-label-mini-line-height: @label-mini-line-height;
6
8
  --van-label-label-color: @label-label-color;
7
9
  --van-label-value-color: @label-value-color;
8
10
  --van-label-bold-color: @label-bold-color;
@@ -11,6 +13,7 @@
11
13
  --van-label-tags-gap: @label-tags-gap;
12
14
  --van-label-media-gap: @label-media-gap;
13
15
  --van-label-media-size: @label-media-size;
16
+ --van-label-mini-media-size: @label-mini-media-size;
14
17
  --van-label-media-radius: @label-media-radius;
15
18
  --van-label-location-color: @label-location-color;
16
19
  --van-label-location-font-size: @label-location-font-size;
@@ -31,6 +34,16 @@
31
34
  flex-direction: column;
32
35
  }
33
36
 
37
+ &--content-right .van-label__value {
38
+ text-align: right;
39
+ }
40
+
41
+ &--mini {
42
+ --van-label-font-size: var(--van-label-mini-font-size);
43
+ --van-label-line-height: var(--van-label-mini-line-height);
44
+ --van-label-media-size: var(--van-label-mini-media-size);
45
+ }
46
+
34
47
  &__label {
35
48
  flex: none;
36
49
  color: var(--van-label-label-color);
@@ -136,6 +149,12 @@
136
149
  }
137
150
  }
138
151
 
152
+ &__media-item .van-image {
153
+ display: block;
154
+ width: 100%;
155
+ height: 100%;
156
+ }
157
+
139
158
  &__play {
140
159
  position: absolute;
141
160
  top: 50%;
package/es/label/var.less CHANGED
@@ -1,6 +1,8 @@
1
1
  @label-font-size: var(--van-font-size-md);
2
2
  @label-line-height: var(--van-line-height-lg);
3
- @label-label-color: var(--van-gray-7);
3
+ @label-mini-font-size: var(--van-font-size-sm);
4
+ @label-mini-line-height: var(--van-line-height-md);
5
+ @label-label-color: var(--van-gray-6);
4
6
  @label-value-color: var(--van-black);
5
7
  @label-bold-color: var(--van-gray-8);
6
8
  @label-link-color: var(--van-primary-color);
@@ -8,6 +10,7 @@
8
10
  @label-tags-gap: 4px;
9
11
  @label-media-gap: 6px;
10
12
  @label-media-size: 64px;
13
+ @label-mini-media-size: 48px;
11
14
  @label-media-radius: 4px;
12
15
  @label-location-color: var(--van-gray-7);
13
16
  @label-location-font-size: var(--van-font-size-sm);
@@ -16,33 +16,30 @@ const CircularIcon = _createVNode("svg", {
16
16
  const IllustrationIcon = _createVNode("svg", {
17
17
  "class": bem("illustration"),
18
18
  "viewBox": "0 0 120 120",
19
- "fill": "none",
20
- "aria-hidden": "true"
19
+ "role": "img",
20
+ "aria-label": "Loading"
21
21
  }, [_createVNode("rect", {
22
- "x": "18",
23
- "y": "24",
24
- "width": "84",
25
- "height": "78",
26
- "rx": "12",
22
+ "x": "16",
23
+ "y": "42",
24
+ "width": "88",
25
+ "height": "62",
26
+ "rx": "8",
27
27
  "fill": "currentColor",
28
- "opacity": "0.16"
28
+ "opacity": "0.12"
29
29
  }, null), _createVNode("path", {
30
- "d": "M35 98V48c0-5.5 4.5-10 10-10h30c5.5 0 10 4.5 10 10v50",
30
+ "d": "M28 42h64v62H28z",
31
31
  "fill": "currentColor",
32
- "opacity": "0.72"
33
- }, null), _createVNode("path", {
34
- "d": "M48 54h8v11h-8zm16 0h8v11h-8zm-16 22h8v11h-8zm16 0h8v11h-8z",
35
- "fill": "white"
32
+ "opacity": "0.24"
36
33
  }, null), _createVNode("path", {
37
- "d": "M56 98V78h8v20",
38
- "fill": "white",
39
- "opacity": "0.92"
40
- }, null), _createVNode("circle", {
41
- "cx": "94",
42
- "cy": "31",
43
- "r": "9",
34
+ "d": "M38 54h12v12H38zm18 0h12v12H56zm18 0h12v12H74zM38 74h12v18H38zm18 0h12v18H56zm18 0h12v18H74z",
44
35
  "fill": "currentColor",
45
- "opacity": "0.9"
36
+ "opacity": "0.78"
37
+ }, null), _createVNode("path", {
38
+ "d": "M48 42V27c0-7 5-12 12-12s12 5 12 12v15",
39
+ "fill": "none",
40
+ "stroke": "currentColor",
41
+ "stroke-width": "8",
42
+ "stroke-linecap": "round"
46
43
  }, null)]);
47
44
  const loadingProps = {
48
45
  size: numericProp,
@@ -0,0 +1,66 @@
1
+ import { type PropType } from 'vue';
2
+ import { type Numeric } from '../utils';
3
+ export declare type MaterialActionBarItem = {
4
+ id: Numeric;
5
+ name: string;
6
+ detail: string;
7
+ unit: string;
8
+ kind?: 'material' | 'tool';
9
+ };
10
+ declare const _default: import("vue").DefineComponent<{
11
+ item: {
12
+ type: PropType<MaterialActionBarItem>;
13
+ required: true;
14
+ };
15
+ modelValue: {
16
+ type: NumberConstructor;
17
+ required: true;
18
+ };
19
+ keyword: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ selected: BooleanConstructor;
24
+ enableInputDialog: {
25
+ type: BooleanConstructor;
26
+ default: true;
27
+ };
28
+ showWarning: BooleanConstructor;
29
+ warning: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "detail")[], "update:modelValue" | "detail", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
+ item: {
35
+ type: PropType<MaterialActionBarItem>;
36
+ required: true;
37
+ };
38
+ modelValue: {
39
+ type: NumberConstructor;
40
+ required: true;
41
+ };
42
+ keyword: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ selected: BooleanConstructor;
47
+ enableInputDialog: {
48
+ type: BooleanConstructor;
49
+ default: true;
50
+ };
51
+ showWarning: BooleanConstructor;
52
+ warning: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ }>> & {
57
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
58
+ onDetail?: ((...args: any[]) => any) | undefined;
59
+ }, {
60
+ selected: boolean;
61
+ warning: string;
62
+ keyword: string;
63
+ enableInputDialog: boolean;
64
+ showWarning: boolean;
65
+ }>;
66
+ export default _default;
@@ -0,0 +1,132 @@
1
+ import { defineComponent, ref, createVNode as _createVNode } from "vue";
2
+ import { Dialog } from "../dialog/index.mjs";
3
+ import { Icon } from "../icon/index.mjs";
4
+ import { Stepper } from "../stepper/index.mjs";
5
+ import { Tag } from "../tag/index.mjs";
6
+ import { createNamespace, truthProp } from "../utils/index.mjs";
7
+ const [name, bem] = createNamespace("material-action-bar");
8
+ var stdin_default = defineComponent({
9
+ name,
10
+ props: {
11
+ item: {
12
+ type: Object,
13
+ required: true
14
+ },
15
+ modelValue: {
16
+ type: Number,
17
+ required: true
18
+ },
19
+ keyword: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ selected: Boolean,
24
+ enableInputDialog: truthProp,
25
+ showWarning: Boolean,
26
+ warning: {
27
+ type: String,
28
+ default: ""
29
+ }
30
+ },
31
+ emits: ["update:modelValue", "detail"],
32
+ setup(props, {
33
+ emit
34
+ }) {
35
+ const showInputDialog = ref(false);
36
+ const inputValue = ref("");
37
+ const openInputDialog = () => {
38
+ if (!props.enableInputDialog)
39
+ return;
40
+ inputValue.value = String(props.modelValue);
41
+ showInputDialog.value = true;
42
+ };
43
+ const confirmInputValue = () => {
44
+ const value = Number(inputValue.value);
45
+ if (!Number.isNaN(value)) {
46
+ emit("update:modelValue", Math.max(0, value));
47
+ }
48
+ };
49
+ const highlight = (text) => {
50
+ const query = props.keyword.trim();
51
+ if (!query)
52
+ return text;
53
+ const lowerText = text.toLowerCase();
54
+ const lowerQuery = query.toLowerCase();
55
+ const parts = [];
56
+ let start = 0;
57
+ let index = lowerText.indexOf(lowerQuery, start);
58
+ while (index !== -1) {
59
+ if (index > start)
60
+ parts.push(text.slice(start, index));
61
+ parts.push(_createVNode("span", {
62
+ "class": bem("keyword")
63
+ }, [text.slice(index, index + query.length)]));
64
+ start = index + query.length;
65
+ index = lowerText.indexOf(lowerQuery, start);
66
+ }
67
+ if (start < text.length)
68
+ parts.push(text.slice(start));
69
+ return parts;
70
+ };
71
+ return () => _createVNode("div", {
72
+ "class": bem({
73
+ selected: props.selected
74
+ })
75
+ }, [_createVNode("div", {
76
+ "class": bem("main")
77
+ }, [_createVNode("button", {
78
+ "type": "button",
79
+ "class": bem("detail"),
80
+ "onClick": () => emit("detail", props.item)
81
+ }, [_createVNode("span", null, [highlight(props.item.name)]), props.selected && props.item.kind && _createVNode(Tag, {
82
+ "class": bem("kind-tag"),
83
+ "color": props.item.kind === "material" ? "#d9ebff" : "#d9f7f7",
84
+ "textColor": props.item.kind === "material" ? "var(--van-primary-color)" : "#00aeb3"
85
+ }, {
86
+ default: () => [props.item.kind === "material" ? "\u7269\u8D44" : "\u5DE5\u5177"]
87
+ }), _createVNode(Icon, {
88
+ "name": "arrow",
89
+ "size": "12"
90
+ }, null)]), _createVNode("div", {
91
+ "class": bem("stepper-wrapper")
92
+ }, [_createVNode(Stepper, {
93
+ "class": bem("stepper"),
94
+ "modelValue": props.modelValue,
95
+ "min": 0,
96
+ "theme": "round",
97
+ "buttonSize": 18,
98
+ "disableInput": true,
99
+ "onUpdate:modelValue": (value) => emit("update:modelValue", Number(value))
100
+ }, null), props.enableInputDialog && _createVNode("button", {
101
+ "type": "button",
102
+ "class": bem("number-trigger"),
103
+ "aria-label": "\u8F93\u5165\u6570\u91CF",
104
+ "onClick": openInputDialog
105
+ }, null)]), _createVNode("span", {
106
+ "class": bem("unit")
107
+ }, [props.item.unit])]), _createVNode("p", {
108
+ "class": bem("desc")
109
+ }, [highlight(props.item.detail)]), props.showWarning && props.warning && _createVNode("p", {
110
+ "class": bem("warning")
111
+ }, [props.warning]), _createVNode(Dialog.Component, {
112
+ "show": showInputDialog.value,
113
+ "inputValue": inputValue.value,
114
+ "inputAlign": "left",
115
+ "title": "\u8F93\u5165\u6570\u91CF",
116
+ "inputPlaceholder": "\u8BF7\u8F93\u5165\u6570\u91CF",
117
+ "inputAutofocus": true,
118
+ "showInput": true,
119
+ "showCancelButton": true,
120
+ "onUpdate:show": (value) => {
121
+ showInputDialog.value = value;
122
+ },
123
+ "onUpdate:inputValue": (value) => {
124
+ inputValue.value = value;
125
+ },
126
+ "onConfirm": confirmInputValue
127
+ }, null)]);
128
+ }
129
+ });
130
+ export {
131
+ stdin_default as default
132
+ };
@@ -0,0 +1 @@
1
+ .van-material-action-bar{position:relative;padding:10px var(--van-padding-md)}.van-material-action-bar--selected{padding:10px var(--van-padding-md);background:var(--van-gray-2);border-radius:8px}.van-material-action-bar--selected:after{display:none}.van-material-action-bar:not(:last-child):after{position:absolute;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);height:1px;background:var(--van-border-color);transform:scaleY(.5);content:""}.van-material-action-bar__main{display:flex;align-items:center;min-height:22px}.van-material-action-bar__detail{display:inline-flex;flex:none;gap:2px;align-items:center;max-width:calc(100% - 96px);padding:0;overflow:hidden;color:var(--van-gray-9);font:inherit;font-size:var(--van-font-size-md);line-height:var(--van-line-height-lg);text-align:left;background:transparent;border:0;cursor:pointer;transition:opacity var(--van-animation-duration-fast)}.van-material-action-bar__detail:active{opacity:var(--van-active-opacity)}.van-material-action-bar__detail>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-material-action-bar__stepper-wrapper{position:relative;margin-left:auto}.van-material-action-bar__kind-tag{flex:none;margin-left:4px}.van-material-action-bar__stepper{flex:none;margin-left:0;--van-stepper-input-width: 32px;--van-stepper-input-height: 18px;--van-stepper-input-font-size: var(--van-font-size-md);--van-stepper-input-line-height: var(--van-line-height-lg)}.van-material-action-bar__number-trigger{position:absolute;z-index:1;top:0;left:18px;width:32px;height:18px;padding:0;background:transparent;border:0;cursor:pointer}.van-material-action-bar__unit{width:32px;margin-left:8px;overflow:hidden;color:var(--van-text-color-2);font-size:var(--van-font-size-md);line-height:var(--van-line-height-lg);text-overflow:ellipsis;white-space:nowrap}.van-material-action-bar__desc{margin:2px 0 0;overflow:hidden;color:var(--van-gray-6);font-size:var(--van-font-size-sm);line-height:20px;text-overflow:ellipsis;white-space:nowrap}.van-material-action-bar__warning{margin:2px 0 0;color:var(--van-red-500);font-size:var(--van-font-size-sm);line-height:20px}.van-material-action-bar__keyword{color:var(--van-primary-color)}
@@ -0,0 +1,58 @@
1
+ export declare const MaterialActionBar: import("../utils").WithInstall<import("vue").DefineComponent<{
2
+ item: {
3
+ type: import("vue").PropType<import("./MaterialActionBar").MaterialActionBarItem>;
4
+ required: true;
5
+ };
6
+ modelValue: {
7
+ type: NumberConstructor;
8
+ required: true;
9
+ };
10
+ keyword: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ selected: BooleanConstructor;
15
+ enableInputDialog: {
16
+ type: BooleanConstructor;
17
+ default: true;
18
+ };
19
+ showWarning: BooleanConstructor;
20
+ warning: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "detail")[], "update:modelValue" | "detail", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
+ item: {
26
+ type: import("vue").PropType<import("./MaterialActionBar").MaterialActionBarItem>;
27
+ required: true;
28
+ };
29
+ modelValue: {
30
+ type: NumberConstructor;
31
+ required: true;
32
+ };
33
+ keyword: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
37
+ selected: BooleanConstructor;
38
+ enableInputDialog: {
39
+ type: BooleanConstructor;
40
+ default: true;
41
+ };
42
+ showWarning: BooleanConstructor;
43
+ warning: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ }>> & {
48
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
49
+ onDetail?: ((...args: any[]) => any) | undefined;
50
+ }, {
51
+ selected: boolean;
52
+ warning: string;
53
+ keyword: string;
54
+ enableInputDialog: boolean;
55
+ showWarning: boolean;
56
+ }>>;
57
+ export default MaterialActionBar;
58
+ export type { MaterialActionBarItem } from './MaterialActionBar';