@ts-element-ui/theme-chalk 1.0.0 → 1.3.0

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.
@@ -0,0 +1,177 @@
1
+ /**
2
+ * TSElement - TimePicker 时间选择器 组件样式
3
+ */
4
+ @use 'common/var.scss' as *;
5
+
6
+ .ts-time-select {
7
+ &__input {
8
+ flex: 1;
9
+ min-width: 0;
10
+ border: none;
11
+ outline: none;
12
+ background: transparent;
13
+ font-size: $font-size-base;
14
+ color: var(--ts-text-color-regular);
15
+
16
+ &[readonly] {
17
+ cursor: pointer;
18
+ }
19
+ }
20
+ }
21
+
22
+ .ts-time-picker {
23
+ position: relative;
24
+ display: inline-flex;
25
+ align-items: center;
26
+ min-width: 160px;
27
+ height: $component-size-base;
28
+ padding: 0 8px;
29
+ border: 1px solid var(--ts-border-color);
30
+ border-radius: $border-radius-base;
31
+ background-color: var(--ts-bg-color);
32
+ transition: border-color 0.2s;
33
+
34
+ &:hover,
35
+ &--focused {
36
+ border-color: var(--ts-color-primary);
37
+ }
38
+
39
+ &--disabled {
40
+ background-color: var(--ts-fill-color-light);
41
+ cursor: not-allowed;
42
+
43
+ .ts-time-picker__input {
44
+ cursor: not-allowed;
45
+ color: var(--ts-text-color-disabled);
46
+ }
47
+ }
48
+
49
+ &--range {
50
+ min-width: 280px;
51
+ }
52
+
53
+ &__trigger {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ flex: 1;
57
+ min-width: 0;
58
+ cursor: pointer;
59
+ }
60
+
61
+ &__input {
62
+ flex: 1;
63
+ min-width: 0;
64
+ height: 100%;
65
+ padding: 0;
66
+ border: none;
67
+ outline: none;
68
+ background: transparent;
69
+ font-size: $font-size-base;
70
+ color: var(--ts-text-color-regular);
71
+ cursor: pointer;
72
+
73
+ &::placeholder {
74
+ color: var(--ts-text-color-placeholder);
75
+ }
76
+ }
77
+
78
+ &__clock {
79
+ display: inline-flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ margin-left: 6px;
83
+ color: var(--ts-text-color-placeholder);
84
+ }
85
+
86
+ &__clock-icon {
87
+ width: 15px;
88
+ height: 15px;
89
+ }
90
+
91
+ &__separator {
92
+ margin: 0 6px;
93
+ color: var(--ts-text-color-placeholder);
94
+ }
95
+
96
+ &__clear {
97
+ display: inline-flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ width: 16px;
101
+ height: 16px;
102
+ margin-left: 4px;
103
+ border-radius: 50%;
104
+ font-size: 12px;
105
+ line-height: 1;
106
+ color: var(--ts-text-color-placeholder);
107
+ cursor: pointer;
108
+
109
+ &:hover {
110
+ color: #fff;
111
+ background-color: var(--ts-text-color-placeholder);
112
+ }
113
+ }
114
+
115
+ &__popper {
116
+ position: fixed;
117
+ z-index: 2000;
118
+ padding: 8px;
119
+ background-color: var(--ts-bg-color);
120
+ border: 1px solid var(--ts-border-color-lighter);
121
+ border-radius: $border-radius-base;
122
+ box-shadow: var(--ts-box-shadow-light);
123
+ }
124
+
125
+ &__panel {
126
+ display: flex;
127
+ gap: 4px;
128
+ outline: none;
129
+ }
130
+
131
+ &__column {
132
+ flex: 1;
133
+ width: 56px;
134
+ max-height: 210px;
135
+ overflow-y: auto;
136
+ border-radius: $border-radius-small;
137
+
138
+ & + & {
139
+ border-left: 1px solid var(--ts-border-color-lighter);
140
+ }
141
+
142
+ &.is-active {
143
+ background-color: var(--ts-fill-color-light);
144
+ }
145
+
146
+ /* 细滚动条 */
147
+ scrollbar-width: thin;
148
+
149
+ &::-webkit-scrollbar {
150
+ width: 4px;
151
+ }
152
+
153
+ &::-webkit-scrollbar-thumb {
154
+ background-color: var(--ts-border-color);
155
+ border-radius: 2px;
156
+ }
157
+ }
158
+
159
+ &__item {
160
+ padding: 4px 0;
161
+ text-align: center;
162
+ font-size: $font-size-base;
163
+ line-height: 1.6;
164
+ color: var(--ts-text-color-regular);
165
+ cursor: pointer;
166
+
167
+ &:hover {
168
+ color: var(--ts-color-primary);
169
+ }
170
+
171
+ &.is-active {
172
+ color: var(--ts-color-primary);
173
+ font-weight: $font-weight-primary;
174
+ background-color: var(--ts-color-primary-light-1);
175
+ }
176
+ }
177
+ }
package/src/tree.scss CHANGED
@@ -60,3 +60,89 @@
60
60
  background-color: var(--ts-color-primary-light-9);
