@chaoswise/ui 3.0.1 → 3.0.2

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 (58) hide show
  1. package/config/babel/antdComs-nouse.js +51 -0
  2. package/config/babel/formily.js +22 -0
  3. package/config/babel/index.js +9 -0
  4. package/config/city/citys.js +1964 -0
  5. package/config/swc.js +5 -0
  6. package/config/theme/CWTheme.js +427 -0
  7. package/config/theme/chart.dark.js +394 -0
  8. package/config/theme/chart.light.js +3 -0
  9. package/config/theme/common.less +161 -0
  10. package/config/theme/dark.js +784 -0
  11. package/config/theme/dark.less +80 -0
  12. package/config/theme/default.js +717 -0
  13. package/config/theme/default.less +144 -0
  14. package/config/theme/style/color/bezierEasing.less +110 -0
  15. package/config/theme/style/color/colorPalette.less +85 -0
  16. package/config/theme/style/color/colors.less +162 -0
  17. package/config/theme/style/color/tinyColor.less +1184 -0
  18. package/config/theme/style/compact.less +4 -0
  19. package/config/theme/style/components.less +65 -0
  20. package/config/theme/style/core/base.less +10 -0
  21. package/config/theme/style/core/global.less +491 -0
  22. package/config/theme/style/core/iconfont.less +22 -0
  23. package/config/theme/style/core/index.less +5 -0
  24. package/config/theme/style/core/motion/fade.less +34 -0
  25. package/config/theme/style/core/motion/move.less +129 -0
  26. package/config/theme/style/core/motion/other.less +51 -0
  27. package/config/theme/style/core/motion/slide.less +129 -0
  28. package/config/theme/style/core/motion/zoom.less +179 -0
  29. package/config/theme/style/core/motion.less +22 -0
  30. package/config/theme/style/css.js +3 -0
  31. package/config/theme/style/dark.less +4 -0
  32. package/config/theme/style/default.css +1784 -0
  33. package/config/theme/style/default.less +4 -0
  34. package/config/theme/style/index-pure.less +2 -0
  35. package/config/theme/style/index.css +1784 -0
  36. package/config/theme/style/index.d.ts +1 -0
  37. package/config/theme/style/index.js +3 -0
  38. package/config/theme/style/index.less +3 -0
  39. package/config/theme/style/mixins/box.less +7 -0
  40. package/config/theme/style/mixins/clearfix.less +16 -0
  41. package/config/theme/style/mixins/compatibility.less +13 -0
  42. package/config/theme/style/mixins/customize.less +181 -0
  43. package/config/theme/style/mixins/iconfont.less +28 -0
  44. package/config/theme/style/mixins/index.less +14 -0
  45. package/config/theme/style/mixins/modal-mask.less +30 -0
  46. package/config/theme/style/mixins/motion.less +33 -0
  47. package/config/theme/style/mixins/operation-unit.less +16 -0
  48. package/config/theme/style/mixins/reset.less +11 -0
  49. package/config/theme/style/mixins/rounded-arrow.less +44 -0
  50. package/config/theme/style/mixins/size.less +10 -0
  51. package/config/theme/style/mixins/typography.less +58 -0
  52. package/config/theme/style/themes/compact.less +295 -0
  53. package/config/theme/style/themes/dark.less +457 -0
  54. package/config/theme/style/themes/default.less +1080 -0
  55. package/config/theme/style/themes/index.less +7 -0
  56. package/config/theme/style/themes/variable.less +1135 -0
  57. package/config/theme/style/variable.less +4 -0
  58. package/package.json +1 -2
