@type-dom/ui 0.1.2 → 0.1.3

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 (132) hide show
  1. package/README.md +134 -134
  2. package/package.json +3 -1
  3. package/src/components/data/td-progress/td-progress.class.js +5 -5
  4. package/src/hooks/use-deprecated/index.js +2 -2
  5. package/src/hooks/use-id/index.js +4 -4
  6. package/src/hooks/use-z-index/index.js +1 -1
  7. package/src/theme-chalk/affix.scss +7 -7
  8. package/src/theme-chalk/alert.scss +115 -115
  9. package/src/theme-chalk/anchor-link.scss +41 -41
  10. package/src/theme-chalk/anchor.scss +88 -88
  11. package/src/theme-chalk/aside.scss +8 -8
  12. package/src/theme-chalk/autocomplete.scss +89 -89
  13. package/src/theme-chalk/avatar.scss +55 -55
  14. package/src/theme-chalk/backtop.scss +29 -29
  15. package/src/theme-chalk/badge.scss +58 -58
  16. package/src/theme-chalk/base.scss +3 -3
  17. package/src/theme-chalk/breadcrumb.scss +62 -62
  18. package/src/theme-chalk/button-group.scss +80 -80
  19. package/src/theme-chalk/button.scss +304 -304
  20. package/src/theme-chalk/calendar.scss +80 -80
  21. package/src/theme-chalk/card.scss +45 -45
  22. package/src/theme-chalk/carousel-item.scss +58 -58
  23. package/src/theme-chalk/carousel.scss +188 -188
  24. package/src/theme-chalk/cascader-panel.scss +138 -138
  25. package/src/theme-chalk/cascader.scss +247 -247
  26. package/src/theme-chalk/check-tag.scss +60 -60
  27. package/src/theme-chalk/checkbox-button.scss +140 -140
  28. package/src/theme-chalk/checkbox-group.scss +7 -7
  29. package/src/theme-chalk/checkbox.scss +298 -298
  30. package/src/theme-chalk/col.scss +48 -48
  31. package/src/theme-chalk/collapse.scss +70 -70
  32. package/src/theme-chalk/color/index.scss +20 -20
  33. package/src/theme-chalk/color-picker.scss +393 -393
  34. package/src/theme-chalk/common/popup.scss +47 -47
  35. package/src/theme-chalk/common/transition.scss +122 -122
  36. package/src/theme-chalk/common/var.scss +1655 -1655
  37. package/src/theme-chalk/container.scss +14 -14
  38. package/src/theme-chalk/dark/css-vars.scss +39 -39
  39. package/src/theme-chalk/dark/var.scss +222 -222
  40. package/src/theme-chalk/date-picker/date-picker.scss +110 -110
  41. package/src/theme-chalk/date-picker/date-range-picker.scss +113 -113
  42. package/src/theme-chalk/date-picker/date-table.scss +158 -158
  43. package/src/theme-chalk/date-picker/month-table.scss +112 -112
  44. package/src/theme-chalk/date-picker/picker-panel.scss +131 -131
  45. package/src/theme-chalk/date-picker/picker.scss +212 -212
  46. package/src/theme-chalk/date-picker/time-picker.scss +90 -90
  47. package/src/theme-chalk/date-picker/time-range-picker.scss +33 -33
  48. package/src/theme-chalk/date-picker/time-spinner.scss +111 -111
  49. package/src/theme-chalk/date-picker/year-table.scss +108 -108
  50. package/src/theme-chalk/date-picker.scss +9 -9
  51. package/src/theme-chalk/descriptions-item.scss +73 -73
  52. package/src/theme-chalk/descriptions.scss +152 -152
  53. package/src/theme-chalk/dialog.scss +192 -192
  54. package/src/theme-chalk/display.scss +12 -12
  55. package/src/theme-chalk/divider.scss +48 -48
  56. package/src/theme-chalk/drawer.scss +155 -155
  57. package/src/theme-chalk/dropdown.scss +208 -208
  58. package/src/theme-chalk/empty.scss +49 -49
  59. package/src/theme-chalk/footer.scss +12 -12
  60. package/src/theme-chalk/form.scss +244 -244
  61. package/src/theme-chalk/header.scss +12 -12
  62. package/src/theme-chalk/icon.scss +45 -45
  63. package/src/theme-chalk/image-viewer.scss +155 -155
  64. package/src/theme-chalk/image.scss +49 -49
  65. package/src/theme-chalk/index.scss +111 -111
  66. package/src/theme-chalk/input-number.scss +186 -186
  67. package/src/theme-chalk/input-tag.scss +220 -220
  68. package/src/theme-chalk/input.scss +474 -474
  69. package/src/theme-chalk/link.scss +90 -90
  70. package/src/theme-chalk/loading.scss +104 -104
  71. package/src/theme-chalk/main.scss +14 -14
  72. package/src/theme-chalk/mention.scss +92 -92
  73. package/src/theme-chalk/menu.scss +339 -339
  74. package/src/theme-chalk/message-box.scss +213 -213
  75. package/src/theme-chalk/message.scss +98 -98
  76. package/src/theme-chalk/mixins/_button.scss +165 -165
  77. package/src/theme-chalk/mixins/_col.scss +33 -33
  78. package/src/theme-chalk/mixins/_var.scss +67 -67
  79. package/src/theme-chalk/mixins/config.scss +5 -5
  80. package/src/theme-chalk/mixins/function.scss +88 -88
  81. package/src/theme-chalk/mixins/mixins.scss +240 -240
  82. package/src/theme-chalk/mixins/utils.scss +39 -39
  83. package/src/theme-chalk/notification.scss +107 -107
  84. package/src/theme-chalk/option-group.scss +33 -33
  85. package/src/theme-chalk/option.scss +71 -71
  86. package/src/theme-chalk/overlay.scss +17 -17
  87. package/src/theme-chalk/page-header.scss +60 -60
  88. package/src/theme-chalk/pagination.scss +238 -238
  89. package/src/theme-chalk/popconfirm.scss +16 -16
  90. package/src/theme-chalk/popover.scss +61 -61
  91. package/src/theme-chalk/popper.scss +106 -106
  92. package/src/theme-chalk/progress.scss +179 -179
  93. package/src/theme-chalk/radio-button.scss +169 -169
  94. package/src/theme-chalk/radio-group.scss +9 -9
  95. package/src/theme-chalk/radio.scss +215 -215
  96. package/src/theme-chalk/rate.scss +108 -108
  97. package/src/theme-chalk/reset.scss +98 -98
  98. package/src/theme-chalk/result.scss +57 -57
  99. package/src/theme-chalk/row.scss +35 -35
  100. package/src/theme-chalk/scrollbar.scss +97 -97
  101. package/src/theme-chalk/segmented.scss +183 -183
  102. package/src/theme-chalk/select-dropdown-v2.scss +1 -1
  103. package/src/theme-chalk/select-dropdown.scss +57 -57
  104. package/src/theme-chalk/select-v2.scss +4 -4
  105. package/src/theme-chalk/select.scss +264 -264
  106. package/src/theme-chalk/skeleton-item.scss +83 -83
  107. package/src/theme-chalk/skeleton.scss +44 -44
  108. package/src/theme-chalk/slider.scss +212 -212
  109. package/src/theme-chalk/space.scss +20 -20
  110. package/src/theme-chalk/spinner.scss +43 -43
  111. package/src/theme-chalk/statistic.scss +35 -35
  112. package/src/theme-chalk/step.scss +316 -316
  113. package/src/theme-chalk/steps.scss +21 -21
  114. package/src/theme-chalk/switch.scss +300 -300
  115. package/src/theme-chalk/table-column.scss +98 -98
  116. package/src/theme-chalk/table-v2.scss +236 -236
  117. package/src/theme-chalk/table.scss +694 -694
  118. package/src/theme-chalk/tabs.scss +660 -660
  119. package/src/theme-chalk/tag.scss +181 -181
  120. package/src/theme-chalk/text.scss +51 -51
  121. package/src/theme-chalk/time-picker.scss +5 -5
  122. package/src/theme-chalk/time-select.scss +37 -37
  123. package/src/theme-chalk/timeline-item.scss +84 -84
  124. package/src/theme-chalk/timeline.scss +46 -46
  125. package/src/theme-chalk/tooltip-v2.scss +95 -95
  126. package/src/theme-chalk/tour.scss +187 -187
  127. package/src/theme-chalk/transfer.scss +203 -203
  128. package/src/theme-chalk/tree-select.scss +41 -41
  129. package/src/theme-chalk/tree.scss +134 -134
  130. package/src/theme-chalk/upload.scss +654 -654
  131. package/src/theme-chalk/var.scss +87 -87
  132. package/src/theme-chalk/virtual-list.scss +40 -40
