rappel-ui 1.0.0 → 1.0.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 (163) hide show
  1. package/package.json +5 -2
  2. package/cjs/_virtual/_plugin-vue_export-helper.js +0 -1
  3. package/cjs/components/button/index.d.ts +0 -33
  4. package/cjs/components/button/index.js +0 -1
  5. package/cjs/components/button/src/button.d.ts +0 -3
  6. package/cjs/components/button/src/button.vue.js +0 -1
  7. package/cjs/components/button/src/button.vue2.js +0 -1
  8. package/cjs/components/button/src/constants.d.ts +0 -4
  9. package/cjs/components/button/src/constants.js +0 -1
  10. package/cjs/components/button/src/types.d.ts +0 -16
  11. package/cjs/components/button/style/css.d.ts +0 -0
  12. package/cjs/components/button/style/index.d.ts +0 -0
  13. package/cjs/components/colors/index.d.ts +0 -7
  14. package/cjs/components/colors/index.js +0 -1
  15. package/cjs/components/colors/src/colors.vue.js +0 -1
  16. package/cjs/components/colors/src/colors.vue2.js +0 -1
  17. package/cjs/components/colors/src/neutral-color.css +0 -1
  18. package/cjs/components/colors/src/neutral-color.vue.js +0 -1
  19. package/cjs/components/colors/src/neutral-color.vue2.js +0 -1
  20. package/cjs/components/colors/src/primary-color.css +0 -1
  21. package/cjs/components/colors/src/primary-color.vue.js +0 -1
  22. package/cjs/components/colors/src/primary-color.vue2.js +0 -1
  23. package/cjs/components/colors/src/secondary-color.css +0 -1
  24. package/cjs/components/colors/src/secondary-color.vue.js +0 -1
  25. package/cjs/components/colors/src/secondary-color.vue2.js +0 -1
  26. package/cjs/components/index.d.ts +0 -4
  27. package/cjs/components/index.js +0 -1
  28. package/cjs/components/input/index.d.ts +0 -25
  29. package/cjs/components/input/index.js +0 -1
  30. package/cjs/components/input/src/input.vue.js +0 -1
  31. package/cjs/components/input/src/input.vue2.js +0 -1
  32. package/cjs/components/tabs/index.d.ts +0 -20
  33. package/cjs/components/tabs/index.js +0 -1
  34. package/cjs/components/tabs/src/tabs.vue.js +0 -1
  35. package/cjs/composables/index.d.ts +0 -6
  36. package/cjs/composables/use-namespace/index.d.ts +0 -12
  37. package/cjs/composables/use-namespace/index.js +0 -1
  38. package/cjs/composables/useDateFormat.d.ts +0 -7
  39. package/cjs/composables/useDateFormat.js +0 -1
  40. package/cjs/composables/useDraggable.d.ts +0 -10
  41. package/cjs/composables/useDraggable.js +0 -1
  42. package/cjs/composables/useOnceFn.d.ts +0 -24
  43. package/cjs/composables/useOnceFn.js +0 -1
  44. package/cjs/composables/useTimeNodes.d.ts +0 -3
  45. package/cjs/composables/useTimeNodes.js +0 -1
  46. package/cjs/composables/useWaterFallLayout.d.ts +0 -10
  47. package/cjs/composables/useWaterFallLayout.js +0 -1
  48. package/cjs/constants/index.d.ts +0 -1
  49. package/cjs/constants/svgLoading.d.ts +0 -2
  50. package/cjs/constants/svgLoading.js +0 -36
  51. package/cjs/directives/index.d.ts +0 -3
  52. package/cjs/directives/vDraggable.d.ts +0 -2
  53. package/cjs/directives/vDraggable.js +0 -1
  54. package/cjs/directives/vResizable.d.ts +0 -14
  55. package/cjs/directives/vResizable.js +0 -21
  56. package/cjs/directives/vSvgLoading.d.ts +0 -4
  57. package/cjs/directives/vSvgLoading.js +0 -1
  58. package/cjs/index.d.ts +0 -86
  59. package/cjs/index.js +0 -1
  60. package/cjs/package.json.js +0 -1
  61. package/cjs/purple-ui/index.d.ts +0 -1
  62. package/cjs/purple-ui/resolver.d.ts +0 -2
  63. package/cjs/purple-ui/resolver.js +0 -1
  64. package/cjs/theme-chalk/src/base.css +0 -1
  65. package/cjs/theme-chalk/src/button.css +0 -1
  66. package/cjs/utils/index.d.ts +0 -2
  67. package/cjs/utils/util.d.ts +0 -143
  68. package/cjs/utils/util.js +0 -3
  69. package/cjs/utils/vue/index.d.ts +0 -17
  70. package/cjs/utils/vue/index.js +0 -1
  71. package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
  72. package/es/components/button/index.d.ts +0 -33
  73. package/es/components/button/index.mjs +0 -6
  74. package/es/components/button/src/button.d.ts +0 -3
  75. package/es/components/button/src/button.vue.mjs +0 -74
  76. package/es/components/button/src/button.vue2.mjs +0 -4
  77. package/es/components/button/src/constants.d.ts +0 -4
  78. package/es/components/button/src/constants.mjs +0 -5
  79. package/es/components/button/src/types.d.ts +0 -16
  80. package/es/components/button/style/css.d.ts +0 -0
  81. package/es/components/button/style/index.d.ts +0 -0
  82. package/es/components/colors/index.d.ts +0 -7
  83. package/es/components/colors/index.mjs +0 -16
  84. package/es/components/colors/src/colors.vue.mjs +0 -21
  85. package/es/components/colors/src/colors.vue2.mjs +0 -4
  86. package/es/components/colors/src/neutral-color.css +0 -1
  87. package/es/components/colors/src/neutral-color.vue.mjs +0 -7
  88. package/es/components/colors/src/neutral-color.vue2.mjs +0 -195
  89. package/es/components/colors/src/primary-color.css +0 -1
  90. package/es/components/colors/src/primary-color.vue.mjs +0 -7
  91. package/es/components/colors/src/primary-color.vue2.mjs +0 -33
  92. package/es/components/colors/src/secondary-color.css +0 -1
  93. package/es/components/colors/src/secondary-color.vue.mjs +0 -7
  94. package/es/components/colors/src/secondary-color.vue2.mjs +0 -54
  95. package/es/components/index.d.ts +0 -4
  96. package/es/components/index.mjs +0 -20
  97. package/es/components/input/index.d.ts +0 -25
  98. package/es/components/input/index.mjs +0 -6
  99. package/es/components/input/src/input.vue.mjs +0 -15
  100. package/es/components/input/src/input.vue2.mjs +0 -4
  101. package/es/components/tabs/index.d.ts +0 -20
  102. package/es/components/tabs/index.mjs +0 -6
  103. package/es/components/tabs/src/tabs.vue.mjs +0 -17
  104. package/es/composables/index.d.ts +0 -6
  105. package/es/composables/use-namespace/index.d.ts +0 -12
  106. package/es/composables/use-namespace/index.mjs +0 -21
  107. package/es/composables/useDateFormat.d.ts +0 -7
  108. package/es/composables/useDateFormat.mjs +0 -20
  109. package/es/composables/useDraggable.d.ts +0 -10
  110. package/es/composables/useDraggable.mjs +0 -55
  111. package/es/composables/useOnceFn.d.ts +0 -24
  112. package/es/composables/useOnceFn.mjs +0 -32
  113. package/es/composables/useTimeNodes.d.ts +0 -3
  114. package/es/composables/useTimeNodes.mjs +0 -24
  115. package/es/composables/useWaterFallLayout.d.ts +0 -10
  116. package/es/composables/useWaterFallLayout.mjs +0 -51
  117. package/es/constants/index.d.ts +0 -1
  118. package/es/constants/svgLoading.d.ts +0 -2
  119. package/es/constants/svgLoading.mjs +0 -39
  120. package/es/directives/index.d.ts +0 -3
  121. package/es/directives/vDraggable.d.ts +0 -2
  122. package/es/directives/vDraggable.mjs +0 -13
  123. package/es/directives/vResizable.d.ts +0 -14
  124. package/es/directives/vResizable.mjs +0 -136
  125. package/es/directives/vSvgLoading.d.ts +0 -4
  126. package/es/directives/vSvgLoading.mjs +0 -48
  127. package/es/index.d.ts +0 -86
  128. package/es/index.mjs +0 -76
  129. package/es/package.json.mjs +0 -4
  130. package/es/purple-ui/index.d.ts +0 -1
  131. package/es/purple-ui/resolver.d.ts +0 -2
  132. package/es/purple-ui/resolver.mjs +0 -18
  133. package/es/theme-chalk/src/base.css +0 -1
  134. package/es/theme-chalk/src/button.css +0 -1
  135. package/es/utils/index.d.ts +0 -2
  136. package/es/utils/util.d.ts +0 -143
  137. package/es/utils/util.mjs +0 -151
  138. package/es/utils/vue/index.d.ts +0 -17
  139. package/es/utils/vue/index.mjs +0 -36
  140. package/global.d.ts +0 -7
  141. package/theme-chalk/base.css +0 -148
  142. package/theme-chalk/css-vars/_button.css +0 -35
  143. package/theme-chalk/css-vars/_colors.css +0 -51
  144. package/theme-chalk/function/_button.css +0 -35
  145. package/theme-chalk/function/index.css +0 -35
  146. package/theme-chalk/index.css +0 -560
  147. package/theme-chalk/mixins/_button.css +0 -35
  148. package/theme-chalk/mixins/index.css +0 -35
  149. package/theme-chalk/pu-button.css +0 -446
  150. package/theme-chalk/root-vars.css +0 -132
  151. package/theme-chalk/src/base.scss +0 -30
  152. package/theme-chalk/src/button.scss +0 -104
  153. package/theme-chalk/src/common/_function.scss +0 -46
  154. package/theme-chalk/src/css-vars/_button.scss +0 -47
  155. package/theme-chalk/src/css-vars/_colors.scss +0 -82
  156. package/theme-chalk/src/css-vars/_namespace.scss +0 -12
  157. package/theme-chalk/src/function/_button.scss +0 -2
  158. package/theme-chalk/src/function/index.scss +0 -155
  159. package/theme-chalk/src/index.scss +0 -2
  160. package/theme-chalk/src/mixins/_button.scss +0 -140
  161. package/theme-chalk/src/mixins/index.scss +0 -25
  162. package/theme-chalk/src/root-vars.scss +0 -13
  163. package/umd/index.js +0 -59
