@douyinfe/semi-ui 2.41.2 โ†’ 2.42.0-beta.0

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 (64) hide show
  1. package/README.md +115 -10
  2. package/dist/css/semi.css +28 -7
  3. package/dist/css/semi.min.css +1 -1
  4. package/dist/umd/semi-ui.js +1450 -1744
  5. package/dist/umd/semi-ui.js.map +1 -1
  6. package/dist/umd/semi-ui.min.js +1 -1
  7. package/dist/umd/semi-ui.min.js.map +1 -1
  8. package/lib/cjs/button/splitButtonGroup.d.ts +2 -0
  9. package/lib/cjs/button/splitButtonGroup.js +14 -0
  10. package/lib/cjs/collapse/item.d.ts +2 -1
  11. package/lib/cjs/collapse/item.js +4 -1
  12. package/lib/cjs/form/baseForm.d.ts +12 -10
  13. package/lib/cjs/form/baseForm.js +17 -13
  14. package/lib/cjs/form/hoc/withField.js +13 -11
  15. package/lib/cjs/form/interface.d.ts +5 -3
  16. package/lib/cjs/inputNumber/index.js +1 -1
  17. package/lib/cjs/modal/confirm.d.ts +1 -1
  18. package/lib/cjs/table/ResizableHeaderCell.d.ts +2 -0
  19. package/lib/cjs/table/ResizableHeaderCell.js +6 -4
  20. package/lib/cjs/table/TableHeader.d.ts +2 -2
  21. package/lib/cjs/table/TableHeaderRow.d.ts +2 -1
  22. package/lib/cjs/table/TableHeaderRow.js +3 -0
  23. package/lib/cjs/table/interface.d.ts +2 -1
  24. package/lib/cjs/toast/index.d.ts +18 -0
  25. package/lib/cjs/toast/index.js +49 -4
  26. package/lib/cjs/toast/toast.d.ts +11 -0
  27. package/lib/cjs/toast/toast.js +22 -2
  28. package/lib/cjs/tooltip/index.d.ts +1 -1
  29. package/lib/cjs/tooltip/index.js +2 -1
  30. package/lib/cjs/tree/treeNode.js +1 -2
  31. package/lib/cjs/typography/base.js +1 -3
  32. package/lib/cjs/upload/fileCard.d.ts +13 -2
  33. package/lib/cjs/upload/fileCard.js +52 -11
  34. package/lib/cjs/upload/index.d.ts +4 -0
  35. package/lib/cjs/upload/index.js +16 -4
  36. package/lib/es/button/splitButtonGroup.d.ts +2 -0
  37. package/lib/es/button/splitButtonGroup.js +14 -0
  38. package/lib/es/collapse/item.d.ts +2 -1
  39. package/lib/es/collapse/item.js +4 -1
  40. package/lib/es/form/baseForm.d.ts +12 -10
  41. package/lib/es/form/baseForm.js +17 -13
  42. package/lib/es/form/hoc/withField.js +14 -12
  43. package/lib/es/form/interface.d.ts +5 -3
  44. package/lib/es/inputNumber/index.js +1 -1
  45. package/lib/es/modal/confirm.d.ts +1 -1
  46. package/lib/es/table/ResizableHeaderCell.d.ts +2 -0
  47. package/lib/es/table/ResizableHeaderCell.js +6 -4
  48. package/lib/es/table/TableHeader.d.ts +2 -2
  49. package/lib/es/table/TableHeaderRow.d.ts +2 -1
  50. package/lib/es/table/TableHeaderRow.js +3 -0
  51. package/lib/es/table/interface.d.ts +2 -1
  52. package/lib/es/toast/index.d.ts +18 -0
  53. package/lib/es/toast/index.js +49 -4
  54. package/lib/es/toast/toast.d.ts +11 -0
  55. package/lib/es/toast/toast.js +22 -2
  56. package/lib/es/tooltip/index.d.ts +1 -1
  57. package/lib/es/tooltip/index.js +2 -1
  58. package/lib/es/tree/treeNode.js +1 -2
  59. package/lib/es/typography/base.js +1 -3
  60. package/lib/es/upload/fileCard.d.ts +13 -2
  61. package/lib/es/upload/fileCard.js +52 -9
  62. package/lib/es/upload/index.d.ts +4 -0
  63. package/lib/es/upload/index.js +16 -4
  64. package/package.json +12 -8