@@ -0,0 +1 @@
1
+ import './index.less';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ require("./index.less");
@@ -0,0 +1,3 @@
1
+ @root-entry-name: default;
2
+
3
+ @import './index-pure.less';
@@ -0,0 +1,7 @@
1
+ .box(@position: absolute) {
2
+ position: @position;
3
+ top: 0;
4
+ right: 0;
5
+ bottom: 0;
6
+ left: 0;
7
+ }
@@ -0,0 +1,16 @@
1
+ // mixins for clearfix
2
+ // ------------------------
3
+ .clearfix() {
4
+ // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
5
+ &::before {
6
+ display: table;
7
+ content: '';
8
+ }
9
+
10
+ &::after {
11
+ // https://github.com/ant-design/ant-design/issues/21864
12
+ display: table;
13
+ clear: both;
14
+ content: '';
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ // Compatibility for browsers.
2
+
3
+ // Placeholder text
4
+ .placeholder(@color: @input-placeholder-color) {
5
+ &::placeholder {
6
+ color: @color;
7
+ user-select: none; // https://github.com/ant-design/ant-design/pull/32639
8
+ }
9
+
10
+ &:placeholder-shown {
11
+ text-overflow: ellipsis;
12
+ }
13
+ }
@@ -0,0 +1,181 @@
1
+ // customize dark components background in popover containers(like Modal, Drawer, Card, Popover, Popconfirm, Notification, ...)
2
+ // for dark theme
3
+ .popover-customize-bg(@containerClass, @background: @popover-background, @prefix: @ant-prefix)
4
+ when
5
+ (@theme = dark) {
6
+ @picker-prefix-cls: ~'@{prefix}-picker';
7
+ @slider-prefix-cls: ~'@{prefix}-slider';
8
+ @anchor-prefix-cls: ~'@{prefix}-anchor';
9
+ @collapse-prefix-cls: ~'@{prefix}-collapse';
10
+ @tab-prefix-cls: ~'@{prefix}-tabs';
11
+ @timeline-prefix-cls: ~'@{prefix}-timeline';
12
+ @tree-prefix-cls: ~'@{prefix}-tree';
13
+ @card-prefix-cls: ~'@{prefix}-card';
14
+ @badge-prefix-cls: ~'@{prefix}-badge';
15
+ @transfer-prefix-cls: ~'@{prefix}-transfer';
16
+ @calendar-prefix-cls: ~'@{prefix}-picker-calendar';
17
+ @calendar-picker-prefix-cls: ~'@{prefix}-picker';
18
+ @table-prefix-cls: ~'@{prefix}-table';
19
+
20
+ @popover-border: @border-width-base @border-style-base @popover-customize-border-color;
21
+
22
+ .@{containerClass} {
23
+ .@{picker-prefix-cls}-clear,
24
+ .@{slider-prefix-cls}-handle,
25
+ .@{anchor-prefix-cls}-wrapper,
26
+ .@{collapse-prefix-cls}-content,
27
+ .@{timeline-prefix-cls}-item-head,
28
+ .@{card-prefix-cls} {
29
+ background-color: @background;
30
+ }
31
+
32
+ .@{transfer-prefix-cls} {
33
+ &-list {
34
+ &-header {
35
+ background: @background;
36
+ border-bottom: @popover-border;
37
+ }
38
+ &-content-item:not(.@{transfer-prefix-cls}-list-content-item-disabled):hover {
39
+ background-color: @item-hover-bg;
40
+ }
41
+ }
42
+ }
43
+
44
+ tr.@{table-prefix-cls}-expanded-row {
45
+ &,
46
+ &:hover {
47
+ > td {
48
+ background: #272727;
49
+ }
50
+ }
51
+ }
52
+ .@{table-prefix-cls}.@{table-prefix-cls}-small {
53
+ thead {
54
+ > tr {
55
+ > th {
56
+ background-color: @background;
57
+ border-bottom: @popover-border;
58
+ }
59
+ }
60
+ }
61
+ }
62
+ .@{table-prefix-cls} {
63
+ background-color: @background;
64
+ .@{table-prefix-cls}-row-expand-icon {
65
+ border: @popover-border;
66
+ }
67
+
68
+ tfoot {
69
+ > tr {
70
+ > th,
71
+ > td {
72
+ border-bottom: @popover-border;
73
+ }
74
+ }
75
+ }
76
+
77
+ thead {
78
+ > tr {
79
+ > th {
80
+ background-color: #272727;
81
+ border-bottom: @popover-border;
82
+ }
83
+ }
84
+ }
85
+
86
+ tbody {
87
+ > tr {
88
+ > td {
89
+ border-bottom: @popover-border;
90
+ &.@{table-prefix-cls}-cell-fix-left,
91
+ &.@{table-prefix-cls}-cell-fix-right {
92
+ background-color: @background;
93
+ }
94
+ }
95
+ &.@{table-prefix-cls}-row:hover {
96
+ > td {
97
+ background: @table-header-sort-active-bg;
98
+ }
99
+ }
100
+ }
101
+ }
102
+ &.@{table-prefix-cls}-bordered {
103
+ .@{table-prefix-cls}-title {
104
+ border: @popover-border;
105
+ }
106
+
107
+ // ============================= Cell =============================
108
+ thead > tr > th,
109
+ tbody > tr > td,
110
+ tfoot > tr > th,
111
+ tfoot > tr > td {
112
+ border-right: @popover-border;
113
+ }
114
+
115
+ // Fixed right should provides additional border
116
+ .@{table-prefix-cls}-cell-fix-right-first::after {
117
+ border-right: @popover-border;
118
+ }
119
+
120
+ // ============================ Header ============================
121
+ table > {
122
+ thead {
123
+ > tr:not(:last-child) > th {
124
+ border-bottom: @border-width-base @border-style-base @border-color-split;
125
+ }
126
+ }
127
+ }
128
+
129
+ // =========================== Content ============================
130
+ .@{table-prefix-cls}-container {
131
+ border: @popover-border;
132
+ }
133
+
134
+ // ========================== Expandable ==========================
135
+ .@{table-prefix-cls}-expanded-row-fixed {
136
+ &::after {
137
+ border-right: @popover-border;
138
+ }
139
+ }
140
+
141
+ .@{table-prefix-cls}-footer {
142
+ border: @popover-border;
143
+ }
144
+ }
145
+ .@{table-prefix-cls}-filter-trigger-container-open {
146
+ background-color: #525252;
147
+ }
148
+ }
149
+
150
+ .@{calendar-prefix-cls}-full {
151
+ background-color: @background;
152
+ .@{calendar-picker-prefix-cls}-panel {
153
+ background-color: @background;
154
+ .@{calendar-prefix-cls}-date {
155
+ border-top: 2px solid @popover-customize-border-color;
156
+ }
157
+ }
158
+ }
159
+
160
+ .@{tab-prefix-cls} {
161
+ &.@{tab-prefix-cls}-card .@{tab-prefix-cls}-card-bar .@{tab-prefix-cls}-tab-active {
162
+ background-color: @background;
163
+ border-bottom: @border-width-base solid @background;
164
+ }
165
+ }
166
+
167
+ .@{badge-prefix-cls} {
168
+ &-count {
169
+ box-shadow: 0 0 0 1px @background;
170
+ }
171
+ }
172
+
173
+ .@{tree-prefix-cls} {
174
+ &-show-line {
175
+ .@{tree-prefix-cls}-switcher {
176
+ background: @background;
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
@@ -0,0 +1,28 @@
1
+ .iconfont-mixin() {
2
+ display: inline-block;
3
+ color: @icon-color;
4
+ font-style: normal;
5
+ line-height: 0;
6
+ text-align: center;
7
+ text-transform: none;
8
+ vertical-align: -0.125em; // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
9
+ text-rendering: optimizelegibility;
10
+ -webkit-font-smoothing: antialiased;
11
+ -moz-osx-font-smoothing: grayscale;
12
+
13
+ > * {
14
+ line-height: 1;
15
+ }
16
+
17
+ svg {
18
+ display: inline-block;
19
+ }
20
+
21
+ &::before {
22
+ display: none; // dont display old icon.
23
+ }
24
+
25
+ & &-icon {
26
+ display: block;
27
+ }
28
+ }
@@ -0,0 +1,14 @@
1
+ // Mixins
2
+ // --------------------------------------------------
3
+ @import 'size';
4
+ @import 'compatibility';
5
+ @import 'clearfix';
6
+ @import 'iconfont';
7
+ @import 'typography';
8
+ @import 'customize';
9
+ @import 'box';
10
+ @import 'modal-mask';
11
+ @import 'motion';
12
+ @import 'reset';
13
+ @import 'operation-unit';
14
+ @import 'rounded-arrow';
@@ -0,0 +1,30 @@
1
+ @import 'box';
2
+
3
+ .modal-mask() {
4
+ pointer-events: none;
5
+
6
+ &.@{ant-prefix}-zoom-enter,
7
+ &.@{ant-prefix}-zoom-appear {
8
+ transform: none; // reset scale avoid mousePosition bug
9
+ opacity: 0;
10
+ animation-duration: @animation-duration-slow;
11
+ user-select: none; // https://github.com/ant-design/ant-design/issues/11777
12
+ }
13
+
14
+ &-mask {
15
+ .box(fixed);
16
+ z-index: @zindex-modal-mask;
17
+ height: 100%;
18
+ background-color: @modal-mask-bg;
19
+
20
+ &-hidden {
21
+ display: none;
22
+ }
23
+ }
24
+
25
+ &-wrap {
26
+ .box(fixed);
27
+ overflow: auto;
28
+ outline: 0;
29
+ }
30
+ }
@@ -0,0 +1,33 @@
1
+ .motion-common(@duration: @animation-duration-base) {
2
+ animation-duration: @duration;
3
+ animation-fill-mode: both;
4
+ }
5
+
6
+ .motion-common-leave(@duration: @animation-duration-base) {
7
+ animation-duration: @duration;
8
+ animation-fill-mode: both;
9
+ }
10
+
11
+ .make-motion(@className, @keyframeName, @duration: @animation-duration-base) {
12
+ .@{className}-enter,
13
+ .@{className}-appear {
14
+ .motion-common(@duration);
15
+
16
+ animation-play-state: paused;
17
+ }
18
+ .@{className}-leave {
19
+ .motion-common-leave(@duration);
20
+
21
+ animation-play-state: paused;
22
+ }
23
+ .@{className}-enter.@{className}-enter-active,
24
+ .@{className}-appear.@{className}-appear-active {
25
+ animation-name: ~'@{keyframeName}In';
26
+ animation-play-state: running;
27
+ }
28
+ .@{className}-leave.@{className}-leave-active {
29
+ animation-name: ~'@{keyframeName}Out';
30
+ animation-play-state: running;
31
+ pointer-events: none;
32
+ }
33
+ }
@@ -0,0 +1,16 @@
1
+ .operation-unit() {
2
+ color: @link-color;
3
+ text-decoration: none;
4
+ outline: none;
5
+ cursor: pointer;
6
+ transition: color 0.3s;
7
+
8
+ &:focus,
9
+ &:hover {
10
+ color: @link-hover-color;
11
+ }
12
+
13
+ &:active {
14
+ color: @link-active-color;
15
+ }
16
+ }
@@ -0,0 +1,11 @@
1
+ .reset-component() {
2
+ box-sizing: border-box;
3
+ margin: 0;
4
+ padding: 0;
5
+ color: @text-color;
6
+ font-size: @font-size-base;
7
+ font-variant: @font-variant-base;
8
+ line-height: @line-height-base;
9
+ list-style: none;
10
+ font-feature-settings: @font-feature-settings-base;
11
+ }
@@ -0,0 +1,44 @@
1
+ .roundedArrow(@width, @outer-radius, @bg-color: var(--antd-arrow-background-color)) {
2
+ @corner-height: unit(((@outer-radius) * (1 - 1 / sqrt(2))));
3
+
4
+ @width-without-unit: unit(@width);
5
+ @outer-radius-without-unit: unit(@outer-radius);
6
+ @inner-radius-without-unit: unit(@arrow-border-radius);
7
+
8
+ @a-x: @width-without-unit - @corner-height;
9
+ @a-y: 2 * @width-without-unit + @corner-height;
10
+ @b-x: @a-x + @outer-radius-without-unit * (1 / sqrt(2));
11
+ @b-y: 2 * @width-without-unit;
12
+ @c-x: 2 * @width-without-unit - @inner-radius-without-unit;
13
+ @c-y: 2 * @width-without-unit;
14
+ @d-x: 2 * @width-without-unit;
15
+ @d-y: 2 * @width-without-unit - @inner-radius-without-unit;
16
+ @e-x: 2 * @width-without-unit;
17
+ @e-y: @f-y + @outer-radius-without-unit * (1 / sqrt(2));
18
+ @f-x: 2 * @width-without-unit + @corner-height;
19
+ @f-y: @width-without-unit - @corner-height;
20
+ @g-x: @f-x - 1;
21
+ @g-y: @f-y;
22
+ @h-x: @a-x;
23
+ @h-y: @a-y - 1;
24
+
25
+ border-radius: 0 0 @arrow-border-radius;
26
+ pointer-events: none;
27
+
28
+ &::before {
29
+ position: absolute;
30
+ top: -@width;
31
+ left: -@width;
32
+ width: @width * 3;
33
+ height: @width * 3;
34
+ background: @bg-color;
35
+ // Hack firefox: https://github.com/ant-design/ant-design/pull/33710#issuecomment-1015287825
36
+ background-repeat: no-repeat;
37
+ background-position: ceil(-@width + 1px) ceil(-@width + 1px);
38
+ content: '';
39
+ clip-path: inset(33% 33%); // For browsers that do not support path()
40
+ clip-path: path(
41
+ 'M @{a-x} @{a-y} A @{outer-radius-without-unit} @{outer-radius-without-unit} 0 0 1 @{b-x} @{b-y} L @{c-x} @{c-y} A @{inner-radius-without-unit} @{inner-radius-without-unit} 0 0 0 @{d-x} @{d-y} L @{e-x} @{e-y} A @{outer-radius-without-unit} @{outer-radius-without-unit} 0 0 1 @{f-x} @{f-y} L @{g-x} @{g-y} L @{h-x} @{h-y} Z'
42
+ );
43
+ }
44
+ }
@@ -0,0 +1,10 @@
1
+ // Sizing shortcuts
2
+
3
+ .size(@width; @height) {
4
+ width: @width;
5
+ height: @height;
6
+ }
7
+
8
+ .square(@size) {
9
+ .size(@size; @size);
10
+ }
@@ -0,0 +1,58 @@
1
+ // =============== Common ===============
2
+ .typography-paragraph() {
3
+ margin-bottom: 1em;
4
+ }
5
+
6
+ .typography-title(@fontSize; @fontWeight; @lineHeight; @headingColor; @headingMarginBottom;) {
7
+ margin-bottom: @headingMarginBottom;
8
+ color: @headingColor;
9
+ font-weight: @fontWeight;
10
+ font-size: @fontSize;
11
+ line-height: @lineHeight;
12
+ }
13
+
14
+ .typography-title-1() {
15
+ .typography-title(
16
+ @heading-1-size,
17
+ @typography-title-font-weight,
18
+ 1.23,
19
+ @heading-color,
20
+ @typography-title-margin-bottom
21
+ );
22
+ }
23
+ .typography-title-2() {
24
+ .typography-title(
25
+ @heading-2-size,
26
+ @typography-title-font-weight,
27
+ 1.35,
28
+ @heading-color,
29
+ @typography-title-margin-bottom
30
+ );
31
+ }
32
+ .typography-title-3() {
33
+ .typography-title(
34
+ @heading-3-size,
35
+ @typography-title-font-weight,
36
+ 1.35,
37
+ @heading-color,
38
+ @typography-title-margin-bottom
39
+ );
40
+ }
41
+ .typography-title-4() {
42
+ .typography-title(
43
+ @heading-4-size,
44
+ @typography-title-font-weight,
45
+ 1.4,
46
+ @heading-color,
47
+ @typography-title-margin-bottom
48
+ );
49
+ }
50
+ .typography-title-5() {
51
+ .typography-title(
52
+ @heading-5-size,
53
+ @typography-title-font-weight,
54
+ 1.5,
55
+ @heading-color,
56
+ @typography-title-margin-bottom
57
+ );
58
+ }