@veltra/desktop 1.0.6 → 1.0.8

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 (114) hide show
  1. package/dist/components/action/action.vue.d.ts +2 -2
  2. package/dist/components/action/style.js +3 -0
  3. package/dist/components/auto-complete/auto-complete.vue.d.ts +1 -1
  4. package/dist/components/auto-complete/style.js +5 -0
  5. package/dist/components/batch-edit/style.js +9 -0
  6. package/dist/components/breadcrumb/breadcrumb.js +106 -0
  7. package/dist/components/breadcrumb/breadcrumb.js.map +1 -0
  8. package/dist/components/breadcrumb/breadcrumb.vue.d.ts +25 -0
  9. package/dist/components/breadcrumb/index.d.ts +1 -0
  10. package/dist/components/breadcrumb/style.d.ts +1 -0
  11. package/dist/components/breadcrumb/style.js +1 -0
  12. package/dist/components/breadcrumb/style2.css +91 -0
  13. package/dist/components/button/button.vue.d.ts +1 -1
  14. package/dist/components/button/style.js +1 -0
  15. package/dist/components/cascade/cascade.vue.d.ts +4 -4
  16. package/dist/components/cascade/style.js +7 -0
  17. package/dist/components/checkbox/checkbox-button.vue.d.ts +2 -2
  18. package/dist/components/checkbox/checkbox.vue.d.ts +1 -1
  19. package/dist/components/checkbox/style.js +1 -0
  20. package/dist/components/checkbox/style2.css +0 -8
  21. package/dist/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
  22. package/dist/components/checkbox-group/style.js +1 -0
  23. package/dist/components/code-editor/code-editor.vue.d.ts +1 -1
  24. package/dist/components/context-menu/style.js +1 -0
  25. package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
  26. package/dist/components/date-picker/date-picker.vue.d.ts +2 -2
  27. package/dist/components/date-picker/style.js +3 -0
  28. package/dist/components/date-range-picker/date-range-picker.vue.d.ts +2 -2
  29. package/dist/components/date-range-picker/style.js +3 -0
  30. package/dist/components/dialog/style.js +2 -0
  31. package/dist/components/drawer/style.js +1 -0
  32. package/dist/components/drawer/style2.css +4 -16
  33. package/dist/components/empty/empty.vue.d.ts +1 -1
  34. package/dist/components/empty/style.js +1 -0
  35. package/dist/components/expression-editor/style.js +6 -0
  36. package/dist/components/float-button/style.js +1 -0
  37. package/dist/components/form/style.js +2 -0
  38. package/dist/components/form-item/style.js +1 -0
  39. package/dist/components/form-item/style2.css +2 -3
  40. package/dist/components/index.d.ts +75 -74
  41. package/dist/components/input/input.vue.d.ts +3 -3
  42. package/dist/components/input/style.js +1 -0
  43. package/dist/components/layout/style.js +1 -0
  44. package/dist/components/list/style.js +1 -0
  45. package/dist/components/loading/style2.css +16 -20
  46. package/dist/components/menu/style.js +2 -0
  47. package/dist/components/menu/style2.css +0 -78
  48. package/dist/components/multi-select/multi-select.vue.d.ts +1 -1
  49. package/dist/components/multi-select/style.js +7 -0
  50. package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +3 -3
  51. package/dist/components/multi-tree-select/style.js +7 -0
  52. package/dist/components/notification/notification.vue.d.ts +1 -1
  53. package/dist/components/number-input/number-input.vue.d.ts +1 -1
  54. package/dist/components/number-input/style.js +1 -0
  55. package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
  56. package/dist/components/number-range-input/style.js +1 -0
  57. package/dist/components/paginator/style.js +3 -0
  58. package/dist/components/palette/palette.vue.d.ts +1 -1
  59. package/dist/components/palette/style.js +3 -0
  60. package/dist/components/password-input/password-input.vue.d.ts +1 -1
  61. package/dist/components/password-input/style.js +2 -0
  62. package/dist/components/pop-confirm/style.js +3 -0
  63. package/dist/components/progress/progress.vue.d.ts +1 -1
  64. package/dist/components/progress-nodes/style2.css +79 -33
  65. package/dist/components/radio/style2.css +0 -8
  66. package/dist/components/radio-group/radio-group.vue.d.ts +1 -1
  67. package/dist/components/radio-group/style.js +1 -0
  68. package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
  69. package/dist/components/select/select.vue.d.ts +1 -1
  70. package/dist/components/select/style.js +5 -0
  71. package/dist/components/select/style2.css +0 -20
  72. package/dist/components/steps/style.js +2 -0
  73. package/dist/components/steps/style2.css +28 -35
  74. package/dist/components/switch/style2.css +0 -3
  75. package/dist/components/switch/switch.vue.d.ts +1 -1
  76. package/dist/components/table/style.js +7 -0
  77. package/dist/components/table/style2.css +0 -41
  78. package/dist/components/table-editor/style.js +2 -0
  79. package/dist/components/tabs/style.js +2 -0
  80. package/dist/components/tabs/tabs.vue.d.ts +4 -4
  81. package/dist/components/tag/style2.css +0 -6
  82. package/dist/components/textarea/style.js +1 -0
  83. package/dist/components/textarea/textarea.vue.d.ts +3 -3
  84. package/dist/components/theme/style.js +5 -0
  85. package/dist/components/tip/tip.vue.d.ts +1 -1
  86. package/dist/components/tree/style.js +4 -0
  87. package/dist/components/tree/tree.vue.d.ts +1 -1
  88. package/dist/components/tree-select/style.js +4 -0
  89. package/dist/components/tree-select/tree-select.vue.d.ts +2 -2
  90. package/dist/index.d.ts +78 -76
  91. package/dist/index.js +73 -72
  92. package/dist/types/breadcrumb.d.ts +43 -0
  93. package/dist/types/index.d.ts +3 -2
  94. package/package.json +11 -11
  95. package/src/components/breadcrumb/breadcrumb.vue +113 -0
  96. package/src/components/breadcrumb/index.ts +1 -0
  97. package/src/components/breadcrumb/style.scss +78 -0
  98. package/src/components/breadcrumb/style.ts +1 -0
  99. package/src/components/checkbox/style.scss +0 -4
  100. package/src/components/drawer/style.scss +18 -11
  101. package/src/components/form-item/style.scss +2 -3
  102. package/src/components/index.ts +2 -0
  103. package/src/components/loading/style.scss +125 -126
  104. package/src/components/menu/style.scss +0 -31
  105. package/src/components/progress-nodes/style.scss +28 -22
  106. package/src/components/radio/style.scss +0 -4
  107. package/src/components/select/style.scss +0 -12
  108. package/src/components/steps/style.scss +10 -10
  109. package/src/components/switch/style.scss +0 -4
  110. package/src/components/table/style.scss +0 -26
  111. package/src/components/tag/style.scss +0 -6
  112. package/src/types/breadcrumb.ts +44 -0
  113. package/src/types/index.ts +1 -0
  114. package/dist/types/index.js +0 -0
