@tendaui/react 1.1.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 (244) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/es/_chunks/dep-0QH2Ee4R.js +34 -0
  4. package/es/_chunks/dep-0QH2Ee4R.js.map +1 -0
  5. package/es/_chunks/dep-B7HmDtze.js +199 -0
  6. package/es/_chunks/dep-B7HmDtze.js.map +1 -0
  7. package/es/_chunks/dep-BH5n5r1M.js +55 -0
  8. package/es/_chunks/dep-BH5n5r1M.js.map +1 -0
  9. package/es/_chunks/dep-BP0-apUT.js +9 -0
  10. package/es/_chunks/dep-BP0-apUT.js.map +1 -0
  11. package/es/_chunks/dep-C1XcmShP.js +18 -0
  12. package/es/_chunks/dep-C1XcmShP.js.map +1 -0
  13. package/es/_chunks/dep-C36au4Ip.js +104 -0
  14. package/es/_chunks/dep-C36au4Ip.js.map +1 -0
  15. package/es/_chunks/dep-CgyDw_YI.js +20 -0
  16. package/es/_chunks/dep-CgyDw_YI.js.map +1 -0
  17. package/es/_chunks/dep-CoIiHOgo.js +162 -0
  18. package/es/_chunks/dep-CoIiHOgo.js.map +1 -0
  19. package/es/_chunks/dep-Cwish4GD.js +29 -0
  20. package/es/_chunks/dep-Cwish4GD.js.map +1 -0
  21. package/es/_chunks/dep-CzLhKWCf.js +56 -0
  22. package/es/_chunks/dep-CzLhKWCf.js.map +1 -0
  23. package/es/_chunks/dep-D-UKOauR.js +12 -0
  24. package/es/_chunks/dep-D-UKOauR.js.map +1 -0
  25. package/es/_chunks/dep-D6YxJv-F.js +31 -0
  26. package/es/_chunks/dep-D6YxJv-F.js.map +1 -0
  27. package/es/_chunks/dep-D7LanWes.js +171 -0
  28. package/es/_chunks/dep-D7LanWes.js.map +1 -0
  29. package/es/_chunks/dep-D8jki30S.js +31 -0
  30. package/es/_chunks/dep-D8jki30S.js.map +1 -0
  31. package/es/_chunks/dep-DB5wmwh1.js +48 -0
  32. package/es/_chunks/dep-DB5wmwh1.js.map +1 -0
  33. package/es/_chunks/dep-DGvfel3I.js +16 -0
  34. package/es/_chunks/dep-DGvfel3I.js.map +1 -0
  35. package/es/_chunks/dep-DHWwZ2Nj.js +139 -0
  36. package/es/_chunks/dep-DHWwZ2Nj.js.map +1 -0
  37. package/es/_chunks/dep-DN7d1SzH.js +24 -0
  38. package/es/_chunks/dep-DN7d1SzH.js.map +1 -0
  39. package/es/_chunks/dep-DZ_0EvBk.js +440 -0
  40. package/es/_chunks/dep-DZ_0EvBk.js.map +1 -0
  41. package/es/_chunks/dep-Dk2xX8lh.js +691 -0
  42. package/es/_chunks/dep-Dk2xX8lh.js.map +1 -0
  43. package/es/_chunks/dep-DwWrhxkd.js +26 -0
  44. package/es/_chunks/dep-DwWrhxkd.js.map +1 -0
  45. package/es/_chunks/dep-EcrDKDlu.js +1677 -0
  46. package/es/_chunks/dep-EcrDKDlu.js.map +1 -0
  47. package/es/_chunks/dep-PPA-yoAy.js +16 -0
  48. package/es/_chunks/dep-PPA-yoAy.js.map +1 -0
  49. package/es/_chunks/dep-U1T8CQY9.js +4 -0
  50. package/es/_chunks/dep-U1T8CQY9.js.map +1 -0
  51. package/es/_chunks/dep-bWaVq_y3.js +14 -0
  52. package/es/_chunks/dep-bWaVq_y3.js.map +1 -0
  53. package/es/_chunks/dep-u1x3x6MJ.js +9 -0
  54. package/es/_chunks/dep-u1x3x6MJ.js.map +1 -0
  55. package/es/alert/Alert.js +153 -0
  56. package/es/alert/Alert.js.map +1 -0
  57. package/es/alert/index.js +23 -0
  58. package/es/alert/index.js.map +1 -0
  59. package/es/alert/style/css.js +1 -0
  60. package/es/alert/style/index.css +172 -0
  61. package/es/alert/style/index.js +2 -0
  62. package/es/alert/style/index.js.map +1 -0
  63. package/es/badge/Badge.js +81 -0
  64. package/es/badge/Badge.js.map +1 -0
  65. package/es/badge/index.js +15 -0
  66. package/es/badge/index.js.map +1 -0
  67. package/es/badge/style/css.js +1 -0
  68. package/es/badge/style/index.css +60 -0
  69. package/es/badge/style/index.js +2 -0
  70. package/es/badge/style/index.js.map +1 -0
  71. package/es/button/Button.js +94 -0
  72. package/es/button/Button.js.map +1 -0
  73. package/es/button/index.js +28 -0
  74. package/es/button/index.js.map +1 -0
  75. package/es/button/style/css.js +1 -0
  76. package/es/button/style/index.css +1206 -0
  77. package/es/button/style/index.js +2 -0
  78. package/es/button/style/index.js.map +1 -0
  79. package/es/checkbox/Checkbox.js +17 -0
  80. package/es/checkbox/Checkbox.js.map +1 -0
  81. package/es/checkbox/CheckboxGroup.js +17 -0
  82. package/es/checkbox/CheckboxGroup.js.map +1 -0
  83. package/es/checkbox/index.js +22 -0
  84. package/es/checkbox/index.js.map +1 -0
  85. package/es/checkbox/style/css.js +1 -0
  86. package/es/checkbox/style/index.css +151 -0
  87. package/es/checkbox/style/index.js +2 -0
  88. package/es/checkbox/style/index.js.map +1 -0
  89. package/es/common/Check.js +101 -0
  90. package/es/common/Check.js.map +1 -0
  91. package/es/common/FakeArrow.js +28 -0
  92. package/es/common/FakeArrow.js.map +1 -0
  93. package/es/common/PluginContainer.js +19 -0
  94. package/es/common/PluginContainer.js.map +1 -0
  95. package/es/common/Portal.js +53 -0
  96. package/es/common/Portal.js.map +1 -0
  97. package/es/config-provider/ConfigContext.js +17 -0
  98. package/es/config-provider/ConfigContext.js.map +1 -0
  99. package/es/config-provider/ConfigProvider.js +45 -0
  100. package/es/config-provider/ConfigProvider.js.map +1 -0
  101. package/es/config-provider/index.js +12 -0
  102. package/es/config-provider/index.js.map +1 -0
  103. package/es/dialog/Dialog.js +575 -0
  104. package/es/dialog/Dialog.js.map +1 -0
  105. package/es/dialog/DialogCard.js +28 -0
  106. package/es/dialog/DialogCard.js.map +1 -0
  107. package/es/dialog/index.js +44 -0
  108. package/es/dialog/index.js.map +1 -0
  109. package/es/dialog/plugin.js +199 -0
  110. package/es/dialog/plugin.js.map +1 -0
  111. package/es/dialog/style/css.js +1 -0
  112. package/es/dialog/style/index.css +510 -0
  113. package/es/dialog/style/index.js +2 -0
  114. package/es/dialog/style/index.js.map +1 -0
  115. package/es/form/Form.js +190 -0
  116. package/es/form/Form.js.map +1 -0
  117. package/es/form/FormContext.js +38 -0
  118. package/es/form/FormContext.js.map +1 -0
  119. package/es/form/FormItem.js +39 -0
  120. package/es/form/FormItem.js.map +1 -0
  121. package/es/form/FormList.js +306 -0
  122. package/es/form/FormList.js.map +1 -0
  123. package/es/form/hooks/useFormItemStyle.js +10 -0
  124. package/es/form/hooks/useFormItemStyle.js.map +1 -0
  125. package/es/form/hooks/useInstance.js +326 -0
  126. package/es/form/hooks/useInstance.js.map +1 -0
  127. package/es/form/index.js +47 -0
  128. package/es/form/index.js.map +1 -0
  129. package/es/form/style/css.js +1 -0
  130. package/es/form/style/index.css +296 -0
  131. package/es/form/style/index.js +2 -0
  132. package/es/form/style/index.js.map +1 -0
  133. package/es/form/utils/index.js +75 -0
  134. package/es/form/utils/index.js.map +1 -0
  135. package/es/hooks/useDragSorter.js +137 -0
  136. package/es/hooks/useDragSorter.js.map +1 -0
  137. package/es/index.js +103 -0
  138. package/es/index.js.map +1 -0
  139. package/es/input/Input.js +375 -0
  140. package/es/input/Input.js.map +1 -0
  141. package/es/input/InputGroup.js +23 -0
  142. package/es/input/InputGroup.js.map +1 -0
  143. package/es/input/index.js +23 -0
  144. package/es/input/index.js.map +1 -0
  145. package/es/input/style/css.js +1 -0
  146. package/es/input/style/index.css +450 -0
  147. package/es/input/style/index.js +2 -0
  148. package/es/input/style/index.js.map +1 -0
  149. package/es/loading/Gradient.js +86 -0
  150. package/es/loading/Gradient.js.map +1 -0
  151. package/es/loading/Loading.js +147 -0
  152. package/es/loading/Loading.js.map +1 -0
  153. package/es/loading/index.js +24 -0
  154. package/es/loading/index.js.map +1 -0
  155. package/es/loading/style/css.js +1 -0
  156. package/es/loading/style/index.css +191 -0
  157. package/es/loading/style/index.js +2 -0
  158. package/es/loading/style/index.js.map +1 -0
  159. package/es/myform/index.js +2 -0
  160. package/es/myform/index.js.map +1 -0
  161. package/es/notification/NotifyContainer.js +78 -0
  162. package/es/notification/NotifyContainer.js.map +1 -0
  163. package/es/notification/NotifyContext.js +149 -0
  164. package/es/notification/NotifyContext.js.map +1 -0
  165. package/es/notification/NotifyItem.js +150 -0
  166. package/es/notification/NotifyItem.js.map +1 -0
  167. package/es/notification/index.js +32 -0
  168. package/es/notification/index.js.map +1 -0
  169. package/es/notification/style/css.js +1 -0
  170. package/es/notification/style/index.css +142 -0
  171. package/es/notification/style/index.js +2 -0
  172. package/es/notification/style/index.js.map +1 -0
  173. package/es/popup/Popup.js +790 -0
  174. package/es/popup/Popup.js.map +1 -0
  175. package/es/popup/index.js +28 -0
  176. package/es/popup/index.js.map +1 -0
  177. package/es/popup/style/css.js +1 -0
  178. package/es/popup/style/index.css +186 -0
  179. package/es/popup/style/index.js +2 -0
  180. package/es/popup/style/index.js.map +1 -0
  181. package/es/portal/Portal.js +48 -0
  182. package/es/portal/Portal.js.map +1 -0
  183. package/es/portal/index.js +7 -0
  184. package/es/portal/index.js.map +1 -0
  185. package/es/select/Option.js +118 -0
  186. package/es/select/Option.js.map +1 -0
  187. package/es/select/OptionGroup.js +9 -0
  188. package/es/select/OptionGroup.js.map +1 -0
  189. package/es/select/PopupContent.js +16 -0
  190. package/es/select/PopupContent.js.map +1 -0
  191. package/es/select/Select.js +709 -0
  192. package/es/select/Select.js.map +1 -0
  193. package/es/select/index.js +66 -0
  194. package/es/select/index.js.map +1 -0
  195. package/es/select/style/css.js +1 -0
  196. package/es/select/style/index.css +437 -0
  197. package/es/select/style/index.js +2 -0
  198. package/es/select/style/index.js.map +1 -0
  199. package/es/select-input/SelectInput.js +202 -0
  200. package/es/select-input/SelectInput.js.map +1 -0
  201. package/es/select-input/hook/useMultiple.js +118 -0
  202. package/es/select-input/hook/useMultiple.js.map +1 -0
  203. package/es/select-input/hook/useSingle.js +105 -0
  204. package/es/select-input/hook/useSingle.js.map +1 -0
  205. package/es/select-input/index.js +51 -0
  206. package/es/select-input/index.js.map +1 -0
  207. package/es/select-input/style/css.js +1 -0
  208. package/es/select-input/style/index.css +0 -0
  209. package/es/select-input/style/index.js +2 -0
  210. package/es/select-input/style/index.js.map +1 -0
  211. package/es/space/index.js +2 -0
  212. package/es/space/index.js.map +1 -0
  213. package/es/style/index.css +490 -0
  214. package/es/style/index.js +2 -0
  215. package/es/style/index.js.map +1 -0
  216. package/es/switch/Switch.js +174 -0
  217. package/es/switch/Switch.js.map +1 -0
  218. package/es/switch/index.js +28 -0
  219. package/es/switch/index.js.map +1 -0
  220. package/es/switch/style/css.js +1 -0
  221. package/es/switch/style/index.css +239 -0
  222. package/es/switch/style/index.js +2 -0
  223. package/es/switch/style/index.js.map +1 -0
  224. package/es/tag/Tag.js +1312 -0
  225. package/es/tag/Tag.js.map +1 -0
  226. package/es/tag/index.js +21 -0
  227. package/es/tag/index.js.map +1 -0
  228. package/es/tag/style/css.js +1 -0
  229. package/es/tag/style/index.css +236 -0
  230. package/es/tag/style/index.js +2 -0
  231. package/es/tag/style/index.js.map +1 -0
  232. package/es/tag-input/TagInput.js +360 -0
  233. package/es/tag-input/TagInput.js.map +1 -0
  234. package/es/tag-input/hooks/useTagList.js +167 -0
  235. package/es/tag-input/hooks/useTagList.js.map +1 -0
  236. package/es/tag-input/index.js +35 -0
  237. package/es/tag-input/index.js.map +1 -0
  238. package/es/tag-input/style/css.js +1 -0
  239. package/es/tag-input/style/index.css +223 -0
  240. package/es/tag-input/style/index.js +2 -0
  241. package/es/tag-input/style/index.js.map +1 -0
  242. package/es/tag-input/useTagList.js +167 -0
  243. package/es/tag-input/useTagList.js.map +1 -0
  244. package/package.json +59 -0