@@ -1,46 +0,0 @@
1
- @use 'sass:map';
2
- @use 'sass:list';
3
- @use '../css-vars/_namespace.scss' as *;
4
-
5
- //('color','text','base') => $obj.color.text.base
6
- @function deepGet($obj, $keys...) {
7
- $current: $obj;
8
- @each $key in $keys {
9
- $current: map.get($current, $key);
10
- }
11
- @return $current;
12
- }
13
-
14
- //('color','text','base') => 'color-text-base'
15
- @function joinStr($args...) {
16
- $str: list.nth($args, 1);
17
- @for $i from 1 through list.length($args) {
18
- @if $i > 1 {
19
- $str: $str + '-' + list.nth($args, $i);
20
- }
21
- }
22
- @return $str;
23
- }
24
- // 'button' => 'pu-button'
25
- @function namespaceJoinStr($args...) {
26
- @return deepGet($namespace, 'prefix') + '-' + joinStr($args...);
27
- }
28
-
29
- //#{$obj.color.text.base}
30
- @function getScssVar($obj, $keys...) {
31
- @return #{deepGet($obj, $keys...)};
32
- }
33
- // $namespace.prefix's value
34
- @function getNamespace($name) {
35
- @return deepGet($namespace, $name);
36
- }
37
-
38
- //('color','text','base') => '--pu-color-text-base'
39
- @function getCssVarStr($args...) {
40
- @return '--' + namespaceJoinStr($args...);
41
- }
42
-
43
- // ('color','text','base') => var(--pu-color-text-base)
44
- @function getCssVar($args...) {
45
- @return var(#{getCssVarStr($args...)});
46
- }
@@ -1,47 +0,0 @@
1
- @use 'sass:map';
2
- @use '../function/index' as *;
3
-
4
- $button: () !default;
5
- $button: map.deep-merge(
6
- (
7
- '': (
8
- 'bgcolor': getCssVar('color', 'fill', 'blank'),
9
- 'color': getCssVar('color', 'text', 'secondary'),
10
- 'border-color': getCssVar('color', 'border', 'base'),
11
- 'hover-color': getCssVar('color', 'primary', 'base'),
12
- 'hover-bgcolor': getCssVar('color', 'primary', 'shade-1'),
13
- 'hover-border-color': getCssVar('color', 'primary', 'shade-4')
14
- )
15
- ),
16
- $button
17
- );
18
-
19
- $button-types: ('', 'primary', 'success', 'danger', 'warning', 'info');
20
- @each $type in $button-types {
21
- @if $type {
22
- $button: map.deep-merge(
23
- (
24
- $type: (
25
- 'bgcolor': getCssVar('color', $type, 'base'),
26
- 'color': getCssVar('color', 'text', 'lightest'),
27
- 'border-color': getCssVar('color', $type, 'base'),
28
- 'hover-color': getCssVar('color', 'text', 'lightest'),
29
- 'hover-bgcolor': getCssVar('color', $type, 'hover'),
30
- 'hover-border-color': getCssVar('color', $type, 'hover')
31
- )
32
- ),
33
- $button
34
- );
35
- }
36
- }
37
-
38
- $button-padding: () !default;
39
- $button-padding: map.deep-merge(
40
- (
41
- 'large': 12px 20px,
42
- '': 8px 16px,
43
- 'small': 6px 12px,
44
- 'mini': 4px 8px
45
- ),
46
- $button-padding
47
- );
@@ -1,82 +0,0 @@
1
- @use 'sass:map';
2
- @use '../function/index.scss' as *;
3
-
4
- $colors: () !default;
5
-
6
- $colors: map.deep-merge(
7
- (
8
- text: (
9
- darkest: #000000,
10
- base: #303131,
11
- secondary: #606062,
12
- neutral: #909093,
13
- placeholder: #b2b2b6,
14
- disabled: #cdcdd1,
15
- lightest: #ffffff
16
- ),
17
- border: (
18
- darker: #c3c3cb,
19
- dark: #d0d0d8,
20
- base: #dbdbe0,
21
- light: #e4e4e8,
22
- lighter: #ededef,
23
- extra-light: #efeff3,
24
- theme: #d4caff
25
- ),
26
- fill: (
27
- darker: #d7d7dc,
28
- dark: #e8e8ec,
29
- base: #ededf0,
30
- light: #f1f1f4,
31
- lighter: #f6f6f7,
32
- extra-light: #f8f8f9,
33
- theme: #f7f7fb,
34
- blank: #ffffff,
35
- transparent: transparent
36
- )
37
- ),
38
- $colors
39
- );
40
-
41
- $state-types: (
42
- primary: (
43
- #937bff
44
- ),
45
- success: (
46
- #06b56d
47
- ),
48
- danger: (
49
- #ee6979
50
- ),
51
- warning: (
52
- #cd9a0a
53
- ),
54
- info: (
55
- #8e8e91
56
- )
57
- );
58
-
59
- /**
60
- * 生成不同(0.9-0.1)透明度对应的等值颜色:
61
- primary: (
62
- base: #937bff,
63
- hover: #7e69dc,
64
- shade-9: #9e88ff,
65
- shade-8: #a995ff,
66
- shade-7: #b3a3ff,
67
- shade-6: #beb0ff,
68
- shade-5: #c9bdff,
69
- shade-4: #d4caff,
70
- shade-3: #ded7ff,
71
- shade-2: #e9e5ff,
72
- shade-1: #f4f2ff
73
- ),
74
- */
75
- @each $type, $color in $state-types {
76
- $colors: map.merge(
77
- $colors,
78
- (
79
- $type: create-colors($color)
80
- )
81
- );
82
- }
@@ -1,12 +0,0 @@
1
- @use 'sass:map';
2
-
3
- $namespace: () !default;
4
- $namespace: map.deep-merge(
5
- (
6
- prefix: 'pu',
7
- statePrefix: 'is',
8
- font-size: 16px,
9
- round: 20px
10
- ),
11
- $namespace
12
- );
@@ -1,2 +0,0 @@
1
- @use '../css-vars/_namespace.scss' as *;
2
- @use './index';
@@ -1,155 +0,0 @@
1
- @use 'sass:map';
2
- @use 'sass:list';
3
- @use 'sass:color';
4
- @use 'sass:math';
5
- @use 'sass:string';
6
- @use '../css-vars/_namespace.scss' as *;
7
-
8
- //('color','text','base') => $obj.color.text.base
9
- @function deepGet($obj, $keys...) {
10
- $current: $obj;
11
- @each $key in $keys {
12
- $current: map.get($current, $key);
13
- }
14
- @return $current;
15
- }
16
-
17
- //('color','text','base') => 'color-text-base'
18
- @function joinStr($args...) {
19
- $str: list.nth($args, 1);
20
- @for $i from 1 through list.length($args) {
21
- @if $i > 1 {
22
- $str: $str + '-' + list.nth($args, $i);
23
- }
24
- }
25
- @return $str;
26
- }
27
- // 'button' => 'pu-button'
28
- @function namespaceJoinStr($args...) {
29
- @return deepGet($namespace, 'prefix') + '-' + joinStr($args...);
30
- }
31
-
32
- //#{$obj.color.text.base}
33
- @function getScssVar($obj, $keys...) {
34
- @return #{deepGet($obj, $keys...)};
35
- }
36
- // $namespace.prefix's value
37
- @function getNamespace($name) {
38
- @return deepGet($namespace, $name);
39
- }
40
-
41
- //('color','text','base') => '--pu-color-text-base'
42
- @function getCssVarStr($args...) {
43
- @return '--' + namespaceJoinStr($args...);
44
- }
45
-
46
- // ('color','text','base') => var(--pu-color-text-base)
47
- @function getCssVar($args...) {
48
- @return var(#{getCssVarStr($args...)});
49
- }
50
-
51
- /**
52
- * 将十六进制颜色转换为RGB颜色
53
- * @param $hex 十六进制颜色值
54
- * @returns RGB颜色值
55
- * color.channel($color, "red", $space: rgb)
56
- */
57
- @function hex-to-rgb($hex) {
58
- @return color.channel($hex, 'red', $space: rgb) color.channel($hex, 'green', $space: rgb)
59
- color.channel($hex, 'blue', $space: rgb);
60
- }
61
- /**
62
- * 将RGB颜色转换为十六进制颜色
63
- * @param $value RGB颜色值
64
- * @returns 十六进制颜色值
65
- */
66
- @function color-to-hex($value) {
67
- $hex-chars: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9' 'a' 'b' 'c' 'd' 'e' 'f';
68
- $first: list.nth($hex-chars, math.floor(math.div($value, 16)) + 1);
69
- $second: list.nth($hex-chars, ($value % 16) + 1);
70
- @return #{$first}#{$second};
71
- }
72
- /**
73
- * 将RGB颜色转换为十六进制颜色
74
- * @param $color RGB颜色值
75
- * @returns 十六进制颜色值
76
- */
77
- @function rgb-to-hex($color) {
78
- $r-hex: color-to-hex(color.channel($color, 'red', $space: rgb));
79
- $g-hex: color-to-hex(color.channel($color, 'green', $space: rgb));
80
- $b-hex: color-to-hex(color.channel($color, 'blue', $space: rgb));
81
-
82
- @return string.unquote('#' + $r-hex + $g-hex + $b-hex);
83
- }
84
-
85
- /**
86
- * 创建一个等效的透明度颜色,并返回一个等效的透明度颜色
87
- * @param $color 颜色
88
- * @param $opacity 透明度,默认值为1
89
- * @returns 一个等效的透明度颜色
90
- */
91
- @function get-equal-opacity-color($color, $opacity: 1) {
92
- // 获取颜色的 RGB 值
93
- $r: color.channel($color, 'red', $space: rgb);
94
- $g: color.channel($color, 'green', $space: rgb);
95
- $b: color.channel($color, 'blue', $space: rgb);
96
-
97
- // 白色背景值
98
- $white-r: 255;
99
- $white-g: 255;
100
- $white-b: 255;
101
-
102
- // 计算等效颜色值:前景 × alpha + 背景 × (1 - alpha)
103
- $equiv-r: math.round($r * $opacity + $white-r * (1 - $opacity));
104
- $equiv-g: math.round($g * $opacity + $white-g * (1 - $opacity));
105
- $equiv-b: math.round($b * $opacity + $white-b * (1 - $opacity));
106
-
107
- // 返回新的颜色
108
- @return rgb-to-hex(rgb($equiv-r, $equiv-g, $equiv-b));
109
- }
110
-
111
- /**
112
- * 创建一个变暗的颜色,并返回一个变暗的颜色
113
- * @param $color 颜色
114
- * @param $factor 颜色变暗的度量,默认为0.15
115
- * @returns 一个变暗的颜色
116
- */
117
- @function darken-color($color, $factor: 0.15) {
118
- $r: color.channel($color, 'red', $space: rgb);
119
- $g: color.channel($color, 'green', $space: rgb);
120
- $b: color.channel($color, 'blue', $space: rgb);
121
-
122
- // 向黑色混合:newColor = originalColor * (1 - factor) + blackColor * factor
123
- $new-r: math.round($r * (1 - $factor));
124
- $new-g: math.round($g * (1 - $factor));
125
- $new-b: math.round($b * (1 - $factor));
126
-
127
- @return rgb-to-hex(rgb($new-r, $new-g, $new-b));
128
- }
129
-
130
- /**
131
- * 创建层级颜色
132
- * @param $base-color 基础颜色
133
- * @param $darkness 变暗的度量,默认为0.15
134
- * @returns 主题色映射
135
- */
136
- @function create-colors($base-color, $darkness: 0.15) {
137
- $result: (
138
- base: $base-color,
139
- hover: darken-color($base-color, $darkness)
140
- );
141
-
142
- // 添加不同透明度的等值颜色,映射为 shade-1 到 shade-9
143
- @for $i from 9 through 1 {
144
- $opacity: $i * 0.1; // 从 0.9 到 0.1
145
- $color-with-opacity: get-equal-opacity-color($base-color, $opacity);
146
- $result: map.merge(
147
- $result,
148
- (
149
- 'shade-#{$i}': $color-with-opacity
150
- )
151
- );
152
- }
153
-
154
- @return $result;
155
- }
@@ -1,2 +0,0 @@
1
- @forward './base.scss';
2
- @forward './button.scss';
@@ -1,140 +0,0 @@
1
- @use 'sass:map';
2
- @use '../css-vars/_button' as *;
3
- @use './index' as *;
4
- @use '../function/index' as *;
5
-
6
- @mixin set-bgcolor-var($type, $value) {
7
- #{getCssVarStr('button', 'bgcolor')}: #{map.get($button, $type, $value)};
8
- }
9
-
10
- @mixin set-bgcolor-custom($value) {
11
- #{getCssVarStr('button', 'bgcolor')}: #{$value};
12
- }
13
-
14
- @mixin set-color-var($type, $value) {
15
- #{getCssVarStr('button', 'color')}: #{map.get($button, $type, $value)};
16
- }
17
-
18
- @mixin set-color-custom($value) {
19
- #{getCssVarStr('button', 'color')}: #{$value};
20
- }
21
-
22
- @mixin set-bordercolor-var($type, $value) {
23
- #{getCssVarStr('button', 'border-color')}: #{map.get($button, $type, $value)};
24
- }
25
-
26
- @mixin set-bordercolor-custom($value) {
27
- #{getCssVarStr('button', 'border-color')}: #{$value};
28
- }
29
-
30
- @mixin set-bbc-color-vars($type) {
31
- @include set-bgcolor-var($type, 'bgcolor');
32
- @include set-color-var($type, 'color');
33
- @include set-bordercolor-var($type, 'border-color');
34
- }
35
-
36
- @mixin set-bbc-hover-color-vars($type) {
37
- @include set-bgcolor-var($type, 'hover-bgcolor');
38
- @include set-color-var($type, 'hover-color');
39
- @include set-bordercolor-var($type, 'hover-border-color');
40
- }
41
-
42
- @mixin button-modifier($button, $type) {
43
- @include set-bbc-color-vars($type);
44
- @include hover() {
45
- @include set-bbc-hover-color-vars($type);
46
- }
47
-
48
- @include is('disabled') {
49
- cursor: not-allowed;
50
- background-color: if(
51
- $type != '',
52
- getCssVar('color', $type, 'shade-4'),
53
- getCssVar('color', 'fill', 'blank')
54
- );
55
- border-color: if(
56
- $type != '',
57
- getCssVar('color', $type, 'shade-4'),
58
- getCssVar('color', 'border', 'base')
59
- );
60
- color: if(
61
- $type != '',
62
- getCssVar('color', 'fill', 'blank'),
63
- getCssVar('color', 'text', 'disabled')
64
- );
65
- }
66
-
67
- @include is('link') {
68
- @include set-color-var($type, if($type != '', 'bgcolor', 'color'));
69
- @include hover {
70
- @include set-color-var($type, if($type != '', 'hover-bgcolor', 'hover-color'));
71
- @include set-bgcolor-custom('transparent');
72
- @include set-bordercolor-custom('transparent');
73
- }
74
-
75
- @include is('disabled') {
76
- background-color: getCssVar('color', 'fill', 'blank');
77
- border-color: getCssVar('color', 'fill', 'blank');
78
- color: if(
79
- $type != '',
80
- getCssVar('color', $type, 'shade-4'),
81
- getCssVar('color', 'text', 'disabled')
82
- );
83
- }
84
- }
85
-
86
- @include is('plain') {
87
- @if $type != '' {
88
- background-color: getCssVar('color', $type, 'shade-1');
89
- color: getCssVar('color', $type, 'base');
90
- border-color: getCssVar('color', $type, 'shade-6');
91
- @include hover {
92
- color: getCssVar('color', 'fill', 'blank');
93
- background-color: getCssVar('color', $type, 'base');
94
- border-color: getCssVar('color', $type, 'base');
95
- }
96
- @include is('disabled') {
97
- background-color: if(
98
- $type != '',
99
- getCssVar('color', $type, 'shade-1'),
100
- getCssVar('color', 'fill', 'blank')
101
- );
102
- color: if(
103
- $type != '',
104
- getCssVar('color', $type, 'shade-4'),
105
- getCssVar('color', 'text', 'disabled')
106
- );
107
- border-color: if(
108
- $type != '',
109
- getCssVar('color', $type, 'shade-4'),
110
- getCssVar('color', 'border', 'shade-4')
111
- );
112
- }
113
- }
114
- }
115
-
116
- @include is('loading') {
117
- &:before {
118
- z-index: 1;
119
- content: '';
120
- position: absolute;
121
- top: -1px;
122
- left: -1px;
123
- right: -1px;
124
- bottom: -1px;
125
- pointer-events: none;
126
- border-radius: inherit;
127
- background-color: rgba(255, 255, 255, 0.5);
128
- }
129
- }
130
- }
131
-
132
- @mixin button-modifier-style($button, $type) {
133
- @if $type != '' {
134
- &--#{$type} {
135
- @include button-modifier($button, $type);
136
- }
137
- } @else {
138
- @include button-modifier($button, $type);
139
- }
140
- }
@@ -1,25 +0,0 @@
1
- @use '../function/index' as *;
2
-
3
- @mixin buildCls($name) {
4
- @at-root {
5
- .#{getNamespace('prefix') + '-' + $name} {
6
- @content;
7
- }
8
- }
9
- }
10
-
11
- @mixin is($state) {
12
- &.#{getNamespace('statePrefix') + '-' + $state} {
13
- @content;
14
- }
15
- }
16
-
17
- @mixin hover() {
18
- &:hover:not(.is-disabled) {
19
- @content;
20
- }
21
- }
22
-
23
- @mixin set-css-var($name, $value) {
24
- #{getCssVarStr($name)}: #{$value};
25
- }
@@ -1,13 +0,0 @@
1
- @use 'sass:map';
2
- @use 'css-vars/_colors' as *;
3
- @use 'function/index' as *;
4
-
5
- :root {
6
- #{getCssVarStr('color', 'primary')}: #{map.get($colors, 'primary', 'base')};
7
-
8
- @each $color-name, $shades in $colors {
9
- @each $shade-name, $shade-value in $shades {
10
- #{getCssVarStr('color')}-#{$color-name}-#{''+$shade-name}: #{$shade-value};
11
- }
12
- }
13
- }