@nextui-org/react 1.0.2-beta.3 → 1.0.2-beta.5-dbg2

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 (788) hide show
  1. package/README.md +2 -2
  2. package/cjs/avatar/avatar-group.js +1 -35
  3. package/cjs/avatar/avatar-group.styles.js +1 -52
  4. package/cjs/avatar/avatar.js +1 -75
  5. package/cjs/avatar/avatar.styles.js +1 -334
  6. package/cjs/avatar/index.js +1 -22
  7. package/cjs/backdrop/backdrop.js +1 -137
  8. package/cjs/backdrop/backdrop.styles.js +1 -119
  9. package/cjs/backdrop/index.js +1 -16
  10. package/cjs/button/button-group-context.js +1 -21
  11. package/cjs/button/button-group.js +1 -81
  12. package/cjs/button/button-group.styles.js +1 -136
  13. package/cjs/button/button-icon.js +1 -68
  14. package/cjs/button/button.js +1 -145
  15. package/cjs/button/button.styles.js +1 -726
  16. package/cjs/button/index.js +1 -25
  17. package/cjs/button/utils.js +1 -27
  18. package/cjs/card/card.js +1 -117
  19. package/cjs/card/card.styles.js +1 -267
  20. package/cjs/card/index.js +1 -24
  21. package/cjs/checkbox/checkbox-context.js +1 -25
  22. package/cjs/checkbox/checkbox-group.js +1 -89
  23. package/cjs/checkbox/checkbox.js +1 -192
  24. package/cjs/checkbox/checkbox.styles.js +1 -563
  25. package/cjs/checkbox/index.js +1 -26
  26. package/cjs/code/code.js +1 -42
  27. package/cjs/code/code.styles.js +1 -14
  28. package/cjs/code/index.js +1 -15
  29. package/cjs/col/col.js +1 -46
  30. package/cjs/col/col.styles.js +1 -16
  31. package/cjs/col/index.js +1 -14
  32. package/cjs/collapse/collapse-context.js +1 -20
  33. package/cjs/collapse/collapse-group.js +1 -90
  34. package/cjs/collapse/collapse-icon.js +1 -41
  35. package/cjs/collapse/collapse.js +1 -196
  36. package/cjs/collapse/collapse.styles.js +1 -256
  37. package/cjs/collapse/index.js +1 -22
  38. package/cjs/container/container.js +1 -91
  39. package/cjs/container/container.styles.js +1 -45
  40. package/cjs/container/index.js +1 -14
  41. package/cjs/css-baseline/css-baseline.js +1 -247
  42. package/cjs/css-baseline/index.js +1 -11
  43. package/cjs/divider/divider.js +1 -82
  44. package/cjs/divider/divider.styles.js +1 -77
  45. package/cjs/divider/index.js +1 -15
  46. package/cjs/grid/grid-container.js +1 -60
  47. package/cjs/grid/grid-item.js +1 -123
  48. package/cjs/grid/grid.js +1 -29
  49. package/cjs/grid/grid.styles.js +1 -15
  50. package/cjs/grid/index.js +1 -18
  51. package/cjs/image/image.js +1 -150
  52. package/cjs/image/image.skeleton.js +1 -50
  53. package/cjs/image/image.styles.js +1 -57
  54. package/cjs/image/index.js +1 -16
  55. package/cjs/index.js +1 -435
  56. package/cjs/input/index.js +1 -30
  57. package/cjs/input/input-password.js +1 -80
  58. package/cjs/input/input-props.js +1 -30
  59. package/cjs/input/input.js +1 -318
  60. package/cjs/input/input.styles.js +1 -878
  61. package/cjs/input/password-icon.js +1 -51
  62. package/cjs/link/icon.js +1 -42
  63. package/cjs/link/index.js +1 -15
  64. package/cjs/link/link.js +1 -42
  65. package/cjs/link/link.styles.js +1 -135
  66. package/cjs/loading/index.js +1 -24
  67. package/cjs/loading/loading.js +1 -80
  68. package/cjs/loading/loading.styles.js +1 -438
  69. package/cjs/loading/spinner.js +1 -47
  70. package/cjs/modal/index.js +1 -28
  71. package/cjs/modal/modal-body.js +1 -62
  72. package/cjs/modal/modal-close-button.js +1 -49
  73. package/cjs/modal/modal-context.js +1 -18
  74. package/cjs/modal/modal-footer.js +1 -69
  75. package/cjs/modal/modal-header.js +1 -69
  76. package/cjs/modal/modal-wrapper.js +1 -153
  77. package/cjs/modal/modal.js +1 -159
  78. package/cjs/modal/modal.styles.js +1 -243
  79. package/cjs/modal/use-modal.js +1 -25
  80. package/cjs/pagination/index.js +1 -19
  81. package/cjs/pagination/pagination-ellipsis.js +1 -86
  82. package/cjs/pagination/pagination-highlight.js +1 -52
  83. package/cjs/pagination/pagination-icon.js +1 -59
  84. package/cjs/pagination/pagination-item.js +1 -104
  85. package/cjs/pagination/pagination.js +1 -169
  86. package/cjs/pagination/pagination.styles.js +1 -361
  87. package/cjs/progress/index.js +1 -15
  88. package/cjs/progress/progress.js +1 -101
  89. package/cjs/progress/progress.styles.js +1 -165
  90. package/cjs/radio/index.js +1 -24
  91. package/cjs/radio/radio-context.js +1 -24
  92. package/cjs/radio/radio-group.js +1 -78
  93. package/cjs/radio/radio.js +1 -156
  94. package/cjs/radio/radio.styles.js +1 -240
  95. package/cjs/row/index.js +1 -14
  96. package/cjs/row/row.js +1 -54
  97. package/cjs/row/row.styles.js +1 -25
  98. package/cjs/snippet/index.js +1 -16
  99. package/cjs/snippet/snippet-icon.js +1 -52
  100. package/cjs/snippet/snippet.js +1 -137
  101. package/cjs/snippet/snippet.styles.js +1 -141
  102. package/cjs/spacer/index.js +1 -14
  103. package/cjs/spacer/spacer.js +1 -49
  104. package/cjs/spacer/spacer.styles.js +1 -24
  105. package/cjs/switch/index.js +1 -17
  106. package/cjs/switch/switch.js +1 -142
  107. package/cjs/switch/switch.styles.js +1 -283
  108. package/cjs/table/base/index.js +1 -0
  109. package/cjs/table/base/table-body.js +1 -0
  110. package/cjs/table/base/table-cell.js +1 -0
  111. package/cjs/table/base/table-column.js +1 -0
  112. package/cjs/table/base/table-header.js +1 -0
  113. package/cjs/table/base/table-row.js +1 -0
  114. package/cjs/table/index.js +1 -0
  115. package/cjs/table/table-body.js +1 -0
  116. package/cjs/table/table-cell.js +1 -0
  117. package/cjs/table/table-checkbox-cell.js +1 -0
  118. package/cjs/table/table-column-header.js +1 -0
  119. package/cjs/table/table-context.js +1 -0
  120. package/cjs/table/table-footer.js +1 -0
  121. package/cjs/table/table-header-row.js +1 -0
  122. package/cjs/table/table-pagination.js +1 -0
  123. package/cjs/table/table-row-group.js +1 -0
  124. package/cjs/table/table-row.js +1 -0
  125. package/cjs/table/table-select-all-checkbox.js +1 -0
  126. package/cjs/table/table-sort-icon.js +1 -0
  127. package/cjs/table/table.js +1 -0
  128. package/cjs/table/table.styles.js +1 -0
  129. package/cjs/table/utils.js +1 -0
  130. package/cjs/text/child.js +1 -83
  131. package/cjs/text/index.js +1 -14
  132. package/cjs/text/text.js +1 -124
  133. package/cjs/text/text.styles.js +1 -41
  134. package/cjs/textarea/index.js +1 -12
  135. package/cjs/textarea/textarea.js +1 -126
  136. package/cjs/textarea/utils.js +1 -126
  137. package/cjs/theme/common.js +1 -503
  138. package/cjs/theme/dark-theme.js +1 -38
  139. package/cjs/theme/index.js +1 -31
  140. package/cjs/theme/light-theme.js +1 -33
  141. package/cjs/theme/stitches.config.js +1 -88
  142. package/cjs/theme/theme-context.js +1 -22
  143. package/cjs/theme/theme-provider.js +1 -111
  144. package/cjs/theme/types.js +1 -3
  145. package/cjs/theme/utils.js +1 -113
  146. package/cjs/tooltip/index.js +1 -17
  147. package/cjs/tooltip/placement.js +1 -193
  148. package/cjs/tooltip/tooltip-content.js +1 -135
  149. package/cjs/tooltip/tooltip.js +1 -143
  150. package/cjs/tooltip/tooltip.styles.js +1 -159
  151. package/cjs/use-body-scroll/index.js +1 -12
  152. package/cjs/use-body-scroll/use-body-scroll.js +1 -77
  153. package/cjs/use-click-anywhere/index.js +1 -12
  154. package/cjs/use-click-anywhere/use-click-anywhere.js +1 -19
  155. package/cjs/use-click-away/index.js +1 -12
  156. package/cjs/use-click-away/use-click-away.js +1 -23
  157. package/cjs/use-clipboard/index.js +1 -12
  158. package/cjs/use-clipboard/use-clipboard.js +1 -57
  159. package/cjs/use-current-state/index.js +1 -12
  160. package/cjs/use-current-state/use-current-state.js +1 -28
  161. package/cjs/use-drip/index.js +1 -12
  162. package/cjs/use-drip/use-drip.js +1 -38
  163. package/cjs/use-input/index.js +1 -12
  164. package/cjs/use-input/use-input.js +1 -32
  165. package/cjs/use-keyboard/codes.js +1 -104
  166. package/cjs/use-keyboard/helper.js +1 -35
  167. package/cjs/use-keyboard/index.js +1 -15
  168. package/cjs/use-keyboard/use-keyboard.js +1 -76
  169. package/cjs/use-pagination/index.js +1 -88
  170. package/cjs/use-portal/index.js +1 -12
  171. package/cjs/use-portal/use-portal.js +1 -43
  172. package/cjs/use-real-shape/index.js +1 -12
  173. package/cjs/use-real-shape/use-real-shape.js +1 -55
  174. package/cjs/use-resize/index.js +1 -12
  175. package/cjs/use-resize/use-resize.js +1 -23
  176. package/cjs/use-ssr/index.js +1 -12
  177. package/cjs/use-ssr/use-ssr.js +1 -25
  178. package/cjs/use-theme/index.js +1 -12
  179. package/cjs/use-theme/use-theme.js +1 -16
  180. package/cjs/use-warning/index.js +1 -12
  181. package/cjs/use-warning/use-warning.js +1 -23
  182. package/cjs/user/index.js +1 -21
  183. package/cjs/user/user-link.js +1 -46
  184. package/cjs/user/user.js +1 -63
  185. package/cjs/user/user.styles.js +1 -56
  186. package/cjs/utils/assertion.js +1 -42
  187. package/cjs/utils/clear-icon.js +1 -70
  188. package/cjs/utils/clsx.js +1 -57
  189. package/cjs/utils/collections.js +1 -110
  190. package/cjs/utils/color.js +1 -187
  191. package/cjs/utils/css-transition.js +1 -76
  192. package/cjs/utils/deep-merge.js +1 -33
  193. package/cjs/utils/dimensions.js +1 -10
  194. package/cjs/utils/dom.js +1 -110
  195. package/cjs/utils/drip.js +1 -116
  196. package/cjs/utils/expand.js +1 -109
  197. package/cjs/utils/icons.js +1 -481
  198. package/cjs/utils/numbers.js +1 -23
  199. package/cjs/utils/object.js +1 -40
  200. package/cjs/utils/prop-types.js +1 -56
  201. package/cjs/utils/react.js +1 -24
  202. package/cjs/utils/strings.js +1 -18
  203. package/cjs/utils/types.d.js +1 -3
  204. package/cjs/utils/with-defaults.js +1 -13
  205. package/esm/avatar/avatar-group.js +1 -35
  206. package/esm/avatar/avatar-group.styles.js +1 -52
  207. package/esm/avatar/avatar.js +1 -75
  208. package/esm/avatar/avatar.styles.js +1 -334
  209. package/esm/avatar/index.js +1 -22
  210. package/esm/backdrop/backdrop.js +1 -137
  211. package/esm/backdrop/backdrop.styles.js +1 -119
  212. package/esm/backdrop/index.js +1 -16
  213. package/esm/button/button-group-context.js +1 -21
  214. package/esm/button/button-group.js +1 -81
  215. package/esm/button/button-group.styles.js +1 -136
  216. package/esm/button/button-icon.js +1 -68
  217. package/esm/button/button.js +1 -145
  218. package/esm/button/button.styles.js +1 -726
  219. package/esm/button/index.js +1 -25
  220. package/esm/button/utils.js +1 -27
  221. package/esm/card/card.js +1 -117
  222. package/esm/card/card.styles.js +1 -267
  223. package/esm/card/index.js +1 -24
  224. package/esm/checkbox/checkbox-context.js +1 -25
  225. package/esm/checkbox/checkbox-group.js +1 -89
  226. package/esm/checkbox/checkbox.js +1 -192
  227. package/esm/checkbox/checkbox.styles.js +1 -563
  228. package/esm/checkbox/index.js +1 -26
  229. package/esm/code/code.js +1 -42
  230. package/esm/code/code.styles.js +1 -14
  231. package/esm/code/index.js +1 -15
  232. package/esm/col/col.js +1 -46
  233. package/esm/col/col.styles.js +1 -16
  234. package/esm/col/index.js +1 -14
  235. package/esm/collapse/collapse-context.js +1 -20
  236. package/esm/collapse/collapse-group.js +1 -90
  237. package/esm/collapse/collapse-icon.js +1 -41
  238. package/esm/collapse/collapse.js +1 -196
  239. package/esm/collapse/collapse.styles.js +1 -256
  240. package/esm/collapse/index.js +1 -22
  241. package/esm/container/container.js +1 -91
  242. package/esm/container/container.styles.js +1 -45
  243. package/esm/container/index.js +1 -14
  244. package/esm/css-baseline/css-baseline.js +1 -247
  245. package/esm/css-baseline/index.js +1 -11
  246. package/esm/divider/divider.js +1 -82
  247. package/esm/divider/divider.styles.js +1 -77
  248. package/esm/divider/index.js +1 -15
  249. package/esm/grid/grid-container.js +1 -60
  250. package/esm/grid/grid-item.js +1 -123
  251. package/esm/grid/grid.js +1 -29
  252. package/esm/grid/grid.styles.js +1 -15
  253. package/esm/grid/index.js +1 -18
  254. package/esm/image/image.js +1 -150
  255. package/esm/image/image.skeleton.js +1 -50
  256. package/esm/image/image.styles.js +1 -57
  257. package/esm/image/index.js +1 -16
  258. package/esm/index.js +1 -435
  259. package/esm/input/index.js +1 -30
  260. package/esm/input/input-password.js +1 -80
  261. package/esm/input/input-props.js +1 -30
  262. package/esm/input/input.js +1 -318
  263. package/esm/input/input.styles.js +1 -878
  264. package/esm/input/password-icon.js +1 -51
  265. package/esm/link/icon.js +1 -42
  266. package/esm/link/index.js +1 -15
  267. package/esm/link/link.js +1 -42
  268. package/esm/link/link.styles.js +1 -135
  269. package/esm/loading/index.js +1 -24
  270. package/esm/loading/loading.js +1 -80
  271. package/esm/loading/loading.styles.js +1 -438
  272. package/esm/loading/spinner.js +1 -47
  273. package/esm/modal/index.js +1 -28
  274. package/esm/modal/modal-body.js +1 -62
  275. package/esm/modal/modal-close-button.js +1 -49
  276. package/esm/modal/modal-context.js +1 -18
  277. package/esm/modal/modal-footer.js +1 -69
  278. package/esm/modal/modal-header.js +1 -69
  279. package/esm/modal/modal-wrapper.js +1 -153
  280. package/esm/modal/modal.js +1 -159
  281. package/esm/modal/modal.styles.js +1 -243
  282. package/esm/modal/use-modal.js +1 -25
  283. package/esm/pagination/index.js +1 -19
  284. package/esm/pagination/pagination-ellipsis.js +1 -86
  285. package/esm/pagination/pagination-highlight.js +1 -52
  286. package/esm/pagination/pagination-icon.js +1 -59
  287. package/esm/pagination/pagination-item.js +1 -104
  288. package/esm/pagination/pagination.js +1 -169
  289. package/esm/pagination/pagination.styles.js +1 -361
  290. package/esm/progress/index.js +1 -15
  291. package/esm/progress/progress.js +1 -101
  292. package/esm/progress/progress.styles.js +1 -165
  293. package/esm/radio/index.js +1 -24
  294. package/esm/radio/radio-context.js +1 -24
  295. package/esm/radio/radio-group.js +1 -78
  296. package/esm/radio/radio.js +1 -156
  297. package/esm/radio/radio.styles.js +1 -240
  298. package/esm/row/index.js +1 -14
  299. package/esm/row/row.js +1 -54
  300. package/esm/row/row.styles.js +1 -25
  301. package/esm/snippet/index.js +1 -16
  302. package/esm/snippet/snippet-icon.js +1 -52
  303. package/esm/snippet/snippet.js +1 -137
  304. package/esm/snippet/snippet.styles.js +1 -141
  305. package/esm/spacer/index.js +1 -14
  306. package/esm/spacer/spacer.js +1 -49
  307. package/esm/spacer/spacer.styles.js +1 -24
  308. package/esm/switch/index.js +1 -17
  309. package/esm/switch/switch.js +1 -142
  310. package/esm/switch/switch.styles.js +1 -283
  311. package/esm/table/base/index.js +1 -0
  312. package/esm/table/base/table-body.js +1 -0
  313. package/esm/table/base/table-cell.js +1 -0
  314. package/esm/table/base/table-column.js +1 -0
  315. package/esm/table/base/table-header.js +1 -0
  316. package/esm/table/base/table-row.js +1 -0
  317. package/esm/table/index.js +1 -0
  318. package/esm/table/table-body.js +1 -0
  319. package/esm/table/table-cell.js +1 -0
  320. package/esm/table/table-checkbox-cell.js +1 -0
  321. package/esm/table/table-column-header.js +1 -0
  322. package/esm/table/table-context.js +1 -0
  323. package/esm/table/table-footer.js +1 -0
  324. package/esm/table/table-header-row.js +1 -0
  325. package/esm/table/table-pagination.js +1 -0
  326. package/esm/table/table-row-group.js +1 -0
  327. package/esm/table/table-row.js +1 -0
  328. package/esm/table/table-select-all-checkbox.js +1 -0
  329. package/esm/table/table-sort-icon.js +1 -0
  330. package/esm/table/table.js +1 -0
  331. package/esm/table/table.styles.js +1 -0
  332. package/esm/table/utils.js +1 -0
  333. package/esm/text/child.js +1 -83
  334. package/esm/text/index.js +1 -14
  335. package/esm/text/text.js +1 -124
  336. package/esm/text/text.styles.js +1 -41
  337. package/esm/textarea/index.js +1 -12
  338. package/esm/textarea/textarea.js +1 -126
  339. package/esm/textarea/utils.js +1 -126
  340. package/esm/theme/common.js +1 -503
  341. package/esm/theme/dark-theme.js +1 -38
  342. package/esm/theme/index.js +1 -31
  343. package/esm/theme/light-theme.js +1 -33
  344. package/esm/theme/stitches.config.js +1 -88
  345. package/esm/theme/theme-context.js +1 -22
  346. package/esm/theme/theme-provider.js +1 -111
  347. package/esm/theme/types.js +1 -3
  348. package/esm/theme/utils.js +1 -113
  349. package/esm/tooltip/index.js +1 -17
  350. package/esm/tooltip/placement.js +1 -193
  351. package/esm/tooltip/tooltip-content.js +1 -135
  352. package/esm/tooltip/tooltip.js +1 -143
  353. package/esm/tooltip/tooltip.styles.js +1 -159
  354. package/esm/use-body-scroll/index.js +1 -12
  355. package/esm/use-body-scroll/use-body-scroll.js +1 -77
  356. package/esm/use-click-anywhere/index.js +1 -12
  357. package/esm/use-click-anywhere/use-click-anywhere.js +1 -19
  358. package/esm/use-click-away/index.js +1 -12
  359. package/esm/use-click-away/use-click-away.js +1 -23
  360. package/esm/use-clipboard/index.js +1 -12
  361. package/esm/use-clipboard/use-clipboard.js +1 -57
  362. package/esm/use-current-state/index.js +1 -12
  363. package/esm/use-current-state/use-current-state.js +1 -28
  364. package/esm/use-drip/index.js +1 -12
  365. package/esm/use-drip/use-drip.js +1 -38
  366. package/esm/use-input/index.js +1 -12
  367. package/esm/use-input/use-input.js +1 -32
  368. package/esm/use-keyboard/codes.js +1 -104
  369. package/esm/use-keyboard/helper.js +1 -35
  370. package/esm/use-keyboard/index.js +1 -15
  371. package/esm/use-keyboard/use-keyboard.js +1 -76
  372. package/esm/use-pagination/index.js +1 -88
  373. package/esm/use-portal/index.js +1 -12
  374. package/esm/use-portal/use-portal.js +1 -43
  375. package/esm/use-real-shape/index.js +1 -12
  376. package/esm/use-real-shape/use-real-shape.js +1 -55
  377. package/esm/use-resize/index.js +1 -12
  378. package/esm/use-resize/use-resize.js +1 -23
  379. package/esm/use-ssr/index.js +1 -12
  380. package/esm/use-ssr/use-ssr.js +1 -25
  381. package/esm/use-theme/index.js +1 -12
  382. package/esm/use-theme/use-theme.js +1 -16
  383. package/esm/use-warning/index.js +1 -12
  384. package/esm/use-warning/use-warning.js +1 -23
  385. package/esm/user/index.js +1 -21
  386. package/esm/user/user-link.js +1 -46
  387. package/esm/user/user.js +1 -63
  388. package/esm/user/user.styles.js +1 -56
  389. package/esm/utils/assertion.js +1 -42
  390. package/esm/utils/clear-icon.js +1 -70
  391. package/esm/utils/clsx.js +1 -57
  392. package/esm/utils/collections.js +1 -110
  393. package/esm/utils/color.js +1 -187
  394. package/esm/utils/css-transition.js +1 -76
  395. package/esm/utils/deep-merge.js +1 -33
  396. package/esm/utils/dimensions.js +1 -10
  397. package/esm/utils/dom.js +1 -110
  398. package/esm/utils/drip.js +1 -116
  399. package/esm/utils/expand.js +1 -109
  400. package/esm/utils/icons.js +1 -481
  401. package/esm/utils/numbers.js +1 -23
  402. package/esm/utils/object.js +1 -40
  403. package/esm/utils/prop-types.js +1 -56
  404. package/esm/utils/react.js +1 -24
  405. package/esm/utils/strings.js +1 -18
  406. package/esm/utils/types.d.js +1 -3
  407. package/esm/utils/with-defaults.js +1 -13
  408. package/package.json +17 -3
  409. package/table/package.json +6 -0
  410. package/{cjs → types}/avatar/avatar-group.d.ts +0 -0
  411. package/{cjs → types}/avatar/avatar-group.styles.d.ts +16 -0
  412. package/{cjs → types}/avatar/avatar.d.ts +0 -0
  413. package/{esm → types}/avatar/avatar.styles.d.ts +8 -0
  414. package/{cjs → types}/avatar/index.d.ts +0 -0
  415. package/{cjs → types}/backdrop/backdrop.d.ts +1 -1
  416. package/{cjs → types}/backdrop/backdrop.styles.d.ts +25 -1
  417. package/{cjs → types}/backdrop/index.d.ts +0 -0
  418. package/{cjs → types}/button/button-group-context.d.ts +0 -0
  419. package/{cjs → types}/button/button-group.d.ts +0 -0
  420. package/{cjs → types}/button/button-group.styles.d.ts +9 -1
  421. package/{esm → types}/button/button-icon.d.ts +9 -0
  422. package/{cjs → types}/button/button.d.ts +1 -0
  423. package/{esm/backdrop/backdrop.styles.d.ts → types/button/button.styles.d.ts} +1220 -930
  424. package/{cjs → types}/button/index.d.ts +0 -0
  425. package/{cjs → types}/button/utils.d.ts +0 -0
  426. package/{cjs → types}/card/card.d.ts +0 -0
  427. package/{cjs → types}/card/card.styles.d.ts +35 -3
  428. package/{cjs → types}/card/index.d.ts +0 -0
  429. package/{cjs → types}/checkbox/checkbox-context.d.ts +0 -0
  430. package/{cjs → types}/checkbox/checkbox-group.d.ts +0 -0
  431. package/{cjs → types}/checkbox/checkbox.d.ts +3 -3
  432. package/{esm/input/input.styles.d.ts → types/checkbox/checkbox.styles.d.ts} +181 -986
  433. package/{cjs → types}/checkbox/index.d.ts +1 -1
  434. package/{cjs → types}/code/code.d.ts +0 -0
  435. package/{esm → types}/code/code.styles.d.ts +16 -0
  436. package/{cjs → types}/code/index.d.ts +0 -0
  437. package/{cjs → types}/col/col.d.ts +0 -0
  438. package/{esm → types}/col/col.styles.d.ts +8 -0
  439. package/{cjs → types}/col/index.d.ts +0 -0
  440. package/{cjs → types}/collapse/collapse-context.d.ts +0 -0
  441. package/{cjs → types}/collapse/collapse-group.d.ts +0 -0
  442. package/{cjs → types}/collapse/collapse-icon.d.ts +0 -0
  443. package/{cjs → types}/collapse/collapse.d.ts +0 -0
  444. package/{esm → types}/collapse/collapse.styles.d.ts +42 -2
  445. package/{cjs → types}/collapse/index.d.ts +0 -0
  446. package/{cjs → types}/container/container.d.ts +0 -0
  447. package/{esm → types}/container/container.styles.d.ts +8 -0
  448. package/{cjs → types}/container/index.d.ts +0 -0
  449. package/{cjs → types}/css-baseline/css-baseline.d.ts +0 -0
  450. package/{cjs → types}/css-baseline/index.d.ts +0 -0
  451. package/{cjs → types}/divider/divider.d.ts +0 -0
  452. package/{esm → types}/divider/divider.styles.d.ts +16 -0
  453. package/{cjs → types}/divider/index.d.ts +0 -0
  454. package/{cjs → types}/grid/grid-container.d.ts +0 -0
  455. package/{cjs → types}/grid/grid-item.d.ts +0 -0
  456. package/{cjs → types}/grid/grid.d.ts +0 -0
  457. package/{cjs → types}/grid/grid.styles.d.ts +16 -0
  458. package/{cjs → types}/grid/index.d.ts +0 -0
  459. package/{cjs → types}/image/image.d.ts +0 -0
  460. package/{cjs → types}/image/image.skeleton.d.ts +0 -0
  461. package/{esm → types}/image/image.styles.d.ts +25 -1
  462. package/{cjs → types}/image/index.d.ts +0 -0
  463. package/{cjs → types}/index.d.ts +4 -0
  464. package/{cjs → types}/input/index.d.ts +0 -0
  465. package/{esm → types}/input/input-password.d.ts +1 -1
  466. package/{cjs → types}/input/input-props.d.ts +0 -0
  467. package/{cjs → types}/input/input.d.ts +0 -0
  468. package/{cjs → types}/input/input.styles.d.ts +93 -5
  469. package/{cjs → types}/input/password-icon.d.ts +0 -0
  470. package/{cjs → types}/link/icon.d.ts +0 -0
  471. package/{cjs → types}/link/index.d.ts +0 -0
  472. package/{cjs → types}/link/link.d.ts +1 -1
  473. package/{cjs → types}/link/link.styles.d.ts +17 -1
  474. package/{cjs → types}/loading/index.d.ts +0 -0
  475. package/{cjs → types}/loading/loading.d.ts +0 -0
  476. package/{esm → types}/loading/loading.styles.d.ts +48 -0
  477. package/{cjs → types}/loading/spinner.d.ts +0 -0
  478. package/{cjs → types}/modal/index.d.ts +0 -0
  479. package/{cjs → types}/modal/modal-body.d.ts +0 -0
  480. package/{cjs → types}/modal/modal-close-button.d.ts +0 -0
  481. package/{cjs → types}/modal/modal-context.d.ts +0 -0
  482. package/{cjs → types}/modal/modal-footer.d.ts +0 -0
  483. package/{cjs → types}/modal/modal-header.d.ts +0 -0
  484. package/{cjs → types}/modal/modal-wrapper.d.ts +0 -0
  485. package/{cjs → types}/modal/modal.d.ts +0 -0
  486. package/{cjs → types}/modal/modal.styles.d.ts +49 -1
  487. package/{cjs → types}/modal/use-modal.d.ts +0 -0
  488. package/{cjs → types}/pagination/index.d.ts +0 -0
  489. package/{cjs → types}/pagination/pagination-ellipsis.d.ts +0 -0
  490. package/{esm → types}/pagination/pagination-highlight.d.ts +2 -1
  491. package/{cjs → types}/pagination/pagination-icon.d.ts +0 -0
  492. package/{cjs → types}/pagination/pagination-item.d.ts +0 -0
  493. package/{cjs → types}/pagination/pagination.d.ts +0 -0
  494. package/{esm → types}/pagination/pagination.styles.d.ts +53 -5
  495. package/{cjs → types}/progress/index.d.ts +0 -0
  496. package/{esm → types}/progress/progress.d.ts +2 -2
  497. package/{esm → types}/progress/progress.styles.d.ts +17 -1
  498. package/{cjs → types}/radio/index.d.ts +0 -0
  499. package/{cjs → types}/radio/radio-context.d.ts +0 -0
  500. package/{cjs → types}/radio/radio-group.d.ts +0 -0
  501. package/{cjs → types}/radio/radio.d.ts +0 -0
  502. package/{cjs → types}/radio/radio.styles.d.ts +51 -3
  503. package/{cjs → types}/row/index.d.ts +0 -0
  504. package/{cjs → types}/row/row.d.ts +0 -0
  505. package/{esm → types}/row/row.styles.d.ts +8 -0
  506. package/{cjs → types}/snippet/index.d.ts +0 -0
  507. package/{cjs → types}/snippet/snippet-icon.d.ts +0 -0
  508. package/{cjs → types}/snippet/snippet.d.ts +0 -0
  509. package/{esm → types}/snippet/snippet.styles.d.ts +33 -1
  510. package/{cjs → types}/spacer/index.d.ts +0 -0
  511. package/{esm → types}/spacer/spacer.d.ts +1 -1
  512. package/{cjs → types}/spacer/spacer.styles.d.ts +9 -1
  513. package/{cjs → types}/switch/index.d.ts +0 -0
  514. package/{esm → types}/switch/switch.d.ts +1 -1
  515. package/{cjs → types}/switch/switch.styles.d.ts +33 -1
  516. package/types/table/base/index.d.ts +5 -0
  517. package/types/table/base/table-body.d.ts +8 -0
  518. package/types/table/base/table-cell.d.ts +8 -0
  519. package/types/table/base/table-column.d.ts +8 -0
  520. package/types/table/base/table-header.d.ts +4 -0
  521. package/types/table/base/table-row.d.ts +8 -0
  522. package/types/table/index.d.ts +12 -0
  523. package/types/table/table-body.d.ts +20 -0
  524. package/types/table/table-cell-old.d.ts +22 -0
  525. package/types/table/table-cell.d.ts +20 -0
  526. package/types/table/table-checkbox-cell.d.ts +23 -0
  527. package/{esm/utils/drip.d.ts → types/table/table-column-header.d.ts} +79 -30
  528. package/types/table/table-column.d.ts +17 -0
  529. package/types/table/table-context.d.ts +29 -0
  530. package/types/table/table-footer.d.ts +31 -0
  531. package/types/table/table-header-row.d.ts +19 -0
  532. package/types/table/table-old.d.ts +49 -0
  533. package/types/table/table-pagination.d.ts +16 -0
  534. package/{esm/code/code.d.ts → types/table/table-row-group.d.ts} +4 -5
  535. package/types/table/table-row.d.ts +20 -0
  536. package/types/table/table-select-all-checkbox.d.ts +20 -0
  537. package/{cjs/button/button-icon.d.ts → types/table/table-sort-icon.d.ts} +20 -18
  538. package/types/table/table-types.d.ts +30 -0
  539. package/types/table/table.d.ts +28 -0
  540. package/{cjs/checkbox/checkbox.styles.d.ts → types/table/table.styles.d.ts} +6795 -48
  541. package/types/table/utils.d.ts +2 -0
  542. package/{cjs → types}/text/child.d.ts +0 -0
  543. package/{cjs → types}/text/index.d.ts +0 -0
  544. package/{cjs → types}/text/text.d.ts +0 -0
  545. package/{cjs → types}/text/text.styles.d.ts +8 -0
  546. package/{cjs → types}/textarea/index.d.ts +0 -0
  547. package/{cjs → types}/textarea/textarea.d.ts +0 -0
  548. package/{cjs → types}/textarea/utils.d.ts +0 -0
  549. package/{cjs → types}/theme/common.d.ts +16 -0
  550. package/{cjs → types}/theme/dark-theme.d.ts +10 -0
  551. package/{cjs → types}/theme/light-theme.d.ts +0 -0
  552. package/types/theme/ssr-provider.d.ts +7 -0
  553. package/{cjs → types}/theme/stitches.config.d.ts +1022 -1
  554. package/{cjs → types}/theme/theme-context.d.ts +0 -0
  555. package/{cjs → types}/theme/theme-provider.d.ts +0 -0
  556. package/{cjs → types}/theme/types.d.ts +0 -0
  557. package/{cjs → types}/theme/utils.d.ts +0 -0
  558. package/{cjs → types}/tooltip/index.d.ts +0 -0
  559. package/{cjs → types}/tooltip/placement.d.ts +0 -0
  560. package/{cjs → types}/tooltip/tooltip-content.d.ts +0 -0
  561. package/{esm → types}/tooltip/tooltip.d.ts +1 -1
  562. package/{esm → types}/tooltip/tooltip.styles.d.ts +34 -2
  563. package/{cjs → types}/use-body-scroll/index.d.ts +0 -0
  564. package/{cjs → types}/use-body-scroll/use-body-scroll.d.ts +0 -0
  565. package/{cjs → types}/use-click-anywhere/index.d.ts +0 -0
  566. package/{cjs → types}/use-click-anywhere/use-click-anywhere.d.ts +0 -0
  567. package/{cjs → types}/use-click-away/index.d.ts +0 -0
  568. package/{cjs → types}/use-click-away/use-click-away.d.ts +0 -0
  569. package/{cjs → types}/use-clipboard/index.d.ts +0 -0
  570. package/{cjs → types}/use-clipboard/use-clipboard.d.ts +0 -0
  571. package/{cjs → types}/use-current-state/index.d.ts +0 -0
  572. package/{cjs → types}/use-current-state/use-current-state.d.ts +0 -0
  573. package/{cjs → types}/use-drip/index.d.ts +0 -0
  574. package/{cjs → types}/use-drip/use-drip.d.ts +0 -0
  575. package/{cjs → types}/use-input/index.d.ts +0 -0
  576. package/{cjs → types}/use-input/use-input.d.ts +0 -0
  577. package/types/use-keyboard/codes.d.ts +92 -0
  578. package/{cjs → types}/use-keyboard/helper.d.ts +0 -0
  579. package/{cjs → types}/use-keyboard/index.d.ts +0 -0
  580. package/{cjs → types}/use-keyboard/use-keyboard.d.ts +0 -0
  581. package/{cjs → types}/use-pagination/index.d.ts +0 -0
  582. package/{cjs → types}/use-portal/index.d.ts +0 -0
  583. package/{cjs → types}/use-portal/use-portal.d.ts +0 -0
  584. package/{cjs → types}/use-real-shape/index.d.ts +0 -0
  585. package/{cjs → types}/use-real-shape/use-real-shape.d.ts +0 -0
  586. package/{cjs → types}/use-resize/index.d.ts +0 -0
  587. package/{cjs → types}/use-resize/use-resize.d.ts +0 -0
  588. package/{cjs → types}/use-ssr/index.d.ts +0 -0
  589. package/{cjs → types}/use-ssr/use-ssr.d.ts +0 -0
  590. package/{cjs → types}/use-theme/index.d.ts +0 -0
  591. package/{cjs → types}/use-theme/use-theme.d.ts +0 -0
  592. package/{cjs → types}/use-warning/index.d.ts +0 -0
  593. package/{cjs → types}/use-warning/use-warning.d.ts +0 -0
  594. package/types/user/index.d.ts +5 -0
  595. package/types/user/user-link.d.ts +15 -0
  596. package/{esm → types}/user/user.d.ts +2 -2
  597. package/{cjs → types}/user/user.styles.d.ts +41 -7
  598. package/{cjs → types}/utils/assertion.d.ts +0 -0
  599. package/{cjs → types}/utils/clear-icon.d.ts +0 -0
  600. package/{cjs → types}/utils/clsx.d.ts +0 -0
  601. package/{cjs → types}/utils/collections.d.ts +2 -1
  602. package/{cjs → types}/utils/color.d.ts +0 -0
  603. package/{cjs → types}/utils/css-transition.d.ts +0 -0
  604. package/{cjs → types}/utils/deep-merge.d.ts +0 -0
  605. package/{cjs → types}/utils/dimensions.d.ts +0 -0
  606. package/{cjs → types}/utils/drip.d.ts +8 -0
  607. package/{cjs → types}/utils/expand.d.ts +0 -0
  608. package/{cjs → types}/utils/numbers.d.ts +0 -0
  609. package/{cjs → types}/utils/object.d.ts +4 -0
  610. package/{esm → types}/utils/prop-types.d.ts +7 -0
  611. package/{cjs → types}/utils/with-defaults.d.ts +0 -0
  612. package/umd/nextui.js +30819 -10604
  613. package/umd/nextui.min.js +1 -1
  614. package/umd/nextui.min.js.LICENSE.txt +15 -0
  615. package/cjs/avatar/avatar.styles.d.ts +0 -937
  616. package/cjs/button/button.styles.d.ts +0 -940
  617. package/cjs/code/code.styles.d.ts +0 -1848
  618. package/cjs/col/col.styles.d.ts +0 -926
  619. package/cjs/collapse/collapse.styles.d.ts +0 -4637
  620. package/cjs/container/container.styles.d.ts +0 -929
  621. package/cjs/divider/divider.styles.d.ts +0 -1853
  622. package/cjs/image/image.styles.d.ts +0 -2775
  623. package/cjs/input/input-password.d.ts +0 -98
  624. package/cjs/loading/loading.styles.d.ts +0 -5554
  625. package/cjs/pagination/pagination-highlight.d.ts +0 -14
  626. package/cjs/pagination/pagination.styles.d.ts +0 -5567
  627. package/cjs/progress/progress.d.ts +0 -65
  628. package/cjs/progress/progress.styles.d.ts +0 -1859
  629. package/cjs/row/row.styles.d.ts +0 -928
  630. package/cjs/snippet/snippet.styles.d.ts +0 -3702
  631. package/cjs/spacer/spacer.d.ts +0 -41
  632. package/cjs/switch/switch.d.ts +0 -82
  633. package/cjs/tooltip/tooltip.d.ts +0 -59
  634. package/cjs/tooltip/tooltip.styles.d.ts +0 -3703
  635. package/cjs/use-keyboard/codes.d.ts +0 -92
  636. package/cjs/user/index.d.ts +0 -6
  637. package/cjs/user/user-link.d.ts +0 -32
  638. package/cjs/user/user.d.ts +0 -35
  639. package/cjs/utils/prop-types.d.ts +0 -54
  640. package/esm/avatar/avatar-group.d.ts +0 -13
  641. package/esm/avatar/avatar-group.styles.d.ts +0 -1851
  642. package/esm/avatar/avatar.d.ts +0 -21
  643. package/esm/avatar/index.d.ts +0 -7
  644. package/esm/backdrop/backdrop.d.ts +0 -37
  645. package/esm/backdrop/index.d.ts +0 -5
  646. package/esm/button/button-group-context.d.ts +0 -20
  647. package/esm/button/button-group.d.ts +0 -34
  648. package/esm/button/button-group.styles.d.ts +0 -932
  649. package/esm/button/button.d.ts +0 -30
  650. package/esm/button/button.styles.d.ts +0 -940
  651. package/esm/button/index.d.ts +0 -10
  652. package/esm/button/utils.d.ts +0 -4
  653. package/esm/card/card.d.ts +0 -23
  654. package/esm/card/card.styles.d.ts +0 -3707
  655. package/esm/card/index.d.ts +0 -5
  656. package/esm/checkbox/checkbox-context.d.ts +0 -13
  657. package/esm/checkbox/checkbox-group.d.ts +0 -29
  658. package/esm/checkbox/checkbox.d.ts +0 -58
  659. package/esm/checkbox/checkbox.styles.d.ts +0 -8351
  660. package/esm/checkbox/index.d.ts +0 -6
  661. package/esm/code/index.d.ts +0 -5
  662. package/esm/col/col.d.ts +0 -20
  663. package/esm/col/index.d.ts +0 -5
  664. package/esm/collapse/collapse-context.d.ts +0 -9
  665. package/esm/collapse/collapse-group.d.ts +0 -18
  666. package/esm/collapse/collapse-icon.d.ts +0 -19
  667. package/esm/collapse/collapse.d.ts +0 -43
  668. package/esm/collapse/index.d.ts +0 -6
  669. package/esm/container/container.d.ts +0 -40
  670. package/esm/container/index.d.ts +0 -5
  671. package/esm/css-baseline/css-baseline.d.ts +0 -9
  672. package/esm/css-baseline/index.d.ts +0 -1
  673. package/esm/divider/divider.d.ts +0 -22
  674. package/esm/divider/index.d.ts +0 -5
  675. package/esm/grid/grid-container.d.ts +0 -22
  676. package/esm/grid/grid-item.d.ts +0 -37
  677. package/esm/grid/grid.d.ts +0 -9
  678. package/esm/grid/grid.styles.d.ts +0 -1849
  679. package/esm/grid/index.d.ts +0 -7
  680. package/esm/image/image.d.ts +0 -29
  681. package/esm/image/image.skeleton.d.ts +0 -19
  682. package/esm/image/index.d.ts +0 -5
  683. package/esm/index.d.ts +0 -79
  684. package/esm/input/index.d.ts +0 -7
  685. package/esm/input/input-props.d.ts +0 -66
  686. package/esm/input/input.d.ts +0 -18
  687. package/esm/input/password-icon.d.ts +0 -6
  688. package/esm/link/icon.d.ts +0 -4
  689. package/esm/link/index.d.ts +0 -5
  690. package/esm/link/link.d.ts +0 -43
  691. package/esm/link/link.styles.d.ts +0 -1854
  692. package/esm/loading/index.d.ts +0 -7
  693. package/esm/loading/loading.d.ts +0 -24
  694. package/esm/loading/spinner.d.ts +0 -17
  695. package/esm/modal/index.d.ts +0 -8
  696. package/esm/modal/modal-body.d.ts +0 -45
  697. package/esm/modal/modal-close-button.d.ts +0 -13
  698. package/esm/modal/modal-context.d.ts +0 -8
  699. package/esm/modal/modal-footer.d.ts +0 -24
  700. package/esm/modal/modal-header.d.ts +0 -24
  701. package/esm/modal/modal-wrapper.d.ts +0 -24
  702. package/esm/modal/modal.d.ts +0 -42
  703. package/esm/modal/modal.styles.d.ts +0 -5560
  704. package/esm/modal/use-modal.d.ts +0 -11
  705. package/esm/pagination/index.d.ts +0 -7
  706. package/esm/pagination/pagination-ellipsis.d.ts +0 -11
  707. package/esm/pagination/pagination-icon.d.ts +0 -16
  708. package/esm/pagination/pagination-item.d.ts +0 -22
  709. package/esm/pagination/pagination.d.ts +0 -46
  710. package/esm/progress/index.d.ts +0 -5
  711. package/esm/radio/index.d.ts +0 -4
  712. package/esm/radio/radio-context.d.ts +0 -13
  713. package/esm/radio/radio-group.d.ts +0 -30
  714. package/esm/radio/radio.d.ts +0 -45
  715. package/esm/radio/radio.styles.d.ts +0 -5555
  716. package/esm/row/index.d.ts +0 -5
  717. package/esm/row/row.d.ts +0 -21
  718. package/esm/snippet/index.d.ts +0 -5
  719. package/esm/snippet/snippet-icon.d.ts +0 -21
  720. package/esm/snippet/snippet.d.ts +0 -35
  721. package/esm/spacer/index.d.ts +0 -5
  722. package/esm/spacer/spacer.styles.d.ts +0 -927
  723. package/esm/switch/index.d.ts +0 -5
  724. package/esm/switch/switch.styles.d.ts +0 -3708
  725. package/esm/text/child.d.ts +0 -23
  726. package/esm/text/index.d.ts +0 -4
  727. package/esm/text/text.d.ts +0 -59
  728. package/esm/text/text.styles.d.ts +0 -927
  729. package/esm/textarea/index.d.ts +0 -3
  730. package/esm/textarea/textarea.d.ts +0 -42
  731. package/esm/textarea/utils.d.ts +0 -13
  732. package/esm/theme/common.d.ts +0 -1644
  733. package/esm/theme/dark-theme.d.ts +0 -33
  734. package/esm/theme/light-theme.d.ts +0 -28
  735. package/esm/theme/stitches.config.d.ts +0 -9004
  736. package/esm/theme/theme-context.d.ts +0 -5
  737. package/esm/theme/theme-provider.d.ts +0 -14
  738. package/esm/theme/types.d.ts +0 -76
  739. package/esm/theme/utils.d.ts +0 -16
  740. package/esm/tooltip/index.d.ts +0 -6
  741. package/esm/tooltip/placement.d.ts +0 -39
  742. package/esm/tooltip/tooltip-content.d.ts +0 -27
  743. package/esm/use-body-scroll/index.d.ts +0 -3
  744. package/esm/use-body-scroll/use-body-scroll.d.ts +0 -9
  745. package/esm/use-click-anywhere/index.d.ts +0 -2
  746. package/esm/use-click-anywhere/use-click-anywhere.d.ts +0 -2
  747. package/esm/use-click-away/index.d.ts +0 -2
  748. package/esm/use-click-away/use-click-away.d.ts +0 -3
  749. package/esm/use-clipboard/index.d.ts +0 -3
  750. package/esm/use-clipboard/use-clipboard.d.ts +0 -8
  751. package/esm/use-current-state/index.d.ts +0 -2
  752. package/esm/use-current-state/use-current-state.d.ts +0 -8
  753. package/esm/use-drip/index.d.ts +0 -2
  754. package/esm/use-drip/use-drip.d.ts +0 -9
  755. package/esm/use-input/index.d.ts +0 -2
  756. package/esm/use-input/use-input.d.ts +0 -13
  757. package/esm/use-keyboard/codes.d.ts +0 -92
  758. package/esm/use-keyboard/helper.d.ts +0 -3
  759. package/esm/use-keyboard/index.d.ts +0 -5
  760. package/esm/use-keyboard/use-keyboard.d.ts +0 -22
  761. package/esm/use-pagination/index.d.ts +0 -20
  762. package/esm/use-portal/index.d.ts +0 -2
  763. package/esm/use-portal/use-portal.d.ts +0 -2
  764. package/esm/use-real-shape/index.d.ts +0 -2
  765. package/esm/use-real-shape/use-real-shape.d.ts +0 -9
  766. package/esm/use-resize/index.d.ts +0 -2
  767. package/esm/use-resize/use-resize.d.ts +0 -2
  768. package/esm/use-ssr/index.d.ts +0 -2
  769. package/esm/use-ssr/use-ssr.d.ts +0 -6
  770. package/esm/use-theme/index.d.ts +0 -2
  771. package/esm/use-theme/use-theme.d.ts +0 -3
  772. package/esm/use-warning/index.d.ts +0 -2
  773. package/esm/use-warning/use-warning.d.ts +0 -2
  774. package/esm/user/index.d.ts +0 -6
  775. package/esm/user/user-link.d.ts +0 -32
  776. package/esm/user/user.styles.d.ts +0 -4621
  777. package/esm/utils/assertion.d.ts +0 -8
  778. package/esm/utils/clear-icon.d.ts +0 -16
  779. package/esm/utils/clsx.d.ts +0 -1
  780. package/esm/utils/collections.d.ts +0 -12
  781. package/esm/utils/color.d.ts +0 -28
  782. package/esm/utils/css-transition.d.ts +0 -27
  783. package/esm/utils/deep-merge.d.ts +0 -1
  784. package/esm/utils/dimensions.d.ts +0 -1
  785. package/esm/utils/expand.d.ts +0 -20
  786. package/esm/utils/numbers.d.ts +0 -9
  787. package/esm/utils/object.d.ts +0 -11
  788. package/esm/utils/with-defaults.d.ts +0 -3