package/README.md CHANGED
@@ -1,5 +1,60 @@
1
- > React component library based on `@douyinfe/semi-foundation`
2
- ## Install
1
+ <div align="center">
2
+ <article style="display: flex; flex-direction: column; align-items: center; justify-content: center;">
3
+ <p align="center"><img width="300" src="https://lf1-cdn-tos.bytescm.com/obj/ttfe/ies/semi/SemiLogo/Logo_1576122865926.png" /></p>
4
+ <h1 style="width: 100%; text-align: center;">Semi-UI</h1>
5
+ <p>
6
+ A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.
7
+ </p>
8
+ </article>
9
+
10
+ <div align="center">
11
+
12
+ [![LICENSE][license-badge]][license-url] [![NPM][npm-badge]][npm-url] [![CONTRIBUTORS][contributors-badge]][contributors-url] ![Design Token][Design Token] [![FIGMA][figma-badge]][figma-url]
13
+ [![BUILD-JS][build-js-badge]][build-js-url] [![BUILD-CSS][build-css-badge]][build-css-url] [![CODECOV][codecov-badge]][codecov-url] [![Chromatic][chromatic-badge]][chromatic-url] [![Cypress][cypress-badge]][cypress-url]
14
+ [![Twitter Follow](https://img.shields.io/twitter/follow/SemiDesignUI?style=social)](https://twitter.com/SemiDesignUI)
15
+
16
+ [npm-badge]: https://img.shields.io/npm/v/@douyinfe/semi-ui.svg
17
+ [contributors-badge]: https://img.shields.io/github/contributors/DouyinFE/semi-design
18
+ [contributors-url]: https://github.com/DouyinFE/semi-design/graphs/contributors
19
+ [Design Token]: https://img.shields.io/badge/Design%20Token-2739%2B-brightgreen
20
+ [npm-url]: https://www.npmjs.com/package/@douyinfe/semi-ui
21
+ [figma-badge]: https://img.shields.io/badge/Figma-UIKit-%2318a0fb
22
+ [figma-url]: https://www.figma.com/@semi
23
+
24
+ [license-badge]: https://img.shields.io/npm/l/@douyinfe/semi-ui
25
+ [license-url]: https://github.com/DouyinFE/semi-design/blob/main/LICENSE
26
+ [codecov-badge]: https://img.shields.io/codecov/c/gh/DouyinFE/semi-design
27
+ [codecov-url]: https://app.codecov.io/gh/DouyinFE/semi-design
28
+ [chromatic-badge]: https://img.shields.io/badge/test-chromatic-brightgreen
29
+ [chromatic-url]: https://www.chromatic.com/
30
+ [cypress-badge]: https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/k83u7j&style=flat&logo=cypress
31
+ [cypress-url]: https://dashboard.cypress.io/projects/k83u7j/runs
32
+
33
+
34
+ [build-js-badge]: https://img.badgesize.io/https:/unpkg.com/@douyinfe/semi-ui/dist/umd/semi-ui.min.js?label=semi.min.js&compression=gzip
35
+ [build-js-url]: https://unpkg.com/browse/@douyinfe/semi-ui/dist/umd/semi-ui.min.js
36
+ [build-css-badge]: https://img.badgesize.io/https:/unpkg.com/@douyinfe/semi-ui/dist/css/semi.min.css?label=semi.min.css&compression=gzip
37
+ [build-css-url]: https://unpkg.com/browse/@douyinfe/semi-ui/dist/css/semi.min.css
38
+
39
+
40
+ </div>
41
+
42
+ </div>
43
+
44
+ # ๐ŸŽ‰ Features
45
+
46
+ - ๐Ÿ’ช Up to 60+ high-quality Components.
47
+ - ๐Ÿ’… Code2Design, automatically generate Figma UI Kit according to different themes, keep same between design and code
48
+ - ๐Ÿš€ Powerful Design2Code support, convert figma draft to code in a few seconds
49
+ - ๐Ÿ’• Complete A11y support, follows W3C standards to provide keyboard interaction, focus management and ARIA for all components
50
+ - ๐Ÿ’… Up to 2700+ Design Tokens can be easily modify by Semi Design system management, make Semi Design to Any Design quickly.
51
+ - ๐ŸŒ Internationalization Support for Dozens of Languages, timezone, RTL support
52
+ - โš™๏ธ Strict quality assurance, covering unit testing, E2E testing, visual testing
53
+ - ๐Ÿ‘ Written in Typescript, friendly Static Type Support. Based on Foundation/Adapter architecture, easy to read and contribute
54
+ - ๐Ÿฅณ SSR (Server Side Rendering) Compatible.
55
+
56
+ # ๐Ÿ”ฅ Install
57
+
3
58
  ```sh
4
59
  # with npm
5
60
  npm install @douyinfe/semi-ui
@@ -9,7 +64,7 @@ yarn add @douyinfe/semi-ui
9
64
 
10
65
  ```
11
66
 
12
- ## Usage
67
+ # ๐Ÿ‘ Usage
13
68
 
14
69
  Here is a quick example to get you started, it's all you need:
15
70
 
@@ -20,7 +75,7 @@ import { Button, Switch } from '@douyinfe/semi-ui';
20
75
 
21
76
  const App = () => (
22
77
  <>
23
- <Button type="primary">primary button</Button>
78
+ <Button type='primary'>primary button</Button>
24
79
  <Switch size='large' />
25
80
  </>
26
81
  );
@@ -28,12 +83,62 @@ const App = () => (
28
83
  ReactDOM.render(<App />, document.querySelector('#app'));
29
84
  ```
30
85
 
31
- And [Semi UI Doc Site](https://semi.design/en-US/) have hundreds editable examples and live preview, welcome play with those examples.
86
+ And [Semi UI Doc Site](https://semi.design/en-US/) has hundreds of editable examples and live preview, welcome to play with those examples.
87
+
88
+
89
+ # ๐Ÿ“ฐ News about Semi UI
90
+ * [Follow on Twitter](https://twitter.com/SemiDesignUI)
91
+ * [Follow on Medium](https://medium.com/@semi-design)
92
+ * [Follow on Dev.to](https://dev.to/semidesign)
93
+
94
+ # ๐Ÿ“Œ Documentation
95
+ * [Semi DSM](https://semi.design/dsm)
96
+ * [Semi Design2Code](https://semi.design/code/en-US)
97
+ * [Semi Figma Plugin](https://www.figma.com/community/plugin/1166339852662786534/Semi-Design-%E8%AE%BE%E8%AE%A1%E8%BD%AC%E4%BB%A3%E7%A0%81)
98
+ * [Quick Start](https://semi.design/en-US/start/getting-started)
99
+ * [Components Overview](https://semi.design/en-US/start/overview)
100
+ * [Customizing Themes](https://semi.design/en-US/start/customize-theme)
101
+ * [Design Tokens](https://semi.design/en-US/basic/tokens)
102
+ * [Dark Mode](https://semi.design/en-US/start/dark-mode)
103
+ * [Semi Icons](https://semi.design/en-US/basic/icon)
104
+ * [Global Config](https://semi.design/en-US/other/configprovider)
105
+ * [Internationalization](https://semi.design/en-US/other/locale)
106
+ * [FAQ](https://semi.design/en-US/start/faq)
107
+ * [CHANGELOG](https://semi.design/en-US/start/changelog)
108
+
109
+ # ๐Ÿ‘Œ Platform Support
110
+
111
+ Semi UI supports all major modern browsers.
112
+
113
+ |[<img alt="chrome" height="24px" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/chrome/chrome.png" />](https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/chrome/chrome.png)<br>chrome|[<img alt="firefox" height="24px" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/firefox/firefox.png" />](https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/firefox/firefox.png)<br>firefox|[<img alt="safari" height="24px" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/safari/safari.png" />](https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/safari/safari.png)<br>safari|[<img alt="IE/Edge" height="24px" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/edge/edge.png" />](https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/edge/edge.png)<br> IE/Edge|[<img alt="electron" height="24px" src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/electron/electron.png" />](https://cdnjs.cloudflare.com/ajax/libs/browser-logos/70.4.0/electron/electron.png)<br>Electron|
114
+ |--|--|--|--|--|
115
+ | latest 2 versions | latest 2 versions | latest 2 versions | Edge | latest 2 versions |
116
+
117
+ # ๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ User Group
118
+
119
+ Join [User Group](https://bytedance.feishu.cn/docs/doccnw93Dujm3UCkHRDTMTm1qwe#) on Feishu / Lark
120
+
121
+ # ๐Ÿ’– Thanks
122
+
123
+ <a href="https://www.chromatic.com/"><img src="https://user-images.githubusercontent.com/321738/84662277-e3db4f80-af1b-11ea-88f5-91d67a5e59f6.png" width="153" height="30" alt="Chromatic" /></a>
124
+
125
+ Thanks to [Chromatic](https://www.chromatic.com/) for providing the visual testing platform that helps us review UI changes and catch visual regressions.
126
+
127
+ <a href="https://www.cypress.io/"><img src="https://user-images.githubusercontent.com/26477537/147624641-1274a91d-bc4c-463e-af1a-dbf15de54c49.png" width="90" height="30" alt="Cypress" /></a>
128
+
129
+ Thanks to [Cypress](https://www.cypress.io/) for providing E2E testing.
130
+
131
+ ## ๐Ÿ‘ Contributing
132
+ Thanks to all the people who already contributed!
133
+
134
+ <a href="https://github.com/DouyinFE/semi-design/graphs/contributors">
135
+ <img src="https://contrib.rocks/image?repo=DouyinFE/semi-design" />
136
+ </a>
137
+
138
+ Read the contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Semi UI.
32
139
 
33
- ## Documentation
140
+ See [CONTRIBUTING](CONTRIBUTING-en-US.md) documentation.
34
141
 
35
- More to see [Semi Design Site](https://semi.design/en-US/).
36
-
37
- ## License
142
+ # ๐ŸŽˆ License
38
143
 
39
- [MIT](LICENSE)
144
+ Semi UI is [MIT Licensed](LICENSE)
package/dist/css/semi.css CHANGED
@@ -1614,11 +1614,11 @@ body {
1614
1614
  border-radius: 0;
1615
1615
  margin-right: 1px;
1616
1616
  }
1617
- .semi-button-split :first-child {
1617
+ .semi-button-split .semi-button-first {
1618
1618
  border-top-left-radius: var(--semi-border-radius-small);
1619
1619
  border-bottom-left-radius: var(--semi-border-radius-small);
1620
1620
  }
1621
- .semi-button-split :last-child {
1621
+ .semi-button-split .semi-button-last {
1622
1622
  border-top-right-radius: var(--semi-border-radius-small);
1623
1623
  border-bottom-right-radius: var(--semi-border-radius-small);
1624
1624
  margin-right: unset;
@@ -15404,6 +15404,7 @@ img[src=""], img:not([src]) {
15404
15404
  padding-bottom: 8px;
15405
15405
  cursor: not-allowed;
15406
15406
  height: 20px;
15407
+ box-sizing: content-box;
15407
15408
  }
15408
15409
 
15409
15410
  .semi-select-borderless:not(:focus-within):not(:hover) {
@@ -19315,13 +19316,29 @@ img[src=""], img:not([src]) {
19315
19316
  pointer-events: none;
19316
19317
  }
19317
19318
  .semi-toast-wrapper {
19318
- pointer-events: none;
19319
19319
  position: fixed;
19320
+ height: 0;
19320
19321
  top: 0;
19321
19322
  width: 100%;
19322
- text-align: center;
19323
+ display: flex;
19324
+ justify-content: center;
19323
19325
  z-index: 1010;
19324
19326
  }
19327
+ .semi-toast-wrapper .semi-toast-innerWrapper {
19328
+ width: fit-content;
19329
+ height: fit-content;
19330
+ }
19331
+ .semi-toast-wrapper .semi-toast-innerWrapper-hover .semi-toast-zero-height-wrapper {
19332
+ perspective: unset;
19333
+ perspective-origin: center center;
19334
+ }
19335
+ .semi-toast-zero-height-wrapper {
19336
+ transition: all 300ms cubic-bezier(0.22, 0.57, 0.02, 1.2);
19337
+ perspective-origin: center 280px;
19338
+ perspective: 280px;
19339
+ height: 0;
19340
+ overflow: visible;
19341
+ }
19325
19342
  .semi-toast-content {
19326
19343
  pointer-events: all;
19327
19344
  box-shadow: var(--semi-shadow-elevated);
@@ -19947,9 +19964,7 @@ img[src=""], img:not([src]) {
19947
19964
  .semi-tree-option-list .semi-tree-option-collapsed .semi-tree-option-expand-icon {
19948
19965
  transform: rotate(270deg);
19949
19966
  }
19950
- .semi-tree-option-list .semi-tree-option-highlight,
19951
- .semi-tree-option-list .semi-tree-option-highlight .semi-checkbox-addon, .semi-tree-option-list .semi-tree-option-filtered,
19952
- .semi-tree-option-list .semi-tree-option-filtered .semi-checkbox-addon {
19967
+ .semi-tree-option-list .semi-tree-option-highlight {
19953
19968
  font-weight: 600;
19954
19969
  color: var(--semi-color-primary);
19955
19970
  }
@@ -21373,6 +21388,12 @@ p.semi-typography-extended,
21373
21388
  left: 50%;
21374
21389
  transform: translate3D(-50%, -50%, 0);
21375
21390
  }
21391
+ .semi-upload-picture-file-card-preview-fallback {
21392
+ background-color: var(--semi-color-fill-0);
21393
+ border: 2px var(--semi-color-border);
21394
+ color: var(--semi-color-tertiary);
21395
+ border-radius: var(--semi-border-radius-small);
21396
+ }
21376
21397
  .semi-upload-picture-file-card-pic-info {
21377
21398
  display: inline-flex;
21378
21399
  box-sizing: border-box;