@@ -5,13 +5,8 @@
5
5
  $root-name: progress-nodes;
6
6
 
7
7
  @include m.b($root-name) {
8
- // CSS 变量定义
9
- --checked-color: #{fn.use-var(color, primary)};
10
- --node-color: #{fn.use-var(text-color, placeholder)};
11
- --dot-size: 14px;
12
-
13
8
  position: relative;
14
- color: var(--node-color);
9
+ color: #{fn.use-var(text-color, placeholder)};
15
10
  overflow: auto;
16
11
  cursor: default;
17
12
 
@@ -28,13 +23,6 @@ $root-name: progress-nodes;
28
23
  cursor: grabbing;
29
24
  }
30
25
 
31
- // 颜色类型变体
32
- @each $type in vars.$color-types {
33
- @include m.m($type) {
34
- --checked-color: #{fn.use-var(color, $type)};
35
- }
36
- }
37
-
38
26
  // 列表容器
39
27
  @include m.e(list) {
40
28
  position: relative;
@@ -82,8 +70,8 @@ $root-name: progress-nodes;
82
70
  // 节点圆点
83
71
  @include m.e(dot) {
84
72
  position: relative;
85
- width: var(--dot-size);
86
- height: var(--dot-size);
73
+ width: 14px;
74
+ height: 14px;
87
75
  border: 2px solid currentColor;
88
76
  border-radius: 50%;
89
77
  background-color: fn.use-var(bg-color, top);
@@ -107,18 +95,36 @@ $root-name: progress-nodes;
107
95
  @include m.ellipsis;
108
96
  }
109
97
 
110
- // checked 状态 - 圆点填充 colorType 颜色
111
98
  @include m.bem($root-name, item) {
112
99
  @include m.is(checked) {
113
- color: var(--checked-color);
100
+ color: #{fn.use-var(color, primary)};
114
101
 
115
102
  @include m.bem($root-name, dot) {
116
- background-color: var(--checked-color);
117
- border-color: var(--checked-color);
103
+ background-color: #{fn.use-var(color, primary)};
104
+ border-color: #{fn.use-var(color, primary)};
118
105
  }
119
106
 
120
107
  @include m.bem($root-name, label) {
121
- color: var(--checked-color);
108
+ color: #{fn.use-var(color, primary)};
109
+ }
110
+ }
111
+ }
112
+
113
+ @each $type in vars.$color-types {
114
+ @include m.m($type) {
115
+ @include m.bem($root-name, item) {
116
+ @include m.is(checked) {
117
+ color: #{fn.use-var(color, $type)};
118
+
119
+ @include m.bem($root-name, dot) {
120
+ background-color: #{fn.use-var(color, $type)};
121
+ border-color: #{fn.use-var(color, $type)};
122
+ }
123
+
124
+ @include m.bem($root-name, label) {
125
+ color: #{fn.use-var(color, $type)};
126
+ }
127
+ }
122
128
  }
123
129
  }
124
130
  }
@@ -164,10 +170,10 @@ $root-name: progress-nodes;
164
170
 
165
171
  @include m.e(link) {
166
172
  // 宽度需要跨越当前 item 的右 padding + 下一个 item 的左 padding
167
- width: calc(100% - var(--dot-size) + 24px);
173
+ width: calc(100% - 14px + 24px);
168
174
  height: 0;
169
175
  border-width: 1px 0 0 0;
170
- left: calc(50% + var(--dot-size) / 2);
176
+ left: calc(50% + 14px / 2);
171
177
  top: 50%;
172
178
  transform: translateY(-50%);
173
179
  }
@@ -4,10 +4,6 @@
4
4
 
5
5
  $root-name: radio;
6
6
  @include m.b($root-name) {
7
- @include m.dark() {
8
- --u-radio-border: #595959;
9
- }
10
-
11
7
  cursor: pointer;
12
8
  vertical-align: middle;
13
9
  user-select: none;
@@ -3,18 +3,6 @@
3
3
 
4
4
  $root-name: select;
5
5
  @include m.b($root-name) {
6
- --u-menu-hover-bg: rgba(148, 163, 184, 0.12);
7
- --u-menu-hover-color: #{fn.use-var(text-color, title)};
8
- --u-menu-active-bg: rgba(59, 130, 246, 0.12);
9
- --u-menu-active-color: var(--u-color-primary-dark-1);
10
-
11
- @include m.dark() {
12
- --u-menu-hover-bg: rgba(148, 163, 184, 0.14);
13
- --u-menu-hover-color: #{fn.use-var(text-color, title)};
14
- --u-menu-active-bg: rgba(96, 165, 250, 0.2);
15
- --u-menu-active-color: #{fn.use-var(text-color, white)};
16
- }
17
-
18
6
  width: 100%;
19
7
 
20
8
  @include m.e(content-filter) {
@@ -10,13 +10,20 @@ $root-name: steps;
10
10
  padding: 0;
11
11
  margin: 0;
12
12
 
13
- /** 颜色变量 */
14
13
  @each $type in vars.$color-types {
15
14
  @include m.em(finished, $type) {
16
- --finished-color: #{fn.use-var(color, $type)};
15
+ @include m.e(item) {
16
+ @include m.is(finished) {
17
+ color: fn.use-var(color, $type);
18
+ }
19
+ }
17
20
  }
18
21
  @include m.em(current, $type) {
19
- --current-color: #{fn.use-var(color, $type)};
22
+ @include m.e(item) {
23
+ @include m.is(current) {
24
+ color: fn.use-var(color, $type);
25
+ }
26
+ }
20
27
  }
21
28
  }
22
29
 
@@ -24,13 +31,6 @@ $root-name: steps;
24
31
  @include m.e(item) {
25
32
  font-weight: 600;
26
33
  color: fn.use-var(text-color, placeholder);
27
-
28
- @include m.is(finished) {
29
- color: var(--finished-color);
30
- }
31
- @include m.is(current) {
32
- color: var(--current-color);
33
- }
34
34
  }
35
35
 
36
36
  @include m.e(node) {
@@ -4,10 +4,6 @@
4
4
 
5
5
  $root-name: switch;
6
6
  @include m.b($root-name) {
7
- --u-switch-height-small: 18px;
8
- --u-switch-height-default: 20px;
9
- --u-switch-height-large: 24px;
10
-
11
7
  display: inline-flex;
12
8
  align-items: center;
13
9
  cursor: pointer;
@@ -14,32 +14,6 @@ $root-name: table;
14
14
  }
15
15
 
16
16
  @include m.b($root-name) {
17
- --u-table-border-color: #e9e9e9;
18
- --u-table-header-bg: #f4f5f7;
19
- --u-table-header-color: #{fn.use-var(text-color, title)};
20
- --u-table-stripe-bg: #f8fafc;
21
- --u-table-stripe-color: inherit;
22
- --u-table-hover-bg: #{fn.use-var(bg-color, hover)};
23
- --u-table-hover-color: inherit;
24
- --u-table-current-bg: #{fn.use-var(bg-color, hover)};
25
- --u-table-current-color: inherit;
26
- --u-table-checked-bg: var(--u-color-primary-light-9);
27
- --u-table-checked-color: inherit;
28
-
29
- @include m.dark() {
30
- --u-table-border-color: #404040;
31
- --u-table-header-bg: #2a2a2a;
32
- --u-table-header-color: #{fn.use-var(text-color, main)};
33
- --u-table-stripe-bg: #2a2a2a;
34
- --u-table-stripe-color: #{fn.use-var(text-color, main)};
35
- --u-table-hover-bg: #333333;
36
- --u-table-hover-color: #{fn.use-var(text-color, title)};
37
- --u-table-current-bg: #{fn.use-var(bg-color, hover)};
38
- --u-table-current-color: inherit;
39
- --u-table-checked-bg: var(--u-color-primary-dark-1);
40
- --u-table-checked-color: inherit;
41
- }
42
-
43
17
  width: 100%;
44
18
  position: relative;
45
19
  border: 1px solid var(--u-table-border-color);
@@ -5,12 +5,6 @@
5
5
 
6
6
  $root-name: tag;
7
7
 
8
- :root {
9
- --u-tag-small: 20px;
10
- --u-tag-default: 24px;
11
- --u-tag-large: 28px;
12
- }
13
-
14
8
  @include m.b($root-name) {
15
9
  cursor: default;
16
10
  color: fn.use-var(text-color, main);
@@ -0,0 +1,44 @@
1
+ import type { ComponentSize, DeconstructValue } from '@veltra/utils'
2
+
3
+ /** 面包屑单项 */
4
+ export interface BreadcrumbItem {
5
+ /** 展示文案 */
6
+ title: string
7
+ /** 存在时渲染为 `<a>`,由浏览器处理导航 */
8
+ href?: string
9
+ /** 为 true 时不跳转、不触发 click */
10
+ disabled?: boolean
11
+ }
12
+
13
+ /** 面包屑组件属性 */
14
+ export interface BreadcrumbProps {
15
+ /** 路径项,顺序为从一级到末级 */
16
+ items: BreadcrumbItem[]
17
+ /** 尺寸 */
18
+ size?: ComponentSize
19
+ /**
20
+ * 末级是否作为链接渲染
21
+ * @default false — 末级为当前页,使用 `aria-current="page"`
22
+ */
23
+ lastLinked?: boolean
24
+ }
25
+
26
+ /** `item` 插槽作用域 */
27
+ export interface BreadcrumbSlotScope {
28
+ item: BreadcrumbItem
29
+ index: number
30
+ isLast: boolean
31
+ }
32
+
33
+ /** 面包屑组件事件 */
34
+ export interface BreadcrumbEmits {
35
+ /**
36
+ * 可交互项(无 `href` 的链式项)被点击时触发;有 `href` 时不触发(走原生导航)
37
+ */
38
+ (e: 'click', item: BreadcrumbItem, index: number, ev: Event): void
39
+ }
40
+
41
+ /** @internal */
42
+ export interface _BreadcrumbExposed {}
43
+
44
+ export type BreadcrumbExposed = DeconstructValue<_BreadcrumbExposed>
@@ -23,6 +23,7 @@ export * from './button'
23
23
  export * from './date-panel'
24
24
  export * from './dialog'
25
25
  export * from './batch-edit'
26
+ export * from './breadcrumb'
26
27
  export * from './list'
27
28
  export * from './action'
28
29
  export * from './empty'
File without changes