lumen-plus 0.0.3 → 0.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 (73) hide show
  1. package/dist/index.js +2 -0
  2. package/dist/theme-chalk/_index.scss +69 -0
  3. package/dist/theme-chalk/_reset.scss +16 -0
  4. package/dist/theme-chalk/_variables.scss +91 -0
  5. package/dist/theme-chalk/affix.scss +8 -0
  6. package/dist/theme-chalk/alert.scss +140 -0
  7. package/dist/theme-chalk/autocomplete.scss +238 -0
  8. package/dist/theme-chalk/avatar.scss +49 -0
  9. package/dist/theme-chalk/backtop.scss +55 -0
  10. package/dist/theme-chalk/badge.scss +47 -0
  11. package/dist/theme-chalk/breadcrumb.scss +50 -0
  12. package/dist/theme-chalk/button.scss +472 -0
  13. package/dist/theme-chalk/calendar.scss +166 -0
  14. package/dist/theme-chalk/card.scss +70 -0
  15. package/dist/theme-chalk/carousel.scss +167 -0
  16. package/dist/theme-chalk/cascader.scss +265 -0
  17. package/dist/theme-chalk/checkbox.scss +127 -0
  18. package/dist/theme-chalk/collapse.scss +100 -0
  19. package/dist/theme-chalk/color-picker.scss +247 -0
  20. package/dist/theme-chalk/container.scss +79 -0
  21. package/dist/theme-chalk/date-picker.scss +352 -0
  22. package/dist/theme-chalk/date-time-picker.scss +396 -0
  23. package/dist/theme-chalk/descriptions.scss +160 -0
  24. package/dist/theme-chalk/dialog.scss +154 -0
  25. package/dist/theme-chalk/divider.scss +61 -0
  26. package/dist/theme-chalk/drawer.scss +211 -0
  27. package/dist/theme-chalk/dropdown.scss +230 -0
  28. package/dist/theme-chalk/empty.scss +36 -0
  29. package/dist/theme-chalk/form.scss +187 -0
  30. package/dist/theme-chalk/icon.scss +16 -0
  31. package/dist/theme-chalk/image.scss +171 -0
  32. package/dist/theme-chalk/input-number.scss +229 -0
  33. package/dist/theme-chalk/input-tag.scss +119 -0
  34. package/dist/theme-chalk/input.scss +249 -0
  35. package/dist/theme-chalk/link.scss +28 -0
  36. package/dist/theme-chalk/loading.scss +68 -0
  37. package/dist/theme-chalk/menu.scss +239 -0
  38. package/dist/theme-chalk/message.scss +150 -0
  39. package/dist/theme-chalk/messagebox.scss +76 -0
  40. package/dist/theme-chalk/mixins/_bem.scss +103 -0
  41. package/dist/theme-chalk/mixins/_function.scss +12 -0
  42. package/dist/theme-chalk/notification.scss +164 -0
  43. package/dist/theme-chalk/pagination.scss +130 -0
  44. package/dist/theme-chalk/pin-input.scss +192 -0
  45. package/dist/theme-chalk/popconfirm.scss +194 -0
  46. package/dist/theme-chalk/popover.scss +196 -0
  47. package/dist/theme-chalk/progress.scss +51 -0
  48. package/dist/theme-chalk/radio.scss +128 -0
  49. package/dist/theme-chalk/rating.scss +227 -0
  50. package/dist/theme-chalk/result.scss +80 -0
  51. package/dist/theme-chalk/segmented.scss +108 -0
  52. package/dist/theme-chalk/select.scss +301 -0
  53. package/dist/theme-chalk/skeleton.scss +113 -0
  54. package/dist/theme-chalk/slider.scss +259 -0
  55. package/dist/theme-chalk/space.scss +44 -0
  56. package/dist/theme-chalk/statistic.scss +49 -0
  57. package/dist/theme-chalk/steps.scss +255 -0
  58. package/dist/theme-chalk/switch.scss +277 -0
  59. package/dist/theme-chalk/table.scss +343 -0
  60. package/dist/theme-chalk/tabs.scss +433 -0
  61. package/dist/theme-chalk/tag.scss +143 -0
  62. package/dist/theme-chalk/textarea.scss +125 -0
  63. package/dist/theme-chalk/time-picker.scss +321 -0
  64. package/dist/theme-chalk/timeline.scss +119 -0
  65. package/dist/theme-chalk/tooltip.scss +165 -0
  66. package/dist/theme-chalk/transfer.scss +219 -0
  67. package/dist/theme-chalk/tree-select.scss +384 -0
  68. package/dist/theme-chalk/tree.scss +101 -0
  69. package/dist/theme-chalk/upload.scss +457 -0
  70. package/dist/theme-chalk/watermark.scss +30 -0
  71. package/dist/utils/index.js +1 -0
  72. package/dist/utils/transitions.js +31 -0
  73. package/package.json +8 -2