@@ -1,88 +1,88 @@
1
- @use 'sass:map';
2
-
3
- @use 'mixins/mixins' as *;
4
- @use 'mixins/var' as *;
5
- @use 'common/var' as *;
6
-
7
- @include b(anchor) {
8
- @include set-component-css-var('anchor', $anchor);
9
-
10
- position: relative;
11
- background-color: getCssVar('anchor-bg-color');
12
-
13
- @include e(marker) {
14
- position: absolute;
15
- background-color: getCssVar('anchor-marker-bg-color');
16
- border-radius: 4px;
17
- opacity: 0;
18
- z-index: 0;
19
- }
20
-
21
- &.#{$namespace}-anchor--vertical {
22
- @include e(marker) {
23
- width: 4px;
24
- height: 14px;
25
- top: 8px;
26
- left: 0;
27
- transition: top 0.25s ease-in-out, opacity 0.25s;
28
- }
29
-
30
- @include e(list) {
31
- padding-left: getCssVar('anchor-padding-indent');
32
- }
33
-
34
- &.#{$namespace}-anchor--underline {
35
- &::before {
36
- position: absolute;
37
- left: 0;
38
- width: 2px;
39
- height: 100%;
40
- background-color: rgba(5, 5, 5, 0.06);
41
- content: '';
42
- }
43
-
44
- @include e(marker) {
45
- width: 2px;
46
- border-radius: unset;
47
- }
48
- }
49
- }
50
-
51
- &.#{$namespace}-anchor--horizontal {
52
- @include e(marker) {
53
- height: 2px;
54
- width: 20px;
55
- bottom: 0;
56
- transition: left 0.25s ease-in-out, opacity 0.25s, width 0.25s;
57
- }
58
-
59
- @include e(list) {
60
- display: flex;
61
- padding-bottom: 4px;
62
-
63
- @include e(item) {
64
- padding-left: 16px;
65
-
66
- &:first-child {
67
- padding-left: 0;
68
- }
69
- }
70
- }
71
-
72
- &.#{$namespace}-anchor--underline {
73
- &::before {
74
- position: absolute;
75
- bottom: 0;
76
- width: 100%;
77
- height: 2px;
78
- background-color: rgba(5, 5, 5, 0.06);
79
- content: '';
80
- }
81
-
82
- @include e(marker) {
83
- height: 2px;
84
- border-radius: unset;
85
- }
86
- }
87
- }
88
- }
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ @include b(anchor) {
8
+ @include set-component-css-var('anchor', $anchor);
9
+
10
+ position: relative;
11
+ background-color: getCssVar('anchor-bg-color');
12
+
13
+ @include e(marker) {
14
+ position: absolute;
15
+ background-color: getCssVar('anchor-marker-bg-color');
16
+ border-radius: 4px;
17
+ opacity: 0;
18
+ z-index: 0;
19
+ }
20
+
21
+ &.#{$namespace}-anchor--vertical {
22
+ @include e(marker) {
23
+ width: 4px;
24
+ height: 14px;
25
+ top: 8px;
26
+ left: 0;
27
+ transition: top 0.25s ease-in-out, opacity 0.25s;
28
+ }
29
+
30
+ @include e(list) {
31
+ padding-left: getCssVar('anchor-padding-indent');
32
+ }
33
+
34
+ &.#{$namespace}-anchor--underline {
35
+ &::before {
36
+ position: absolute;
37
+ left: 0;
38
+ width: 2px;
39
+ height: 100%;
40
+ background-color: rgba(5, 5, 5, 0.06);
41
+ content: '';
42
+ }
43
+
44
+ @include e(marker) {
45
+ width: 2px;
46
+ border-radius: unset;
47
+ }
48
+ }
49
+ }
50
+
51
+ &.#{$namespace}-anchor--horizontal {
52
+ @include e(marker) {
53
+ height: 2px;
54
+ width: 20px;
55
+ bottom: 0;
56
+ transition: left 0.25s ease-in-out, opacity 0.25s, width 0.25s;
57
+ }
58
+
59
+ @include e(list) {
60
+ display: flex;
61
+ padding-bottom: 4px;
62
+
63
+ @include e(item) {
64
+ padding-left: 16px;
65
+
66
+ &:first-child {
67
+ padding-left: 0;
68
+ }
69
+ }
70
+ }
71
+
72
+ &.#{$namespace}-anchor--underline {
73
+ &::before {
74
+ position: absolute;
75
+ bottom: 0;
76
+ width: 100%;
77
+ height: 2px;
78
+ background-color: rgba(5, 5, 5, 0.06);
79
+ content: '';
80
+ }
81
+
82
+ @include e(marker) {
83
+ height: 2px;
84
+ border-radius: unset;
85
+ }
86
+ }
87
+ }
88
+ }
@@ -1,8 +1,8 @@
1
- @use 'mixins/mixins' as *;
2
-
3
- @include b(aside) {
4
- overflow: auto;
5
- box-sizing: border-box;
6
- flex-shrink: 0;
7
- width: var(#{getCssVarName('aside', 'width')}, 300px);
8
- }
1
+ @use 'mixins/mixins' as *;
2
+
3
+ @include b(aside) {
4
+ overflow: auto;
5
+ box-sizing: border-box;
6
+ flex-shrink: 0;
7
+ width: var(#{getCssVarName('aside', 'width')}, 300px);
8
+ }
@@ -1,89 +1,89 @@
1
- @use 'sass:map';
2
-
3
- @use 'mixins/mixins' as *;
4
- @use 'mixins/utils' as *;
5
- @use 'common/var' as *;
6
-
7
- @include b(autocomplete) {
8
- @include set-component-css-var('input', $input);
9
- }
10
-
11
- @include b(autocomplete) {
12
- width: getCssVar('input-width');
13
- position: relative;
14
- display: inline-block;
15
-
16
- @include e(popper) {
17
- @include picker-popper(
18
- getCssVar('bg-color', 'overlay'),
19
- 1px solid getCssVar('border-color', 'light'),
20
- getCssVar('box-shadow', 'light')
21
- );
22
- }
23
- }
24
-
25
- @include b(autocomplete-suggestion) {
26
- border-radius: getCssVar('border-radius', 'base');
27
- box-sizing: border-box;
28
-
29
- @include e(wrap) {
30
- max-height: 280px;
31
- padding: 10px 0;
32
- box-sizing: border-box;
33
- }
34
-
35
- @include e(list) {
36
- margin: 0;
37
- padding: 0;
38
- }
39
-
40
- & li {
41
- padding: 0 20px;
42
- margin: 0;
43
- line-height: 34px;
44
- cursor: pointer;
45
- color: getCssVar('text-color', 'regular');
46
- font-size: getCssVar('font-size', 'base');
47
- list-style: none;
48
- text-align: left;
49
- white-space: nowrap;
50
- overflow: hidden;
51
- text-overflow: ellipsis;
52
-
53
- &:hover {
54
- background-color: map.get($select-option, 'hover-background');
55
- }
56
-
57
- &.highlighted {
58
- background-color: map.get($select-option, 'hover-background');
59
- }
60
-
61
- &.divider {
62
- margin-top: 6px;
63
- border-top: 1px solid getCssVar('color', 'black');
64
- }
65
-
66
- &.divider:last-child {
67
- margin-bottom: -6px;
68
- }
69
- }
70
-
71
- @include when(loading) {
72
- li {
73
- text-align: center;
74
- height: 100px;
75
- line-height: 100px;
76
- font-size: 20px;
77
- color: getCssVar('text-color', 'secondary');
78
- @include utils-vertical-center;
79
-
80
- &:hover {
81
- background-color: getCssVar('bg-color', 'overlay');
82
- }
83
- }
84
-
85
- & .#{$namespace}-icon-loading {
86
- vertical-align: middle;
87
- }
88
- }
89
- }
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/utils' as *;
5
+ @use 'common/var' as *;
6
+
7
+ @include b(autocomplete) {
8
+ @include set-component-css-var('input', $input);
9
+ }
10
+
11
+ @include b(autocomplete) {
12
+ width: getCssVar('input-width');
13
+ position: relative;
14
+ display: inline-block;
15
+
16
+ @include e(popper) {
17
+ @include picker-popper(
18
+ getCssVar('bg-color', 'overlay'),
19
+ 1px solid getCssVar('border-color', 'light'),
20
+ getCssVar('box-shadow', 'light')
21
+ );
22
+ }
23
+ }
24
+
25
+ @include b(autocomplete-suggestion) {
26
+ border-radius: getCssVar('border-radius', 'base');
27
+ box-sizing: border-box;
28
+
29
+ @include e(wrap) {
30
+ max-height: 280px;
31
+ padding: 10px 0;
32
+ box-sizing: border-box;
33
+ }
34
+
35
+ @include e(list) {
36
+ margin: 0;
37
+ padding: 0;
38
+ }
39
+
40
+ & li {
41
+ padding: 0 20px;
42
+ margin: 0;
43
+ line-height: 34px;
44
+ cursor: pointer;
45
+ color: getCssVar('text-color', 'regular');
46
+ font-size: getCssVar('font-size', 'base');
47
+ list-style: none;
48
+ text-align: left;
49
+ white-space: nowrap;
50
+ overflow: hidden;
51
+ text-overflow: ellipsis;
52
+
53
+ &:hover {
54
+ background-color: map.get($select-option, 'hover-background');
55
+ }
56
+
57
+ &.highlighted {
58
+ background-color: map.get($select-option, 'hover-background');
59
+ }
60
+
61
+ &.divider {
62
+ margin-top: 6px;
63
+ border-top: 1px solid getCssVar('color', 'black');
64
+ }
65
+
66
+ &.divider:last-child {
67
+ margin-bottom: -6px;
68
+ }
69
+ }
70
+
71
+ @include when(loading) {
72
+ li {
73
+ text-align: center;
74
+ height: 100px;
75
+ line-height: 100px;
76
+ font-size: 20px;
77
+ color: getCssVar('text-color', 'secondary');
78
+ @include utils-vertical-center;
79
+
80
+ &:hover {
81
+ background-color: getCssVar('bg-color', 'overlay');
82
+ }
83
+ }
84
+
85
+ & .#{$namespace}-icon-loading {
86
+ vertical-align: middle;
87
+ }
88
+ }
89
+ }
@@ -1,55 +1,55 @@
1
- @use 'sass:map';
2
-
3
- @use 'mixins/mixins' as *;
4
- @use 'mixins/var' as *;
5
- @use 'common/var' as *;
6
-
7
- @include b(avatar) {
8
- @include set-component-css-var('avatar', $avatar);
9
- @include set-component-css-var('avatar-size', $avatar-size);
10
-
11
- @include set-css-var-value(
12
- ('avatar', 'size'),
13
- map.get($avatar-size, 'default')
14
- );
15
-
16
- display: inline-flex;
17
- justify-content: center;
18
- align-items: center;
19
- box-sizing: border-box;
20
- text-align: center;
21
- overflow: hidden;
22
- outline: none;
23
- color: getCssVar('avatar', 'text-color');
24
- background: getCssVar('avatar', 'bg-color');
25
- width: getCssVar('avatar', 'size');
26
- height: getCssVar('avatar', 'size');
27
- font-size: getCssVar('avatar', 'text-size');
28
-
29
- > img {
30
- display: block;
31
- width: 100%;
32
- height: 100%;
33
- }
34
-
35
- @include m(circle) {
36
- border-radius: 50%;
37
- }
38
-
39
- @include m(square) {
40
- border-radius: getCssVar('avatar', 'border-radius');
41
- }
42
-
43
- @include m(icon) {
44
- font-size: getCssVar('avatar', 'icon-size');
45
- }
46
-
47
- @each $size in (small, large) {
48
- @include m($size) {
49
- @include set-css-var-value(
50
- ('avatar', 'size'),
51
- map.get($avatar-size, $size)
52
- );
53
- }
54
- }
55
- }
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ @include b(avatar) {
8
+ @include set-component-css-var('avatar', $avatar);
9
+ @include set-component-css-var('avatar-size', $avatar-size);
10
+
11
+ @include set-css-var-value(
12
+ ('avatar', 'size'),
13
+ map.get($avatar-size, 'default')
14
+ );
15
+
16
+ display: inline-flex;
17
+ justify-content: center;
18
+ align-items: center;
19
+ box-sizing: border-box;
20
+ text-align: center;
21
+ overflow: hidden;
22
+ outline: none;
23
+ color: getCssVar('avatar', 'text-color');
24
+ background: getCssVar('avatar', 'bg-color');
25
+ width: getCssVar('avatar', 'size');
26
+ height: getCssVar('avatar', 'size');
27
+ font-size: getCssVar('avatar', 'text-size');
28
+
29
+ > img {
30
+ display: block;
31
+ width: 100%;
32
+ height: 100%;
33
+ }
34
+
35
+ @include m(circle) {
36
+ border-radius: 50%;
37
+ }
38
+
39
+ @include m(square) {
40
+ border-radius: getCssVar('avatar', 'border-radius');
41
+ }
42
+
43
+ @include m(icon) {
44
+ font-size: getCssVar('avatar', 'icon-size');
45
+ }
46
+
47
+ @each $size in (small, large) {
48
+ @include m($size) {
49
+ @include set-css-var-value(
50
+ ('avatar', 'size'),
51
+ map.get($avatar-size, $size)
52
+ );
53
+ }
54
+ }
55
+ }
@@ -1,29 +1,29 @@
1
- @use 'mixins/mixins' as *;
2
- @use 'mixins/var' as *;
3
- @use 'common/var' as *;
4
-
5
- @include b(backtop) {
6
- @include set-component-css-var('backtop', $backtop);
7
-
8
- position: fixed;
9
- background-color: getCssVar('backtop', 'bg-color');
10
- width: 40px;
11
- height: 40px;
12
- border-radius: 50%;
13
- color: getCssVar('backtop', 'text-color');
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- font-size: 20px;
18
- box-shadow: getCssVar('box-shadow', 'lighter');
19
- cursor: pointer;
20
- z-index: 5;
21
-
22
- &:hover {
23
- background-color: getCssVar('backtop', 'hover-bg-color');
24
- }
25
-
26
- @include e(icon) {
27
- font-size: 20px;
28
- }
29
- }
1
+ @use 'mixins/mixins' as *;
2
+ @use 'mixins/var' as *;
3
+ @use 'common/var' as *;
4
+
5
+ @include b(backtop) {
6
+ @include set-component-css-var('backtop', $backtop);
7
+
8
+ position: fixed;
9
+ background-color: getCssVar('backtop', 'bg-color');
10
+ width: 40px;
11
+ height: 40px;
12
+ border-radius: 50%;
13
+ color: getCssVar('backtop', 'text-color');
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ font-size: 20px;
18
+ box-shadow: getCssVar('box-shadow', 'lighter');
19
+ cursor: pointer;
20
+ z-index: 5;
21
+
22
+ &:hover {
23
+ background-color: getCssVar('backtop', 'hover-bg-color');
24
+ }
25
+
26
+ @include e(icon) {
27
+ font-size: 20px;
28
+ }
29
+ }
@@ -1,58 +1,58 @@
1
- @use 'mixins/mixins' as *;
2
- @use 'mixins/var' as *;
3
- @use 'common/var' as *;
4
-
5
- @include b(badge) {
6
- @include set-component-css-var('badge', $badge);
7
-
8
- position: relative;
9
- vertical-align: middle;
10
- display: inline-block;
11
- width: fit-content;
12
-
13
- @include e(content) {
14
- background-color: getCssVar('badge', 'bg-color');
15
- border-radius: getCssVar('badge', 'radius');
16
- color: getCssVar('color', 'white');
17
-
18
- display: inline-flex;
19
- justify-content: center;
20
- align-items: center;
21
-
22
- font-size: getCssVar('badge', 'font-size');
23
- height: getCssVar('badge', 'size');
24
- padding: 0 getCssVar('badge', 'padding');
25
- white-space: nowrap;
26
- border: 1px solid getCssVar('bg-color');
27
-
28
- @include when(fixed) {
29
- position: absolute;
30
- top: 0;
31
- right: calc(1px + #{getCssVar('badge', 'size')} / 2);
32
- transform: translateY(-50%) translateX(100%);
33
- z-index: getCssVar('index', 'normal');
34
-
35
- @include when(dot) {
36
- right: 5px;
37
- }
38
- }
39
-
40
- @include when(dot) {
41
- height: 8px;
42
- width: 8px;
43
- padding: 0;
44
- right: 0;
45
- border-radius: 50%;
46
- }
47
-
48
- @include when(hide-zero) {
49
- display: none;
50
- }
51
-
52
- @each $type in (primary, success, warning, info, danger) {
53
- @include m($type) {
54
- background-color: getCssVar('color', $type);
55
- }
56
- }
57
- }
58
- }
1
+ @use 'mixins/mixins' as *;
2
+ @use 'mixins/var' as *;
3
+ @use 'common/var' as *;
4
+
5
+ @include b(badge) {
6
+ @include set-component-css-var('badge', $badge);
7
+
8
+ position: relative;
9
+ vertical-align: middle;
10
+ display: inline-block;
11
+ width: fit-content;
12
+
13
+ @include e(content) {
14
+ background-color: getCssVar('badge', 'bg-color');
15
+ border-radius: getCssVar('badge', 'radius');
16
+ color: getCssVar('color', 'white');
17
+
18
+ display: inline-flex;
19
+ justify-content: center;
20
+ align-items: center;
21
+
22
+ font-size: getCssVar('badge', 'font-size');
23
+ height: getCssVar('badge', 'size');
24
+ padding: 0 getCssVar('badge', 'padding');
25
+ white-space: nowrap;
26
+ border: 1px solid getCssVar('bg-color');
27
+
28
+ @include when(fixed) {
29
+ position: absolute;
30
+ top: 0;
31
+ right: calc(1px + #{getCssVar('badge', 'size')} / 2);
32
+ transform: translateY(-50%) translateX(100%);
33
+ z-index: getCssVar('index', 'normal');
34
+
35
+ @include when(dot) {
36
+ right: 5px;
37
+ }
38
+ }
39
+
40
+ @include when(dot) {
41
+ height: 8px;
42
+ width: 8px;
43
+ padding: 0;
44
+ right: 0;
45
+ border-radius: 50%;
46
+ }
47
+
48
+ @include when(hide-zero) {
49
+ display: none;
50
+ }
51
+
52
+ @each $type in (primary, success, warning, info, danger) {
53
+ @include m($type) {
54
+ background-color: getCssVar('color', $type);
55
+ }
56
+ }
57
+ }
58
+ }
@@ -1,3 +1,3 @@
1
- @use 'var';
2
- @use 'common/transition';
3
- @use 'icon';
1
+ @use 'var';
2
+ @use 'common/transition';
3
+ @use 'icon';