61
61
  }
62
62
  }
63
+
64
+ // ========== TreeSelect 折叠标签浮层 ==========
65
+ .ts-tree-select {
66
+ &__trigger { position: relative; }
67
+
68
+ &__tags-tooltip {
69
+ position: absolute;
70
+ top: 100%;
71
+ left: 0;
72
+ margin-top: 4px;
73
+ padding: 6px 10px;
74
+ white-space: nowrap;
75
+ font-size: $font-size-small;
76
+ color: var(--ts-text-color-regular);
77
+ background-color: var(--ts-bg-color);
78
+ border: 1px solid var(--ts-border-color-lighter);
79
+ border-radius: $border-radius-base;
80
+ box-shadow: var(--ts-box-shadow-light);
81
+ z-index: 1001;
82
+ }
83
+ }
84
+
85
+ // ========== TreeV2 虚拟滚动 ==========
86
+ .ts-tree-v2 {
87
+ &__scroller {
88
+ position: relative;
89
+ overflow-y: auto;
90
+ }
91
+
92
+ &__phantom {
93
+ position: relative;
94
+ width: 100%;
95
+ }
96
+
97
+ .ts-tree__node-row {
98
+ display: flex;
99
+ align-items: center;
100
+ box-sizing: border-box;
101
+ padding-right: 8px;
102
+ cursor: pointer;
103
+
104
+ &:hover { background-color: var(--ts-fill-color-light); }
105
+ }
106
+
107
+ .ts-tree__label {
108
+ flex: 1;
109
+ overflow: hidden;
110
+ text-overflow: ellipsis;
111
+ white-space: nowrap;
112
+
113
+ &.is-current { color: var(--ts-color-primary); }
114
+ &.is-disabled {
115
+ color: var(--ts-text-color-disabled);
116
+ cursor: not-allowed;
117
+ }
118
+ }
119
+
120
+ .ts-tree__expand {
121
+ display: inline-flex;
122
+ align-items: center;
123
+ justify-content: center;
124
+ flex-shrink: 0;
125
+ color: var(--ts-text-color-placeholder);
126
+
127
+ & > i { transition: transform 0.2s; }
128
+ &.is-expanded > i { transform: rotate(90deg); }
129
+ &.is-leaf { visibility: hidden; }
130
+
131
+ // 懒加载中:隐藏箭头,展示旋转 loading
132
+ &.is-loading > i { visibility: hidden; }
133
+
134
+ &.is-loading::after {
135
+ content: '';
136
+ width: 12px;
137
+ height: 12px;
138
+ border: 2px solid var(--ts-color-primary);
139
+ border-top-color: transparent;
140
+ border-radius: 50%;
141
+ animation: ts-tree-v2-loading 0.8s linear infinite;
142
+ }
143
+ }
144
+ }
145
+
146
+ @keyframes ts-tree-v2-loading {
147
+ to { transform: rotate(360deg); }
148
+ }