persagy-vant 0.0.37 → 0.0.38

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 (150) hide show
  1. package/es/area/style/index.mjs +2 -0
  2. package/es/area/style/less.mjs +2 -0
  3. package/es/cell/index.d.ts +1 -1
  4. package/es/icon/Icon.mjs +7 -4
  5. package/es/icon/assets/copy.svg +4 -0
  6. package/es/icon/config.d.ts +1 -0
  7. package/es/icon/config.mjs +1 -0
  8. package/es/icon/gif.d.ts +6 -0
  9. package/es/icon/gif.mjs +9 -0
  10. package/es/icon/index.css +1 -1
  11. package/es/icon/index.d.ts +2 -0
  12. package/es/icon/index.mjs +4 -1
  13. package/es/icon/latest-iconfont.css +1 -1
  14. package/es/icon/latest-iconfont.less +11 -0
  15. package/es/index.d.ts +1 -1
  16. package/es/index.mjs +1 -1
  17. package/es/info-card/InfoCard.d.ts +31 -0
  18. package/es/info-card/InfoCard.mjs +45 -3
  19. package/es/info-card/index.css +1 -1
  20. package/es/info-card/index.d.ts +22 -1
  21. package/es/info-card/index.less +57 -0
  22. package/es/info-card/var.less +1 -1
  23. package/es/label/Label.d.ts +21 -0
  24. package/es/label/Label.mjs +12 -2
  25. package/es/label/index.css +1 -1
  26. package/es/label/index.d.ts +15 -0
  27. package/es/label/index.less +27 -0
  28. package/es/label/var.less +1 -0
  29. package/es/list/style/index.mjs +2 -0
  30. package/es/list/style/less.mjs +2 -0
  31. package/es/loading/Loading.mjs +8 -26
  32. package/es/loading/style/index.mjs +2 -0
  33. package/es/loading/style/less.mjs +2 -0
  34. package/es/material-action-bar/index.css +1 -1
  35. package/es/material-action-bar/index.less +3 -1
  36. package/es/material-add/MaterialAdd.mjs +158 -63
  37. package/es/material-add/index.css +1 -1
  38. package/es/material-add/index.d.ts +1 -1
  39. package/es/material-add/index.less +0 -14
  40. package/es/material-add/types.d.ts +7 -4
  41. package/es/material-detail/MaterialDetail.mjs +14 -9
  42. package/es/material-display-bar/index.css +1 -1
  43. package/es/material-display-bar/index.less +2 -1
  44. package/es/material-display-bar/var.less +1 -0
  45. package/es/number-keyboard/style/index.mjs +2 -0
  46. package/es/number-keyboard/style/less.mjs +2 -0
  47. package/es/picker/style/index.mjs +2 -0
  48. package/es/picker/style/less.mjs +2 -0
  49. package/es/progress/Progress.d.ts +17 -0
  50. package/es/progress/Progress.mjs +14 -9
  51. package/es/progress/index.css +1 -1
  52. package/es/progress/index.d.ts +12 -1
  53. package/es/progress/index.less +24 -14
  54. package/es/progress/types.d.ts +1 -0
  55. package/es/progress/var.less +10 -7
  56. package/es/pull-refresh/style/index.mjs +2 -0
  57. package/es/pull-refresh/style/less.mjs +2 -0
  58. package/es/switch/style/index.mjs +2 -0
  59. package/es/switch/style/less.mjs +2 -0
  60. package/es/tree-select/TreeSelect.mjs +9 -4
  61. package/es/tree-select/index.css +1 -1
  62. package/es/tree-select/index.less +29 -1
  63. package/es/work-order-card/WorkOrderCard.mjs +52 -11
  64. package/es/work-order-card/index.css +1 -1
  65. package/es/work-order-card/index.less +3 -4
  66. package/es/work-order-card/style/index.mjs +2 -0
  67. package/es/work-order-card/style/less.mjs +2 -0
  68. package/es/work-order-card/types.d.ts +14 -1
  69. package/lib/area/style/index.js +2 -0
  70. package/lib/area/style/less.js +2 -0
  71. package/lib/cell/index.d.ts +1 -1
  72. package/lib/icon/Icon.js +7 -4
  73. package/lib/icon/assets/copy.svg +4 -0
  74. package/lib/icon/config.d.ts +1 -0
  75. package/lib/icon/config.js +1 -0
  76. package/lib/icon/gif.d.ts +6 -0
  77. package/lib/icon/gif.js +28 -0
  78. package/lib/icon/index.css +1 -1
  79. package/lib/icon/index.d.ts +2 -0
  80. package/lib/icon/index.js +4 -1
  81. package/lib/icon/latest-iconfont.css +1 -1
  82. package/lib/icon/latest-iconfont.less +11 -0
  83. package/lib/index.css +1 -1
  84. package/lib/index.d.ts +1 -1
  85. package/lib/index.js +1 -1
  86. package/lib/info-card/InfoCard.d.ts +31 -0
  87. package/lib/info-card/InfoCard.js +45 -3
  88. package/lib/info-card/index.css +1 -1
  89. package/lib/info-card/index.d.ts +22 -1
  90. package/lib/info-card/index.less +57 -0
  91. package/lib/info-card/var.less +1 -1
  92. package/lib/label/Label.d.ts +21 -0
  93. package/lib/label/Label.js +12 -2
  94. package/lib/label/index.css +1 -1
  95. package/lib/label/index.d.ts +15 -0
  96. package/lib/label/index.less +27 -0
  97. package/lib/label/var.less +1 -0
  98. package/lib/list/style/index.js +2 -0
  99. package/lib/list/style/less.js +2 -0
  100. package/lib/loading/Loading.js +8 -26
  101. package/lib/loading/style/index.js +2 -0
  102. package/lib/loading/style/less.js +2 -0
  103. package/lib/material-action-bar/index.css +1 -1
  104. package/lib/material-action-bar/index.less +3 -1
  105. package/lib/material-add/MaterialAdd.js +158 -63
  106. package/lib/material-add/index.css +1 -1
  107. package/lib/material-add/index.d.ts +1 -1
  108. package/lib/material-add/index.less +0 -14
  109. package/lib/material-add/types.d.ts +7 -4
  110. package/lib/material-detail/MaterialDetail.js +14 -9
  111. package/lib/material-display-bar/index.css +1 -1
  112. package/lib/material-display-bar/index.less +2 -1
  113. package/lib/material-display-bar/var.less +1 -0
  114. package/lib/number-keyboard/style/index.js +2 -0
  115. package/lib/number-keyboard/style/less.js +2 -0
  116. package/lib/picker/style/index.js +2 -0
  117. package/lib/picker/style/less.js +2 -0
  118. package/lib/progress/Progress.d.ts +17 -0
  119. package/lib/progress/Progress.js +13 -8
  120. package/lib/progress/index.css +1 -1
  121. package/lib/progress/index.d.ts +12 -1
  122. package/lib/progress/index.less +24 -14
  123. package/lib/progress/types.d.ts +1 -0
  124. package/lib/progress/var.less +10 -7
  125. package/lib/pull-refresh/style/index.js +2 -0
  126. package/lib/pull-refresh/style/less.js +2 -0
  127. package/lib/switch/style/index.js +2 -0
  128. package/lib/switch/style/less.js +2 -0
  129. package/lib/tree-select/TreeSelect.js +9 -4
  130. package/lib/tree-select/index.css +1 -1
  131. package/lib/tree-select/index.less +29 -1
  132. package/lib/vant.cjs.js +308 -128
  133. package/lib/vant.es.js +308 -128
  134. package/lib/vant.js +308 -128
  135. package/lib/vant.min.js +1 -1
  136. package/lib/web-types.json +1 -1
  137. package/lib/work-order-card/WorkOrderCard.js +52 -11
  138. package/lib/work-order-card/index.css +1 -1
  139. package/lib/work-order-card/index.less +3 -4
  140. package/lib/work-order-card/style/index.js +2 -0
  141. package/lib/work-order-card/style/less.js +2 -0
  142. package/lib/work-order-card/types.d.ts +14 -1
  143. package/package.json +2 -2
  144. package/skills/use-persagy-vant/references/component-documentation.md +4 -4
  145. package/skills/use-persagy-vant/references/component-variant-selection.md +2 -2
  146. package/skills/use-persagy-vant/references/design-interaction-baseline.md +2 -1
  147. package/skills/use-persagy-vant/references/page-recipes.md +4 -0
  148. package/skills/use-persagy-vant/references/reuse-policy.md +2 -2
  149. /package/es/{loading/assets/building.gif → icon/assets/gif/loading-building.gif} +0 -0
  150. /package/lib/{loading/assets/building.gif → icon/assets/gif/loading-building.gif} +0 -0