@@ -1,187 +1 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.isNormalColor = exports.isHex = exports.isCssVar = exports.isColor = exports.invertHex = exports.hexToRgb = exports.hexToRGBA = exports.hexFromString = exports.getCssVar = exports.colorToRgbValues = exports.addColorAlpha = void 0;
5
-
6
- var _propTypes = require("./prop-types");
7
-
8
- const getCssVar = name => {
9
- if (typeof document !== 'undefined' || !name) {
10
- const property = isCssVar(name) ? name.replace('var(', '').replace(')', '') : `--${name}`;
11
- return getComputedStyle(document.documentElement).getPropertyValue(property);
12
- }
13
-
14
- return '';
15
- };
16
-
17
- exports.getCssVar = getCssVar;
18
-
19
- const isCssVar = property => {
20
- return property && (property == null ? void 0 : property.indexOf('var(')) === 0 ? true : false;
21
- };
22
- /**
23
- * This function allows validate if a string is a hexadecimal
24
- * value
25
- * @param str [string] hexadecimal value
26
- * @returns result [boolean]
27
- */
28
-
29
-
30
- exports.isCssVar = isCssVar;
31
-
32
- const isHex = str => {
33
- const exp = /#[a-fA-F0-9]{3,6}/g;
34
- return exp.test(str);
35
- };
36
- /**
37
- *
38
- * @param hex [string]
39
- * @param alpha [number]
40
- * @returns [string]
41
- */
42
-
43
-
44
- exports.isHex = isHex;
45
-
46
- const hexToRGBA = (hex, alpha = 1) => {
47
- let r = 0,
48
- g = 0,
49
- b = 0; // 3 digits
50
-
51
- if (hex.length == 4) {
52
- r = '0x' + hex[1] + hex[1];
53
- g = '0x' + hex[2] + hex[2];
54
- b = '0x' + hex[3] + hex[3]; // 6 digits
55
- } else if (hex.length == 7) {
56
- r = '0x' + hex[1] + hex[2];
57
- g = '0x' + hex[3] + hex[4];
58
- b = '0x' + hex[5] + hex[6];
59
- }
60
-
61
- return `rgba(${+r}, ${+g},${+b},${alpha})`;
62
- };
63
-
64
- exports.hexToRGBA = hexToRGBA;
65
-
66
- const isNormalColor = color => {
67
- let found = _propTypes.normalColors.find(el => el === color);
68
-
69
- return found !== undefined && found !== null;
70
- };
71
- /**
72
- * Function that checks color name support in the current browser
73
- * @param strColor
74
- * @returns boolean
75
- */
76
-
77
-
78
- exports.isNormalColor = isNormalColor;
79
-
80
- const isColor = strColor => {
81
- let s = new Option().style;
82
- s.color = strColor;
83
- return s.color == strColor;
84
- };
85
-
86
- exports.isColor = isColor;
87
-
88
- const hexToRgb = color => {
89
- const fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
90
- const full = color.replace(fullReg, (_, r, g, b) => `${r}${r}${g}${g}${b}${b}`);
91
- const values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
92
-
93
- if (!values) {
94
- throw new Error(`Next UI: Unsupported ${color} color.`);
95
- }
96
-
97
- return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
98
- };
99
-
100
- exports.hexToRgb = hexToRgb;
101
-
102
- const hexFromString = (str, defaultColor = '', returnLast = false) => {
103
- const fullReg = /#[a-fA-F0-9]{6}|#[a-fA-F0-9]{3}$/g;
104
- const hexCodes = str.match(fullReg);
105
-
106
- if (hexCodes && hexCodes.length > 0) {
107
- return returnLast ? hexCodes[hexCodes.length - 1] : hexCodes;
108
- }
109
-
110
- return defaultColor;
111
- };
112
-
113
- exports.hexFromString = hexFromString;
114
-
115
- const colorToRgbValues = colorProp => {
116
- const color = isCssVar(colorProp) ? getCssVar(colorProp) : colorProp;
117
- if (color.charAt(0) === '#') return hexToRgb(color);
118
- const safeColor = color.replace(/ /g, '');
119
- const colorType = color.substr(0, 4);
120
- const regArray = safeColor.match(/\((.+)\)/);
121
-
122
- if (!colorType.startsWith('rgb') || !regArray) {
123
- throw new Error(`Next UI: Only support ["RGB", "RGBA", "HEX"] color.`);
124
- }
125
-
126
- return regArray[1].split(',').map(str => Number.parseFloat(str));
127
- };
128
-
129
- exports.colorToRgbValues = colorToRgbValues;
130
-
131
- const addColorAlpha = (colorProp, alpha = 1) => {
132
- if (!colorProp) return '';
133
- const color = isCssVar(colorProp) ? getCssVar(colorProp) : colorProp;
134
-
135
- if (isHex(color)) {
136
- return hexToRGBA(color, alpha);
137
- } else if (!/^#|rgb|RGB/.test(color)) {
138
- return color;
139
- }
140
-
141
- const [r, g, b] = colorToRgbValues(color);
142
- const safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
143
- return `rgba(${r}, ${g}, ${b}, ${safeAlpha})`;
144
- };
145
-
146
- exports.addColorAlpha = addColorAlpha;
147
-
148
- function padZero(str, len) {
149
- len = len || 2;
150
- var zeros = new Array(len).join('0');
151
- return (zeros + str).slice(-len);
152
- }
153
-
154
- const invertHex = (hexProp, smooth = true) => {
155
- let hex = isCssVar(hexProp) ? getCssVar(hexProp) : hexProp;
156
-
157
- if (hex.indexOf('#') === 0) {
158
- hex = hex.slice(1);
159
- } // convert 3-digit hex to 6-digits.
160
-
161
-
162
- if (hex.length === 3) {
163
- hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
164
- }
165
-
166
- if (hex.length !== 6) {
167
- return hexProp;
168
- }
169
-
170
- let r = parseInt(hex.slice(0, 2), 16),
171
- g = parseInt(hex.slice(2, 4), 16),
172
- b = parseInt(hex.slice(4, 6), 16);
173
-
174
- if (smooth) {
175
- // http://stackoverflow.com/a/3943023/112731
176
- return r * 0.299 + g * 0.587 + b * 0.114 > 186 ? '#000000' : '#FFFFFF';
177
- } // invert color components
178
-
179
-
180
- r = 255 - r;
181
- g = 255 - g;
182
- b = 255 - b; // pad each with zeros and return
183
-
184
- return '#' + padZero(r.toString(16)) + padZero(g.toString(16)) + padZero(b.toString(16));
185
- };
186
-
187
- exports.invertHex = invertHex;
1
+ exports.__esModule=!0,exports.isNormalColor=exports.isHex=exports.isCssVar=exports.isColor=exports.invertHex=exports.hexToRgb=exports.hexToRGBA=exports.hexFromString=exports.getCssVar=exports.colorToRgbValues=exports.addColorAlpha=void 0;var r=require("./prop-types");const e=r=>{if("undefined"!=typeof document||!r){const e=t(r)?r.replace("var(","").replace(")",""):`--${r}`;return getComputedStyle(document.documentElement).getPropertyValue(e)}return""};exports.getCssVar=e;const t=r=>!(!r||0!==(null==r?void 0:r.indexOf("var(")));exports.isCssVar=t;const o=r=>/#[a-fA-F0-9]{3,6}/g.test(r);exports.isHex=o;const s=(r,e=1)=>{let t=0,o=0,s=0;return 4==r.length?(t="0x"+r[1]+r[1],o="0x"+r[2]+r[2],s="0x"+r[3]+r[3]):7==r.length&&(t="0x"+r[1]+r[2],o="0x"+r[3]+r[4],s="0x"+r[5]+r[6]),`rgba(${+t}, ${+o},${+s},${e})`};exports.hexToRGBA=s;exports.isNormalColor=e=>{let t=r.normalColors.find((r=>r===e));return null!=t};exports.isColor=r=>{let e=(new Option).style;return e.color=r,e.color==r};const n=r=>{const e=r.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,((r,e,t,o)=>`${e}${e}${t}${t}${o}${o}`)),t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)throw new Error(`Next UI: Unsupported ${r} color.`);return[Number.parseInt(t[1],16),Number.parseInt(t[2],16),Number.parseInt(t[3],16)]};exports.hexToRgb=n;exports.hexFromString=(r,e="",t=!1)=>{const o=r.match(/#[a-fA-F0-9]{6}|#[a-fA-F0-9]{3}$/g);return o&&o.length>0?t?o[o.length-1]:o:e};const l=r=>{const o=t(r)?e(r):r;if("#"===o.charAt(0))return n(o);const s=o.replace(/ /g,""),l=o.substr(0,4),p=s.match(/\((.+)\)/);if(!l.startsWith("rgb")||!p)throw new Error('Next UI: Only support ["RGB", "RGBA", "HEX"] color.');return p[1].split(",").map((r=>Number.parseFloat(r)))};exports.colorToRgbValues=l;function p(r,e){return e=e||2,(new Array(e).join("0")+r).slice(-e)}exports.addColorAlpha=(r,n=1)=>{if(!r)return"";const p=t(r)?e(r):r;if(o(p))return s(p,n);if(!/^#|rgb|RGB/.test(p))return p;const[a,x,i]=l(p);return`rgba(${a}, ${x}, ${i}, ${n>1?1:n<0?0:n})`};exports.invertHex=(r,o=!0)=>{let s=t(r)?e(r):r;if(0===s.indexOf("#")&&(s=s.slice(1)),3===s.length&&(s=s[0]+s[0]+s[1]+s[1]+s[2]+s[2]),6!==s.length)return r;let n=parseInt(s.slice(0,2),16),l=parseInt(s.slice(2,4),16),a=parseInt(s.slice(4,6),16);return o?.299*n+.587*l+.114*a>186?"#000000":"#FFFFFF":(n=255-n,l=255-l,a=255-a,"#"+p(n.toString(16))+p(l.toString(16))+p(a.toString(16)))};
@@ -1,76 +1 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- exports.__esModule = true;
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _withDefaults = _interopRequireDefault(require("../utils/with-defaults"));
11
-
12
- var _clsx = _interopRequireDefault(require("../utils/clsx"));
13
-
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
18
- const defaultProps = {
19
- visible: false,
20
- enterTime: 60,
21
- leaveTime: 60,
22
- clearTime: 60,
23
- className: '',
24
- name: 'transition'
25
- };
26
-
27
- const CSSTransition = ({
28
- children,
29
- className,
30
- visible,
31
- enterTime,
32
- leaveTime,
33
- clearTime,
34
- name,
35
- ...props
36
- }) => {
37
- const [classes, setClasses] = (0, _react.useState)('');
38
- const [renderable, setRenderable] = (0, _react.useState)(visible);
39
- (0, _react.useEffect)(() => {
40
- const statusClassName = visible ? 'enter' : 'leave';
41
- const time = visible ? enterTime : leaveTime;
42
-
43
- if (visible && !renderable) {
44
- setRenderable(true);
45
- }
46
-
47
- setClasses(`${name}-${statusClassName}`); // set class to active
48
-
49
- const timer = setTimeout(() => {
50
- setClasses(`${name}-${statusClassName} ${name}-${statusClassName}-active`);
51
- clearTimeout(timer);
52
- }, time); // remove classess when animation over
53
-
54
- const clearClassesTimer = setTimeout(() => {
55
- if (!visible) {
56
- setClasses('');
57
- setRenderable(false);
58
- }
59
-
60
- clearTimeout(clearClassesTimer);
61
- }, time + clearTime);
62
- return () => {
63
- clearTimeout(timer);
64
- clearTimeout(clearClassesTimer);
65
- };
66
- }, [visible, renderable]);
67
- if (! /*#__PURE__*/_react.default.isValidElement(children) || !renderable) return null;
68
- return /*#__PURE__*/_react.default.cloneElement(children, { ...props,
69
- className: (0, _clsx.default)(children.props.className, className, classes)
70
- });
71
- };
72
-
73
- var _default = (0, _withDefaults.default)(CSSTransition, defaultProps);
74
-
75
- exports.default = _default;
76
- module.exports = exports.default;
1
+ var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var a={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var n=u?Object.getOwnPropertyDescriptor(e,i):null;n&&(n.get||n.set)?Object.defineProperty(a,i,n):a[i]=e[i]}a.default=e,r&&r.set(e,a);return a}(require("react")),r=e(require("../utils/with-defaults")),a=e(require("../utils/clsx"));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}var u=(0,r.default)((({children:e,className:r,visible:l,enterTime:u,leaveTime:i,clearTime:n,name:o,...s})=>{const[c,f]=(0,t.useState)(""),[p,m]=(0,t.useState)(l);return(0,t.useEffect)((()=>{const e=l?"enter":"leave",t=l?u:i;l&&!p&&m(!0),f(`${o}-${e}`);const r=setTimeout((()=>{f(`${o}-${e} ${o}-${e}-active`),clearTimeout(r)}),t),a=setTimeout((()=>{l||(f(""),m(!1)),clearTimeout(a)}),t+n);return()=>{clearTimeout(r),clearTimeout(a)}}),[l,p]),t.default.isValidElement(e)&&p?t.default.cloneElement(e,{...s,className:(0,a.default)(e.props.className,r,c)}):null}),{visible:!1,enterTime:60,leaveTime:60,clearTime:60,className:"",name:"transition"});exports.default=u,module.exports=exports.default;
@@ -1,33 +1 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = deepMerge;
5
-
6
- function deepMerge(result) {
7
- var stack = Array.prototype.slice.call(arguments, 1);
8
- var item;
9
- var key;
10
-
11
- while (stack.length) {
12
- item = stack.shift();
13
-
14
- for (key in item) {
15
- // eslint-disable-next-line no-prototype-builtins
16
- if (item.hasOwnProperty(key)) {
17
- if (typeof result[key] === 'object' && result[key] && Object.prototype.toString.call(result[key]) !== '[object Array]') {
18
- if (typeof item[key] === 'object' && item[key] !== null) {
19
- result[key] = deepMerge({}, result[key], item[key]);
20
- } else {
21
- result[key] = item[key];
22
- }
23
- } else {
24
- result[key] = item[key];
25
- }
26
- }
27
- }
28
- }
29
-
30
- return result;
31
- }
32
-
33
- module.exports = exports.default;
1
+ exports.__esModule=!0,exports.default=function t(e){var o,r,l=Array.prototype.slice.call(arguments,1);for(;l.length;)for(r in o=l.shift())o.hasOwnProperty(r)&&("object"==typeof e[r]&&e[r]&&"[object Array]"!==Object.prototype.toString.call(e[r])&&"object"==typeof o[r]&&null!==o[r]?e[r]=t({},e[r],o[r]):e[r]=o[r]);return e},module.exports=exports.default;
@@ -1,10 +1 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.getMargin = void 0;
5
-
6
- const getMargin = num => {
7
- return `calc(${num * 15.25}pt + 1px * ${num - 1})`;
8
- };
9
-
10
- exports.getMargin = getMargin;
1
+ exports.__esModule=!0,exports.getMargin=void 0;exports.getMargin=e=>`calc(${15.25*e}pt + 1px * ${e-1})`;
package/cjs/utils/dom.js CHANGED
@@ -1,110 +1 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.canUseDOM = canUseDOM;
5
- exports.detectBrowser = detectBrowser;
6
- exports.detectDeviceType = detectDeviceType;
7
- exports.detectOS = detectOS;
8
- exports.detectTouch = detectTouch;
9
- exports.isBrowser = void 0;
10
-
11
- function canUseDOM() {
12
- return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
13
- }
14
-
15
- const isBrowser = canUseDOM();
16
- exports.isBrowser = isBrowser;
17
-
18
- function getUserAgentBrowser(navigator) {
19
- const {
20
- userAgent: ua,
21
- vendor
22
- } = navigator;
23
- const android = /(android)/i.test(ua);
24
-
25
- switch (true) {
26
- case /CriOS/.test(ua):
27
- return 'Chrome for iOS';
28
-
29
- case /Edg\//.test(ua):
30
- return 'Edge';
31
-
32
- case android && /Silk\//.test(ua):
33
- return 'Silk';
34
-
35
- case /Chrome/.test(ua) && /Google Inc/.test(vendor):
36
- return 'Chrome';
37
-
38
- case /Firefox\/\d+\.\d+$/.test(ua):
39
- return 'Firefox';
40
-
41
- case android:
42
- return 'AOSP';
43
-
44
- case /MSIE|Trident/.test(ua):
45
- return 'IE';
46
-
47
- case /Safari/.test(navigator.userAgent) && /Apple Computer/.test(ua):
48
- return 'Safari';
49
-
50
- case /AppleWebKit/.test(ua):
51
- return 'WebKit';
52
-
53
- default:
54
- return null;
55
- }
56
- }
57
-
58
- function getUserAgentOS(navigator) {
59
- const {
60
- userAgent: ua,
61
- platform
62
- } = navigator;
63
-
64
- switch (true) {
65
- case /Android/.test(ua):
66
- return 'Android';
67
-
68
- case /iPhone|iPad|iPod/.test(platform):
69
- return 'iOS';
70
-
71
- case /Win/.test(platform):
72
- return 'Windows';
73
-
74
- case /Mac/.test(platform):
75
- return 'Mac';
76
-
77
- case /CrOS/.test(ua):
78
- return 'Chrome OS';
79
-
80
- case /Firefox/.test(ua):
81
- return 'Firefox OS';
82
-
83
- default:
84
- return null;
85
- }
86
- }
87
-
88
- function detectDeviceType(navigator) {
89
- const {
90
- userAgent: ua
91
- } = navigator;
92
- if (/(tablet)|(iPad)|(Nexus 9)/i.test(ua)) return 'tablet';
93
- if (/(mobi)/i.test(ua)) return 'phone';
94
- return 'desktop';
95
- }
96
-
97
- function detectOS(os) {
98
- if (!isBrowser) return false;
99
- return getUserAgentOS(window.navigator) === os;
100
- }
101
-
102
- function detectBrowser(browser) {
103
- if (!isBrowser) return false;
104
- return getUserAgentBrowser(window.navigator) === browser;
105
- }
106
-
107
- function detectTouch() {
108
- if (!isBrowser) return false;
109
- return window.ontouchstart === null && window.ontouchmove === null && window.ontouchend === null;
110
- }
1
+ function e(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}exports.__esModule=!0,exports.canUseDOM=e,exports.detectBrowser=function(e){return!!t&&function(e){const{userAgent:t,vendor:r}=e,n=/(android)/i.test(t);switch(!0){case/CriOS/.test(t):return"Chrome for iOS";case/Edg\//.test(t):return"Edge";case n&&/Silk\//.test(t):return"Silk";case/Chrome/.test(t)&&/Google Inc/.test(r):return"Chrome";case/Firefox\/\d+\.\d+$/.test(t):return"Firefox";case n:return"AOSP";case/MSIE|Trident/.test(t):return"IE";case/Safari/.test(e.userAgent)&&/Apple Computer/.test(t):return"Safari";case/AppleWebKit/.test(t):return"WebKit";default:return null}}(window.navigator)===e},exports.detectDeviceType=function(e){const{userAgent:t}=e;return/(tablet)|(iPad)|(Nexus 9)/i.test(t)?"tablet":/(mobi)/i.test(t)?"phone":"desktop"},exports.detectOS=function(e){return!!t&&function(e){const{userAgent:t,platform:r}=e;switch(!0){case/Android/.test(t):return"Android";case/iPhone|iPad|iPod/.test(r):return"iOS";case/Win/.test(r):return"Windows";case/Mac/.test(r):return"Mac";case/CrOS/.test(t):return"Chrome OS";case/Firefox/.test(t):return"Firefox OS";default:return null}}(window.navigator)===e},exports.detectTouch=function(){return!!t&&(null===window.ontouchstart&&null===window.ontouchmove&&null===window.ontouchend)},exports.isBrowser=void 0;const t=e();exports.isBrowser=t;
package/cjs/utils/drip.js CHANGED
@@ -1,116 +1 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- exports.__esModule = true;
6
- exports.default = exports.StyledDrip = void 0;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _stitches = require("../theme/stitches.config");
11
-
12
- var _withDefaults = _interopRequireDefault(require("../utils/with-defaults"));
13
-
14
- var _clsx = _interopRequireDefault(require("../utils/clsx"));
15
-
16
- var _jsxRuntime = require("react/jsx-runtime");
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- const defaultProps = {
23
- visible: false,
24
- x: 0,
25
- y: 0,
26
- className: ''
27
- };
28
- const expand = (0, _stitches.keyframes)({
29
- '0%': {
30
- opacity: 0,
31
- transform: 'scale(0.25)'
32
- },
33
- '30%': {
34
- opacity: 1
35
- },
36
- '80%': {
37
- opacity: 0.5
38
- },
39
- '100%': {
40
- transform: 'scale(28)',
41
- opacity: 0
42
- }
43
- });
44
- const StyledDrip = (0, _stitches.styled)('div', {
45
- position: 'absolute',
46
- left: 0,
47
- right: 0,
48
- top: 0,
49
- bottom: 0,
50
- '& svg': {
51
- position: 'absolute',
52
- animation: `350ms linear ${expand}`,
53
- animationFillMode: 'forwards',
54
- width: '$md',
55
- height: '$md'
56
- }
57
- });
58
- exports.StyledDrip = StyledDrip;
59
-
60
- const Drip = ({
61
- visible,
62
- x,
63
- y,
64
- color,
65
- onCompleted,
66
- className,
67
- ...props
68
- }) => {
69
- const dripRef = (0, _react.useRef)(null);
70
- const top = Number.isNaN(+y) ? 0 : y - 10;
71
- const left = Number.isNaN(+x) ? 0 : x - 10;
72
- (0, _react.useEffect)(() => {
73
- if (!dripRef.current) return;
74
- dripRef.current.addEventListener('animationend', onCompleted);
75
- return () => {
76
- if (!dripRef.current) return;
77
- dripRef.current.removeEventListener('animationend', onCompleted);
78
- };
79
- });
80
- if (!visible) return null;
81
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledDrip, {
82
- ref: dripRef,
83
- className: (0, _clsx.default)('nextui-drip', className),
84
- ...props,
85
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
86
- width: "20",
87
- height: "20",
88
- viewBox: "0 0 20 20",
89
- style: {
90
- top,
91
- left
92
- },
93
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
94
- stroke: "none",
95
- strokeWidth: "1",
96
- fill: "none",
97
- fillRule: "evenodd",
98
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
99
- className: "nextui-drip-filler",
100
- fill: color,
101
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
102
- width: "100%",
103
- height: "100%",
104
- rx: "10"
105
- })
106
- })
107
- })
108
- })
109
- });
110
- };
111
-
112
- const MemoDrip = /*#__PURE__*/_react.default.memo(Drip);
113
-
114
- var _default = (0, _withDefaults.default)(MemoDrip, defaultProps);
115
-
116
- exports.default = _default;
1
+ var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=exports.StyledDrip=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(i,o,a):i[o]=e[o]}i.default=e,r&&r.set(e,i);return i}(require("react")),r=require("../theme/stitches.config"),i=e(require("../utils/with-defaults")),n=e(require("../utils/clsx")),o=require("react/jsx-runtime");function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}const a=(0,r.keyframes)({"0%":{opacity:0,transform:"scale(0.25)"},"30%":{opacity:1},"80%":{opacity:.5},"100%":{transform:"scale(28)",opacity:0}}),s=(0,r.styled)("div",{position:"absolute",left:0,right:0,top:0,bottom:0,"& svg":{position:"absolute",animation:`350ms linear ${a}`,animationFillMode:"forwards",width:"$md",height:"$md"}});exports.StyledDrip=s;const u=({visible:e,x:r,y:i,color:l,onCompleted:a,className:u,...c})=>{const f=(0,t.useRef)(null),d=Number.isNaN(+i)?0:i-10,p=Number.isNaN(+r)?0:r-10;return(0,t.useEffect)((()=>{if(f.current)return f.current.addEventListener("animationend",a),()=>{f.current&&f.current.removeEventListener("animationend",a)}})),e?(0,o.jsx)(s,{ref:f,className:(0,n.default)("nextui-drip",u),...c,children:(0,o.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{top:d,left:p},children:(0,o.jsx)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,o.jsx)("g",{className:"nextui-drip-filler",fill:l,children:(0,o.jsx)("rect",{width:"100%",height:"100%",rx:"10"})})})})}):null},c=t.default.memo(u);var f=(0,i.default)(c,{visible:!1,x:0,y:0,className:""});exports.default=f;
@@ -1,109 +1 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- exports.__esModule = true;
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _stitches = require("../theme/stitches.config");
11
-
12
- var _withDefaults = _interopRequireDefault(require("../utils/with-defaults"));
13
-
14
- var _useRealShape = _interopRequireDefault(require("../use-real-shape"));
15
-
16
- var _jsxRuntime = require("react/jsx-runtime");
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- const defaultProps = {
23
- isExpanded: false,
24
- animated: true,
25
- delay: 200
26
- };
27
- const StyledExpand = (0, _stitches.styled)('div', {
28
- p: 0,
29
- m: 0,
30
- h: 0,
31
- opacity: 0,
32
- overflow: 'hidden',
33
- variants: {
34
- expanded: {
35
- true: {
36
- opacity: 1
37
- }
38
- }
39
- }
40
- });
41
-
42
- const Expand = ({
43
- isExpanded,
44
- delay,
45
- animated,
46
- css,
47
- children
48
- }) => {
49
- const [height, setHeight] = (0, _react.useState)(isExpanded ? 'auto' : '0');
50
- const [selfExpanded, setSelfExpanded] = (0, _react.useState)(isExpanded);
51
- const contentRef = (0, _react.useRef)(null);
52
- const entryTimer = (0, _react.useRef)();
53
- const leaveTimer = (0, _react.useRef)();
54
- const resetTimer = (0, _react.useRef)();
55
- const [state, updateShape] = (0, _useRealShape.default)(contentRef);
56
- (0, _react.useEffect)(() => setHeight(`${state.height}px`), [state.height]);
57
- (0, _react.useEffect)(() => {
58
- if (isExpanded === selfExpanded) return; // show element or reset height.
59
- // force an update once manually, even if the element does not change.
60
- // (the height of the element might be "auto")
61
-
62
- if (!isExpanded) {
63
- updateShape();
64
- setHeight(`${state.height}px`);
65
- } // show expand animation
66
-
67
-
68
- entryTimer.current = window.setTimeout(() => {
69
- setSelfExpanded(isExpanded);
70
- clearTimeout(entryTimer.current);
71
- }, 30); // Reset height after animation
72
-
73
- if (isExpanded) {
74
- resetTimer.current = window.setTimeout(() => {
75
- setHeight('auto');
76
- clearTimeout(resetTimer.current);
77
- }, delay);
78
- } else {
79
- leaveTimer.current = window.setTimeout(() => {
80
- clearTimeout(leaveTimer.current);
81
- }, delay / 2);
82
- }
83
-
84
- return () => {
85
- clearTimeout(entryTimer.current);
86
- clearTimeout(leaveTimer.current);
87
- clearTimeout(resetTimer.current);
88
- };
89
- }, [isExpanded]);
90
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledExpand, {
91
- expanded: selfExpanded,
92
- css: {
93
- height: selfExpanded ? height : '0',
94
- transition: animated ? `height ${delay}ms ease 0ms,
95
- opacity ${delay * 1.5}ms ease 0ms;` : 'none',
96
- ...css
97
- },
98
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
99
- ref: contentRef,
100
- className: "nextui-expand-content",
101
- children: children
102
- })
103
- });
104
- };
105
-
106
- var _default = (0, _withDefaults.default)(Expand, defaultProps);
107
-
108
- exports.default = _default;
109
- module.exports = exports.default;
1
+ var e=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var u={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(u,i,o):u[i]=e[i]}u.default=e,r&&r.set(e,u);return u}(require("react")),r=require("../theme/stitches.config"),u=e(require("../utils/with-defaults")),n=e(require("../use-real-shape")),i=require("react/jsx-runtime");function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const o=(0,r.styled)("div",{p:0,m:0,h:0,opacity:0,overflow:"hidden",variants:{expanded:{true:{opacity:1}}}});var s=(0,u.default)((({isExpanded:e,delay:r,animated:u,css:a,children:s})=>{const[c,l]=(0,t.useState)(e?"auto":"0"),[d,f]=(0,t.useState)(e),p=(0,t.useRef)(null),h=(0,t.useRef)(),m=(0,t.useRef)(),x=(0,t.useRef)(),[y,v]=(0,n.default)(p);return(0,t.useEffect)((()=>l(`${y.height}px`)),[y.height]),(0,t.useEffect)((()=>{if(e!==d)return e||(v(),l(`${y.height}px`)),h.current=window.setTimeout((()=>{f(e),clearTimeout(h.current)}),30),e?x.current=window.setTimeout((()=>{l("auto"),clearTimeout(x.current)}),r):m.current=window.setTimeout((()=>{clearTimeout(m.current)}),r/2),()=>{clearTimeout(h.current),clearTimeout(m.current),clearTimeout(x.current)}}),[e]),(0,i.jsx)(o,{expanded:d,css:{height:d?c:"0",transition:u?`height ${r}ms ease 0ms,\n opacity ${1.5*r}ms ease 0ms;`:"none",...a},children:(0,i.jsx)("div",{ref:p,className:"nextui-expand-content",children:s})})}),{isExpanded:!1,animated:!0,delay:200});exports.default=s,module.exports=exports.default;