@@ -0,0 +1,510 @@
1
+ @-webkit-keyframes tDialogZoomIn {
2
+ 0% {
3
+ opacity: 0;
4
+ -webkit-transform: scale(0.01);
5
+ transform: scale(0.01);
6
+ }
7
+ 100% {
8
+ opacity: 1;
9
+ }
10
+ }
11
+ @keyframes tDialogZoomIn {
12
+ 0% {
13
+ opacity: 0;
14
+ -webkit-transform: scale(0.01);
15
+ transform: scale(0.01);
16
+ }
17
+ 100% {
18
+ opacity: 1;
19
+ }
20
+ }
21
+ @-webkit-keyframes tDialogZoomOut {
22
+ from {
23
+ opacity: 1;
24
+ }
25
+ to {
26
+ opacity: 0;
27
+ -webkit-transform: scale(0.01);
28
+ transform: scale(0.01);
29
+ }
30
+ }
31
+ @keyframes tDialogZoomOut {
32
+ from {
33
+ opacity: 1;
34
+ }
35
+ to {
36
+ opacity: 0;
37
+ -webkit-transform: scale(0.01);
38
+ transform: scale(0.01);
39
+ }
40
+ }
41
+ @-webkit-keyframes tDialogMaskIn {
42
+ from {
43
+ opacity: 0;
44
+ }
45
+ to {
46
+ opacity: 1;
47
+ }
48
+ }
49
+ @keyframes tDialogMaskIn {
50
+ from {
51
+ opacity: 0;
52
+ }
53
+ to {
54
+ opacity: 1;
55
+ }
56
+ }
57
+ @-webkit-keyframes tDialogMaskOut {
58
+ from {
59
+ opacity: 1;
60
+ }
61
+ to {
62
+ opacity: 0;
63
+ }
64
+ }
65
+ @keyframes tDialogMaskOut {
66
+ from {
67
+ opacity: 1;
68
+ }
69
+ to {
70
+ opacity: 0;
71
+ }
72
+ }
73
+ .t-dialog-zoom-enter, .t-dialog-zoom-enter-from, .t-dialog-zoom-appear {
74
+ -webkit-animation-duration: 0.2s;
75
+ animation-duration: 0.2s;
76
+ -webkit-animation-fill-mode: both;
77
+ animation-fill-mode: both;
78
+ -webkit-animation-timing-function: cubic-bezier(0, 0, 0.15, 1);
79
+ animation-timing-function: cubic-bezier(0, 0, 0.15, 1);
80
+ -webkit-animation-play-state: paused;
81
+ animation-play-state: paused;
82
+ }
83
+ .t-dialog-zoom-exit {
84
+ -webkit-animation-duration: 0.2s;
85
+ animation-duration: 0.2s;
86
+ -webkit-animation-fill-mode: both;
87
+ animation-fill-mode: both;
88
+ -webkit-animation-timing-function: cubic-bezier(0.38, 0, 0.24, 1);
89
+ animation-timing-function: cubic-bezier(0.38, 0, 0.24, 1);
90
+ -webkit-animation-play-state: paused;
91
+ animation-play-state: paused;
92
+ }
93
+ .t-dialog-zoom-enter-active, .t-dialog-zoom-appear-active {
94
+ -webkit-animation-name: tDialogZoomIn;
95
+ animation-name: tDialogZoomIn;
96
+ -webkit-animation-play-state: running;
97
+ animation-play-state: running;
98
+ -webkit-animation-fill-mode: both;
99
+ animation-fill-mode: both;
100
+ }
101
+ .t-dialog-zoom-exit-active {
102
+ -webkit-animation-name: tDialogZoomOut;
103
+ animation-name: tDialogZoomOut;
104
+ -webkit-animation-play-state: running;
105
+ animation-play-state: running;
106
+ -webkit-animation-fill-mode: both;
107
+ animation-fill-mode: both;
108
+ }
109
+
110
+ .t-dialog-fade-enter,
111
+ .t-dialog-fade-appear {
112
+ opacity: 0;
113
+ -webkit-animation-duration: 0.2s;
114
+ animation-duration: 0.2s;
115
+ -webkit-animation-fill-mode: both;
116
+ animation-fill-mode: both;
117
+ -webkit-animation-timing-function: cubic-bezier(0, 0, 0.15, 1);
118
+ animation-timing-function: cubic-bezier(0, 0, 0.15, 1);
119
+ -webkit-animation-play-state: paused;
120
+ animation-play-state: paused;
121
+ }
122
+
123
+ .t-dialog-fade-exit {
124
+ -webkit-animation-duration: 0.2s;
125
+ animation-duration: 0.2s;
126
+ -webkit-animation-fill-mode: both;
127
+ animation-fill-mode: both;
128
+ -webkit-animation-timing-function: cubic-bezier(0, 0, 0.15, 1);
129
+ animation-timing-function: cubic-bezier(0, 0, 0.15, 1);
130
+ -webkit-animation-play-state: paused;
131
+ animation-play-state: paused;
132
+ }
133
+
134
+ .t-dialog-fade-enter.t-dialog-fade-enter-active,
135
+ .t-dialog-fade-appear.t-dialog-fade-appear-active {
136
+ -webkit-animation-name: tDialogFadeIn;
137
+ animation-name: tDialogFadeIn;
138
+ -webkit-animation-play-state: running;
139
+ animation-play-state: running;
140
+ }
141
+
142
+ .t-dialog-fade-exit.t-dialog-fade-exit-active {
143
+ -webkit-animation-name: tDialogFadeOut;
144
+ animation-name: tDialogFadeOut;
145
+ -webkit-animation-play-state: running;
146
+ animation-play-state: running;
147
+ }
148
+
149
+ @-webkit-keyframes tDialogFadeIn {
150
+ 0% {
151
+ opacity: 0;
152
+ }
153
+ 100% {
154
+ opacity: 1;
155
+ }
156
+ }
157
+
158
+ @keyframes tDialogFadeIn {
159
+ 0% {
160
+ opacity: 0;
161
+ }
162
+ 100% {
163
+ opacity: 1;
164
+ }
165
+ }
166
+ @-webkit-keyframes tDialogFadeOut {
167
+ 0% {
168
+ opacity: 1;
169
+ }
170
+ 100% {
171
+ opacity: 0;
172
+ }
173
+ }
174
+ @keyframes tDialogFadeOut {
175
+ 0% {
176
+ opacity: 1;
177
+ }
178
+ 100% {
179
+ opacity: 0;
180
+ }
181
+ }
182
+ .t-dialog {
183
+ font: var(--td-font-body-medium);
184
+ color: var(--td-text-color-primary);
185
+ -webkit-box-sizing: border-box;
186
+ box-sizing: border-box;
187
+ margin: 0;
188
+ padding: 0;
189
+ list-style: none;
190
+ width: 480px;
191
+ background-color: var(--td-bg-color-container);
192
+ position: relative;
193
+ border: 1px solid var(--td-border-level-1-color);
194
+ border-radius: var(--td-radius-large);
195
+ }
196
+ .t-dialog .t-icon.t-is-info {
197
+ color: var(--td-brand-color);
198
+ }
199
+ .t-dialog .t-icon.t-is-success {
200
+ color: var(--td-success-color);
201
+ }
202
+ .t-dialog .t-icon.t-is-warning {
203
+ color: var(--td-warning-color);
204
+ }
205
+ .t-dialog .t-icon.t-is-error {
206
+ color: var(--td-error-color);
207
+ }
208
+ .t-dialog--lock {
209
+ overflow: hidden;
210
+ }
211
+ .t-dialog__header {
212
+ color: var(--td-text-color-primary);
213
+ font: var(--td-font-title-medium);
214
+ font-weight: 600;
215
+ display: -webkit-box;
216
+ display: -ms-flexbox;
217
+ display: flex;
218
+ -webkit-box-align: center;
219
+ -ms-flex-align: center;
220
+ align-items: center;
221
+ word-break: break-word;
222
+ gap: var(--td-comp-margin-s);
223
+ -webkit-box-sizing: border-box;
224
+ box-sizing: border-box;
225
+ }
226
+ .t-dialog__header .t-dialog__header-content {
227
+ display: -webkit-box;
228
+ display: -ms-flexbox;
229
+ display: flex;
230
+ -webkit-box-align: start;
231
+ -ms-flex-align: start;
232
+ align-items: flex-start;
233
+ width: 100%;
234
+ }
235
+ .t-dialog__header .t-icon:not(.t-icon-close) {
236
+ font-size: calc(var(--td-font-size-body-large) + 8px);
237
+ display: -webkit-inline-box;
238
+ display: -ms-inline-flexbox;
239
+ display: inline-flex;
240
+ -webkit-box-align: center;
241
+ -ms-flex-align: center;
242
+ align-items: center;
243
+ margin-right: var(--td-comp-margin-s);
244
+ -ms-flex-negative: 0;
245
+ flex-shrink: 0;
246
+ }
247
+ .t-dialog__header--fullscreen {
248
+ background-color: var(--td-bg-color-secondarycontainer);
249
+ min-height: var(--td-comp-size-xxxl);
250
+ -webkit-box-pack: end;
251
+ -ms-flex-pack: end;
252
+ justify-content: flex-end;
253
+ display: -webkit-box;
254
+ display: -ms-flexbox;
255
+ display: flex;
256
+ -webkit-box-align: center;
257
+ -ms-flex-align: center;
258
+ align-items: center;
259
+ -webkit-box-orient: horizontal;
260
+ -webkit-box-direction: normal;
261
+ -ms-flex-direction: row;
262
+ flex-direction: row;
263
+ padding: 0 var(--td-comp-paddingLR-xxl);
264
+ }
265
+ .t-dialog__header--fullscreen .t-dialog__header-content {
266
+ -webkit-box-sizing: border-box;
267
+ box-sizing: border-box;
268
+ display: -webkit-box;
269
+ display: -ms-flexbox;
270
+ display: flex;
271
+ -webkit-box-pack: center;
272
+ -ms-flex-pack: center;
273
+ justify-content: center;
274
+ -webkit-box-align: center;
275
+ -ms-flex-align: center;
276
+ align-items: center;
277
+ }
278
+ .t-dialog__body::-webkit-scrollbar {
279
+ width: 6px;
280
+ height: 6px;
281
+ }
282
+ .t-dialog__body::-webkit-scrollbar-thumb {
283
+ border: 0px solid transparent;
284
+ background-clip: content-box;
285
+ background-color: var(--td-scrollbar-color);
286
+ border-radius: calc(6px * 2 - 1px);
287
+ }
288
+ .t-dialog__body::-webkit-scrollbar-thumb:vertical:hover, .t-dialog__body::-webkit-scrollbar-thumb:horizontal:hover {
289
+ background-color: var(--td-scrollbar-hover-color);
290
+ }
291
+ .t-dialog__body {
292
+ color: var(--td-text-color-secondary);
293
+ font: var(--td-font-body-medium);
294
+ overflow: auto;
295
+ padding: var(--td-comp-paddingTB-l) 0;
296
+ word-break: break-word;
297
+ }
298
+ .t-dialog__body__icon, .t-dialog__body--icon {
299
+ padding: var(--td-comp-paddingTB-l) 0;
300
+ }
301
+ .t-dialog__body--fullscreen::-webkit-scrollbar {
302
+ width: 6px;
303
+ height: 6px;
304
+ }
305
+ .t-dialog__body--fullscreen::-webkit-scrollbar-thumb {
306
+ border: 0px solid transparent;
307
+ background-clip: content-box;
308
+ background-color: var(--td-scrollbar-color);
309
+ border-radius: calc(6px * 2 - 1px);
310
+ }
311
+ .t-dialog__body--fullscreen::-webkit-scrollbar-thumb:vertical:hover, .t-dialog__body--fullscreen::-webkit-scrollbar-thumb:horizontal:hover {
312
+ background-color: var(--td-scrollbar-hover-color);
313
+ }
314
+ .t-dialog__body--fullscreen {
315
+ -webkit-box-sizing: border-box;
316
+ box-sizing: border-box;
317
+ padding: var(--td-comp-paddingTB-xl) var(--td-comp-paddingLR-xxl);
318
+ height: calc(100% - var(--td-comp-size-xxxl) - var(--td-comp-size-xxxxl));
319
+ overflow: auto;
320
+ }
321
+ .t-dialog__body--fullscreen--without-footer {
322
+ -webkit-box-sizing: border-box;
323
+ box-sizing: border-box;
324
+ padding: var(--td-comp-paddingTB-xl) var(--td-comp-paddingLR-xxl);
325
+ height: calc(100% - var(--td-comp-size-xxxl));
326
+ overflow: auto;
327
+ }
328
+ .t-dialog__footer {
329
+ width: 100%;
330
+ text-align: right;
331
+ padding: var(--td-comp-paddingTB-l) 0 0;
332
+ }
333
+ .t-dialog__footer .t-button + .t-button {
334
+ margin-left: var(--td-comp-margin-s);
335
+ }
336
+ .t-dialog__footer--fullscreen {
337
+ min-height: var(--td-comp-size-xxxxl);
338
+ padding: 0 var(--td-comp-paddingLR-xxl) var(--td-comp-paddingTB-xxl);
339
+ -webkit-box-sizing: border-box;
340
+ box-sizing: border-box;
341
+ }
342
+ .t-dialog--default {
343
+ padding: var(--td-comp-paddingTB-xxl) var(--td-comp-paddingLR-xxl);
344
+ }
345
+ .t-dialog__close {
346
+ font-size: calc(var(--td-font-size-body-large) + 4px);
347
+ color: var(--td-text-color-secondary);
348
+ display: -webkit-box;
349
+ display: -ms-flexbox;
350
+ display: flex;
351
+ width: calc(var(--td-font-size-body-large) + 4px);
352
+ height: calc(var(--td-font-size-body-large) + 4px);
353
+ -webkit-box-align: center;
354
+ -ms-flex-align: center;
355
+ align-items: center;
356
+ border-radius: var(--td-radius-default);
357
+ -webkit-transition: all 0.2s linear;
358
+ transition: all 0.2s linear;
359
+ padding: var(--td-comp-paddingTB-xxs) var(--td-comp-paddingLR-xxs);
360
+ }
361
+ .t-dialog__close:hover {
362
+ cursor: pointer;
363
+ background: var(--td-bg-color-container-hover);
364
+ }
365
+ .t-dialog__close:active {
366
+ background: var(--td-bg-color-container-active);
367
+ }
368
+ .t-dialog__close--fullscreen {
369
+ display: -webkit-box;
370
+ display: -ms-flexbox;
371
+ display: flex;
372
+ background: transparent;
373
+ }
374
+ .t-dialog__close--fullscreen:hover {
375
+ cursor: pointer;
376
+ background: var(--td-bg-color-secondarycontainer-hover);
377
+ }
378
+ .t-dialog__close--fullscreen:active {
379
+ background: var(--td-bg-color-secondarycontainer-active);
380
+ }
381
+ .t-dialog.t-dialog--draggable:hover {
382
+ cursor: move;
383
+ }
384
+ .t-dialog.t-dialog--draggable .t-dialog__header:hover,
385
+ .t-dialog.t-dialog--draggable .t-dialog__body:hover,
386
+ .t-dialog.t-dialog--draggable .t-dialog__footer:hover {
387
+ cursor: auto;
388
+ }
389
+ .t-dialog__fullscreen {
390
+ width: 100%;
391
+ border-radius: 0;
392
+ }
393
+
394
+ .t-dialog__ctx {
395
+ pointer-events: auto;
396
+ outline: none;
397
+ top: 0;
398
+ left: 0;
399
+ width: 100%;
400
+ height: 100%;
401
+ }
402
+ .t-dialog__ctx.t-dialog__ctx--modeless {
403
+ pointer-events: none;
404
+ }
405
+ .t-dialog__ctx.t-dialog__ctx--fixed {
406
+ position: fixed;
407
+ z-index: 2500;
408
+ }
409
+ .t-dialog__ctx.t-dialog__ctx--absolute {
410
+ position: absolute;
411
+ }
412
+ .t-dialog__ctx.t-dialog__ctx--absolute .t-dialog__mask {
413
+ position: absolute;
414
+ }
415
+ .t-dialog__ctx.t-dialog__ctx--absolute .t-dialog__wrap {
416
+ position: absolute;
417
+ }
418
+ .t-dialog__ctx.t-is-visible {
419
+ visibility: visible;
420
+ }
421
+ .t-dialog__ctx.t-is-hidden {
422
+ visibility: hidden;
423
+ }
424
+ .t-dialog__ctx.t-is-display {
425
+ display: block;
426
+ }
427
+ .t-dialog__ctx.t-not-display {
428
+ display: none;
429
+ }
430
+ .t-dialog__ctx .t-dialog__mask {
431
+ position: fixed;
432
+ top: 0;
433
+ left: 0;
434
+ width: 100%;
435
+ height: 100%;
436
+ z-index: 1;
437
+ background: var(--td-mask-active);
438
+ pointer-events: auto;
439
+ }
440
+ .t-dialog__ctx .t-dialog__wrap {
441
+ position: fixed;
442
+ top: 0;
443
+ left: 0;
444
+ width: 100%;
445
+ height: 100%;
446
+ z-index: 1;
447
+ overflow: auto;
448
+ }
449
+ .t-dialog__ctx .t-dialog__wrap::-webkit-scrollbar {
450
+ width: 8px;
451
+ height: 8px;
452
+ }
453
+ .t-dialog__ctx .t-dialog__wrap::-webkit-scrollbar-thumb {
454
+ border: 2px solid transparent;
455
+ background-clip: content-box;
456
+ background-color: var(--td-scrollbar-color);
457
+ border-radius: calc(8px * 2 - 1px);
458
+ }
459
+ .t-dialog__ctx .t-dialog__wrap::-webkit-scrollbar-thumb:vertical:hover, .t-dialog__ctx .t-dialog__wrap::-webkit-scrollbar-thumb:horizontal:hover {
460
+ background-color: var(--td-scrollbar-hover-color);
461
+ }
462
+ .t-dialog__ctx .t-dialog__position {
463
+ display: -webkit-box;
464
+ display: -ms-flexbox;
465
+ display: flex;
466
+ -webkit-box-pack: center;
467
+ -ms-flex-pack: center;
468
+ justify-content: center;
469
+ min-height: 100%;
470
+ width: 100%;
471
+ position: relative;
472
+ padding: 48px 0;
473
+ -webkit-box-sizing: border-box;
474
+ box-sizing: border-box;
475
+ }
476
+ .t-dialog__ctx .t-dialog__position.t-dialog--top {
477
+ -webkit-box-align: start;
478
+ -ms-flex-align: start;
479
+ align-items: flex-start;
480
+ padding-top: 20vh;
481
+ }
482
+ .t-dialog__ctx .t-dialog__position.t-dialog--center {
483
+ -webkit-box-align: center;
484
+ -ms-flex-align: center;
485
+ align-items: center;
486
+ }
487
+ .t-dialog__ctx .t-dialog__position_fullscreen {
488
+ display: -webkit-box;
489
+ display: -ms-flexbox;
490
+ display: flex;
491
+ -webkit-box-pack: center;
492
+ -ms-flex-pack: center;
493
+ justify-content: center;
494
+ min-height: 100%;
495
+ width: 100%;
496
+ position: relative;
497
+ -webkit-box-sizing: border-box;
498
+ box-sizing: border-box;
499
+ }
500
+ .t-dialog__ctx .t-is-hidden {
501
+ background: none;
502
+ }
503
+ .t-dialog__ctx .t-dialog {
504
+ pointer-events: auto;
505
+ z-index: 2500;
506
+ }
507
+ .t-dialog__ctx.t-dialog__ctx--modeless .t-dialog {
508
+ -webkit-box-shadow: var(--td-shadow-3);
509
+ box-shadow: var(--td-shadow-3);
510
+ }
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,190 @@
1
+ import { _ as _toConsumableArray } from '../_chunks/dep-CgyDw_YI.js';
2
+ import { _ as _slicedToArray } from '../_chunks/dep-CzLhKWCf.js';
3
+ import { _ as _defineProperty } from '../_chunks/dep-Cwish4GD.js';
4
+ import React, { useState, useMemo, useRef, useEffect, useImperativeHandle } from 'react';
5
+ import classNames from 'classnames';
6
+ import { u as useConfig } from '../_chunks/dep-u1x3x6MJ.js';
7
+ import { n as noop } from '../_chunks/dep-U1T8CQY9.js';
8
+ import { f as forwardRefWithStatics } from '../_chunks/dep-BP0-apUT.js';
9
+ import useInstance from './hooks/useInstance.js';
10
+ import { H as HOOK_MARK, u as useForm } from '../_chunks/dep-D7LanWes.js';
11
+ import { get, isUndefined } from 'lodash-es';
12
+ import FormContext from './FormContext.js';
13
+ import { f as formDefaultProps, F as FormItem } from '../_chunks/dep-EcrDKDlu.js';
14
+ import FormList from './FormList.js';
15
+ import { u as useDefaultProps } from '../_chunks/dep-DGvfel3I.js';
16
+ import '../_chunks/dep-D-UKOauR.js';
17
+ import '../config-provider/ConfigContext.js';
18
+ import 'hoist-non-react-statics';
19
+ import '../_chunks/dep-DN7d1SzH.js';
20
+ import '../_chunks/dep-DZ_0EvBk.js';
21
+ import './utils/index.js';
22
+ import '@tendaui/icons';
23
+ import '../_chunks/dep-bWaVq_y3.js';
24
+ import '../_chunks/dep-C36au4Ip.js';
25
+ import '../_chunks/dep-D6YxJv-F.js';
26
+ import '../_chunks/dep-DHWwZ2Nj.js';
27
+ import '../_chunks/dep-B7HmDtze.js';
28
+ import '../common/Check.js';
29
+ import '../_chunks/dep-DwWrhxkd.js';
30
+ import '../tag-input/TagInput.js';
31
+ import '../input/index.js';
32
+ import '../input/Input.js';
33
+ import '../_chunks/dep-0QH2Ee4R.js';
34
+ import '../input/InputGroup.js';
35
+ import '../input/style/css.js';
36
+ import '../tag-input/hooks/useTagList.js';
37
+ import '../tag/index.js';
38
+ import '../tag/Tag.js';
39
+ import '../tag/style/css.js';
40
+ import '../hooks/useDragSorter.js';
41
+
42
+ function useWatch(name, form) {
43
+ var _useState = useState(),
44
+ _useState2 = _slicedToArray(_useState, 2),
45
+ value = _useState2[0],
46
+ setValue = _useState2[1];
47
+ var valueStr = useMemo(function () {
48
+ return JSON.stringify(value);
49
+ }, [value]);
50
+ var valueStrRef = useRef(valueStr);
51
+ var isValidForm = form && form._init;
52
+ useEffect(function () {
53
+ var _form$getInternalHook, _form$getFieldsValue2;
54
+ if (!isValidForm) return;
55
+ var internalHooks = (_form$getInternalHook = form.getInternalHooks) === null || _form$getInternalHook === void 0 ? void 0 : _form$getInternalHook.call(form, HOOK_MARK);
56
+ var _ref = internalHooks || {},
57
+ _ref$registerWatch = _ref.registerWatch,
58
+ registerWatch = _ref$registerWatch === void 0 ? noop : _ref$registerWatch;
59
+ var cancelRegister = registerWatch(function () {
60
+ var _form$getFieldsValue;
61
+ var allFieldsValue2 = (_form$getFieldsValue = form.getFieldsValue) === null || _form$getFieldsValue === void 0 ? void 0 : _form$getFieldsValue.call(form, true);
62
+ var newValue = get(allFieldsValue2, name);
63
+ var nextValueStr = JSON.stringify(newValue);
64
+ if (valueStrRef.current !== nextValueStr) {
65
+ valueStrRef.current = nextValueStr;
66
+ setValue(nextValueStr);
67
+ }
68
+ });
69
+ var allFieldsValue = (_form$getFieldsValue2 = form.getFieldsValue) === null || _form$getFieldsValue2 === void 0 ? void 0 : _form$getFieldsValue2.call(form, true);
70
+ var initialValue = get(allFieldsValue, name);
71
+ setValue(JSON.stringify(initialValue));
72
+ return cancelRegister;
73
+ }, []);
74
+ return isUndefined(value) ? value : JSON.parse(value);
75
+ }
76
+
77
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
78
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
79
+ var Form = forwardRefWithStatics(function (originalProps, ref) {
80
+ var _form$getInternalHook, _form$getInternalHook2;
81
+ var _useConfig = useConfig(),
82
+ classPrefix = _useConfig.classPrefix,
83
+ globalFormConfig = _useConfig.form;
84
+ var props = useDefaultProps(originalProps, formDefaultProps);
85
+ var style = props.style,
86
+ className = props.className,
87
+ labelWidth = props.labelWidth,
88
+ statusIcon = props.statusIcon,
89
+ labelAlign = props.labelAlign,
90
+ layout = props.layout,
91
+ colon = props.colon,
92
+ initialData = props.initialData,
93
+ _props$requiredMark = props.requiredMark,
94
+ requiredMark = _props$requiredMark === void 0 ? globalFormConfig.requiredMark : _props$requiredMark,
95
+ _props$requiredMarkPo = props.requiredMarkPosition,
96
+ requiredMarkPosition = _props$requiredMarkPo === void 0 ? globalFormConfig.requiredMarkPosition : _props$requiredMarkPo,
97
+ scrollToFirstError = props.scrollToFirstError,
98
+ showErrorMessage = props.showErrorMessage,
99
+ resetType = props.resetType,
100
+ rules = props.rules,
101
+ _props$errorMessage = props.errorMessage,
102
+ errorMessage = _props$errorMessage === void 0 ? globalFormConfig.errorMessage : _props$errorMessage,
103
+ preventSubmitDefault = props.preventSubmitDefault,
104
+ disabled = props.disabled,
105
+ children = props.children,
106
+ id = props.id,
107
+ onReset = props.onReset,
108
+ _props$onValuesChange = props.onValuesChange,
109
+ onValuesChange = _props$onValuesChange === void 0 ? noop : _props$onValuesChange;
110
+ var formClass = classNames("".concat(classPrefix, "-form"), className, _defineProperty({}, "".concat(classPrefix, "-form-inline"), layout === "inline"));
111
+ var _useForm = useForm(props.form),
112
+ _useForm2 = _slicedToArray(_useForm, 1),
113
+ form = _useForm2[0];
114
+ var formRef = useRef(null);
115
+ var formMapRef = useRef(/* @__PURE__ */new Map());
116
+ var floatingFormDataRef = useRef({});
117
+ var formInstance = useInstance(props, formRef, formMapRef, floatingFormDataRef);
118
+ var exposedFormInstance = formInstance;
119
+ useImperativeHandle(ref, function () {
120
+ return exposedFormInstance;
121
+ });
122
+ Object.assign(form, _objectSpread({}, exposedFormInstance));
123
+ form === null || form === void 0 || (_form$getInternalHook = form.getInternalHooks) === null || _form$getInternalHook === void 0 || (_form$getInternalHook = _form$getInternalHook.call(form, HOOK_MARK)) === null || _form$getInternalHook === void 0 || (_form$getInternalHook2 = _form$getInternalHook.setForm) === null || _form$getInternalHook2 === void 0 || _form$getInternalHook2.call(_form$getInternalHook, exposedFormInstance);
124
+ React.useEffect(function () {
125
+ var _form$getInternalHook3, _form$getInternalHook4;
126
+ form === null || form === void 0 || (_form$getInternalHook3 = form.getInternalHooks) === null || _form$getInternalHook3 === void 0 || (_form$getInternalHook3 = _form$getInternalHook3.call(form, HOOK_MARK)) === null || _form$getInternalHook3 === void 0 || (_form$getInternalHook4 = _form$getInternalHook3.flashQueue) === null || _form$getInternalHook4 === void 0 || _form$getInternalHook4.call(_form$getInternalHook3);
127
+ }, [form]);
128
+ function onResetHandler(e) {
129
+ var _form$getInternalHook5, _form$getInternalHook6;
130
+ _toConsumableArray(formMapRef.current.values()).forEach(function (formItemRef) {
131
+ formItemRef === null || formItemRef === void 0 || formItemRef.current.resetField();
132
+ });
133
+ form === null || form === void 0 || (_form$getInternalHook5 = form.getInternalHooks) === null || _form$getInternalHook5 === void 0 || (_form$getInternalHook5 = _form$getInternalHook5.call(form, HOOK_MARK)) === null || _form$getInternalHook5 === void 0 || (_form$getInternalHook6 = _form$getInternalHook5.notifyWatch) === null || _form$getInternalHook6 === void 0 || _form$getInternalHook6.call(_form$getInternalHook5, []);
134
+ form.store = {};
135
+ onReset === null || onReset === void 0 || onReset({
136
+ e: e
137
+ });
138
+ }
139
+ function onFormItemValueChange(changedValue) {
140
+ var allFields = formInstance.getFieldsValue(true);
141
+ onValuesChange(changedValue, allFields);
142
+ }
143
+ function onKeyDownHandler(e) {
144
+ if (e.target.tagName.toLowerCase() !== "input") return;
145
+ if (preventSubmitDefault && e.key === "Enter") {
146
+ var _e$preventDefault, _e$stopPropagation;
147
+ (_e$preventDefault = e.preventDefault) === null || _e$preventDefault === void 0 || _e$preventDefault.call(e);
148
+ (_e$stopPropagation = e.stopPropagation) === null || _e$stopPropagation === void 0 || _e$stopPropagation.call(e);
149
+ }
150
+ }
151
+ return /* @__PURE__ */React.createElement(FormContext.Provider, {
152
+ value: {
153
+ form: form,
154
+ labelWidth: labelWidth,
155
+ statusIcon: statusIcon,
156
+ labelAlign: labelAlign,
157
+ layout: layout,
158
+ colon: colon,
159
+ initialData: initialData,
160
+ requiredMark: requiredMark,
161
+ requiredMarkPosition: requiredMarkPosition,
162
+ errorMessage: errorMessage,
163
+ showErrorMessage: showErrorMessage,
164
+ scrollToFirstError: scrollToFirstError,
165
+ resetType: resetType,
166
+ rules: rules,
167
+ disabled: disabled,
168
+ formMapRef: formMapRef,
169
+ floatingFormDataRef: floatingFormDataRef,
170
+ onFormItemValueChange: onFormItemValueChange
171
+ }
172
+ }, /* @__PURE__ */React.createElement("form", {
173
+ ref: formRef,
174
+ id: id,
175
+ style: style,
176
+ className: formClass,
177
+ onSubmit: formInstance.submit,
178
+ onReset: onResetHandler,
179
+ onKeyDown: onKeyDownHandler
180
+ }, children));
181
+ }, {
182
+ useForm: useForm,
183
+ useWatch: useWatch,
184
+ FormItem: FormItem,
185
+ FormList: FormList
186
+ });
187
+ Form.displayName = "Form";
188
+
189
+ export { Form as default };
190
+ //# sourceMappingURL=Form.js.map