@@ -24,10 +24,12 @@ var import_vue = require("vue");
24
24
  var import_utils = require("../utils");
25
25
  const [name, bem] = (0, import_utils.createNamespace)("progress");
26
26
  const progressProps = {
27
+ size: (0, import_utils.makeStringProp)("default"),
27
28
  color: String,
28
29
  inactive: Boolean,
29
30
  pivotText: String,
30
31
  textColor: String,
32
+ textSize: import_utils.numericProp,
31
33
  showPivot: import_utils.truthProp,
32
34
  pivotColor: String,
33
35
  trackColor: String,
@@ -46,6 +48,7 @@ var stdin_default = (0, import_vue.defineComponent)({
46
48
  const renderPivot = () => {
47
49
  const {
48
50
  textColor,
51
+ textSize,
49
52
  pivotText,
50
53
  pivotColor,
51
54
  percentage
@@ -53,10 +56,8 @@ var stdin_default = (0, import_vue.defineComponent)({
53
56
  const text = pivotText != null ? pivotText : `${percentage}%`;
54
57
  if (props.showPivot && text) {
55
58
  const style = {
56
- color: textColor,
57
- left: `${+percentage}%`,
58
- transform: `translate(-${+percentage}%,-50%)`,
59
- background: pivotColor || background.value
59
+ color: textColor || pivotColor,
60
+ fontSize: (0, import_utils.addUnit)(textSize)
60
61
  };
61
62
  return (0, import_vue.createVNode)("span", {
62
63
  "style": style,
@@ -72,7 +73,7 @@ var stdin_default = (0, import_vue.defineComponent)({
72
73
  percentage,
73
74
  strokeWidth
74
75
  } = props;
75
- const rootStyle = {
76
+ const trackStyle = {
76
77
  background: trackColor,
77
78
  height: (0, import_utils.addUnit)(strokeWidth)
78
79
  };
@@ -81,14 +82,18 @@ var stdin_default = (0, import_vue.defineComponent)({
81
82
  background: background.value
82
83
  };
83
84
  return (0, import_vue.createVNode)("div", {
84
- "class": bem(),
85
- "style": rootStyle
85
+ "class": bem({
86
+ large: props.size === "large"
87
+ })
88
+ }, [(0, import_vue.createVNode)("div", {
89
+ "class": bem("track"),
90
+ "style": trackStyle
86
91
  }, [(0, import_vue.createVNode)("span", {
87
92
  "class": bem("portion", {
88
93
  inactive: props.inactive
89
94
  }),
90
95
  "style": portionStyle
91
- }, null), renderPivot()]);
96
+ }, null)]), renderPivot()]);
92
97
  };
93
98
  }
94
99
  });
@@ -1 +1 @@
1
- :root{--van-progress-height: 4px;--van-progress-color: var(--van-primary-color);--van-progress-inactive-color: var(--van-gray-5);--van-progress-background-color: var(--van-gray-3);--van-progress-pivot-padding: 0 5px;--van-progress-pivot-text-color: var(--van-white);--van-progress-pivot-font-size: var(--van-font-size-xs);--van-progress-pivot-line-height: 1.6;--van-progress-pivot-background-color: var(--van-primary-color)}.van-progress{position:relative;height:var(--van-progress-height);background:var(--van-progress-background-color);border-radius:var(--van-progress-height)}.van-progress__portion{position:absolute;left:0;width:100%;height:100%;background:var(--van-progress-color);border-radius:inherit;transform-origin:0;transition:all var(--van-animation-duration-base) var(--van-animation-timing-function-enter)}.van-progress__portion--inactive{background:var(--van-progress-inactive-color)}.van-progress__pivot{position:absolute;top:50%;box-sizing:border-box;min-width:3.6em;padding:var(--van-progress-pivot-padding);color:var(--van-progress-pivot-text-color);font-size:var(--van-progress-pivot-font-size);line-height:var(--van-progress-pivot-line-height);text-align:center;word-break:keep-all;background:var(--van-progress-pivot-background-color);border-radius:1em;transition:all var(--van-animation-duration-base) var(--van-animation-timing-function-enter)}.van-progress__pivot--inactive{background:var(--van-progress-inactive-color)}
1
+ :root{--van-progress-height: 6px;--van-progress-large-height: 8px;--van-progress-color: var(--van-primary-color);--van-progress-inactive-color: var(--van-gray-5);--van-progress-background-color: var(--van-gray-2);--van-progress-pivot-padding: 0;--van-progress-pivot-text-color: var(--van-progress-pivot-background-color);--van-progress-pivot-font-size: var(--van-font-size-sm);--van-progress-large-pivot-font-size: var(--van-font-size-md);--van-progress-pivot-line-height: var(--van-line-height-lg);--van-progress-pivot-background-color: var(--van-text-color-2);--van-progress-text-gap: var(--van-padding-sm)}.van-progress{display:flex;align-items:center;gap:var(--van-progress-text-gap)}.van-progress--large{--van-progress-height: var(--van-progress-large-height);--van-progress-pivot-font-size: var(--van-progress-large-pivot-font-size)}.van-progress__track{position:relative;flex:1;height:var(--van-progress-height);overflow:hidden;background:var(--van-progress-background-color);border-radius:var(--van-border-radius-max)}.van-progress__portion{position:absolute;left:0;width:100%;height:100%;background:var(--van-progress-color);border-radius:var(--van-border-radius-max);transform-origin:0;transition:all var(--van-animation-duration-base) var(--van-animation-timing-function-enter)}.van-progress__portion--inactive{background:var(--van-progress-inactive-color)}.van-progress__pivot{flex:none;box-sizing:border-box;padding:var(--van-progress-pivot-padding);color:var(--van-progress-pivot-text-color);font-size:var(--van-progress-pivot-font-size);line-height:var(--van-progress-pivot-line-height);text-align:center;word-break:keep-all}.van-progress__pivot--inactive{color:var(--van-progress-inactive-color)}
@@ -1,9 +1,14 @@
1
1
  import { ProgressProps } from './Progress';
2
2
  export declare const Progress: import("../utils").WithInstall<import("vue").DefineComponent<{
3
+ size: {
4
+ type: import("vue").PropType<import("./types").ProgressSize>;
5
+ default: import("./types").ProgressSize;
6
+ };
3
7
  color: StringConstructor;
4
8
  inactive: BooleanConstructor;
5
9
  pivotText: StringConstructor;
6
10
  textColor: StringConstructor;
11
+ textSize: (NumberConstructor | StringConstructor)[];
7
12
  showPivot: {
8
13
  type: BooleanConstructor;
9
14
  default: true;
@@ -17,10 +22,15 @@ export declare const Progress: import("../utils").WithInstall<import("vue").Defi
17
22
  validator: (value: import("../utils").Numeric) => boolean;
18
23
  };
19
24
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
+ size: {
26
+ type: import("vue").PropType<import("./types").ProgressSize>;
27
+ default: import("./types").ProgressSize;
28
+ };
20
29
  color: StringConstructor;
21
30
  inactive: BooleanConstructor;
22
31
  pivotText: StringConstructor;
23
32
  textColor: StringConstructor;
33
+ textSize: (NumberConstructor | StringConstructor)[];
24
34
  showPivot: {
25
35
  type: BooleanConstructor;
26
36
  default: true;
@@ -34,13 +44,14 @@ export declare const Progress: import("../utils").WithInstall<import("vue").Defi
34
44
  validator: (value: import("../utils").Numeric) => boolean;
35
45
  };
36
46
  }>>, {
47
+ size: import("./types").ProgressSize;
37
48
  inactive: boolean;
38
49
  showPivot: boolean;
39
50
  percentage: string | number;
40
51
  }>>;
41
52
  export default Progress;
42
53
  export type { ProgressProps };
43
- export type { ProgressInstance } from './types';
54
+ export type { ProgressInstance, ProgressSize } from './types';
44
55
  declare module 'vue' {
45
56
  interface GlobalComponents {
46
57
  VanProgress: typeof Progress;
@@ -2,21 +2,37 @@
2
2
 
3
3
  :root {
4
4
  --van-progress-height: @progress-height;
5
+ --van-progress-large-height: @progress-large-height;
5
6
  --van-progress-color: @progress-color;
6
7
  --van-progress-inactive-color: @progress-inactive-color;
7
8
  --van-progress-background-color: @progress-background-color;
8
9
  --van-progress-pivot-padding: @progress-pivot-padding;
9
- --van-progress-pivot-text-color: @progress-pivot-text-color;
10
+ --van-progress-pivot-text-color: var(--van-progress-pivot-background-color);
10
11
  --van-progress-pivot-font-size: @progress-pivot-font-size;
12
+ --van-progress-large-pivot-font-size: @progress-large-pivot-font-size;
11
13
  --van-progress-pivot-line-height: @progress-pivot-line-height;
12
14
  --van-progress-pivot-background-color: @progress-pivot-background-color;
15
+ --van-progress-text-gap: @progress-text-gap;
13
16
  }
14
17
 
15
18
  .van-progress {
16
- position: relative;
17
- height: var(--van-progress-height);
18
- background: var(--van-progress-background-color);
19
- border-radius: var(--van-progress-height);
19
+ display: flex;
20
+ align-items: center;
21
+ gap: var(--van-progress-text-gap);
22
+
23
+ &--large {
24
+ --van-progress-height: var(--van-progress-large-height);
25
+ --van-progress-pivot-font-size: var(--van-progress-large-pivot-font-size);
26
+ }
27
+
28
+ &__track {
29
+ position: relative;
30
+ flex: 1;
31
+ height: var(--van-progress-height);
32
+ overflow: hidden;
33
+ background: var(--van-progress-background-color);
34
+ border-radius: var(--van-border-radius-max);
35
+ }
20
36
 
21
37
  &__portion {
22
38
  position: absolute;
@@ -24,7 +40,7 @@
24
40
  width: 100%;
25
41
  height: 100%;
26
42
  background: var(--van-progress-color);
27
- border-radius: inherit;
43
+ border-radius: var(--van-border-radius-max);
28
44
  transform-origin: 0;
29
45
  transition: all var(--van-animation-duration-base)
30
46
  var(--van-animation-timing-function-enter);
@@ -35,23 +51,17 @@
35
51
  }
36
52
 
37
53
  &__pivot {
38
- position: absolute;
39
- top: 50%;
54
+ flex: none;
40
55
  box-sizing: border-box;
41
- min-width: 3.6em;
42
56
  padding: var(--van-progress-pivot-padding);
43
57
  color: var(--van-progress-pivot-text-color);
44
58
  font-size: var(--van-progress-pivot-font-size);
45
59
  line-height: var(--van-progress-pivot-line-height);
46
60
  text-align: center;
47
61
  word-break: keep-all;
48
- background: var(--van-progress-pivot-background-color);
49
- border-radius: 1em;
50
- transition: all var(--van-animation-duration-base)
51
- var(--van-animation-timing-function-enter);
52
62
 
53
63
  &--inactive {
54
- background: var(--van-progress-inactive-color);
64
+ color: var(--van-progress-inactive-color);
55
65
  }
56
66
  }
57
67
  }
@@ -1,5 +1,6 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
2
  import type { ProgressProps } from './Progress';
3
+ export declare type ProgressSize = 'default' | 'large';
3
4
  export declare type ProgressExpose = {
4
5
  resize: () => void;
5
6
  };
@@ -1,11 +1,14 @@
1
1
  @import '../style/var.less';
2
2
 
3
- @progress-height: 4px;
3
+ @progress-height: 6px;
4
+ @progress-large-height: 8px;
4
5
  @progress-color: var(--van-primary-color);
5
6
  @progress-inactive-color: var(--van-gray-5);
6
- @progress-background-color: var(--van-gray-3);
7
- @progress-pivot-padding: 0 5px;
8
- @progress-pivot-text-color: var(--van-white);
9
- @progress-pivot-font-size: var(--van-font-size-xs);
10
- @progress-pivot-line-height: 1.6;
11
- @progress-pivot-background-color: var(--van-primary-color);
7
+ @progress-background-color: var(--van-gray-2);
8
+ @progress-pivot-padding: 0;
9
+ @progress-pivot-text-color: var(--van-text-color-2);
10
+ @progress-pivot-font-size: var(--van-font-size-sm);
11
+ @progress-large-pivot-font-size: var(--van-font-size-md);
12
+ @progress-pivot-line-height: var(--van-line-height-lg);
13
+ @progress-pivot-background-color: var(--van-text-color-2);
14
+ @progress-text-gap: var(--van-padding-sm);
@@ -1,3 +1,5 @@
1
1
  require("../../style/base.css");
2
+ require("../../badge/index.css");
3
+ require("../../icon/index.css");
2
4
  require("../../loading/index.css");
3
5
  require("../index.css");
@@ -1,3 +1,5 @@
1
1
  require("../../style/base.less");
2
+ require("../../badge/index.less");
3
+ require("../../icon/index.less");
2
4
  require("../../loading/index.less");
3
5
  require("../index.less");
@@ -1,3 +1,5 @@
1
1
  require("../../style/base.css");
2
+ require("../../badge/index.css");
3
+ require("../../icon/index.css");
2
4
  require("../../loading/index.css");
3
5
  require("../index.css");
@@ -1,3 +1,5 @@
1
1
  require("../../style/base.less");
2
+ require("../../badge/index.less");
3
+ require("../../icon/index.less");
2
4
  require("../../loading/index.less");
3
5
  require("../index.less");
@@ -61,6 +61,10 @@ var stdin_default = (0, import_vue.defineComponent)({
61
61
  const expandedKeys = (0, import_vue.computed)(() => props.expandedKeys);
62
62
  const isExpanded = (id) => expandedKeys.value.includes(id);
63
63
  const isSelected = (id) => selectedKeys.value.includes(id);
64
+ const getNodeStyle = (level) => ({
65
+ paddingLeft: `calc(var(--van-padding-md) + ${level * 16}px)`,
66
+ "--van-tree-select-divider-left": `calc(var(--van-padding-md) + ${level * 16}px)`
67
+ });
64
68
  const getDescendantIds = (item) => {
65
69
  var _a;
66
70
  return ((_a = item.children) == null ? void 0 : _a.flatMap((child) => [child.id, ...getDescendantIds(child)])) || [];
@@ -123,7 +127,10 @@ var stdin_default = (0, import_vue.defineComponent)({
123
127
  if (!hasChildren && slots.leaf) {
124
128
  return (0, import_vue.createVNode)("div", {
125
129
  "key": item.id,
126
- "class": bem("node")
130
+ "class": [bem("node"), bem("leaf", {
131
+ divider: props.showDivider
132
+ })],
133
+ "style": getNodeStyle(level)
127
134
  }, [slots.leaf({
128
135
  item,
129
136
  level
@@ -140,9 +147,7 @@ var stdin_default = (0, import_vue.defineComponent)({
140
147
  }),
141
148
  "title": item.text,
142
149
  "border": props.showDivider,
143
- "style": {
144
- paddingLeft: `calc(var(--van-padding-md) + ${level * 16}px)`
145
- },
150
+ "style": getNodeStyle(level),
146
151
  "rightSelect": selectable && selectionState !== "indeterminate" ? selectionState === "checked" : void 0,
147
152
  "selectType": props.multiple ? "checkbox" : "radio",
148
153
  "onUpdate:rightSelect": (value) => updateSelected(item, value)
@@ -1 +1 @@
1
- :root{--van-tree-select-indent: var(--van-padding-md);--van-tree-select-arrow-size: 16px;--van-tree-select-animation-duration: .24s}.van-tree-select{overflow:hidden;color:var(--van-cell-text-color);background:var(--van-white)}.van-tree-select__node{overflow:hidden}.van-tree-select__cell{min-height:44px;padding:10px var(--van-padding-md)}.van-tree-select__cell .van-cell__title-row{align-items:center}.van-tree-select__cell .van-cell__title{font-size:var(--van-font-size-md);line-height:22px}.van-tree-select__node:not(:last-child)>.van-tree-select__cell:not(.van-cell--borderless):after{display:block}.van-tree-select__arrow{flex:none;margin-right:var(--van-padding-base);color:var(--van-gray-5);font-size:var(--van-tree-select-arrow-size);transition:transform var(--van-tree-select-animation-duration) ease}.van-tree-select__arrow--expanded{transform:rotate(0)}.van-tree-select__arrow:not(.van-tree-select__arrow--expanded){transform:rotate(-90deg)}.van-tree-select__expand-control{display:inline-flex;align-items:center;padding:0;color:inherit;font:inherit;line-height:inherit;text-align:left;background:transparent;border:0}.van-tree-select__expand-control:not(:disabled){cursor:pointer}.van-tree-select__expand-control:disabled{color:var(--van-text-color-3);cursor:not-allowed}.van-tree-select__children{overflow:hidden}.van-tree-select__indeterminate{position:relative;display:block;width:14px;height:14px;padding:0;background:var(--van-primary-color);border:0;border-radius:50%}.van-tree-select__indeterminate:after{position:absolute;top:calc(50% - 1px);right:25%;left:25%;height:2px;content:"";background:var(--van-white);border-radius:1px}.van-tree-select-expand-enter-active,.van-tree-select-expand-leave-active{overflow:hidden;transition:max-height var(--van-tree-select-animation-duration) ease,opacity var(--van-tree-select-animation-duration) ease}.van-tree-select-expand-enter-from,.van-tree-select-expand-leave-to{max-height:0;opacity:0}.van-tree-select-expand-enter-to,.van-tree-select-expand-leave-from{max-height:1000px;opacity:1}
1
+ :root{--van-tree-select-indent: var(--van-padding-md);--van-tree-select-arrow-size: 16px;--van-tree-select-animation-duration: .24s;--van-tree-select-divider-left: var(--van-padding-md)}.van-tree-select{overflow:hidden;color:var(--van-cell-text-color);background:var(--van-white)}.van-tree-select__node{overflow:hidden}.van-tree-select__leaf{position:relative;box-sizing:border-box}.van-tree-select__leaf--divider:not(:last-child):after{position:absolute;right:var(--van-padding-md);bottom:0;left:var(--van-tree-select-divider-left);height:1px;background:var(--van-border-color);content:"";transform:scaleY(.5)}.van-tree-select__cell{min-height:44px;padding:10px var(--van-padding-md)}.van-tree-select__cell .van-cell__title-row{align-items:center}.van-tree-select__cell .van-cell__title{font-size:var(--van-font-size-md);line-height:22px}.van-tree-select__node:not(:last-child)>.van-tree-select__cell:not(.van-cell--borderless):after{display:block;left:var(--van-tree-select-divider-left)}.van-tree-select__cell--branch:not(.van-cell--borderless):after{display:block;left:var(--van-tree-select-divider-left)}.van-tree-select__arrow{flex:none;margin-right:var(--van-padding-base);color:var(--van-gray-5);font-size:var(--van-tree-select-arrow-size);transition:transform var(--van-tree-select-animation-duration) ease}.van-tree-select__arrow--expanded{transform:rotate(0)}.van-tree-select__arrow:not(.van-tree-select__arrow--expanded){transform:rotate(-90deg)}.van-tree-select__expand-control{display:inline-flex;align-items:center;padding:0;color:inherit;font:inherit;line-height:inherit;text-align:left;background:transparent;border:0}.van-tree-select__expand-control:not(:disabled){cursor:pointer}.van-tree-select__expand-control:disabled{color:var(--van-text-color-3);cursor:not-allowed}.van-tree-select__children{overflow:hidden}.van-tree-select__indeterminate{position:relative;display:block;width:14px;height:14px;padding:0;background:var(--van-primary-color);border:0;border-radius:50%}.van-tree-select__indeterminate:after{position:absolute;top:calc(50% - 1px);right:25%;left:25%;height:2px;content:"";background:var(--van-white);border-radius:1px}.van-tree-select-expand-enter-active,.van-tree-select-expand-leave-active{overflow:hidden;transition:max-height var(--van-tree-select-animation-duration) ease,opacity var(--van-tree-select-animation-duration) ease}.van-tree-select-expand-enter-from,.van-tree-select-expand-leave-to{max-height:0;opacity:0}.van-tree-select-expand-enter-to,.van-tree-select-expand-leave-from{max-height:1000px;opacity:1}
@@ -4,6 +4,7 @@
4
4
  --van-tree-select-indent: @tree-select-indent;
5
5
  --van-tree-select-arrow-size: @tree-select-arrow-size;
6
6
  --van-tree-select-animation-duration: @tree-select-animation-duration;
7
+ --van-tree-select-divider-left: var(--van-padding-md);
7
8
  }
8
9
 
9
10
  .van-tree-select {
@@ -13,6 +14,26 @@
13
14
 
14
15
  &__node { overflow: hidden; }
15
16
 
17
+ // Slot content keeps the same left hierarchy as regular tree nodes. Embedded
18
+ // components retain their own right padding to avoid doubling the edge gap.
19
+ &__leaf {
20
+ position: relative;
21
+ box-sizing: border-box;
22
+
23
+ // Leaf-slot items are wrapped by separate tree nodes, so restore the
24
+ // divider between adjacent leaves just as we do for regular Cell nodes.
25
+ &--divider:not(:last-child)::after {
26
+ position: absolute;
27
+ right: var(--van-padding-md);
28
+ bottom: 0;
29
+ left: var(--van-tree-select-divider-left);
30
+ height: 1px;
31
+ background: var(--van-border-color);
32
+ content: '';
33
+ transform: scaleY(.5);
34
+ }
35
+ }
36
+
16
37
  &__cell {
17
38
  min-height: 44px;
18
39
  padding: 10px var(--van-padding-md);
@@ -22,9 +43,16 @@
22
43
  }
23
44
 
24
45
  // Each Cell is wrapped by a tree node, so Cell's :last-child rule would
25
- // otherwise hide every divider. Restore it between sibling tree nodes.
46
+ // otherwise hide every divider. Branches retain a divider even when they
47
+ // are the only sibling, separating the parent from its indented children.
26
48
  &__node:not(:last-child) > &__cell:not(.van-cell--borderless)::after {
27
49
  display: block;
50
+ left: var(--van-tree-select-divider-left);
51
+ }
52
+
53
+ &__cell--branch:not(.van-cell--borderless)::after {
54
+ display: block;
55
+ left: var(--van-tree-select-divider-left);
28
56
  }
29
57
 
30
58
  &__arrow {