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,49 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ @include b('statistic') {
5
+ @include e('title') {
6
+ font-size: $font-size-small;
7
+ color: $color-text-secondary;
8
+ margin-bottom: 8px;
9
+ }
10
+
11
+ @include e('content') {
12
+ display: flex;
13
+ align-items: baseline;
14
+ font-size: $font-size-extra-large;
15
+ color: $color-text-primary;
16
+ }
17
+
18
+ @include e('value') {
19
+ font-weight: $font-weight-primary;
20
+ font-variant-numeric: tabular-nums;
21
+ }
22
+
23
+ @include e('prefix') {
24
+ margin-right: 4px;
25
+ }
26
+
27
+ @include e('suffix') {
28
+ margin-left: 4px;
29
+ font-size: $font-size-base;
30
+ }
31
+ }
32
+
33
+ @include b('countdown') {
34
+ .#{$namespace}-statistic__value {
35
+ font-variant-numeric: tabular-nums;
36
+ }
37
+ }
38
+
39
+ .dark {
40
+ .#{$namespace}-statistic {
41
+ .#{$namespace}-statistic__title {
42
+ color: $color-text-dark-secondary;
43
+ }
44
+
45
+ .#{$namespace}-statistic__content {
46
+ color: $color-text-dark;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,255 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ @include b('steps') {
5
+ display: flex;
6
+
7
+ @include m('horizontal') {
8
+ flex-direction: row;
9
+
10
+ .#{$namespace}-step {
11
+ flex: 1;
12
+ position: relative;
13
+
14
+ &:last-child {
15
+ flex: none;
16
+
17
+ .#{$namespace}-step__line {
18
+ display: none;
19
+ }
20
+ }
21
+ }
22
+
23
+ .#{$namespace}-step__head {
24
+ display: flex;
25
+ align-items: center;
26
+ }
27
+
28
+ .#{$namespace}-step__line {
29
+ flex: 1;
30
+ height: 2px;
31
+ margin: 0 12px;
32
+ }
33
+ }
34
+
35
+ @include m('vertical') {
36
+ flex-direction: column;
37
+
38
+ .#{$namespace}-step {
39
+ &:last-child {
40
+ .#{$namespace}-step__line {
41
+ display: none;
42
+ }
43
+ }
44
+ }
45
+
46
+ .#{$namespace}-step__head {
47
+ flex-direction: column;
48
+ align-items: flex-start;
49
+ }
50
+
51
+ .#{$namespace}-step__line {
52
+ width: 2px;
53
+ flex: 1;
54
+ min-height: 50px;
55
+ margin: 8px 0 8px 13px;
56
+ }
57
+
58
+ .#{$namespace}-step__main {
59
+ padding-left: 16px;
60
+ padding-bottom: 24px;
61
+ }
62
+ }
63
+
64
+ @include m('simple') {
65
+ .#{$namespace}-step__description {
66
+ display: none;
67
+ }
68
+ }
69
+
70
+ @include when('center') {
71
+ .#{$namespace}-step__head {
72
+ justify-content: center;
73
+ }
74
+
75
+ .#{$namespace}-step__main {
76
+ text-align: center;
77
+ }
78
+ }
79
+ }
80
+
81
+ @include b('step') {
82
+ display: flex;
83
+ flex-direction: column;
84
+
85
+ &.is-wait {
86
+ .#{$namespace}-step__icon {
87
+ background: $bg-color;
88
+ border-color: $border-color-lighter;
89
+ color: $border-color-lighter;
90
+ }
91
+
92
+ .#{$namespace}-step__line {
93
+ background: $border-color-lighter;
94
+ }
95
+
96
+ .#{$namespace}-step__title {
97
+ color: $color-text-secondary;
98
+ }
99
+ }
100
+
101
+ &.is-process {
102
+ .#{$namespace}-step__icon {
103
+ background: $color-primary;
104
+ border-color: $color-primary;
105
+ color: #fff;
106
+ }
107
+
108
+ .#{$namespace}-step__line {
109
+ background: $border-color-lighter;
110
+ }
111
+
112
+ .#{$namespace}-step__title {
113
+ color: $color-text-primary;
114
+ font-weight: $font-weight-primary;
115
+ }
116
+ }
117
+
118
+ &.is-finish {
119
+ .#{$namespace}-step__icon {
120
+ background: $bg-color;
121
+ border-color: $color-primary;
122
+ color: $color-primary;
123
+ }
124
+
125
+ .#{$namespace}-step__line {
126
+ background: $color-primary;
127
+ }
128
+
129
+ .#{$namespace}-step__title {
130
+ color: $color-text-primary;
131
+ }
132
+ }
133
+
134
+ &.is-success {
135
+ .#{$namespace}-step__icon {
136
+ background: $bg-color;
137
+ border-color: $color-success;
138
+ color: $color-success;
139
+ }
140
+
141
+ .#{$namespace}-step__line {
142
+ background: $color-success;
143
+ }
144
+ }
145
+
146
+ &.is-error {
147
+ .#{$namespace}-step__icon {
148
+ background: $bg-color;
149
+ border-color: $color-danger;
150
+ color: $color-danger;
151
+ }
152
+
153
+ .#{$namespace}-step__title {
154
+ color: $color-danger;
155
+ }
156
+ }
157
+
158
+ @include e('head') {
159
+ display: flex;
160
+ align-items: center;
161
+ }
162
+
163
+ @include e('icon') {
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: center;
167
+ width: 28px;
168
+ height: 28px;
169
+ border-radius: $border-radius-circle;
170
+ border: 2px solid;
171
+ font-size: $font-size-base;
172
+ flex-shrink: 0;
173
+ transition: background-color $transition-duration, border-color $transition-duration, color $transition-duration;
174
+ }
175
+
176
+ @include e('icon-inner') {
177
+ font-weight: $font-weight-primary;
178
+ }
179
+
180
+ @include e('line') {
181
+ background: $border-color-lighter;
182
+ transition: background $transition-duration;
183
+ }
184
+
185
+ @include e('main') {
186
+ margin-top: 8px;
187
+ }
188
+
189
+ @include e('title') {
190
+ font-size: $font-size-base;
191
+ line-height: 1.5;
192
+ transition: color $transition-duration;
193
+ }
194
+
195
+ @include e('description') {
196
+ font-size: $font-size-small;
197
+ color: $color-text-secondary;
198
+ margin-top: 4px;
199
+ }
200
+ }
201
+
202
+ .dark {
203
+ .#{$namespace}-step {
204
+ .#{$namespace}-step__title {
205
+ color: $color-text-dark;
206
+ }
207
+
208
+ .#{$namespace}-step__description {
209
+ color: $color-text-dark-secondary;
210
+ }
211
+
212
+ .#{$namespace}-step__line {
213
+ background: color-mix(in oklab, #{$bg-color-dark-lighter} 72%, #{$color-text-dark});
214
+ }
215
+
216
+ &.is-wait {
217
+ .#{$namespace}-step__icon {
218
+ background: $bg-color-dark-light;
219
+ border-color: color-mix(in oklab, #{$bg-color-dark-lighter} 72%, #{$color-text-dark});
220
+ color: color-mix(in oklab, #{$bg-color-dark-lighter} 72%, #{$color-text-dark});
221
+ }
222
+
223
+ .#{$namespace}-step__line {
224
+ background: color-mix(in oklab, #{$bg-color-dark-lighter} 72%, #{$color-text-dark});
225
+ }
226
+
227
+ .#{$namespace}-step__title {
228
+ color: $color-text-dark-secondary;
229
+ }
230
+ }
231
+
232
+ &.is-process {
233
+ .#{$namespace}-step__line {
234
+ background: color-mix(in oklab, #{$bg-color-dark-lighter} 72%, #{$color-text-dark});
235
+ }
236
+
237
+ .#{$namespace}-step__title {
238
+ color: $color-text-dark;
239
+ }
240
+ }
241
+
242
+ &.is-finish {
243
+ .#{$namespace}-step__icon {
244
+ background: $bg-color-dark-light;
245
+ }
246
+ }
247
+
248
+ &.is-success,
249
+ &.is-error {
250
+ .#{$namespace}-step__icon {
251
+ background: $bg-color-dark-light;
252
+ }
253
+ }
254
+ }
255
+ }
@@ -0,0 +1,277 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+ @use './mixins/function' as *;
4
+
5
+ @keyframes #{$namespace}-switch-spin {
6
+ from {
7
+ transform: rotate(0deg);
8
+ }
9
+ to {
10
+ transform: rotate(360deg);
11
+ }
12
+ }
13
+
14
+ @include b(switch) {
15
+ --sw-height: 24px;
16
+ --sw-width: 40px;
17
+ --sw-color: #{$color-primary};
18
+
19
+ position: relative;
20
+ display: inline-flex;
21
+ align-items: center;
22
+ vertical-align: middle;
23
+ height: var(--sw-height);
24
+ border: none;
25
+ background: none;
26
+ padding: 0;
27
+ cursor: pointer;
28
+ user-select: none;
29
+ outline: none;
30
+ font-family: inherit;
31
+ -webkit-tap-highlight-color: transparent;
32
+
33
+ @include e(track) {
34
+ position: relative;
35
+ width: var(--sw-width);
36
+ height: var(--sw-height);
37
+ background-color: $border-color-light;
38
+ border-radius: calc(var(--sw-height) / 2);
39
+ transition: background-color $transition-duration cubic-bezier(0.4, 0, 0.2, 1);
40
+ overflow: hidden;
41
+ }
42
+
43
+ .#{$namespace}-switch__icon {
44
+ position: absolute;
45
+ top: 50%;
46
+ transform: translate3d(0, -50%, 0);
47
+ width: calc(var(--sw-height) - 8px);
48
+ height: calc(var(--sw-height) - 8px);
49
+ display: inline-flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ pointer-events: none;
53
+ z-index: 0;
54
+ color: $color-text-secondary;
55
+ opacity: 0.9;
56
+ transition:
57
+ transform $transition-duration cubic-bezier(0.4, 0, 0.2, 1),
58
+ opacity $transition-duration cubic-bezier(0.4, 0, 0.2, 1),
59
+ color $transition-duration cubic-bezier(0.4, 0, 0.2, 1);
60
+ }
61
+
62
+ .#{$namespace}-switch__icon--left {
63
+ left: 6px;
64
+ opacity: 0;
65
+ transform: translate3d(-6px, -50%, 0);
66
+ }
67
+
68
+ .#{$namespace}-switch__icon--right {
69
+ right: 6px;
70
+ opacity: 1;
71
+ }
72
+
73
+ @include e(thumb) {
74
+ position: absolute;
75
+ top: 2px;
76
+ left: 2px;
77
+ width: calc(var(--sw-height) - 4px);
78
+ height: calc(var(--sw-height) - 4px);
79
+ background-color: $bg-color;
80
+ border-radius: 50%;
81
+ transition: transform $transition-duration cubic-bezier(0.4, 0, 0.2, 1);
82
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ z-index: 1;
87
+ }
88
+
89
+ @include e(loading) {
90
+ display: flex;
91
+ animation: #{$namespace}-switch-spin 1s linear infinite;
92
+ color: $color-text-secondary;
93
+ }
94
+
95
+ @include e(label) {
96
+ margin-left: $spacing-mini;
97
+ color: $color-text-regular;
98
+ font-size: $font-size-base;
99
+ white-space: nowrap;
100
+ transition: color $transition-duration;
101
+
102
+ @include when(loading) {
103
+ color: $color-text-secondary;
104
+ }
105
+ }
106
+
107
+ // Sizes
108
+ @include m(small) {
109
+ --sw-height: 20px;
110
+ --sw-width: 32px;
111
+
112
+ .#{$namespace}-switch__icon--left {
113
+ left: 4px;
114
+ }
115
+
116
+ .#{$namespace}-switch__icon--right {
117
+ right: 4px;
118
+ }
119
+
120
+ .#{$namespace}-switch__label {
121
+ font-size: $font-size-small;
122
+ }
123
+ }
124
+
125
+ @include m(medium) {
126
+ --sw-height: 24px;
127
+ --sw-width: 40px;
128
+ }
129
+
130
+ @include m(large) {
131
+ --sw-height: 28px;
132
+ --sw-width: 48px;
133
+
134
+ .#{$namespace}-switch__icon--left {
135
+ left: 8px;
136
+ }
137
+
138
+ .#{$namespace}-switch__icon--right {
139
+ right: 8px;
140
+ }
141
+
142
+ .#{$namespace}-switch__label {
143
+ font-size: $font-size-medium;
144
+ }
145
+ }
146
+
147
+ // When there are icons inside the track, widen the track.
148
+ &.is-has-icons {
149
+ &.#{$namespace}-switch--small {
150
+ --sw-width: 40px;
151
+ }
152
+
153
+ &.#{$namespace}-switch--medium {
154
+ --sw-width: 48px;
155
+ }
156
+
157
+ &.#{$namespace}-switch--large {
158
+ --sw-width: 56px;
159
+ }
160
+ }
161
+
162
+ // States
163
+ @include when(active) {
164
+ .#{$namespace}-switch__track {
165
+ background-color: var(--sw-color);
166
+ }
167
+
168
+ .#{$namespace}-switch__icon {
169
+ color: rgba(255, 255, 255, 0.92);
170
+ }
171
+
172
+ .#{$namespace}-switch__icon--left {
173
+ opacity: 1;
174
+ transform: translate3d(0, -50%, 0);
175
+ }
176
+
177
+ .#{$namespace}-switch__icon--right {
178
+ opacity: 0;
179
+ transform: translate3d(6px, -50%, 0);
180
+ }
181
+
182
+ .#{$namespace}-switch__thumb {
183
+ transform: translateX(calc(var(--sw-width) - var(--sw-height)));
184
+ }
185
+ }
186
+
187
+ @include when(disabled) {
188
+ cursor: not-allowed;
189
+ opacity: 0.5;
190
+
191
+ .#{$namespace}-switch__track {
192
+ background-color: $border-color-extra-light;
193
+ }
194
+
195
+ .#{$namespace}-switch__thumb {
196
+ box-shadow: none;
197
+ }
198
+ }
199
+
200
+ @include when(loading) {
201
+ cursor: default;
202
+ pointer-events: none;
203
+ }
204
+
205
+ // Hover effect
206
+ &:not(.is-disabled):not(.is-loading):hover {
207
+ .#{$namespace}-switch__thumb {
208
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
209
+ }
210
+ }
211
+
212
+ // Focus visible
213
+ &:focus-visible {
214
+ .#{$namespace}-switch__track {
215
+ outline: 2px solid var(--sw-color);
216
+ outline-offset: 2px;
217
+ }
218
+ }
219
+ }
220
+
221
+ .dark {
222
+ .#{$namespace}-switch {
223
+ .#{$namespace}-switch__icon {
224
+ color: $color-text-dark-secondary;
225
+ }
226
+
227
+ .#{$namespace}-switch__track {
228
+ background-color: color-mix(in oklab, $bg-color-dark-overlay 80%, $bg-color);
229
+ }
230
+
231
+ .#{$namespace}-switch__thumb {
232
+ background-color: $bg-color;
233
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
234
+ }
235
+
236
+ .#{$namespace}-switch__loading {
237
+ color: $color-text-dark-secondary;
238
+ }
239
+
240
+ .#{$namespace}-switch__label {
241
+ color: $color-text-dark-secondary;
242
+ }
243
+
244
+ &.is-active {
245
+ .#{$namespace}-switch__track {
246
+ background-color: var(--sw-color);
247
+ }
248
+
249
+ .#{$namespace}-switch__icon {
250
+ color: rgba(255, 255, 255, 0.92);
251
+ }
252
+
253
+ .#{$namespace}-switch__thumb {
254
+ background-color: $bg-color;
255
+ }
256
+
257
+ .#{$namespace}-switch__label {
258
+ color: $color-text-dark;
259
+ }
260
+ }
261
+
262
+ &.is-disabled {
263
+ .#{$namespace}-switch__track {
264
+ background-color: $bg-color-dark-overlay;
265
+ }
266
+
267
+ .#{$namespace}-switch__thumb {
268
+ background-color: $bg-color-dark-lighter;
269
+ box-shadow: none;
270
+ }
271
+
272
+ .#{$namespace}-switch__label {
273
+ color: rgba($color-text-dark, 0.45);
274
+ }
275
+ }
276
+ }
277
+ }