@@ -0,0 +1,128 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+ @use './mixins/function' as *;
4
+
5
+ @include b(radio) {
6
+ display: inline-flex;
7
+ align-items: center;
8
+ cursor: pointer;
9
+ user-select: none;
10
+ font-size: $font-size-base;
11
+ line-height: 1.5;
12
+
13
+ @include m(small) {
14
+ font-size: $font-size-small;
15
+
16
+ .#{$namespace}-radio__inner {
17
+ width: 14px;
18
+ height: 14px;
19
+ }
20
+
21
+ .#{$namespace}-radio__dot {
22
+ width: 6px;
23
+ height: 6px;
24
+ }
25
+ }
26
+
27
+ @include m(medium) {
28
+ .#{$namespace}-radio__inner {
29
+ width: 16px;
30
+ height: 16px;
31
+ }
32
+
33
+ .#{$namespace}-radio__dot {
34
+ width: 8px;
35
+ height: 8px;
36
+ }
37
+ }
38
+
39
+ @include m(large) {
40
+ font-size: $font-size-large;
41
+
42
+ .#{$namespace}-radio__inner {
43
+ width: 18px;
44
+ height: 18px;
45
+ }
46
+
47
+ .#{$namespace}-radio__dot {
48
+ width: 10px;
49
+ height: 10px;
50
+ }
51
+ }
52
+
53
+ @include when(checked) {
54
+ .#{$namespace}-radio__inner {
55
+ border-color: $color-primary;
56
+ }
57
+
58
+ .#{$namespace}-radio__dot {
59
+ background-color: $color-primary;
60
+ }
61
+ }
62
+
63
+ @include when(disabled) {
64
+ cursor: not-allowed;
65
+ opacity: 0.5;
66
+ }
67
+
68
+ @include e(input) {
69
+ position: relative;
70
+ display: inline-flex;
71
+ align-items: center;
72
+ flex-shrink: 0;
73
+ }
74
+
75
+ @include e(original) {
76
+ position: absolute;
77
+ opacity: 0;
78
+ width: 0;
79
+ height: 0;
80
+ margin: 0;
81
+ }
82
+
83
+ @include e(inner) {
84
+ position: relative;
85
+ display: inline-flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ border: 1px solid $border-color-base;
89
+ border-radius: 50%;
90
+ background-color: $bg-color;
91
+ transition: border-color 0.2s;
92
+
93
+ &:hover {
94
+ border-color: $color-primary;
95
+ }
96
+ }
97
+
98
+ @include e(dot) {
99
+ display: block;
100
+ border-radius: 50%;
101
+ transition: transform 0.2s;
102
+ transform: scale(0);
103
+ }
104
+
105
+ &.is-checked {
106
+ .#{$namespace}-radio__dot {
107
+ transform: scale(1);
108
+ }
109
+ }
110
+
111
+ @include e(label) {
112
+ margin-left: 8px;
113
+ color: $color-text-primary;
114
+ }
115
+ }
116
+
117
+ .dark {
118
+ .#{$namespace}-radio {
119
+ .#{$namespace}-radio__inner {
120
+ background-color: $bg-color-dark-light;
121
+ border-color: color-mix(in oklab, $bg-color-dark-lighter 70%, $color-text-dark-secondary);
122
+ }
123
+
124
+ .#{$namespace}-radio__label {
125
+ color: $color-text-dark;
126
+ }
127
+ }
128
+ }
@@ -0,0 +1,227 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ @include b(rating) {
5
+ --rating-void-color: #c0c4cc;
6
+ --rating-fill-color: #{$color-warning};
7
+ --rating-hover-color: #{$color-warning};
8
+ --rating-disabled-color: #d8dce5;
9
+ --rating-font-size: 20px;
10
+ --rating-line-height: 1;
11
+ --rating-stroke-width: 1.5;
12
+
13
+ display: inline-flex;
14
+ align-items: center;
15
+ height: 20px;
16
+ line-height: var(--rating-line-height);
17
+ outline: none;
18
+
19
+ &:focus-visible {
20
+ outline: 2px solid $color-primary;
21
+ outline-offset: 2px;
22
+ }
23
+
24
+ &__item {
25
+ position: relative;
26
+ display: inline-block;
27
+ cursor: pointer;
28
+ font-size: inherit;
29
+ background: none;
30
+ border: none;
31
+ padding: 0;
32
+ margin: 0;
33
+ line-height: var(--rating-line-height);
34
+
35
+ &:not(:last-child) {
36
+ margin-right: 6px;
37
+ }
38
+
39
+ &:focus-visible {
40
+ outline: 2px solid $color-primary;
41
+ outline-offset: 1px;
42
+ border-radius: $border-radius-base;
43
+ }
44
+
45
+ &:disabled {
46
+ cursor: not-allowed;
47
+ }
48
+ }
49
+
50
+ // 星星容器
51
+ &__star {
52
+ position: relative;
53
+ display: inline-block;
54
+ width: 1em;
55
+ height: 1em;
56
+ font-size: inherit;
57
+ line-height: 1;
58
+ vertical-align: middle;
59
+ cursor: pointer;
60
+ color: var(--rating-void-color);
61
+ user-select: none;
62
+ -webkit-user-select: none;
63
+ }
64
+
65
+ &__star-bg, &__star-fill {
66
+ position: absolute;
67
+ inset: 0;
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ pointer-events: none;
72
+ svg { width: 100%; height: 100%; fill: currentColor; }
73
+ }
74
+
75
+ &__star-bg { color: var(--rating-void-color); }
76
+
77
+ &__star-fill {
78
+ color: var(--rating-fill-color);
79
+ overflow: hidden;
80
+ width: 0;
81
+ }
82
+
83
+ // 圆角星
84
+ &--rounded {
85
+ &__star svg polygon {
86
+ stroke-linejoin: round;
87
+ stroke-linecap: round;
88
+ }
89
+ &__star-bg svg polygon,
90
+ &__star-fill svg polygon {
91
+ stroke: currentColor;
92
+ stroke-width: 1.2;
93
+ }
94
+ &__star { filter: drop-shadow(0 0 0.25px rgba(0,0,0,0.15)); }
95
+ }
96
+
97
+ // 根据 data-ratio 控制填充宽度
98
+ &__star[data-ratio='1'] &__star-fill { width: 100%; }
99
+ &__star[data-ratio='0.5'] &__star-fill { width: 50%; }
100
+
101
+ // 悬停放大 + 颜色
102
+ &--interactive {
103
+ &__item:hover &__star { transform: scale(1.08); }
104
+ &__item:hover &__star-fill { color: var(--rating-hover-color); }
105
+ }
106
+
107
+ // 禁用/只读态
108
+ &--disabled {
109
+ cursor: not-allowed;
110
+ &__item, &__star, &__icon-wrapper { cursor: not-allowed; }
111
+ &__star { opacity: 0.55; }
112
+ }
113
+
114
+ &--readonly {
115
+ cursor: default;
116
+ &__item, &__star, &__icon-wrapper { cursor: default; }
117
+ }
118
+
119
+ &__text {
120
+ margin-left: 8px;
121
+ font-size: var(--rating-font-size);
122
+ color: $color-text-primary;
123
+ }
124
+
125
+ // Icon 覆盖实现支持
126
+ &__icon-wrapper {
127
+ position: relative;
128
+ display: inline-flex;
129
+ width: 1em;
130
+ height: 1em;
131
+ font-size: inherit;
132
+ line-height: 1;
133
+ vertical-align: middle;
134
+ color: var(--rating-void-color);
135
+ user-select: none;
136
+ -webkit-user-select: none;
137
+ }
138
+
139
+ &__icon {
140
+ width: 100%;
141
+ height: 100%;
142
+ display: block;
143
+ color: inherit;
144
+ }
145
+
146
+ &__icon--void { color: var(--rating-void-color); }
147
+ &__icon--void path {
148
+ fill: var(--rating-void-color);
149
+ stroke: none;
150
+ }
151
+
152
+ // 满星或 hover 显示填充时隐藏描边
153
+ &__icon-wrapper[data-ratio='1'] > &__icon--void path,
154
+ &--interactive &__item:hover &__icon-wrapper > &__icon--void path {
155
+ stroke: transparent;
156
+ }
157
+
158
+ &__icon--filled { color: var(--rating-fill-color); }
159
+ &__icon--filled path { fill: currentColor; stroke: none; }
160
+
161
+ &__icon-fill {
162
+ position: absolute;
163
+ inset: 0;
164
+ overflow: hidden;
165
+ display: flex;
166
+ align-items: center;
167
+ justify-content: center;
168
+ color: var(--rating-fill-color);
169
+ pointer-events: none;
170
+ transition: clip-path .12s ease, color .18s ease;
171
+ clip-path: inset(0 100% 0 0);
172
+ }
173
+
174
+ // half / full / empty 独立属性支持
175
+ &__icon-wrapper[data-full='true'] > &__icon-fill { clip-path: inset(0 0 0 0); }
176
+ &__icon-wrapper[data-half='true'] > &__icon-fill { clip-path: inset(0 50% 0 0); }
177
+ &__icon-wrapper[data-empty='true'] > &__icon-fill { clip-path: inset(0 100% 0 0); }
178
+
179
+ // 兼容旧 data-ratio
180
+ &__icon-wrapper[data-ratio='1']:not([data-full]) > &__icon-fill { clip-path: inset(0 0 0 0); }
181
+ &__icon-wrapper[data-ratio='0.5']:not([data-half]) > &__icon-fill { clip-path: inset(0 50% 0 0); }
182
+ &__icon-wrapper[data-ratio='0']:not([data-empty]) > &__icon-fill { clip-path: inset(0 100% 0 0); }
183
+
184
+ &--interactive &__item:hover &__icon-fill { color: var(--rating-hover-color); }
185
+ &--interactive &__item:hover &__icon-wrapper { transform: scale(1.08); }
186
+
187
+ // 图标包装器在禁用或只读下不显示点击手势
188
+ &--disabled &__icon-wrapper,
189
+ &--readonly &__icon-wrapper { cursor: inherit; }
190
+
191
+ // 圆角增强
192
+ &--rounded &__icon-wrapper { filter: drop-shadow(0 0 0.25px rgba(0,0,0,0.12)); }
193
+ &--rounded &__icon { stroke-linejoin: round; stroke-linecap: round; }
194
+ &--rounded &__icon path { stroke-linejoin: round; stroke-linecap: round; }
195
+
196
+ // 响应式设计
197
+ @media (hover: hover) {
198
+ .#{$namespace}-rating__item {
199
+ transition: transform 0.2s ease;
200
+ }
201
+ }
202
+ }
203
+
204
+ // 暗色模式适配
205
+ @media (prefers-color-scheme: dark) {
206
+ .#{$namespace}-rating {
207
+ &__icon--void { color: rgba(#fff, 0.3); }
208
+ &--interactive &__item:hover &__icon-fill { color: $color-warning; }
209
+
210
+ @media (hover: hover) {
211
+ &:not(&--disabled):not(&--readonly) &__item:hover &__icon--void {
212
+ color: $color-warning;
213
+ }
214
+ }
215
+ }
216
+ }
217
+
218
+ .dark {
219
+ .#{$namespace}-rating {
220
+ --rating-void-color: #{rgba($color-text-dark, 0.45)};
221
+ --rating-disabled-color: #{rgba($color-text-dark, 0.28)};
222
+
223
+ &__text {
224
+ color: $color-text-dark;
225
+ }
226
+ }
227
+ }
@@ -0,0 +1,80 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ @include b('result') {
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ padding: $spacing-large * 2;
9
+ text-align: center;
10
+
11
+ @include m('success') {
12
+ .#{$namespace}-result__icon {
13
+ color: $color-success;
14
+ }
15
+ }
16
+
17
+ @include m('warning') {
18
+ .#{$namespace}-result__icon {
19
+ color: $color-warning;
20
+ }
21
+ }
22
+
23
+ @include m('error') {
24
+ .#{$namespace}-result__icon {
25
+ color: $color-danger;
26
+ }
27
+ }
28
+
29
+ @include m('info') {
30
+ .#{$namespace}-result__icon {
31
+ color: $color-info;
32
+ }
33
+ }
34
+
35
+ @include e('icon') {
36
+ margin-bottom: $spacing-base;
37
+ }
38
+
39
+ @include e('title') {
40
+ font-size: $font-size-extra-large;
41
+ font-weight: $font-weight-primary;
42
+ color: $color-text-primary;
43
+ margin-bottom: $spacing-mini;
44
+ }
45
+
46
+ @include e('subtitle') {
47
+ font-size: $font-size-base;
48
+ color: $color-text-secondary;
49
+ margin-bottom: $spacing-large;
50
+ }
51
+
52
+ @include e('extra') {
53
+ margin-top: $spacing-base;
54
+ }
55
+
56
+ @include e('content') {
57
+ margin-top: $spacing-large;
58
+ padding: $spacing-large;
59
+ background: $bg-color-page;
60
+ border-radius: $border-radius-base;
61
+ width: 100%;
62
+ max-width: 480px;
63
+ }
64
+ }
65
+
66
+ .dark {
67
+ .#{$namespace}-result {
68
+ .#{$namespace}-result__title {
69
+ color: $color-text-dark;
70
+ }
71
+
72
+ .#{$namespace}-result__subtitle {
73
+ color: $color-text-dark-secondary;
74
+ }
75
+
76
+ .#{$namespace}-result__content {
77
+ background: $bg-color-dark-lighter;
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,108 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ @include b('segmented') {
5
+ display: inline-flex;
6
+ padding: 2px;
7
+ background-color: $bg-color-page;
8
+ border-radius: $border-radius-base;
9
+
10
+ @include m('small') {
11
+ .#{$namespace}-segmented__item {
12
+ padding: 4px 10px;
13
+ font-size: $font-size-small;
14
+ }
15
+ }
16
+
17
+ @include m('default') {
18
+ .#{$namespace}-segmented__item {
19
+ padding: 6px 14px;
20
+ font-size: $font-size-base;
21
+ }
22
+ }
23
+
24
+ @include m('large') {
25
+ .#{$namespace}-segmented__item {
26
+ padding: 8px 18px;
27
+ font-size: $font-size-medium;
28
+ }
29
+ }
30
+
31
+ @include when('block') {
32
+ display: flex;
33
+ width: 100%;
34
+
35
+ .#{$namespace}-segmented__item {
36
+ flex: 1;
37
+ }
38
+ }
39
+
40
+ @include when('disabled') {
41
+ cursor: not-allowed;
42
+
43
+ .#{$namespace}-segmented__item {
44
+ cursor: not-allowed;
45
+ color: $color-text-disabled;
46
+ }
47
+ }
48
+
49
+ @include e('item') {
50
+ display: inline-flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ gap: 6px;
54
+ border: none;
55
+ border-radius: $border-radius-base;
56
+ background-color: transparent;
57
+ cursor: pointer;
58
+ color: $color-text-regular;
59
+ transition: background-color $transition-duration-fast, color $transition-duration-fast, box-shadow $transition-duration-fast;
60
+ white-space: nowrap;
61
+
62
+ &:hover:not(.is-selected):not(.is-disabled) {
63
+ color: $color-text-primary;
64
+ }
65
+
66
+ &.is-selected {
67
+ background-color: $bg-color;
68
+ color: $color-text-primary;
69
+ font-weight: $font-weight-primary;
70
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
71
+ }
72
+
73
+ &.is-disabled {
74
+ cursor: not-allowed;
75
+ color: $color-text-disabled;
76
+ }
77
+ }
78
+
79
+ @include e('icon') {
80
+ display: flex;
81
+ align-items: center;
82
+ }
83
+
84
+ @include e('label') {
85
+ display: flex;
86
+ align-items: center;
87
+ }
88
+ }
89
+
90
+ .dark {
91
+ .#{$namespace}-segmented {
92
+ background-color: $bg-color-dark-lighter;
93
+
94
+ .#{$namespace}-segmented__item {
95
+ color: $color-text-dark-secondary;
96
+
97
+ &:hover:not(.is-selected):not(.is-disabled) {
98
+ color: $color-text-dark;
99
+ }
100
+
101
+ &.is-selected {
102
+ background-color: $bg-color-dark-light;
103
+ color: $color-text-dark;
104
+ box-shadow: none;
105
+ }
106
+ }
107
+ }
108
+ }