@tendaui/components 1.3.0 → 1.3.1

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 (142) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +176 -176
  3. package/button/_example/ghost.tsx +2 -5
  4. package/color-picker/utils/color-picker/cmyk.ts +89 -89
  5. package/color-picker/utils/color-picker/color.ts +467 -467
  6. package/color-picker/utils/color-picker/constants.ts +187 -187
  7. package/color-picker/utils/color-picker/draggable.ts +99 -99
  8. package/color-picker/utils/color-picker/format.ts +90 -90
  9. package/color-picker/utils/color-picker/gradient.ts +237 -237
  10. package/color-picker/utils/color-picker/index.ts +7 -7
  11. package/color-picker/utils/color-picker/types.ts +33 -33
  12. package/dialog/hooks/useDialogPosition.ts +35 -35
  13. package/form/type.ts +519 -519
  14. package/global-config/default-config.ts +95 -95
  15. package/global-config/locale/ar_KW.ts +259 -259
  16. package/global-config/locale/en_US.ts +265 -265
  17. package/global-config/locale/it_IT.ts +264 -264
  18. package/global-config/locale/ja_JP.ts +264 -264
  19. package/global-config/locale/ko_KR.ts +264 -264
  20. package/global-config/locale/ru_RU.ts +277 -277
  21. package/global-config/locale/zh_CN.ts +265 -265
  22. package/global-config/locale/zh_TW.ts +265 -265
  23. package/global-config/mobile/default-config.ts +6 -6
  24. package/global-config/mobile/locale/ar_KW.ts +112 -112
  25. package/global-config/mobile/locale/en_US.ts +113 -113
  26. package/global-config/mobile/locale/it_IT.ts +113 -113
  27. package/global-config/mobile/locale/ja_JP.ts +100 -100
  28. package/global-config/mobile/locale/ko_KR.ts +100 -100
  29. package/global-config/mobile/locale/ru_RU.ts +112 -112
  30. package/global-config/mobile/locale/zh_CN.ts +100 -100
  31. package/global-config/mobile/locale/zh_TW.ts +100 -100
  32. package/global-config/t.ts +111 -111
  33. package/input-number/InputNumber.tsx +124 -124
  34. package/input-number/defaultProps.ts +17 -17
  35. package/input-number/index.ts +9 -9
  36. package/input-number/style/css.js +1 -1
  37. package/input-number/style/index.js +1 -1
  38. package/input-number/useInputNumber.tsx +270 -270
  39. package/list/ListItem.tsx +36 -36
  40. package/list/ListItemMeta.tsx +40 -40
  41. package/list/defaultProps.ts +11 -11
  42. package/list/hooks/useListVirtualScroll.ts +82 -82
  43. package/list/style/css.js +1 -1
  44. package/list/style/index.js +1 -1
  45. package/locale/LocalReceiver.ts +55 -55
  46. package/locale/ar_KW.ts +7 -7
  47. package/locale/en_US.ts +7 -7
  48. package/locale/it_IT.ts +6 -6
  49. package/locale/ja_JP.ts +6 -6
  50. package/locale/ko_KR.ts +6 -6
  51. package/locale/ru_RU.ts +6 -6
  52. package/locale/zh_CN.ts +5 -5
  53. package/locale/zh_TW.ts +7 -7
  54. package/package.json +2 -2
  55. package/radio/_example/default.tsx +2 -2
  56. package/select/type.ts +382 -382
  57. package/select-input/type.ts +280 -280
  58. package/slider/SliderHandleButton.tsx +50 -50
  59. package/slider/defaultProps.ts +15 -15
  60. package/slider/style/css.js +1 -1
  61. package/slider/style/index.js +1 -1
  62. package/styles/_global.scss +40 -40
  63. package/styles/_vars.scss +374 -374
  64. package/styles/components/alert/_index.scss +175 -175
  65. package/styles/components/alert/_vars.scss +41 -41
  66. package/styles/components/badge/_index.scss +71 -71
  67. package/styles/components/badge/_vars.scss +26 -26
  68. package/styles/components/button/_index.scss +499 -499
  69. package/styles/components/button/_mixins.scss +40 -40
  70. package/styles/components/button/_vars.scss +121 -121
  71. package/styles/components/checkbox/_index.scss +158 -158
  72. package/styles/components/checkbox/_var.scss +59 -59
  73. package/styles/components/color-picker/_index.scss +586 -586
  74. package/styles/components/color-picker/_vars.scss +79 -79
  75. package/styles/components/dialog/_animate.scss +133 -133
  76. package/styles/components/dialog/_index.scss +310 -310
  77. package/styles/components/dialog/_vars.scss +60 -60
  78. package/styles/components/drawer/_index.scss +206 -206
  79. package/styles/components/drawer/_var.scss +55 -55
  80. package/styles/components/fireworks/_index.scss +86 -86
  81. package/styles/components/fireworks/_vars.scss +5 -5
  82. package/styles/components/form/_index.scss +175 -175
  83. package/styles/components/form/_mixins.scss +74 -74
  84. package/styles/components/form/_vars.scss +101 -101
  85. package/styles/components/input/_index.scss +350 -350
  86. package/styles/components/input/_mixins.scss +120 -120
  87. package/styles/components/input/_vars.scss +130 -130
  88. package/styles/components/input-number/_index.scss +327 -327
  89. package/styles/components/input-number/_vars.scss +56 -56
  90. package/styles/components/ip-input/_index.scss +277 -277
  91. package/styles/components/layout/_index.scss +47 -47
  92. package/styles/components/layout/_vars.scss +19 -19
  93. package/styles/components/layout/doc.scss +74 -74
  94. package/styles/components/list/_index.scss +172 -172
  95. package/styles/components/list/_vars.scss +42 -42
  96. package/styles/components/loading/_index.scss +113 -113
  97. package/styles/components/loading/_vars.scss +40 -40
  98. package/styles/components/notification/_index.scss +140 -140
  99. package/styles/components/notification/_mixins.scss +13 -13
  100. package/styles/components/notification/_vars.scss +60 -60
  101. package/styles/components/popup/_index.scss +78 -78
  102. package/styles/components/popup/_mixin.scss +149 -149
  103. package/styles/components/popup/_vars.scss +33 -33
  104. package/styles/components/radio/_index.scss +376 -376
  105. package/styles/components/radio/_vars.scss +89 -89
  106. package/styles/components/select/_index.scss +291 -291
  107. package/styles/components/select/_var.scss +64 -64
  108. package/styles/components/select-input/_index.scss +5 -5
  109. package/styles/components/select-input/_var.scss +4 -4
  110. package/styles/components/slider/_index.scss +241 -241
  111. package/styles/components/slider/_vars.scss +51 -51
  112. package/styles/components/switch/_index.scss +175 -175
  113. package/styles/components/switch/_vars.scss +63 -63
  114. package/styles/components/table/_index.scss +194 -194
  115. package/styles/components/table/_var.scss +52 -52
  116. package/styles/components/tabs/_index.scss +165 -165
  117. package/styles/components/tabs/_mixins.scss +11 -11
  118. package/styles/components/tabs/_vars.scss +72 -72
  119. package/styles/components/tag/_index.scss +317 -317
  120. package/styles/components/tag/_var.scss +86 -86
  121. package/styles/components/tag-input/_index.scss +164 -164
  122. package/styles/components/tag-input/_vars.scss +17 -17
  123. package/styles/mixins/_focus.scss +8 -8
  124. package/styles/mixins/_layout.scss +32 -32
  125. package/styles/mixins/_reset.scss +11 -11
  126. package/styles/mixins/_scrollbar.scss +32 -32
  127. package/styles/mixins/_text.scss +50 -50
  128. package/styles/themes/_dark.scss +169 -169
  129. package/styles/themes/_font.scss +69 -69
  130. package/styles/themes/_index.scss +5 -5
  131. package/styles/themes/_light.scss +170 -170
  132. package/styles/themes/_radius.scss +9 -9
  133. package/styles/themes/_size.scss +68 -68
  134. package/styles/utilities/_animation.scss +58 -58
  135. package/styles/utilities/_tips.scss +10 -10
  136. package/switch/_example/with-label.tsx +1 -1
  137. package/utils/input-number/large-number.ts +423 -423
  138. package/utils/input-number/number.ts +257 -257
  139. package/utils/log/index.ts +3 -3
  140. package/utils/log/log.ts +29 -29
  141. package/utils/log/types.ts +9 -9
  142. package/utils/style.ts +58 -58
