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,61 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ @include b('divider') {
5
+ position: relative;
6
+ color: $color-text-secondary;
7
+
8
+ @include m('horizontal') {
9
+ display: flex;
10
+ align-items: center;
11
+ width: 100%;
12
+ margin: 16px 0;
13
+
14
+ .#{$namespace}-divider__line {
15
+ flex: 1;
16
+ border-top: 1px solid $border-color-light;
17
+ }
18
+
19
+ &.is-left { .#{$namespace}-divider__text { margin-left: 8px; } }
20
+ &.is-right { .#{$namespace}-divider__text { margin-right: 8px; } }
21
+
22
+ .#{$namespace}-divider__text {
23
+ padding: 0 12px;
24
+ font-size: $font-size-small;
25
+ color: $color-text-secondary;
26
+ white-space: nowrap;
27
+ }
28
+ }
29
+
30
+ @include m('vertical') {
31
+ display: inline-flex;
32
+ align-items: stretch;
33
+ width: 1px;
34
+ height: 1em;
35
+ margin: 0 8px;
36
+
37
+ .#{$namespace}-divider__line { border-left: 1px solid $border-color-light; }
38
+ }
39
+
40
+ @include m('dashed') {
41
+ .#{$namespace}-divider__line { border-style: dashed; }
42
+ }
43
+
44
+ @include m('dotted') {
45
+ .#{$namespace}-divider__line { border-style: dotted; }
46
+ }
47
+ }
48
+
49
+ .dark {
50
+ .#{$namespace}-divider {
51
+ color: $color-text-dark-secondary;
52
+
53
+ .#{$namespace}-divider__line {
54
+ border-color: $bg-color-dark-lighter;
55
+ }
56
+
57
+ .#{$namespace}-divider__text {
58
+ color: $color-text-dark-secondary;
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,211 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ @include b('drawer') {
5
+ position: fixed;
6
+ top: 0;
7
+ left: 0;
8
+ right: 0;
9
+ bottom: 0;
10
+ z-index: $z-index-popper;
11
+ outline: none;
12
+
13
+ @include e('overlay') {
14
+ position: absolute;
15
+ top: 0;
16
+ left: 0;
17
+ right: 0;
18
+ bottom: 0;
19
+ background: rgba(0, 0, 0, 0.5);
20
+ animation: drawer-fade-in $transition-duration;
21
+ }
22
+
23
+ &.is-closing {
24
+ .#{$namespace}-drawer__overlay {
25
+ animation: drawer-fade-out $transition-duration forwards;
26
+ }
27
+ }
28
+
29
+ @include e('panel') {
30
+ position: absolute;
31
+ background: $bg-color;
32
+ display: flex;
33
+ flex-direction: column;
34
+ box-shadow: $box-shadow-dark;
35
+ }
36
+
37
+ @include m('rtl') {
38
+ .#{$namespace}-drawer__panel {
39
+ top: 0;
40
+ right: 0;
41
+ bottom: 0;
42
+ animation: drawer-slide-in-right $transition-duration;
43
+ }
44
+
45
+ &.is-closing .#{$namespace}-drawer__panel {
46
+ animation: drawer-slide-out-right $transition-duration forwards;
47
+ }
48
+ }
49
+
50
+ @include m('ltr') {
51
+ .#{$namespace}-drawer__panel {
52
+ top: 0;
53
+ left: 0;
54
+ bottom: 0;
55
+ animation: drawer-slide-in-left $transition-duration;
56
+ }
57
+
58
+ &.is-closing .#{$namespace}-drawer__panel {
59
+ animation: drawer-slide-out-left $transition-duration forwards;
60
+ }
61
+ }
62
+
63
+ @include m('ttb') {
64
+ .#{$namespace}-drawer__panel {
65
+ top: 0;
66
+ left: 0;
67
+ right: 0;
68
+ animation: drawer-slide-in-top $transition-duration;
69
+ }
70
+
71
+ &.is-closing .#{$namespace}-drawer__panel {
72
+ animation: drawer-slide-out-top $transition-duration forwards;
73
+ }
74
+ }
75
+
76
+ @include m('btt') {
77
+ .#{$namespace}-drawer__panel {
78
+ bottom: 0;
79
+ left: 0;
80
+ right: 0;
81
+ animation: drawer-slide-in-bottom $transition-duration;
82
+ }
83
+
84
+ &.is-closing .#{$namespace}-drawer__panel {
85
+ animation: drawer-slide-out-bottom $transition-duration forwards;
86
+ }
87
+ }
88
+
89
+ @include e('header') {
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: space-between;
93
+ padding: $spacing-base $spacing-large;
94
+ border-bottom: 1px solid $border-color-lighter;
95
+ }
96
+
97
+ @include e('title') {
98
+ font-size: $font-size-large;
99
+ font-weight: $font-weight-primary;
100
+ color: $color-text-primary;
101
+ }
102
+
103
+ @include e('close') {
104
+ border: none;
105
+ background: transparent;
106
+ color: $color-text-secondary;
107
+ cursor: pointer;
108
+ padding: 4px;
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ transition: color $transition-duration-fast;
113
+
114
+ &:hover {
115
+ color: $color-text-primary;
116
+ }
117
+ }
118
+
119
+ @include e('body') {
120
+ flex: 1;
121
+ padding: $spacing-large;
122
+ overflow: auto;
123
+ }
124
+
125
+ @include e('footer') {
126
+ padding: $spacing-base $spacing-large;
127
+ border-top: 1px solid $border-color-lighter;
128
+ }
129
+ }
130
+
131
+ @keyframes drawer-fade-in {
132
+ from { opacity: 0; }
133
+ to { opacity: 1; }
134
+ }
135
+
136
+ @keyframes drawer-fade-out {
137
+ from { opacity: 1; }
138
+ to { opacity: 0; }
139
+ }
140
+
141
+ @keyframes drawer-slide-in-right {
142
+ from { transform: translateX(100%); }
143
+ to { transform: translateX(0); }
144
+ }
145
+
146
+ @keyframes drawer-slide-out-right {
147
+ from { transform: translateX(0); }
148
+ to { transform: translateX(100%); }
149
+ }
150
+
151
+ @keyframes drawer-slide-in-left {
152
+ from { transform: translateX(-100%); }
153
+ to { transform: translateX(0); }
154
+ }
155
+
156
+ @keyframes drawer-slide-out-left {
157
+ from { transform: translateX(0); }
158
+ to { transform: translateX(-100%); }
159
+ }
160
+
161
+ @keyframes drawer-slide-in-top {
162
+ from { transform: translateY(-100%); }
163
+ to { transform: translateY(0); }
164
+ }
165
+
166
+ @keyframes drawer-slide-out-top {
167
+ from { transform: translateY(0); }
168
+ to { transform: translateY(-100%); }
169
+ }
170
+
171
+ @keyframes drawer-slide-in-bottom {
172
+ from { transform: translateY(100%); }
173
+ to { transform: translateY(0); }
174
+ }
175
+
176
+ @keyframes drawer-slide-out-bottom {
177
+ from { transform: translateY(0); }
178
+ to { transform: translateY(100%); }
179
+ }
180
+
181
+ .dark {
182
+ .#{$namespace}-drawer {
183
+ .#{$namespace}-drawer__panel {
184
+ background: $bg-color-dark-light;
185
+ }
186
+
187
+ .#{$namespace}-drawer__header {
188
+ border-bottom-color: $bg-color-dark-lighter;
189
+ }
190
+
191
+ .#{$namespace}-drawer__title {
192
+ color: $color-text-dark;
193
+ }
194
+
195
+ .#{$namespace}-drawer__close {
196
+ color: $color-text-dark-secondary;
197
+
198
+ &:hover {
199
+ color: $color-text-dark;
200
+ }
201
+ }
202
+
203
+ .#{$namespace}-drawer__body {
204
+ color: $color-text-dark;
205
+ }
206
+
207
+ .#{$namespace}-drawer__footer {
208
+ border-top-color: $bg-color-dark-lighter;
209
+ }
210
+ }
211
+ }
@@ -0,0 +1,230 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ // Dropdown
5
+ @include b('dropdown') {
6
+ display: inline-flex;
7
+ position: relative;
8
+ color: $color-text-regular;
9
+ font-size: $font-size-base;
10
+ line-height: 1;
11
+ vertical-align: top;
12
+
13
+ // Size
14
+ @include m('large') {
15
+ font-size: calc(#{$font-size-base} + 2px);
16
+ .#{$namespace}-dropdown__caret svg { width: 14px; height: 14px; }
17
+ }
18
+ @include m('small') {
19
+ font-size: calc(#{$font-size-base} - 2px);
20
+ .#{$namespace}-dropdown__caret svg { width: 10px; height: 10px; }
21
+ }
22
+
23
+ // Trigger
24
+ @include e('trigger') {
25
+ display: inline-flex;
26
+ align-items: center;
27
+ cursor: pointer;
28
+ outline: none;
29
+ transition: color $transition-duration-fast;
30
+
31
+ &:hover { color: $color-primary-light; }
32
+ }
33
+
34
+ @include e('trigger-icon') {
35
+ display: inline-flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ margin-right: 6px;
39
+ pointer-events: none;
40
+ }
41
+
42
+ @include e('trigger-prefix') {
43
+ display: inline-flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ margin-right: 6px;
47
+ pointer-events: none;
48
+ }
49
+
50
+ // Caret
51
+ @include e('caret') {
52
+ display: inline-flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ margin-left: 8px;
56
+ color: currentColor;
57
+ transition: transform $transition-duration-fast;
58
+
59
+ svg {
60
+ width: 12px;
61
+ height: 12px;
62
+ fill: none;
63
+ stroke: currentColor;
64
+ stroke-width: 2;
65
+ stroke-linecap: round;
66
+ stroke-linejoin: round;
67
+ }
68
+ }
69
+
70
+ &.is-open .#{$namespace}-dropdown__caret { transform: rotate(180deg); }
71
+
72
+ // Split Button
73
+ @include e('split-button') {
74
+ display: inline-flex;
75
+
76
+ .#{$namespace}-button-group { display: inline-flex; }
77
+
78
+ .#{$namespace}-button:first-child {
79
+ border-top-right-radius: 0;
80
+ border-bottom-right-radius: 0;
81
+ border-right-color: rgba(255, 255, 255, 0.5);
82
+ }
83
+
84
+ .#{$namespace}-dropdown__caret-button {
85
+ border-top-left-radius: 0;
86
+ border-bottom-left-radius: 0;
87
+ border-left-color: rgba(255, 255, 255, 0.5);
88
+ padding: 0 10px;
89
+ display: inline-flex;
90
+ align-items: center;
91
+ justify-content: center;
92
+
93
+ svg {
94
+ width: 12px;
95
+ height: 12px;
96
+ fill: none;
97
+ stroke: currentColor;
98
+ stroke-width: 2;
99
+ stroke-linecap: round;
100
+ stroke-linejoin: round;
101
+ }
102
+ }
103
+ }
104
+
105
+ // Popper
106
+ @include e('popper') {
107
+ // 位置通过 CSS 变量控制(组件仅设置变量,避免硬编码内联 style 字符串)
108
+ position: fixed;
109
+ top: var(--lm-dropdown-top, -9999px);
110
+ left: var(--lm-dropdown-left, -9999px);
111
+ z-index: 2000;
112
+
113
+ --lm-dropdown-bg: #{$bg-color-overlay};
114
+ --lm-dropdown-border: #{$border-color-light};
115
+ --lm-dropdown-arrow: 8px;
116
+ --lm-dropdown-max-height: 300px;
117
+ --lm-dropdown-arrow-edge: 16px;
118
+
119
+ // 不在 popper 上做 opacity/transform 动画,避免和 Svelte transition 冲突
120
+ pointer-events: none;
121
+ }
122
+
123
+ &.is-open .#{$namespace}-dropdown__popper {
124
+ pointer-events: auto;
125
+ }
126
+
127
+ // Motion wrapper:承载外观与布局,动画由 Svelte transition 控制
128
+ @include e('motion') {
129
+ position: relative;
130
+ background: var(--lm-dropdown-bg);
131
+ border: 1px solid var(--lm-dropdown-border);
132
+ border-radius: $border-radius-base;
133
+ box-shadow: $box-shadow-light;
134
+ padding: 4px 0;
135
+ min-width: 100px;
136
+ width: max-content;
137
+ will-change: transform, opacity;
138
+
139
+ &.is-bottom, &.is-bottom-start, &.is-bottom-end { transform-origin: top center; }
140
+ &.is-top, &.is-top-start, &.is-top-end { transform-origin: bottom center; }
141
+ }
142
+
143
+ // Arrow
144
+ @include e('arrow') {
145
+ position: absolute;
146
+ width: var(--lm-dropdown-arrow);
147
+ height: var(--lm-dropdown-arrow);
148
+ pointer-events: none;
149
+ z-index: 0;
150
+
151
+ &::before {
152
+ content: '';
153
+ position: absolute;
154
+ inset: 0;
155
+ background: var(--lm-dropdown-bg);
156
+ transform: rotate(45deg);
157
+ border-radius: calc(var(--lm-dropdown-arrow) * 0.2);
158
+ }
159
+ }
160
+
161
+ @include e('content') {
162
+ position: relative;
163
+ z-index: 1;
164
+ max-height: var(--lm-dropdown-max-height);
165
+ overflow-y: auto;
166
+ }
167
+ }
168
+
169
+ // Arrow Position (只保留上下方向)
170
+ .#{$namespace}-dropdown__popper {
171
+ &.is-bottom .#{$namespace}-dropdown__arrow,
172
+ &.is-bottom-start .#{$namespace}-dropdown__arrow,
173
+ &.is-bottom-end .#{$namespace}-dropdown__arrow {
174
+ top: calc(var(--lm-dropdown-arrow) / -2 + 1px);
175
+ &::before { box-shadow: -1px -1px 0 0 var(--lm-dropdown-border); }
176
+ }
177
+ &.is-bottom .#{$namespace}-dropdown__arrow { left: 50%; transform: translateX(-50%); }
178
+ &.is-bottom-start .#{$namespace}-dropdown__arrow { left: var(--lm-dropdown-arrow-edge); }
179
+ &.is-bottom-end .#{$namespace}-dropdown__arrow { right: var(--lm-dropdown-arrow-edge); }
180
+
181
+ &.is-top .#{$namespace}-dropdown__arrow,
182
+ &.is-top-start .#{$namespace}-dropdown__arrow,
183
+ &.is-top-end .#{$namespace}-dropdown__arrow {
184
+ bottom: calc(var(--lm-dropdown-arrow) / -2 + 1px);
185
+ &::before { box-shadow: 1px 1px 0 0 var(--lm-dropdown-border); }
186
+ }
187
+ &.is-top .#{$namespace}-dropdown__arrow { left: 50%; transform: translateX(-50%); }
188
+ &.is-top-start .#{$namespace}-dropdown__arrow { left: var(--lm-dropdown-arrow-edge); }
189
+ &.is-top-end .#{$namespace}-dropdown__arrow { right: var(--lm-dropdown-arrow-edge); }
190
+ }
191
+
192
+ // Menu
193
+ @include b('dropdown-menu') { list-style: none; margin: 0; padding: 0; }
194
+
195
+ // Item
196
+ @include b('dropdown-item') {
197
+ display: flex;
198
+ align-items: center;
199
+ gap: 8px;
200
+ padding: 8px 16px;
201
+ font-size: $font-size-base;
202
+ color: $color-text-regular;
203
+ cursor: pointer;
204
+ white-space: nowrap;
205
+ line-height: 1.4;
206
+ transition: background-color $transition-duration-fast, color $transition-duration-fast;
207
+
208
+ &:hover, &:focus { background-color: $fill-color-light; color: $color-primary; }
209
+ &.is-disabled { color: $color-text-placeholder; cursor: not-allowed; pointer-events: none; }
210
+ &.is-divided { margin-top: 4px; border-top: 1px solid $border-color-lighter; padding-top: 12px; }
211
+
212
+ @include e('icon') { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; align-items: center; justify-content: center; margin-right: 2px; }
213
+ }
214
+
215
+ // Dark Mode
216
+ .dark {
217
+ .#{$namespace}-dropdown {
218
+ color: $color-text-dark;
219
+ }
220
+ .#{$namespace}-dropdown__popper {
221
+ --lm-dropdown-bg: #{$bg-color-dark-overlay};
222
+ --lm-dropdown-border: #{$border-color-dark-light};
223
+ }
224
+ .#{$namespace}-dropdown-item {
225
+ color: $color-text-dark;
226
+ &:hover, &:focus { background-color: $bg-color-dark-lighter; color: $color-primary; }
227
+ &.is-disabled { color: $color-text-dark-placeholder; }
228
+ &.is-divided { border-top-color: $border-color-dark-light; }
229
+ }
230
+ }
@@ -0,0 +1,36 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ @include b('empty') {
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ justify-content: center;
9
+ padding: 24px;
10
+ color: $color-text-secondary;
11
+
12
+ @include e('image') {
13
+ width: 64px;
14
+ height: 41px;
15
+ margin-bottom: 12px;
16
+ opacity: 0.9;
17
+ svg { display: block; width: 100%; height: 100%; }
18
+ }
19
+
20
+ @include e('description') {
21
+ font-size: $font-size-small;
22
+ margin-bottom: 12px;
23
+ text-align: center;
24
+ }
25
+
26
+ @include e('actions') {
27
+ display: inline-flex;
28
+ gap: 8px;
29
+ }
30
+ }
31
+
32
+ .dark {
33
+ .#{$namespace}-empty {
34
+ color: $color-text-dark-secondary;
35
+ }
36
+ }