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,150 @@
1
+ @use 'sass:color';
2
+ @use './variables' as *;
3
+ @use './mixins/bem' as *;
4
+
5
+ /* Message container */
6
+ .#{$namespace}-message-container {
7
+ position: fixed;
8
+ top: 0;
9
+ left: 50%;
10
+ transform: translateX(-50%);
11
+ z-index: $z-index-top;
12
+ pointer-events: none;
13
+ }
14
+
15
+ @include b('message') {
16
+ position: absolute;
17
+ left: 50%;
18
+ transform: translateX(-50%);
19
+ display: inline-flex;
20
+ align-items: center;
21
+ gap: 8px;
22
+ padding: 10px 16px;
23
+ border-radius: $border-radius-medium;
24
+ font-size: $font-size-base;
25
+ line-height: 1.5;
26
+ border: 1px solid transparent;
27
+ overflow: hidden;
28
+ min-width: 280px;
29
+ max-width: 500px;
30
+ pointer-events: auto;
31
+ transition: opacity $animation-duration ease, transform $animation-duration ease, top $animation-duration ease;
32
+ animation: #{$namespace}-message-slide-in $animation-duration ease-out;
33
+
34
+ @include e('icon') {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ flex-shrink: 0;
39
+
40
+ svg {
41
+ width: 16px;
42
+ height: 16px;
43
+ }
44
+ }
45
+
46
+ @include e('content') {
47
+ flex: 1;
48
+ min-width: 0;
49
+ word-break: break-word;
50
+ }
51
+
52
+ @include e('close') {
53
+ cursor: pointer;
54
+ background: none;
55
+ border: none;
56
+ color: inherit;
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ padding: 0;
61
+ margin-left: 8px;
62
+ width: 16px;
63
+ height: 16px;
64
+ border-radius: 50%;
65
+ flex-shrink: 0;
66
+ opacity: 0.6;
67
+ transition: opacity 0.2s ease;
68
+
69
+ &:hover { opacity: 1; }
70
+
71
+ svg { width: 14px; height: 14px; }
72
+ }
73
+
74
+ // Center modifier
75
+ @include when('center') {
76
+ justify-content: center;
77
+ text-align: center;
78
+ }
79
+
80
+ // Closable modifier
81
+ @include when('closable') {
82
+ padding-right: 12px;
83
+ }
84
+
85
+ // Hidden state for fade out
86
+ @include when('hidden') {
87
+ opacity: 0;
88
+ transform: translateX(-50%) translateY(-100%);
89
+ }
90
+
91
+ // Type modifiers
92
+ @include m('info') {
93
+ background-color: color.mix(#fff, $color-info, 92%);
94
+ color: $color-info;
95
+ border-color: color.mix(#fff, $color-info, 80%);
96
+ }
97
+
98
+ @include m('success') {
99
+ background-color: color.mix(#fff, $color-success, 92%);
100
+ color: $color-success;
101
+ border-color: color.mix(#fff, $color-success, 80%);
102
+ }
103
+
104
+ @include m('warning') {
105
+ background-color: color.mix(#fff, $color-warning, 92%);
106
+ color: $color-warning;
107
+ border-color: color.mix(#fff, $color-warning, 80%);
108
+ }
109
+
110
+ @include m('error') {
111
+ background-color: color.mix(#fff, $color-danger, 92%);
112
+ color: $color-danger;
113
+ border-color: color.mix(#fff, $color-danger, 80%);
114
+ }
115
+ }
116
+
117
+ @keyframes #{$namespace}-message-slide-in {
118
+ from {
119
+ opacity: 0;
120
+ transform: translateX(-50%) translateY(-100%);
121
+ }
122
+ to {
123
+ opacity: 1;
124
+ transform: translateX(-50%) translateY(0);
125
+ }
126
+ }
127
+
128
+ .dark {
129
+ .#{$namespace}-message {
130
+ @include m('info') {
131
+ background-color: color.mix($bg-color-dark-light, $color-info, 85%);
132
+ border-color: color.mix($bg-color-dark-light, $color-info, 65%);
133
+ }
134
+
135
+ @include m('success') {
136
+ background-color: color.mix($bg-color-dark-light, $color-success, 85%);
137
+ border-color: color.mix($bg-color-dark-light, $color-success, 65%);
138
+ }
139
+
140
+ @include m('warning') {
141
+ background-color: color.mix($bg-color-dark-light, $color-warning, 85%);
142
+ border-color: color.mix($bg-color-dark-light, $color-warning, 65%);
143
+ }
144
+
145
+ @include m('error') {
146
+ background-color: color.mix($bg-color-dark-light, $color-danger, 85%);
147
+ border-color: color.mix($bg-color-dark-light, $color-danger, 65%);
148
+ }
149
+ }
150
+ }
@@ -0,0 +1,76 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ .#{$namespace}-messagebox {
5
+ &__header {
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: space-between;
9
+ margin-bottom: 16px;
10
+ gap: 12px;
11
+ }
12
+
13
+ &__icon {
14
+ margin-right: 8px;
15
+ flex: 0 0 auto;
16
+ }
17
+
18
+ &__title {
19
+ margin: 0;
20
+ font-size: 16px;
21
+ font-weight: 500;
22
+ color: var(--lm-color-text-primary, #222);
23
+ flex: 1 1 auto;
24
+ }
25
+
26
+ &__close {
27
+ border: none;
28
+ background: transparent;
29
+ cursor: pointer;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ width: 32px;
34
+ height: 32px;
35
+ padding: 4px;
36
+
37
+ svg {
38
+ width: 18px;
39
+ height: 18px;
40
+ color: var(--lm-color-text-secondary, #666);
41
+ }
42
+
43
+ &:hover svg {
44
+ color: var(--lm-color-text-primary, #222);
45
+ }
46
+ }
47
+
48
+ &__body {
49
+ margin-bottom: 24px;
50
+ line-height: 1.5;
51
+ }
52
+
53
+ &__footer {
54
+ display: flex;
55
+ justify-content: flex-end;
56
+ gap: 8px;
57
+ }
58
+ }
59
+
60
+ .dark {
61
+ .#{$namespace}-messagebox {
62
+ &__title {
63
+ color: $color-text-dark;
64
+ }
65
+
66
+ &__close {
67
+ svg {
68
+ color: $color-text-dark-secondary;
69
+ }
70
+
71
+ &:hover svg {
72
+ color: $color-text-dark;
73
+ }
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,103 @@
1
+ @use 'sass:meta';
2
+ @use 'sass:string';
3
+
4
+ // CSS namespace prefix
5
+ $namespace: 'lm' !default;
6
+
7
+ // Separator
8
+ $common-separator: '-' !default;
9
+ $element-separator: '__' !default;
10
+ $modifier-separator: '--' !default;
11
+ $state-prefix: 'is-' !default;
12
+
13
+ // BEM helper mixins
14
+ @mixin b($block) {
15
+ $B: $namespace + $common-separator + $block !global;
16
+
17
+ .#{$B} {
18
+ @content;
19
+ }
20
+ }
21
+
22
+ @mixin e($element) {
23
+ $E: $element !global;
24
+ $selector: &;
25
+ $currentSelector: '';
26
+ @each $unit in $element {
27
+ $currentSelector: #{$currentSelector +
28
+ '.' +
29
+ $B +
30
+ $element-separator +
31
+ $unit +
32
+ ','};
33
+ }
34
+
35
+ @if hitAllSpecialNestRule($selector) {
36
+ @at-root {
37
+ #{$selector} {
38
+ #{$currentSelector} {
39
+ @content;
40
+ }
41
+ }
42
+ }
43
+ } @else {
44
+ @at-root {
45
+ #{$currentSelector} {
46
+ @content;
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ @mixin m($modifier) {
53
+ $selector: &;
54
+ $currentSelector: '';
55
+ @each $unit in $modifier {
56
+ $currentSelector: #{$currentSelector +
57
+ $selector +
58
+ $modifier-separator +
59
+ $unit +
60
+ ','};
61
+ }
62
+
63
+ @at-root {
64
+ #{$currentSelector} {
65
+ @content;
66
+ }
67
+ }
68
+ }
69
+
70
+ @mixin when($state) {
71
+ @at-root {
72
+ &.#{$state-prefix + $state} {
73
+ @content;
74
+ }
75
+ }
76
+ }
77
+
78
+ // Helper function
79
+ @function hitAllSpecialNestRule($selector) {
80
+ @return containsModifier($selector) or containWhenFlag($selector) or
81
+ containPseudoClass($selector);
82
+ }
83
+
84
+ @function containsModifier($selector) {
85
+ $selector: selectorToString($selector);
86
+ @return string.index($selector, $modifier-separator);
87
+ }
88
+
89
+ @function containWhenFlag($selector) {
90
+ $selector: selectorToString($selector);
91
+ @return string.index($selector, '.' + $state-prefix);
92
+ }
93
+
94
+ @function containPseudoClass($selector) {
95
+ $selector: selectorToString($selector);
96
+ @return string.index($selector, ':');
97
+ }
98
+
99
+ @function selectorToString($selector) {
100
+ $selector: meta.inspect($selector);
101
+ $selector: string.slice($selector, 2, -2);
102
+ @return $selector;
103
+ }
@@ -0,0 +1,12 @@
1
+ // Common functions
2
+ @function strip-unit($value) {
3
+ @return $value / ($value * 0 + 1);
4
+ }
5
+
6
+ @function rem($pixels, $context: 16) {
7
+ @return #{strip-unit($pixels) / strip-unit($context)}rem;
8
+ }
9
+
10
+ @function em($pixels, $context: 16) {
11
+ @return #{strip-unit($pixels) / strip-unit($context)}em;
12
+ }
@@ -0,0 +1,164 @@
1
+ @use 'sass:color';
2
+ @use './variables' as *;
3
+ @use './mixins/bem' as *;
4
+
5
+ /* Notification container positions */
6
+ .#{$namespace}-notification-container {
7
+ position: fixed;
8
+ z-index: $z-index-top;
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: $spacing-mini;
12
+
13
+ &--top-left { top: $spacing-base; left: $spacing-base; }
14
+ &--top-right { top: $spacing-base; right: $spacing-base; }
15
+ &--bottom-left { bottom: $spacing-base; left: $spacing-base; }
16
+ &--bottom-right { bottom: $spacing-base; right: $spacing-base; }
17
+ }
18
+
19
+ @include b('notification') {
20
+ --lm-notification-icon-size: 20px;
21
+ --lm-notification-header-gap: 8px;
22
+
23
+ position: relative;
24
+ display: flex;
25
+ align-items: flex-start;
26
+ gap: 8px;
27
+ padding: 10px 14px;
28
+ border-radius: $border-radius-medium;
29
+ font-size: $font-size-base;
30
+ line-height: 1.5;
31
+ border: 1px solid transparent;
32
+ box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
33
+ overflow: hidden;
34
+ min-width: 300px;
35
+ max-width: 420px;
36
+ animation: #{$namespace}-notification-slide-in $animation-duration ease-out;
37
+
38
+ @include e('icon') {
39
+ width: var(--lm-notification-icon-size);
40
+ height: var(--lm-notification-icon-size);
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ flex-shrink: 0;
45
+
46
+ svg {
47
+ width: var(--lm-notification-icon-size);
48
+ height: var(--lm-notification-icon-size);
49
+ }
50
+ }
51
+
52
+ @include e('header') {
53
+ display: flex;
54
+ align-items: center;
55
+ gap: var(--lm-notification-header-gap);
56
+ min-width: 0;
57
+ }
58
+
59
+ @include e('content') {
60
+ flex: 1;
61
+ min-width: 0;
62
+ display: flex;
63
+ flex-direction: column;
64
+ gap: 8px;
65
+ }
66
+
67
+ @include e('title') {
68
+ font-weight: $font-weight-primary;
69
+ margin: 0;
70
+ line-height: 1.4;
71
+ }
72
+
73
+ @include e('message') {
74
+ &.is-with-title {
75
+ padding-left: calc(var(--lm-notification-icon-size) + var(--lm-notification-header-gap));
76
+ }
77
+
78
+ font-size: $font-size-small;
79
+ opacity: 0.9;
80
+ line-height: 1.4;
81
+ }
82
+
83
+ @include e('close') {
84
+ cursor: pointer;
85
+ background: none;
86
+ border: none;
87
+ color: inherit;
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ padding: 0;
92
+ width: 18px;
93
+ height: 18px;
94
+ border-radius: 50%;
95
+ flex-shrink: 0;
96
+ opacity: 0.8;
97
+ transition: opacity 0.2s ease;
98
+
99
+ &:hover {
100
+ opacity: 1;
101
+ }
102
+
103
+ svg {
104
+ width: 14px;
105
+ height: 14px;
106
+ }
107
+ }
108
+
109
+ // Modifiers matching Alert visual style
110
+ @include m('info') {
111
+ background-color: color.mix(#fff, $color-info, 92%);
112
+ color: $color-info;
113
+ border-color: color.mix(#fff, $color-info, 80%);
114
+ }
115
+
116
+ @include m('success') {
117
+ background-color: color.mix(#fff, $color-success, 92%);
118
+ color: $color-success;
119
+ border-color: color.mix(#fff, $color-success, 80%);
120
+ }
121
+
122
+ @include m('warning') {
123
+ background-color: color.mix(#fff, $color-warning, 92%);
124
+ color: $color-warning;
125
+ border-color: color.mix(#fff, $color-warning, 80%);
126
+ }
127
+
128
+ @include m('error') {
129
+ background-color: color.mix(#fff, $color-danger, 92%);
130
+ color: $color-danger;
131
+ border-color: color.mix(#fff, $color-danger, 80%);
132
+ }
133
+ }
134
+
135
+ @keyframes #{$namespace}-notification-slide-in {
136
+ from { transform: translateY(-8px); opacity: 0; }
137
+ to { transform: translateY(0); opacity: 1; }
138
+ }
139
+
140
+ .dark {
141
+ .#{$namespace}-notification {
142
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
143
+
144
+ @include m('info') {
145
+ background-color: color.mix($bg-color-dark-light, $color-info, 85%);
146
+ border-color: color.mix($bg-color-dark-light, $color-info, 65%);
147
+ }
148
+
149
+ @include m('success') {
150
+ background-color: color.mix($bg-color-dark-light, $color-success, 85%);
151
+ border-color: color.mix($bg-color-dark-light, $color-success, 65%);
152
+ }
153
+
154
+ @include m('warning') {
155
+ background-color: color.mix($bg-color-dark-light, $color-warning, 85%);
156
+ border-color: color.mix($bg-color-dark-light, $color-warning, 65%);
157
+ }
158
+
159
+ @include m('error') {
160
+ background-color: color.mix($bg-color-dark-light, $color-danger, 85%);
161
+ border-color: color.mix($bg-color-dark-light, $color-danger, 65%);
162
+ }
163
+ }
164
+ }
@@ -0,0 +1,130 @@
1
+ @use './variables' as *;
2
+ @use './mixins/bem' as *;
3
+
4
+ @include b('pagination') {
5
+ display: flex;
6
+ align-items: center;
7
+ gap: 8px;
8
+ font-size: $font-size-base;
9
+ color: $color-text-regular;
10
+
11
+ @include when('disabled') {
12
+ opacity: 0.6;
13
+ pointer-events: none;
14
+ }
15
+
16
+ @include when('background') {
17
+ .#{$namespace}-pagination__number.is-active .#{$namespace}-button {
18
+ background: $color-primary;
19
+ color: #fff;
20
+ }
21
+ }
22
+
23
+ @include m('small') {
24
+ font-size: $font-size-small;
25
+ }
26
+
27
+ @include e('total') {
28
+ color: $color-text-secondary;
29
+ white-space: nowrap;
30
+ }
31
+
32
+ // Select 组件样式覆盖
33
+ @include e('sizes') {
34
+ &.#{$namespace}-select {
35
+ width: auto;
36
+ min-width: 100px;
37
+ }
38
+ }
39
+
40
+ @include e('pager') {
41
+ display: flex;
42
+ align-items: center;
43
+ gap: 4px;
44
+ list-style: none;
45
+ margin: 0;
46
+ padding: 0;
47
+
48
+ li {
49
+ display: flex;
50
+ }
51
+ }
52
+
53
+ @include e('number') {
54
+ .#{$namespace}-button {
55
+ min-width: 32px;
56
+ padding: 0 4px;
57
+ }
58
+
59
+ &.is-active .#{$namespace}-button {
60
+ color: $color-primary;
61
+ font-weight: $font-weight-primary;
62
+ background: rgba($color-primary, 0.1);
63
+ }
64
+ }
65
+
66
+ @include e('more') {
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ }
71
+
72
+ @include e('more-btn') {
73
+ .#{$namespace}-button {
74
+ min-width: 32px;
75
+ padding: 0 4px;
76
+ }
77
+ }
78
+
79
+ @include e('ellipsis') {
80
+ letter-spacing: 2px;
81
+ color: $color-text-secondary;
82
+ }
83
+
84
+ @include e('jump') {
85
+ display: flex;
86
+ align-items: center;
87
+ gap: 8px;
88
+ white-space: nowrap;
89
+ }
90
+
91
+ // Input 组件样式覆盖
92
+ @include e('editor') {
93
+ &.#{$namespace}-input {
94
+ width: 56px;
95
+ }
96
+
97
+ .#{$namespace}-input__inner {
98
+ text-align: center;
99
+ }
100
+ }
101
+
102
+ // prev/next 按钮样式
103
+ @include e('btn') {
104
+ .#{$namespace}-button {
105
+ min-width: 32px;
106
+ padding: 0 8px;
107
+ }
108
+ }
109
+ }
110
+
111
+ .dark {
112
+ .#{$namespace}-pagination {
113
+ color: $color-text-dark-secondary;
114
+
115
+ @include e('total') {
116
+ color: $color-text-dark-secondary;
117
+ }
118
+
119
+ @include e('ellipsis') {
120
+ color: $color-text-dark-secondary;
121
+ }
122
+
123
+ @include when('background') {
124
+ .#{$namespace}-pagination__number.is-active .#{$namespace}-button {
125
+ background: $color-primary;
126
+ color: #fff;
127
+ }
128
+ }
129
+ }
130
+ }