@@ -1,42 +1,42 @@
1
- @use "../../_vars.scss" as *;
2
- // 颜色
3
- $list-bg-color-default: $bg-color-container;
4
- $list-bg-color-strip: $bg-color-secondarycontainer;
5
- $list-item-split-color: $border-level-1-color;
6
- $list-avatar-bg-color: $bg-color-page;
7
- $list-text-color-loading: $text-color-placeholder;
8
- // $list-icon-color-loading: $brand-color-5;
9
- $list-text-color-load-more: $text-color-placeholder;
10
- $list-meta-title-color: $text-color-primary;
11
- $list-meta-description-color: $text-color-primary;
12
- $list-action-color: $brand-color;
13
- $list-action-icon-color: $text-color-secondary;
14
- $list-link-color: $text-color-link;
15
- $list-font-color: $text-color-primary;
16
-
17
- // 间距
18
- $list-padding: $comp-paddingTB-m $comp-paddingLR-l;
19
- $list-item-spacer-small: $comp-paddingTB-s $comp-paddingLR-m;
20
- $list-item-spacer-default: $comp-paddingTB-m $comp-paddingLR-l;
21
- $list-item-spacer-large: $comp-paddingTB-l $comp-paddingLR-xl;
22
- // $list-meta-padding: $spacer-s 0;
23
- $list-avatar-margin-right: $comp-margin-l;
24
- $list-meta-title-margin: 0 0 $comp-margin-s;
25
- $list-meta-description-margin-right: $comp-margin-xxl;
26
- $list-action-margin-right: $comp-margin-l;
27
- $list-load-not-empty-padding: $comp-paddingTB-m $comp-paddingLR-l;
28
- $list-load-icon-margin: $comp-margin-s;
29
-
30
- // 尺寸
31
- $list-item-line-height: $text-line-height-base;
32
- $list-avatar-size: $comp-size-xxxl;
33
- $list-icon-size: $comp-size-xxxs;
34
-
35
- // 字体
36
- $list-item-font: $font-body-medium;
37
- $list-meta-title-font: $font-title-medium;
38
- $list-load-font-size: $comp-size-xxxs;
39
- $list-load-more-font-size: $comp-size-xxxs;
40
-
41
- // 行号
42
- $list-load-line-height: $text-line-height-base;
1
+ @use "../../_vars.scss" as *;
2
+ // 颜色
3
+ $list-bg-color-default: $bg-color-container;
4
+ $list-bg-color-strip: $bg-color-secondarycontainer;
5
+ $list-item-split-color: $border-level-1-color;
6
+ $list-avatar-bg-color: $bg-color-page;
7
+ $list-text-color-loading: $text-color-placeholder;
8
+ // $list-icon-color-loading: $brand-color-5;
9
+ $list-text-color-load-more: $text-color-placeholder;
10
+ $list-meta-title-color: $text-color-primary;
11
+ $list-meta-description-color: $text-color-primary;
12
+ $list-action-color: $brand-color;
13
+ $list-action-icon-color: $text-color-secondary;
14
+ $list-link-color: $text-color-link;
15
+ $list-font-color: $text-color-primary;
16
+
17
+ // 间距
18
+ $list-padding: $comp-paddingTB-m $comp-paddingLR-l;
19
+ $list-item-spacer-small: $comp-paddingTB-s $comp-paddingLR-m;
20
+ $list-item-spacer-default: $comp-paddingTB-m $comp-paddingLR-l;
21
+ $list-item-spacer-large: $comp-paddingTB-l $comp-paddingLR-xl;
22
+ // $list-meta-padding: $spacer-s 0;
23
+ $list-avatar-margin-right: $comp-margin-l;
24
+ $list-meta-title-margin: 0 0 $comp-margin-s;
25
+ $list-meta-description-margin-right: $comp-margin-xxl;
26
+ $list-action-margin-right: $comp-margin-l;
27
+ $list-load-not-empty-padding: $comp-paddingTB-m $comp-paddingLR-l;
28
+ $list-load-icon-margin: $comp-margin-s;
29
+
30
+ // 尺寸
31
+ $list-item-line-height: $text-line-height-base;
32
+ $list-avatar-size: $comp-size-xxxl;
33
+ $list-icon-size: $comp-size-xxxs;
34
+
35
+ // 字体
36
+ $list-item-font: $font-body-medium;
37
+ $list-meta-title-font: $font-title-medium;
38
+ $list-load-font-size: $comp-size-xxxs;
39
+ $list-load-more-font-size: $comp-size-xxxs;
40
+
41
+ // 行号
42
+ $list-load-line-height: $text-line-height-base;
@@ -1,113 +1,113 @@
1
- @use "../../_vars.scss" as *;
2
- @use '../../_vars.scss' as *;
3
-
4
- @use './_vars.scss' as *;
5
-
6
- @use '../../utilities/_animation.scss' as *;
7
-
8
- @use '../../mixins/_reset.scss' as *;
9
-
10
- .#{$prefix}-loading {
11
- @include reset;
12
-
13
- position: relative;
14
- color: $loading-color;
15
- font-size: $loading-icon-size;
16
-
17
- &--lock {
18
- overflow: hidden;
19
- }
20
-
21
- &.#{$prefix}-size-s {
22
- font-size: $loading-icon-size-small;
23
- }
24
-
25
- &.#{$prefix}-size-l {
26
- font-size: $loading-icon-size-large;
27
- }
28
-
29
- &__parent--relative {
30
- position: relative !important;
31
- }
32
- }
33
-
34
- .#{$prefix}-loading__fullscreen {
35
- position: fixed;
36
- top: 0;
37
- left: 0;
38
- width: 100%;
39
- height: 100%;
40
- z-index: $z-index-loading;
41
- }
42
-
43
- .#{$prefix}-loading--center {
44
- display: inline-flex;
45
- align-items: center;
46
- vertical-align: middle;
47
- justify-content: center;
48
- }
49
-
50
- .#{$prefix}-loading__content {
51
- position: absolute;
52
- left: 48%;
53
- top: 20%;
54
- }
55
-
56
- .#{$prefix}-loading--inherit-color {
57
- color: inherit;
58
- }
59
-
60
- .#{$prefix}-loading__parent {
61
- position: relative;
62
- }
63
-
64
- .#{$prefix}-loading__overlay {
65
- background-color: $loading-mask-color;
66
- }
67
-
68
- /** 仅用于作为包裹元素时 */
69
- .#{$prefix}-loading--full {
70
- position: absolute;
71
- top: 0;
72
- left: 0;
73
- width: 100%;
74
- height: 100%;
75
- z-index: $z-index-loading;
76
- }
77
-
78
- .#{$prefix}-loading--hidden {
79
- visibility: hidden;
80
- }
81
-
82
- .#{$prefix}-loading--visible {
83
- visibility: visible;
84
- }
85
-
86
- .#{$prefix}-loading__text {
87
- width: auto;
88
- display: inline-block;
89
- vertical-align: middle;
90
- font: $loading-text-size;
91
- margin-left: $loading-text-margin-left;
92
- }
93
-
94
- .#{$prefix}-loading__gradient {
95
- display: inline-flex;
96
- justify-content: center;
97
- align-items: center;
98
- vertical-align: middle;
99
-
100
- &-conic {
101
- width: 100%;
102
- height: 100%;
103
- border-radius: $border-radius-circle;
104
- /* stylelint-disable-next-line color-no-hex */
105
- background: conic-gradient(
106
- from 90deg at 50% 50%,
107
- #fff 0deg,
108
- currentcolor 360deg
109
- );
110
- -webkit-mask: radial-gradient(transparent calc(50% - 0.5px), #fff 50%);
111
- mask: radial-gradient(transparent calc(50% - 0.5px), #fff 50%);
112
- }
113
- }
1
+ @use "../../_vars.scss" as *;
2
+ @use '../../_vars.scss' as *;
3
+
4
+ @use './_vars.scss' as *;
5
+
6
+ @use '../../utilities/_animation.scss' as *;
7
+
8
+ @use '../../mixins/_reset.scss' as *;
9
+
10
+ .#{$prefix}-loading {
11
+ @include reset;
12
+
13
+ position: relative;
14
+ color: $loading-color;
15
+ font-size: $loading-icon-size;
16
+
17
+ &--lock {
18
+ overflow: hidden;
19
+ }
20
+
21
+ &.#{$prefix}-size-s {
22
+ font-size: $loading-icon-size-small;
23
+ }
24
+
25
+ &.#{$prefix}-size-l {
26
+ font-size: $loading-icon-size-large;
27
+ }
28
+
29
+ &__parent--relative {
30
+ position: relative !important;
31
+ }
32
+ }
33
+
34
+ .#{$prefix}-loading__fullscreen {
35
+ position: fixed;
36
+ top: 0;
37
+ left: 0;
38
+ width: 100%;
39
+ height: 100%;
40
+ z-index: $z-index-loading;
41
+ }
42
+
43
+ .#{$prefix}-loading--center {
44
+ display: inline-flex;
45
+ align-items: center;
46
+ vertical-align: middle;
47
+ justify-content: center;
48
+ }
49
+
50
+ .#{$prefix}-loading__content {
51
+ position: absolute;
52
+ left: 48%;
53
+ top: 20%;
54
+ }
55
+
56
+ .#{$prefix}-loading--inherit-color {
57
+ color: inherit;
58
+ }
59
+
60
+ .#{$prefix}-loading__parent {
61
+ position: relative;
62
+ }
63
+
64
+ .#{$prefix}-loading__overlay {
65
+ background-color: $loading-mask-color;
66
+ }
67
+
68
+ /** 仅用于作为包裹元素时 */
69
+ .#{$prefix}-loading--full {
70
+ position: absolute;
71
+ top: 0;
72
+ left: 0;
73
+ width: 100%;
74
+ height: 100%;
75
+ z-index: $z-index-loading;
76
+ }
77
+
78
+ .#{$prefix}-loading--hidden {
79
+ visibility: hidden;
80
+ }
81
+
82
+ .#{$prefix}-loading--visible {
83
+ visibility: visible;
84
+ }
85
+
86
+ .#{$prefix}-loading__text {
87
+ width: auto;
88
+ display: inline-block;
89
+ vertical-align: middle;
90
+ font: $loading-text-size;
91
+ margin-left: $loading-text-margin-left;
92
+ }
93
+
94
+ .#{$prefix}-loading__gradient {
95
+ display: inline-flex;
96
+ justify-content: center;
97
+ align-items: center;
98
+ vertical-align: middle;
99
+
100
+ &-conic {
101
+ width: 100%;
102
+ height: 100%;
103
+ border-radius: $border-radius-circle;
104
+ /* stylelint-disable-next-line color-no-hex */
105
+ background: conic-gradient(
106
+ from 90deg at 50% 50%,
107
+ #fff 0deg,
108
+ currentcolor 360deg
109
+ );
110
+ -webkit-mask: radial-gradient(transparent calc(50% - 0.5px), #fff 50%);
111
+ mask: radial-gradient(transparent calc(50% - 0.5px), #fff 50%);
112
+ }
113
+ }
@@ -1,40 +1,40 @@
1
- @use "../../_vars.scss" as *;
2
- // 组件变量
3
- // 名称可按如下规则定义//
4
- // <component>-[type]-[attrtype]-<attr>-[status]
5
-
6
- // component:组件名,如button//
7
- // type: 组件类型,如 button 的次要按钮(line//
8
- // attrtype: 属性的具体应用场景。如颜色,用于背景(bg)、文本(text)、边框(border)等
9
- // attr: 属性名称,如color、height、radius//
10
- // status: 表示组件状态或尺寸,如 hover、disabled、s、l
11
-
12
- // 如:$button-line-bg-color-hover
13
- // 如:$button-line-height-s
14
-
15
- //颜色
16
- $loading-color: $brand-color;
17
- $loading-mask-color: $mask-disabled;
18
- $loading-gradient-color: $brand-color;
19
-
20
- // 字号
21
- $loading-text-size: $font-body-medium;
22
- $loading-icon-size: $comp-size-l;
23
- $loading-icon-size-small: $comp-size-xxxs;
24
- $loading-icon-size-large: $comp-size-xxxl;
25
- $loading-fullscreen-icon-size: $loading-icon-size;
26
-
27
- // 间距
28
- $loading-text-margin-left: $comp-margin-xs;
29
- $loading-gradient-padding-s: 1px;
30
- $loading-gradient-padding-m: 3px;
31
- $loading-gradient-padding-l: 5px;
32
-
33
- // Size
34
- $loading-gradient-size-s: $comp-size-xxxs;
35
- $loading-gradient-size-m: $comp-size-xl;
36
- $loading-gradient-size-l: $comp-size-xxxl;
37
-
38
- $loading-gradient-mask-size-s: 5.5px;
39
- $loading-gradient-mask-size-m: 11.5px;
40
- $loading-gradient-mask-size-l: 15.5px;
1
+ @use "../../_vars.scss" as *;
2
+ // 组件变量
3
+ // 名称可按如下规则定义//
4
+ // <component>-[type]-[attrtype]-<attr>-[status]
5
+
6
+ // component:组件名,如button//
7
+ // type: 组件类型,如 button 的次要按钮(line//
8
+ // attrtype: 属性的具体应用场景。如颜色,用于背景(bg)、文本(text)、边框(border)等
9
+ // attr: 属性名称,如color、height、radius//
10
+ // status: 表示组件状态或尺寸,如 hover、disabled、s、l
11
+
12
+ // 如:$button-line-bg-color-hover
13
+ // 如:$button-line-height-s
14
+
15
+ //颜色
16
+ $loading-color: $brand-color;
17
+ $loading-mask-color: $mask-disabled;
18
+ $loading-gradient-color: $brand-color;
19
+
20
+ // 字号
21
+ $loading-text-size: $font-body-medium;
22
+ $loading-icon-size: $comp-size-l;
23
+ $loading-icon-size-small: $comp-size-xxxs;
24
+ $loading-icon-size-large: $comp-size-xxxl;
25
+ $loading-fullscreen-icon-size: $loading-icon-size;
26
+
27
+ // 间距
28
+ $loading-text-margin-left: $comp-margin-xs;
29
+ $loading-gradient-padding-s: 1px;
30
+ $loading-gradient-padding-m: 3px;
31
+ $loading-gradient-padding-l: 5px;
32
+
33
+ // Size
34
+ $loading-gradient-size-s: $comp-size-xxxs;
35
+ $loading-gradient-size-m: $comp-size-xl;
36
+ $loading-gradient-size-l: $comp-size-xxxl;
37
+
38
+ $loading-gradient-mask-size-s: 5.5px;
39
+ $loading-gradient-mask-size-m: 11.5px;
40
+ $loading-gradient-mask-size-l: 15.5px;
@@ -1,13 +1,13 @@
1
- @use "../../_vars.scss" as *;
2
- // 组件允许单个组件打包,因此默认引入公共基础样式
3
- @use '../../vars.scss' as *;
4
-
5
- @use './_vars.scss' as *;
6
-
7
- @use './_mixins.scss' as *;
8
-
9
- @use '../../mixins/_reset.scss' as *;
10
-
1
+ @use "../../_vars.scss" as *;
2
+ // 组件允许单个组件打包,因此默认引入公共基础样式
3
+ @use '../../vars.scss' as *;
4
+
5
+ @use './_vars.scss' as *;
6
+
7
+ @use './_mixins.scss' as *;
8
+
9
+ @use '../../mixins/_reset.scss' as *;
10
+
11
11
  .#{$prefix}-notify {
12
12
  &[data-x-position='right'] {
13
13
  inset-inline-end: 8px;
@@ -16,77 +16,77 @@
16
16
  &[data-x-position='left'] {
17
17
  inset-inline-start: 8px;
18
18
  }
19
-
19
+
20
20
  &[data-x-position='center'] {
21
21
  inset-inline-start: 50%;
22
22
  transform: translateX(-50%);
23
23
  }
24
-
25
- &[data-y-position='top'] {
26
- top: 10px;
27
- }
28
- @include reset;
29
- position: fixed;
30
- z-index: $z-index-Notification;
31
- width: $notification-width-default;
32
- &__container {
33
- position: relative;
34
- width: 100%;
35
- height: 100%;
36
- }
37
-
38
- &__item {
39
- border-radius: $notification-detail-item-border-radius;
40
- padding: $notification-padding-default;
41
- background-color: $notification-color-block;
42
- color: $notification-content-color;
43
- box-shadow: $notification-shadow;
44
- overflow: hidden;
45
- &:hover {
46
- background-color: $bg-color-container-hover;
47
- color: $notification-detail-item-color-hover;
48
- }
49
- &:active {
50
- background-color: $bg-color-container-active;
51
- color: $notification-detail-item-color-active;
52
- }
53
-
54
- --y: translateY(-100%);
55
- transform: var(--y);
56
- transition:
57
- transform 400ms,
58
- opacity 400ms,
59
- height 400ms,
60
- box-shadow 200ms;
61
- z-index: var(--z-index);
62
-
63
- &[data-mounted='true'] {
64
- &[data-expanded='false'] {
65
- --y: translateY(calc(var(--gap) * var(--index)))
66
- scale(calc(1 - var(--index) * 0.05));
67
- }
68
-
69
- &[data-expanded='true'] {
70
- --y: translateY(var(--offset)) scale(1);
71
- }
72
-
73
- &[data-removed='true'] {
74
- &[data-front='true'] {
75
- --y: translateY(-100%);
76
- opacity: 0;
77
- }
78
-
79
- &[data-front='false'] {
80
- --y: translateY(-40%);
81
- opacity: 0;
82
- transition:
83
- transform 400ms,
84
- opacity 200ms;
85
- }
86
- }
87
- }
88
- }
89
-
24
+
25
+ &[data-y-position='top'] {
26
+ top: 10px;
27
+ }
28
+ @include reset;
29
+ position: fixed;
30
+ z-index: $z-index-Notification;
31
+ width: $notification-width-default;
32
+ &__container {
33
+ position: relative;
34
+ width: 100%;
35
+ height: 100%;
36
+ }
37
+
38
+ &__item {
39
+ border-radius: $notification-detail-item-border-radius;
40
+ padding: $notification-padding-default;
41
+ background-color: $notification-color-block;
42
+ color: $notification-content-color;
43
+ box-shadow: $notification-shadow;
44
+ overflow: hidden;
45
+ &:hover {
46
+ background-color: $bg-color-container-hover;
47
+ color: $notification-detail-item-color-hover;
48
+ }
49
+ &:active {
50
+ background-color: $bg-color-container-active;
51
+ color: $notification-detail-item-color-active;
52
+ }
53
+
54
+ --y: translateY(-100%);
55
+ transform: var(--y);
56
+ transition:
57
+ transform 400ms,
58
+ opacity 400ms,
59
+ height 400ms,
60
+ box-shadow 200ms;
61
+ z-index: var(--z-index);
62
+
63
+ &[data-mounted='true'] {
64
+ &[data-expanded='false'] {
65
+ --y: translateY(calc(var(--gap) * var(--index)))
66
+ scale(calc(1 - var(--index) * 0.05));
67
+ }
68
+
69
+ &[data-expanded='true'] {
70
+ --y: translateY(var(--offset)) scale(1);
71
+ }
72
+
73
+ &[data-removed='true'] {
74
+ &[data-front='true'] {
75
+ --y: translateY(-100%);
76
+ opacity: 0;
77
+ }
78
+
79
+ &[data-front='false'] {
80
+ --y: translateY(-40%);
81
+ opacity: 0;
82
+ transition:
83
+ transform 400ms,
84
+ opacity 200ms;
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
90
  &__icon {
91
91
  width: $notification-icon-width;
92
92
  text-align: center;
@@ -96,66 +96,66 @@
96
96
  font-size: $notification-icon-font-size;
97
97
  }
98
98
  }
99
-
100
- // icon theme
101
- .t-icon.#{$prefix}-is-info {
102
- color: $notification-icon-info-color;
103
- }
104
-
105
- .t-icon.#{$prefix}-is-success {
106
- color: $notification-icon-success-color;
107
- }
108
-
109
- .t-icon.#{$prefix}-is-warning {
110
- color: $notification-icon-warning-color;
111
- }
112
-
113
- .t-icon.#{$prefix}-is-error {
114
- color: $notification-icon-error-color;
115
- }
116
-
117
- &__main {
118
- flex: 1;
119
- }
120
-
121
- &__title__wrap {
122
- display: flex;
123
- justify-content: space-between;
124
- }
125
-
126
- &__title {
127
- font: $notification-title-font;
128
- color: $notification-title-color;
129
- }
130
-
131
- .t-icon-close {
132
- cursor: pointer;
133
- font-size: $notification-icon-close-font-size;
134
- border-radius: $border-radius-default;
135
- color: $notification-close-icon-color;
136
-
137
- &:hover {
138
- background: $notification-close-bg-color-hover;
139
- }
140
-
141
- &:active {
142
- background: $notification-close-bg-color-active;
143
- }
144
- }
145
-
146
- &__content {
147
- font: $notification-content-font;
148
- color: $notification-content-color;
149
- margin-top: $notification-content-margin-top;
150
- }
151
-
152
- &__header {
153
- display: flex;
154
- }
155
- &__detail {
156
- font: $notification-content-font;
157
- color: $notification-content-color;
158
- margin-top: $notification-content-margin-top;
159
- word-break: break-all;
160
- }
161
- }
99
+
100
+ // icon theme
101
+ .t-icon.#{$prefix}-is-info {
102
+ color: $notification-icon-info-color;
103
+ }
104
+
105
+ .t-icon.#{$prefix}-is-success {
106
+ color: $notification-icon-success-color;
107
+ }
108
+
109
+ .t-icon.#{$prefix}-is-warning {
110
+ color: $notification-icon-warning-color;
111
+ }
112
+
113
+ .t-icon.#{$prefix}-is-error {
114
+ color: $notification-icon-error-color;
115
+ }
116
+
117
+ &__main {
118
+ flex: 1;
119
+ }
120
+
121
+ &__title__wrap {
122
+ display: flex;
123
+ justify-content: space-between;
124
+ }
125
+
126
+ &__title {
127
+ font: $notification-title-font;
128
+ color: $notification-title-color;
129
+ }
130
+
131
+ .t-icon-close {
132
+ cursor: pointer;
133
+ font-size: $notification-icon-close-font-size;
134
+ border-radius: $border-radius-default;
135
+ color: $notification-close-icon-color;
136
+
137
+ &:hover {
138
+ background: $notification-close-bg-color-hover;
139
+ }
140
+
141
+ &:active {
142
+ background: $notification-close-bg-color-active;
143
+ }
144
+ }
145
+
146
+ &__content {
147
+ font: $notification-content-font;
148
+ color: $notification-content-color;
149
+ margin-top: $notification-content-margin-top;
150
+ }
151
+
152
+ &__header {
153
+ display: flex;
154
+ }
155
+ &__detail {
156
+ font: $notification-content-font;
157
+ color: $notification-content-color;
158
+ margin-top: $notification-content-margin-top;
159
+ word-break: break-all;
160
+ }
161
+ }