@wonderflow/react-components 10.9.1 → 10.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/core/basic.css +1 -1
  2. package/core/typography.css +1 -1
  3. package/core.css +1 -1
  4. package/dist/components/accordion/accordion-context.d.ts +1 -1
  5. package/dist/components/accordion/accordion-context.d.ts.map +1 -1
  6. package/dist/components/accordion/accordion-context.js +16 -1
  7. package/dist/components/accordion/accordion-item.d.ts.map +1 -1
  8. package/dist/components/accordion/accordion-item.js +15 -0
  9. package/dist/components/accordion/accordion.d.ts +17 -3
  10. package/dist/components/accordion/accordion.d.ts.map +1 -1
  11. package/dist/components/accordion/accordion.js +15 -0
  12. package/dist/components/accordion/accordion.module.css +1 -1
  13. package/dist/components/accordion/accordion.stories.d.ts +18 -2
  14. package/dist/components/accordion/accordion.stories.d.ts.map +1 -1
  15. package/dist/components/accordion/accordion.stories.js +1 -1
  16. package/dist/components/accordion/index.d.ts.map +1 -1
  17. package/dist/components/accordion/index.js +15 -0
  18. package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -1
  19. package/dist/components/aspect-ratio/aspect-ratio.js +15 -0
  20. package/dist/components/aspect-ratio/aspect-ratio.stories.js +1 -1
  21. package/dist/components/aspect-ratio/index.d.ts +1 -1
  22. package/dist/components/aspect-ratio/index.d.ts.map +1 -1
  23. package/dist/components/aspect-ratio/index.js +15 -0
  24. package/dist/components/autocomplete/autocomplete-option.d.ts.map +1 -1
  25. package/dist/components/autocomplete/autocomplete-option.js +15 -0
  26. package/dist/components/autocomplete/autocomplete.d.ts +2 -2
  27. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  28. package/dist/components/autocomplete/autocomplete.js +20 -2
  29. package/dist/components/autocomplete/autocomplete.module.css +1 -1
  30. package/dist/components/autocomplete/autocomplete.stories.js +2 -2
  31. package/dist/components/autocomplete/index.d.ts.map +1 -1
  32. package/dist/components/autocomplete/index.js +15 -0
  33. package/dist/components/avatar/avatar.d.ts.map +1 -1
  34. package/dist/components/avatar/avatar.js +15 -0
  35. package/dist/components/avatar/avatar.module.css +1 -1
  36. package/dist/components/avatar/avatar.stories.js +1 -1
  37. package/dist/components/avatar/index.d.ts.map +1 -1
  38. package/dist/components/avatar/index.js +15 -0
  39. package/dist/components/button/button.d.ts.map +1 -1
  40. package/dist/components/button/button.js +15 -0
  41. package/dist/components/button/button.module.css +1 -1
  42. package/dist/components/button/button.stories.js +1 -1
  43. package/dist/components/button/index.d.ts.map +1 -1
  44. package/dist/components/button/index.js +15 -0
  45. package/dist/components/card/card.module.css +1 -1
  46. package/dist/components/card/index.d.ts.map +1 -1
  47. package/dist/components/card/index.js +15 -0
  48. package/dist/components/chip/chip.d.ts.map +1 -1
  49. package/dist/components/chip/chip.js +15 -0
  50. package/dist/components/chip/chip.module.css +1 -1
  51. package/dist/components/chip/chip.stories.js +1 -1
  52. package/dist/components/chip/index.d.ts.map +1 -1
  53. package/dist/components/chip/index.js +15 -0
  54. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  55. package/dist/components/circular-progress/circular-progress.js +15 -0
  56. package/dist/components/circular-progress/circular-progress.module.css +1 -1
  57. package/dist/components/circular-progress/circular-progress.stories.js +1 -1
  58. package/dist/components/circular-progress/index.d.ts.map +1 -1
  59. package/dist/components/circular-progress/index.js +15 -0
  60. package/dist/components/clamp-text/clamp-text.d.ts.map +1 -1
  61. package/dist/components/clamp-text/clamp-text.js +16 -1
  62. package/dist/components/clamp-text/clamp-text.module.css +1 -1
  63. package/dist/components/clamp-text/clamp-text.stories.js +1 -1
  64. package/dist/components/clamp-text/index.d.ts.map +1 -1
  65. package/dist/components/clamp-text/index.js +15 -0
  66. package/dist/components/container/container.d.ts.map +1 -1
  67. package/dist/components/container/container.js +15 -0
  68. package/dist/components/container/container.module.css +1 -1
  69. package/dist/components/container/index.d.ts.map +1 -1
  70. package/dist/components/container/index.js +15 -0
  71. package/dist/components/datetime/datetime.d.ts.map +1 -1
  72. package/dist/components/datetime/datetime.js +15 -0
  73. package/dist/components/datetime/datetime.stories.js +1 -1
  74. package/dist/components/datetime/index.d.ts.map +1 -1
  75. package/dist/components/datetime/index.js +15 -0
  76. package/dist/components/disclosure/disclosure.d.ts.map +1 -1
  77. package/dist/components/disclosure/disclosure.js +15 -0
  78. package/dist/components/disclosure/disclosure.module.css +1 -1
  79. package/dist/components/disclosure/disclosure.stories.js +1 -1
  80. package/dist/components/disclosure/index.d.ts.map +1 -1
  81. package/dist/components/disclosure/index.js +15 -0
  82. package/dist/components/drawer/drawer.d.ts.map +1 -1
  83. package/dist/components/drawer/drawer.js +15 -0
  84. package/dist/components/drawer/drawer.module.css +1 -1
  85. package/dist/components/drawer/drawer.stories.js +3 -3
  86. package/dist/components/drawer/index.d.ts.map +1 -1
  87. package/dist/components/drawer/index.js +15 -0
  88. package/dist/components/elevator/elevator.d.ts.map +1 -1
  89. package/dist/components/elevator/elevator.js +15 -0
  90. package/dist/components/elevator/elevator.stories.js +1 -1
  91. package/dist/components/elevator/index.d.ts.map +1 -1
  92. package/dist/components/elevator/index.js +15 -0
  93. package/dist/components/expander/expander.d.ts +20 -0
  94. package/dist/components/expander/expander.d.ts.map +1 -0
  95. package/dist/components/expander/expander.js +35 -0
  96. package/dist/components/expander/expander.module.css +1 -0
  97. package/dist/components/expander/expander.stories.d.ts +7 -0
  98. package/dist/components/expander/expander.stories.d.ts.map +1 -0
  99. package/dist/components/expander/expander.stories.js +16 -0
  100. package/dist/components/expander/index.d.ts +3 -0
  101. package/dist/components/expander/index.d.ts.map +1 -0
  102. package/dist/components/expander/index.js +16 -0
  103. package/dist/components/grid/grid.module.css +1 -1
  104. package/dist/components/grid/index.d.ts.map +1 -1
  105. package/dist/components/grid/index.js +15 -0
  106. package/dist/components/grid/item/grid-item.d.ts.map +1 -1
  107. package/dist/components/grid/item/grid-item.js +15 -0
  108. package/dist/components/grid/item/grid-item.module.css +1 -1
  109. package/dist/components/icon-button/icon-button.d.ts +2 -2
  110. package/dist/components/icon-button/icon-button.d.ts.map +1 -1
  111. package/dist/components/icon-button/icon-button.js +15 -0
  112. package/dist/components/icon-button/icon-button.module.css +1 -1
  113. package/dist/components/icon-button/icon-button.stories.d.ts +1 -1
  114. package/dist/components/icon-button/icon-button.stories.d.ts.map +1 -1
  115. package/dist/components/icon-button/icon-button.stories.js +1 -1
  116. package/dist/components/icon-button/index.d.ts.map +1 -1
  117. package/dist/components/icon-button/index.js +15 -0
  118. package/dist/components/index.d.ts +1 -0
  119. package/dist/components/index.d.ts.map +1 -1
  120. package/dist/components/index.js +16 -0
  121. package/dist/components/info-state/index.d.ts.map +1 -1
  122. package/dist/components/info-state/index.js +15 -0
  123. package/dist/components/info-state/info-state.d.ts.map +1 -1
  124. package/dist/components/info-state/info-state.js +15 -0
  125. package/dist/components/info-state/info-state.module.css +1 -1
  126. package/dist/components/info-state/info-state.stories.js +1 -1
  127. package/dist/components/input-group/index.d.ts.map +1 -1
  128. package/dist/components/input-group/index.js +15 -0
  129. package/dist/components/input-group/input-group.d.ts.map +1 -1
  130. package/dist/components/input-group/input-group.js +15 -0
  131. package/dist/components/input-group/input-group.module.css +1 -1
  132. package/dist/components/input-group/input-group.stories.js +1 -1
  133. package/dist/components/linear-progress/index.d.ts.map +1 -1
  134. package/dist/components/linear-progress/index.js +15 -0
  135. package/dist/components/linear-progress/linear-progress.d.ts.map +1 -1
  136. package/dist/components/linear-progress/linear-progress.js +15 -0
  137. package/dist/components/linear-progress/linear-progress.module.css +1 -1
  138. package/dist/components/linear-progress/linear-progress.stories.js +1 -1
  139. package/dist/components/list/index.d.ts.map +1 -1
  140. package/dist/components/list/index.js +15 -0
  141. package/dist/components/list/list-item.d.ts.map +1 -1
  142. package/dist/components/list/list-item.js +15 -0
  143. package/dist/components/list/list.d.ts +3 -3
  144. package/dist/components/list/list.d.ts.map +1 -1
  145. package/dist/components/list/list.js +15 -0
  146. package/dist/components/list/list.module.css +1 -1
  147. package/dist/components/list/list.stories.js +1 -1
  148. package/dist/components/masonry/index.d.ts.map +1 -1
  149. package/dist/components/masonry/index.js +15 -0
  150. package/dist/components/masonry/masonry.d.ts.map +1 -1
  151. package/dist/components/masonry/masonry.module.css +1 -1
  152. package/dist/components/menu/index.d.ts.map +1 -1
  153. package/dist/components/menu/index.js +15 -0
  154. package/dist/components/menu/menu-item/menu-item-checkbox.d.ts.map +1 -1
  155. package/dist/components/menu/menu-item/menu-item-checkbox.js +15 -0
  156. package/dist/components/menu/menu-item/menu-item.d.ts.map +1 -1
  157. package/dist/components/menu/menu-item/menu-item.js +18 -3
  158. package/dist/components/menu/menu-item/menu-item.module.css +1 -1
  159. package/dist/components/menu/menu-item/menu-item.stories.js +1 -1
  160. package/dist/components/menu/menu-separator/menu-separator.d.ts.map +1 -1
  161. package/dist/components/menu/menu-separator/menu-separator.js +15 -0
  162. package/dist/components/menu/menu.d.ts.map +1 -1
  163. package/dist/components/menu/menu.js +15 -0
  164. package/dist/components/menu/menu.module.css +1 -1
  165. package/dist/components/menu/menu.stories.js +3 -3
  166. package/dist/components/modal/content/modal-content.d.ts +0 -4
  167. package/dist/components/modal/content/modal-content.d.ts.map +1 -1
  168. package/dist/components/modal/content/modal-content.js +15 -0
  169. package/dist/components/modal/content/modal-content.module.css +1 -1
  170. package/dist/components/modal/index.d.ts.map +1 -1
  171. package/dist/components/modal/index.js +15 -0
  172. package/dist/components/modal/modal.d.ts.map +1 -1
  173. package/dist/components/modal/modal.js +15 -0
  174. package/dist/components/modal/modal.module.css +1 -1
  175. package/dist/components/modal/modal.stories.js +3 -3
  176. package/dist/components/overlay-container/index.d.ts.map +1 -1
  177. package/dist/components/overlay-container/index.js +15 -0
  178. package/dist/components/overlay-container/overlay-container.d.ts.map +1 -1
  179. package/dist/components/overlay-container/overlay-container.js +15 -0
  180. package/dist/components/overlay-container/overlay-container.module.css +1 -1
  181. package/dist/components/pagination/index.d.ts.map +1 -1
  182. package/dist/components/pagination/index.js +15 -0
  183. package/dist/components/pagination/pagination.d.ts.map +1 -1
  184. package/dist/components/pagination/pagination.js +15 -0
  185. package/dist/components/pagination/pagination.module.css +1 -1
  186. package/dist/components/pagination/pagination.stories.js +1 -1
  187. package/dist/components/popover/index.d.ts.map +1 -1
  188. package/dist/components/popover/index.js +15 -0
  189. package/dist/components/popover/popover.d.ts.map +1 -1
  190. package/dist/components/popover/popover.js +3 -1
  191. package/dist/components/popover/popover.module.css +1 -1
  192. package/dist/components/popover/popover.stories.js +6 -6
  193. package/dist/components/prose/index.d.ts.map +1 -1
  194. package/dist/components/prose/index.js +15 -0
  195. package/dist/components/prose/prose.d.ts.map +1 -1
  196. package/dist/components/prose/prose.js +15 -0
  197. package/dist/components/prose/prose.module.css +1 -1
  198. package/dist/components/prose/prose.stories.js +1 -1
  199. package/dist/components/select/index.d.ts.map +1 -1
  200. package/dist/components/select/index.js +15 -0
  201. package/dist/components/select/select.d.ts.map +1 -1
  202. package/dist/components/select/select.js +15 -0
  203. package/dist/components/select/select.module.css +1 -1
  204. package/dist/components/select/select.stories.js +1 -1
  205. package/dist/components/selection-controls/checkbox.d.ts.map +1 -1
  206. package/dist/components/selection-controls/checkbox.js +15 -0
  207. package/dist/components/selection-controls/checkbox.stories.js +1 -1
  208. package/dist/components/selection-controls/index.d.ts.map +1 -1
  209. package/dist/components/selection-controls/index.js +15 -0
  210. package/dist/components/selection-controls/radio.d.ts.map +1 -1
  211. package/dist/components/selection-controls/radio.js +15 -0
  212. package/dist/components/selection-controls/radio.stories.js +1 -1
  213. package/dist/components/selection-controls/selection-controls.module.css +1 -1
  214. package/dist/components/selection-controls/toggle.d.ts.map +1 -1
  215. package/dist/components/selection-controls/toggle.js +15 -0
  216. package/dist/components/selection-controls/toggle.stories.js +1 -1
  217. package/dist/components/separator/index.d.ts.map +1 -1
  218. package/dist/components/separator/index.js +15 -0
  219. package/dist/components/separator/separator.d.ts.map +1 -1
  220. package/dist/components/separator/separator.js +15 -0
  221. package/dist/components/separator/separator.module.css +1 -1
  222. package/dist/components/skeleton/index.d.ts.map +1 -1
  223. package/dist/components/skeleton/index.js +15 -0
  224. package/dist/components/skeleton/skeleton.d.ts.map +1 -1
  225. package/dist/components/skeleton/skeleton.module.css +1 -1
  226. package/dist/components/skeleton/skeleton.stories.js +1 -1
  227. package/dist/components/slider/index.d.ts.map +1 -1
  228. package/dist/components/slider/index.js +15 -0
  229. package/dist/components/slider/slider.d.ts.map +1 -1
  230. package/dist/components/slider/slider.js +15 -0
  231. package/dist/components/slider/slider.module.css +1 -1
  232. package/dist/components/slider/slider.stories.js +1 -1
  233. package/dist/components/snackbar/index.d.ts.map +1 -1
  234. package/dist/components/snackbar/index.js +15 -0
  235. package/dist/components/snackbar/snackbar.d.ts.map +1 -1
  236. package/dist/components/snackbar/snackbar.js +15 -0
  237. package/dist/components/snackbar/snackbar.module.css +1 -1
  238. package/dist/components/snackbar/snackbar.stories.js +1 -1
  239. package/dist/components/spinner/index.d.ts.map +1 -1
  240. package/dist/components/spinner/index.js +15 -0
  241. package/dist/components/spinner/spinner.d.ts.map +1 -1
  242. package/dist/components/spinner/spinner.js +15 -0
  243. package/dist/components/spinner/spinner.stories.js +1 -1
  244. package/dist/components/split-button/index.d.ts.map +1 -1
  245. package/dist/components/split-button/index.js +15 -0
  246. package/dist/components/split-button/split-button.d.ts.map +1 -1
  247. package/dist/components/split-button/split-button.js +15 -0
  248. package/dist/components/split-button/split-button.module.css +1 -1
  249. package/dist/components/split-button/split-button.stories.js +1 -1
  250. package/dist/components/stack/index.d.ts.map +1 -1
  251. package/dist/components/stack/index.js +15 -0
  252. package/dist/components/stack/stack.d.ts.map +1 -1
  253. package/dist/components/stack/stack.module.css +1 -1
  254. package/dist/components/star-meter/index.d.ts.map +1 -1
  255. package/dist/components/star-meter/index.js +15 -0
  256. package/dist/components/star-meter/star-meter.d.ts.map +1 -1
  257. package/dist/components/star-meter/star-meter.js +15 -0
  258. package/dist/components/star-meter/star-meter.module.css +1 -1
  259. package/dist/components/star-meter/star-meter.stories.js +1 -1
  260. package/dist/components/symbol/index.d.ts.map +1 -1
  261. package/dist/components/symbol/index.js +15 -0
  262. package/dist/components/symbol/symbol.d.ts.map +1 -1
  263. package/dist/components/symbol/symbol.module.css +1 -1
  264. package/dist/components/symbol/symbol.stories.js +1 -1
  265. package/dist/components/tab/index.d.ts.map +1 -1
  266. package/dist/components/tab/index.js +15 -0
  267. package/dist/components/tab/tab.d.ts +2 -1
  268. package/dist/components/tab/tab.d.ts.map +1 -1
  269. package/dist/components/tab/tab.js +16 -1
  270. package/dist/components/tab/tab.module.css +1 -1
  271. package/dist/components/tab/tab.stories.js +1 -1
  272. package/dist/components/tab/tabs-panel.d.ts.map +1 -1
  273. package/dist/components/tab/tabs-panel.js +15 -0
  274. package/dist/components/table/index.d.ts.map +1 -1
  275. package/dist/components/table/index.js +15 -0
  276. package/dist/components/table/table-cell/index.d.ts.map +1 -1
  277. package/dist/components/table/table-cell/index.js +15 -0
  278. package/dist/components/table/table-cell/table-cell.d.ts.map +1 -1
  279. package/dist/components/table/table-cell/table-cell.js +15 -0
  280. package/dist/components/table/table-cell/table-cell.module.css +1 -1
  281. package/dist/components/table/table-checkbox/index.d.ts.map +1 -1
  282. package/dist/components/table/table-checkbox/index.js +15 -0
  283. package/dist/components/table/table-checkbox/table-checkbox.d.ts.map +1 -1
  284. package/dist/components/table/table-checkbox/table-checkbox.js +15 -0
  285. package/dist/components/table/table-checkbox/table-checkbox.module.css +1 -1
  286. package/dist/components/table/table-controls/index.d.ts.map +1 -1
  287. package/dist/components/table/table-controls/index.js +15 -0
  288. package/dist/components/table/table-controls/toggle-columns.d.ts.map +1 -1
  289. package/dist/components/table/table-controls/toggle-columns.js +18 -3
  290. package/dist/components/table/table-expand/index.d.ts.map +1 -1
  291. package/dist/components/table/table-expand/index.js +15 -0
  292. package/dist/components/table/table-expand/table-expand.module.css +1 -1
  293. package/dist/components/table/table-header/index.d.ts +1 -1
  294. package/dist/components/table/table-header/index.d.ts.map +1 -1
  295. package/dist/components/table/table-header/index.js +15 -0
  296. package/dist/components/table/table-header/table-header.d.ts.map +1 -1
  297. package/dist/components/table/table-header/table-header.module.css +1 -1
  298. package/dist/components/table/table-pagination/index.d.ts +1 -1
  299. package/dist/components/table/table-pagination/index.d.ts.map +1 -1
  300. package/dist/components/table/table-pagination/index.js +15 -0
  301. package/dist/components/table/table-pagination/table-pagination.d.ts.map +1 -1
  302. package/dist/components/table/table-pagination/table-pagination.js +15 -0
  303. package/dist/components/table/table-row/index.d.ts.map +1 -1
  304. package/dist/components/table/table-row/index.js +15 -0
  305. package/dist/components/table/table-row/table-row.d.ts.map +1 -1
  306. package/dist/components/table/table-row/table-row.js +17 -2
  307. package/dist/components/table/table.d.ts +5 -1
  308. package/dist/components/table/table.d.ts.map +1 -1
  309. package/dist/components/table/table.js +17 -1
  310. package/dist/components/table/table.module.css +1 -1
  311. package/dist/components/table/table.stories.d.ts +16 -16
  312. package/dist/components/table/table.stories.d.ts.map +1 -1
  313. package/dist/components/table/types.d.ts.map +1 -1
  314. package/dist/components/table/types.js +15 -0
  315. package/dist/components/text/index.d.ts.map +1 -1
  316. package/dist/components/text/index.js +15 -0
  317. package/dist/components/text/text.d.ts.map +1 -1
  318. package/dist/components/text/text.module.css +1 -1
  319. package/dist/components/text/text.stories.js +1 -1
  320. package/dist/components/textfield/base-field/base-field.d.ts +2 -2
  321. package/dist/components/textfield/base-field/base-field.d.ts.map +1 -1
  322. package/dist/components/textfield/base-field/base-field.js +1 -1
  323. package/dist/components/textfield/base-field/base-field.module.css +1 -1
  324. package/dist/components/textfield/base-field/index.d.ts.map +1 -1
  325. package/dist/components/textfield/base-field/index.js +15 -0
  326. package/dist/components/textfield/index.d.ts.map +1 -1
  327. package/dist/components/textfield/index.js +15 -0
  328. package/dist/components/textfield/textfield.d.ts +3 -54
  329. package/dist/components/textfield/textfield.d.ts.map +1 -1
  330. package/dist/components/textfield/textfield.js +2 -2
  331. package/dist/components/textfield/textfield.module.css +1 -1
  332. package/dist/components/textfield/textfield.stories.d.ts +4 -56
  333. package/dist/components/textfield/textfield.stories.d.ts.map +1 -1
  334. package/dist/components/textfield/textfield.stories.js +1 -1
  335. package/dist/components/title/index.d.ts.map +1 -1
  336. package/dist/components/title/index.js +15 -0
  337. package/dist/components/title/title.d.ts.map +1 -1
  338. package/dist/components/title/title.js +16 -1
  339. package/dist/components/title/title.module.css +1 -1
  340. package/dist/components/title/title.stories.d.ts +1 -0
  341. package/dist/components/title/title.stories.d.ts.map +1 -1
  342. package/dist/components/title/title.stories.js +10 -1
  343. package/dist/components/toggle-button/index.d.ts.map +1 -1
  344. package/dist/components/toggle-button/index.js +15 -0
  345. package/dist/components/toggle-button/toggle-button.d.ts +4 -3
  346. package/dist/components/toggle-button/toggle-button.d.ts.map +1 -1
  347. package/dist/components/toggle-button/toggle-button.js +19 -4
  348. package/dist/components/toggle-button/toggle-button.module.css +1 -1
  349. package/dist/components/toggle-button/toggle-button.stories.d.ts +2 -11
  350. package/dist/components/toggle-button/toggle-button.stories.d.ts.map +1 -1
  351. package/dist/components/toggle-button/toggle-button.stories.js +1 -1
  352. package/dist/components/tooltip/index.d.ts.map +1 -1
  353. package/dist/components/tooltip/index.js +15 -0
  354. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  355. package/dist/components/tooltip/tooltip.js +3 -1
  356. package/dist/components/tooltip/tooltip.module.css +1 -1
  357. package/dist/components/tooltip/tooltip.stories.js +1 -1
  358. package/dist/index.d.ts.map +1 -1
  359. package/dist/index.js +15 -0
  360. package/dist/providers/index.d.ts.map +1 -1
  361. package/dist/providers/index.js +15 -0
  362. package/dist/providers/overlay.d.ts.map +1 -1
  363. package/dist/providers/overlay.js +15 -0
  364. package/dist/providers/responsive.d.ts.map +1 -1
  365. package/dist/providers/responsive.js +15 -0
  366. package/dist/types/index.d.ts.map +1 -1
  367. package/dist/types/index.js +15 -0
  368. package/dist/types/polymorphic/index.d.ts +1 -6
  369. package/dist/types/polymorphic/index.d.ts.map +1 -1
  370. package/dist/types/polymorphic/index.js +15 -0
  371. package/package.json +6 -6
@@ -1 +1 @@
1
- .Textfield{appearance:none;padding:0;position:relative}.Textfield[data-textfield-dimension=small]{--field-height:1.50rem;--field-padding:0.33rem;--font-size:0.88rem}.Textfield[data-textfield-dimension=regular]{--field-height:2.50rem;--field-padding:1.00rem;--font-size:1.00rem}.Textfield[data-textfield-dimension=big]{--field-height:3.00rem;--field-padding:1.00rem;--font-size:1.13rem}.Textfield[data-textfield-fullwidth=true]{inline-size:100%}.FieldContainer{position:relative}.InputField{--factor:4}[data-textfield-has-icon=true][data-textfield-icon-position=right] .InputField{padding:0 calc(var(--field-padding)*var(--factor)) 0 var(--field-padding)}[data-textfield-has-icon=true][data-textfield-icon-position=left] .InputField{padding:0 var(--field-padding) 0 calc(var(--field-padding)*var(--factor))}[data-textfield-dimension*=big] .InputField,[data-textfield-dimension*=regular] .InputField{--factor:3}.Icon{border-radius:.25rem;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}[data-textfield-icon-position=left] .Icon{left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .Icon{left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .Icon{fill:var(--highlight-red-foreground)}.IconButton:is(.IconButton){--x:25%;outline-offset:-.25em;position:absolute;top:50%;transform:translateY(-50%) translateX(var(--x))}.IconButton[data-button-kind=flat]:is(.IconButton):is(:hover,:active,:focus,[data-button-disabled=true]){-webkit-backdrop-filter:none;backdrop-filter:none;background-color:transparent}[data-textfield-icon-position=left] .IconButton:is(.IconButton){--x:-19%;left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .IconButton:is(.IconButton){left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .IconButton:is(.IconButton){color:var(--highlight-red-foreground)}.InputField:invalid+.Icon{fill:var(--highlight-red-foreground)}
1
+ @layer components{.Textfield{appearance:none;padding:0;position:relative}.Textfield[data-textfield-dimension=small]{--field-height:1.50rem;--field-padding:0.33rem;--font-size:0.88rem}.Textfield[data-textfield-dimension=regular]{--field-height:2.50rem;--field-padding:1.00rem;--font-size:1.00rem}.Textfield[data-textfield-dimension=big]{--field-height:3.00rem;--field-padding:1.00rem;--font-size:1.13rem}.Textfield[data-textfield-fullwidth=true]{inline-size:100%}.FieldContainer{position:relative}.InputField{--factor:4}[data-textfield-has-icon=true][data-textfield-icon-position=right] .InputField{padding:0 calc(var(--field-padding)*var(--factor)) 0 var(--field-padding)}[data-textfield-has-icon=true][data-textfield-icon-position=left] .InputField{padding:0 var(--field-padding) 0 calc(var(--field-padding)*var(--factor))}[data-textfield-dimension*=big] .InputField,[data-textfield-dimension*=regular] .InputField{--factor:3}.Icon{border-radius:.25rem;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}[data-textfield-icon-position=left] .Icon{left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .Icon{left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .Icon{fill:var(--highlight-red-foreground)}.InputField:invalid+.Icon{fill:var(--highlight-red-foreground)}}@layer overrides{.IconButton{--x:25%;outline-offset:-.25em;position:absolute;top:50%;transform:translateY(-50%) translateX(var(--x))}.IconButton[data-button-kind=flat]:is(:hover,:active,:focus,[data-button-disabled=true]){-webkit-backdrop-filter:none;backdrop-filter:none;background-color:transparent}[data-textfield-icon-position=left] .IconButton{--x:-19%;left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .IconButton{left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .IconButton{color:var(--highlight-red-foreground)}}
@@ -3,60 +3,8 @@ import React from 'react';
3
3
  import { Textfield } from './textfield';
4
4
  declare const story: ComponentMeta<typeof Textfield>;
5
5
  export default story;
6
- export declare const Single: ComponentStory<React.ForwardRefExoticComponent<React.InputHTMLAttributes<import("./base-field").PrimitiveInputType> & {
7
- invalid?: boolean | undefined;
8
- } & {
9
- icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
10
- iconPosition?: "left" | "right" | undefined;
11
- label?: string | undefined;
12
- type?: string | undefined;
13
- textarea?: boolean | undefined;
14
- dimension?: "small" | "regular" | "big" | undefined;
15
- readOnly?: boolean | undefined;
16
- disabled?: boolean | undefined;
17
- onChange?: ((event: React.ChangeEvent<import("./base-field").PrimitiveInputType>) => void) | undefined;
18
- fullWidth?: boolean | undefined;
19
- } & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
20
- export declare const Types: ComponentStory<React.ForwardRefExoticComponent<React.InputHTMLAttributes<import("./base-field").PrimitiveInputType> & {
21
- invalid?: boolean | undefined;
22
- } & {
23
- icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
24
- iconPosition?: "left" | "right" | undefined;
25
- label?: string | undefined;
26
- type?: string | undefined;
27
- textarea?: boolean | undefined;
28
- dimension?: "small" | "regular" | "big" | undefined;
29
- readOnly?: boolean | undefined;
30
- disabled?: boolean | undefined;
31
- onChange?: ((event: React.ChangeEvent<import("./base-field").PrimitiveInputType>) => void) | undefined;
32
- fullWidth?: boolean | undefined;
33
- } & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
34
- export declare const Textarea: ComponentStory<React.ForwardRefExoticComponent<React.InputHTMLAttributes<import("./base-field").PrimitiveInputType> & {
35
- invalid?: boolean | undefined;
36
- } & {
37
- icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
38
- iconPosition?: "left" | "right" | undefined;
39
- label?: string | undefined;
40
- type?: string | undefined;
41
- textarea?: boolean | undefined;
42
- dimension?: "small" | "regular" | "big" | undefined;
43
- readOnly?: boolean | undefined;
44
- disabled?: boolean | undefined;
45
- onChange?: ((event: React.ChangeEvent<import("./base-field").PrimitiveInputType>) => void) | undefined;
46
- fullWidth?: boolean | undefined;
47
- } & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
48
- export declare const WithIcon: ComponentStory<React.ForwardRefExoticComponent<React.InputHTMLAttributes<import("./base-field").PrimitiveInputType> & {
49
- invalid?: boolean | undefined;
50
- } & {
51
- icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
52
- iconPosition?: "left" | "right" | undefined;
53
- label?: string | undefined;
54
- type?: string | undefined;
55
- textarea?: boolean | undefined;
56
- dimension?: "small" | "regular" | "big" | undefined;
57
- readOnly?: boolean | undefined;
58
- disabled?: boolean | undefined;
59
- onChange?: ((event: React.ChangeEvent<import("./base-field").PrimitiveInputType>) => void) | undefined;
60
- fullWidth?: boolean | undefined;
61
- } & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
6
+ export declare const Single: ComponentStory<React.ForwardRefExoticComponent<Pick<import("./textfield").TextfieldProps<Record<string, unknown>>, string> & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
7
+ export declare const Types: ComponentStory<React.ForwardRefExoticComponent<Pick<import("./textfield").TextfieldProps<Record<string, unknown>>, string> & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
8
+ export declare const Textarea: ComponentStory<React.ForwardRefExoticComponent<Pick<import("./textfield").TextfieldProps<Record<string, unknown>>, string> & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
9
+ export declare const WithIcon: ComponentStory<React.ForwardRefExoticComponent<Pick<import("./textfield").TextfieldProps<Record<string, unknown>>, string> & React.RefAttributes<import("./base-field").PrimitiveInputType>>>;
62
10
  //# sourceMappingURL=textfield.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"textfield.stories.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAoC1C,CAAC;AAEF,eAAe,KAAK,CAAC;AA4BrB,eAAO,MAAM,MAAM;;;;;;;;;;;;;oEAA0B,CAAC;AAY9C,eAAO,MAAM,KAAK;;;;;;;;;;;;;oEAA4B,CAAC;AAgB/C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;oEAA4B,CAAC;AAalD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;oEAA0B,CAAC"}
1
+ {"version":3,"file":"textfield.stories.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAoC1C,CAAC;AAEF,eAAe,KAAK,CAAC;AA4BrB,eAAO,MAAM,MAAM,+LAA0B,CAAC;AAY9C,eAAO,MAAM,KAAK,+LAA4B,CAAC;AAgB/C,eAAO,MAAM,QAAQ,+LAA4B,CAAC;AAalD,eAAO,MAAM,QAAQ,+LAA0B,CAAC"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Stack } from '../..';
3
3
  import { Textfield } from './textfield';
4
4
  const story = {
5
- title: 'Components/Inputs/Textfield',
5
+ title: 'Inputs/Textfield',
6
6
  component: Textfield,
7
7
  args: {
8
8
  dimension: 'regular',
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/title/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/title/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -1 +1,16 @@
1
+ /*
2
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export { Title } from './title';
@@ -1 +1 @@
1
- {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/components/title/title.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAU,MAAM,cAAc,CAAC;AAInD,oBAAY,UAAU,GAAG;IACvB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;IACtD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAA;AAED,aAAK,gBAAgB,GAAG,WAAW,CAAC,mBAAmB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAE5E,eAAO,MAAM,KAAK,kBAqDI,CAAC"}
1
+ {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/components/title/title.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,WAAW,EAAU,MAAM,cAAc,CAAC;AAInD,oBAAY,UAAU,GAAG;IACvB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;IACtD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAA;AAED,aAAK,gBAAgB,GAAG,WAAW,CAAC,mBAAmB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAE5E,eAAO,MAAM,KAAK,kBAqDI,CAAC"}
@@ -1,4 +1,19 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
2
17
  import clsx from 'clsx';
3
18
  import { Children, forwardRef, useCallback, } from 'react';
4
19
  import slugify from 'slugify';
@@ -21,6 +36,6 @@ export const Title = forwardRef(({ children, className, as: Wrapper = 'span', li
21
36
  '--t-align': textAlign,
22
37
  };
23
38
  return (_jsxs(Wrapper, { ref: forwardedRef, "data-title-line-height": lineHeight, "data-title-responsive": responsive,
24
- // @ts-expect-error
39
+ // @ts-expect-error: computedLevel is not a pure class in css module
25
40
  className: clsx(styles.Title, styles[computedLevel], className), style: { ...dynamicStyle, ...style }, id: generatedID, ...otherProps, children: [children, anchor && (_jsx("a", { href: `#${generatedID}`, className: styles.Anchor, children: _jsx(Symbol, { source: "link", weight: "duotone", dimension: 24 }) }))] }));
26
41
  });
@@ -1 +1 @@
1
- .Title:is(.H1,.H2,.H3,.H4,.H5,.H6,.Display){--lh:1.5;color:var(--heading-foreground,var(--dimmed-9));display:block;font-size:var(--fs-max);line-height:1.2;max-inline-size:var(--max-w,initial);min-block-size:.01vh;overflow-wrap:break-word;text-align:var(--t-align)}.Title[data-title-line-height=small]:is(.H1,.H2,.H3,.H4,.H5,.H6,.Display){--lh:1.2}.Title[data-title-line-height=large]:is(.H1,.H2,.H3,.H4,.H5,.H6,.Display){line-height:1.5}.Title:is(.H6){--fs-min:0.88rem;--fs-max:1.13rem;font-weight:700}.Title:is(.H5){--fs-min:1rem;--fs-max:1.33rem;font-weight:700}.Title:is(.H5):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title:is(.H4){--fs-min:1.33rem;--fs-max:1.77rem;font-weight:700}.Title:is(.H4):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title:is(.H3){--fs-min:1.77rem;--fs-max:2.37rem;font-weight:800}.Title:is(.H3):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title:is(.H2){--fs-min:2.37rem;--fs-max:3.16rem;font-weight:800}.Title:is(.H2):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title:is(.H1){--fs-min:3.16rem;--fs-max:4.2rem;font-weight:800}.Title:is(.H1):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title.Display{--fs-min:4.2rem;--fs-max:5.6rem;font-weight:800}.Title.Display:before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title[data-title-responsive=true]{font-size:var(--fs-min)}@media (min-width:48em){.Title[data-title-responsive=true]{font-size:var(--fs-max)}}.Anchor:is(.Anchor){align-items:center;background-color:var(--highlight-cyan-background);background-image:none;block-size:max(16px,.6em);border-radius:.5rem;color:var(--heading-foreground,var(--dimmed-9));display:inline-flex;inline-size:max(16px,.6em);justify-content:center;line-height:1;margin-left:.2em;padding:.1em;visibility:hidden}.Title:focus-within .Anchor:is(.Anchor),.Title:hover .Anchor:is(.Anchor){visibility:visible}.Anchor:is(.Anchor) svg{height:100%;width:100%}
1
+ @layer components{.Title:is(.H1,.H2,.H3,.H4,.H5,.H6,.Display){--lh:1.5;color:var(--heading-foreground,var(--dimmed-9));display:block;font-size:var(--fs-max);line-height:1.2;max-inline-size:var(--max-w,initial);min-block-size:.01vh;overflow-wrap:break-word;text-align:var(--t-align)}.Title[data-title-line-height=small]:is(.H1,.H2,.H3,.H4,.H5,.H6,.Display){--lh:1.2}.Title[data-title-line-height=large]:is(.H1,.H2,.H3,.H4,.H5,.H6,.Display){line-height:1.5}.Title:is(.H6){--fs-min:0.88rem;--fs-max:1.13rem;font-weight:700}.Title:is(.H5){--fs-min:1rem;--fs-max:1.33rem;font-weight:700}.Title:is(.H5):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title:is(.H4){--fs-min:1.33rem;--fs-max:1.77rem;font-weight:700}.Title:is(.H4):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title:is(.H3){--fs-min:1.77rem;--fs-max:2.37rem;font-weight:800}.Title:is(.H3):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title:is(.H2){--fs-min:2.37rem;--fs-max:3.16rem;font-weight:800}.Title:is(.H2):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title:is(.H1){--fs-min:3.16rem;--fs-max:4.2rem;font-weight:800}.Title:is(.H1):before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title.Display{--fs-min:4.2rem;--fs-max:5.6rem;font-weight:800}.Title.Display:before{content:"";display:block;height:0;margin-top:calc((1 - var(--lh))*.6em);width:0}.Title[data-title-responsive=true]{font-size:var(--fs-min)}@media (min-width:48em){.Title[data-title-responsive=true]{font-size:var(--fs-max)}}}@layer overrides{.Anchor{align-items:center;background-color:var(--highlight-cyan-background);background-image:none;block-size:max(16px,.6em);border-radius:.5rem;color:var(--heading-foreground,var(--dimmed-9));display:inline-flex;inline-size:max(16px,.6em);justify-content:center;line-height:1;margin-left:.2em;padding:.1em;visibility:hidden}.Title:focus-within .Anchor,.Title:hover .Anchor{visibility:visible}.Anchor svg{height:100%;width:100%}}
@@ -4,4 +4,5 @@ declare const story: ComponentMeta<typeof Title>;
4
4
  export default story;
5
5
  export declare const Default: ComponentStory<typeof Title>;
6
6
  export declare const Single: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"span", import("./title").TitleProps>>;
7
+ export declare const WithAnchor: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"span", import("./title").TitleProps>>;
7
8
  //# sourceMappingURL=title.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"title.stories.d.ts","sourceRoot":"","sources":["../../../src/components/title/title.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,KAAK,CAuBtC,CAAC;AAEF,eAAe,KAAK,CAAC;AAErB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAC,OAAO,KAAK,CAUhD,CAAC;AAQF,eAAO,MAAM,MAAM,6GAAoB,CAAC"}
1
+ {"version":3,"file":"title.stories.d.ts","sourceRoot":"","sources":["../../../src/components/title/title.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,KAAK,CAuBtC,CAAC;AAEF,eAAe,KAAK,CAAC;AAErB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAC,OAAO,KAAK,CAUhD,CAAC;AAQF,eAAO,MAAM,MAAM,6GAAoB,CAAC;AAQxC,eAAO,MAAM,UAAU,6GAAoB,CAAC"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Container } from '../..';
3
3
  import { Title } from './title';
4
4
  const story = {
5
- title: 'Components/Typography/Title',
5
+ title: 'Typography/Title',
6
6
  component: Title,
7
7
  parameters: {
8
8
  controls: { hideNoControlsWarning: true },
@@ -36,3 +36,12 @@ Single.args = {
36
36
  maxWidth: 'auto',
37
37
  textAlign: 'center',
38
38
  };
39
+ export const WithAnchor = Template.bind({});
40
+ WithAnchor.args = {
41
+ as: 'span',
42
+ lineHeight: 'small',
43
+ level: '1',
44
+ maxWidth: 'auto',
45
+ textAlign: 'center',
46
+ anchor: true,
47
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1 +1,16 @@
1
+ /*
2
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export { ToggleButton } from './toggle-button';
@@ -1,6 +1,7 @@
1
1
  import { Except } from 'type-fest';
2
2
  import { IconButton, IconButtonProps, Polymorphic } from '../..';
3
- export declare type ToggleButtonProps = Except<IconButtonProps, 'icon'> & {
3
+ declare type OmitIcon<T = Record<string, unknown>> = T extends IconButtonProps ? Except<T, 'icon'> : never;
4
+ export declare type ToggleButtonProps<T = Record<string, unknown>> = OmitIcon & PropsWithClass<{
4
5
  /**
5
6
  * Set the icon to show when the button is resting.
6
7
  */
@@ -14,8 +15,8 @@ export declare type ToggleButtonProps = Except<IconButtonProps, 'icon'> & {
14
15
  * the icon will be shown instead of the resting icon.
15
16
  */
16
17
  pressed?: boolean;
17
- };
18
- declare type PolymorphicToggleButton = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof IconButton>, Polymorphic.OwnProps<typeof IconButton> & ToggleButtonProps>;
18
+ }> & T;
19
+ declare type PolymorphicToggleButton = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof IconButton>, ToggleButtonProps<Polymorphic.OwnProps<typeof IconButton>>>;
19
20
  export declare const ToggleButton: PolymorphicToggleButton;
20
21
  export {};
21
22
  //# sourceMappingURL=toggle-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/toggle-button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EACL,UAAU,EAAE,eAAe,EAAE,WAAW,EAEzC,MAAM,cAAc,CAAC;AAItB,oBAAY,iBAAiB,GAAG,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,GAAG;IAChE;;OAEG;IACH,WAAW,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAA;AAED,aAAK,uBAAuB,GAAG,WAAW,CAAC,mBAAmB,CAC9D,WAAW,CAAC,gBAAgB,CAAC,OAAO,UAAU,CAAC,EAC/C,WAAW,CAAC,QAAQ,CAAC,OAAO,UAAU,CAAC,GAAG,iBAAiB,CAC1D,CAAC;AAqBF,eAAO,MAAM,YAAY,yBA8EI,CAAC"}
1
+ {"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/toggle-button.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EACL,UAAU,EAAE,eAAe,EAAE,WAAW,EAEzC,MAAM,cAAc,CAAC;AAItB,aAAK,QAAQ,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC;AAEnG,oBAAY,iBAAiB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,QAAQ,GAAG,cAAc,CAAC;IACrF;;OAEG;IACH,WAAW,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,GAAG,CAAC,CAAA;AAEN,aAAK,uBAAuB,GAAG,WAAW,CAAC,mBAAmB,CAC9D,WAAW,CAAC,gBAAgB,CAAC,OAAO,UAAU,CAAC,EAC/C,iBAAiB,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC,CACzD,CAAC;AAqBF,eAAO,MAAM,YAAY,yBA8EI,CAAC"}
@@ -1,4 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
2
17
  import clsx from 'clsx';
3
18
  import { domMax, LazyMotion, m } from 'framer-motion';
4
19
  import { forwardRef, useCallback, useEffect, useState, } from 'react';
@@ -24,9 +39,9 @@ const scaleAnimation = {
24
39
  };
25
40
  export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, dimension, kind, disabled, iconColor, pressed = false, onClick, ...otherProps }, forwardedRef) => {
26
41
  const [isPressed, setIsPressed] = useState(pressed);
27
- const [firstRender, setFirstRender] = useState(true);
42
+ const [isFirstRender, setIsFirstRender] = useState(true);
28
43
  useEffect(() => {
29
- setFirstRender(false);
44
+ setIsFirstRender(false);
30
45
  }, [pressed]);
31
46
  const handleClick = useCallback((event) => {
32
47
  setIsPressed(!isPressed);
@@ -41,6 +56,6 @@ export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, d
41
56
  return (_jsx(Symbol, { source: icon, dimension: iconSize[dimension] }));
42
57
  }, []);
43
58
  return (_jsx(IconButton, { as: "button", ref: forwardedRef, dimension: dimension, "aria-pressed": isPressed, kind: kind, disabled: disabled, onClick: handleClick, className: clsx(styles.ToggleButton, className), ...otherProps, children: _jsx(LazyMotion, { features: domMax, strict: true, children: isPressed && pressedIcon
44
- ? (_jsx(m.span, { variants: scaleAnimation, initial: firstRender && isPressed ? false : 'scaleOut', animate: "scaleIn", children: renderIcon(pressedIcon, dimension) }, "pressedIcon"))
45
- : restingIcon && (_jsx(m.span, { variants: scaleAnimation, initial: firstRender && !isPressed ? false : 'scaleOut', animate: "scaleIn", children: renderIcon(restingIcon, dimension) }, "restingIcon")) }) }));
59
+ ? (_jsx(m.span, { variants: scaleAnimation, initial: isFirstRender && isPressed ? false : 'scaleOut', animate: "scaleIn", children: renderIcon(pressedIcon, dimension) }, "pressedIcon"))
60
+ : restingIcon && (_jsx(m.span, { variants: scaleAnimation, initial: isFirstRender && !isPressed ? false : 'scaleOut', animate: "scaleIn", children: renderIcon(restingIcon, dimension) }, "restingIcon")) }) }));
46
61
  });
@@ -1 +1 @@
1
- .ToggleButton{border-radius:200px;line-height:0;padding:0}.ToggleButton[aria-pressed=true]{box-shadow:0 0 0 var(--border-width) var(--border-color),0 0 0 var(--border-width) var(--border-color)}.ToggleButton[data-button-kind=primary]{--border-color:rgba(207,42,67,.25)}.ToggleButton[data-button-kind=primary][aria-pressed=true]{background:none;color:var(--cta-default)}.ToggleButton[data-button-kind=secondary]{--border-color:var(--dimmed-2)}.ToggleButton[data-button-kind=secondary][aria-pressed=true]{background:none;color:var(--global-vibrancy-foreground)}.ToggleButton[data-button-kind=flat]{--border-color:var(--dimmed-2)}.ToggleButton[data-button-kind=flat][aria-pressed=true]{background:none;color:var(--global-vibrancy-foreground)}.ToggleButton[data-button-dimension=small]{--border-width:2px}.ToggleButton[data-button-dimension=regular]{--border-width:4px}.ToggleButton[data-button-dimension=big]{--border-width:6px}
1
+ @layer components{.ToggleButton{border-radius:200px;line-height:0;padding:0}.ToggleButton[aria-pressed=true]{box-shadow:0 0 0 var(--border-width) var(--border-color),0 0 0 var(--border-width) var(--border-color)}.ToggleButton[data-button-kind=primary]{--border-color:rgba(207,42,67,.25)}.ToggleButton[data-button-kind=primary][aria-pressed=true]{background:none;color:var(--cta-default)}.ToggleButton[data-button-kind=secondary]{--border-color:var(--dimmed-2)}.ToggleButton[data-button-kind=secondary][aria-pressed=true]{background:none;color:var(--global-vibrancy-foreground)}.ToggleButton[data-button-kind=flat]{--border-color:var(--dimmed-2)}.ToggleButton[data-button-kind=flat][aria-pressed=true]{background:none;color:var(--global-vibrancy-foreground)}.ToggleButton[data-button-dimension=small]{--border-width:2px}.ToggleButton[data-button-dimension=regular]{--border-width:4px}.ToggleButton[data-button-dimension=big]{--border-width:6px}}
@@ -1,16 +1,7 @@
1
1
  import { ComponentMeta, ComponentStory } from '@storybook/react';
2
- import React from 'react';
3
2
  import { ToggleButton } from './toggle-button';
4
3
  declare const story: ComponentMeta<typeof ToggleButton>;
5
4
  export default story;
6
- export declare const Default: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"button", import("..").ButtonProps & import("..").IconButtonProps & import("type-fest").Except<import("..").IconButtonProps, "icon"> & {
7
- restingIcon: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
8
- pressedIcon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
9
- pressed?: boolean | undefined;
10
- }>>;
11
- export declare const MultipleIcons: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"button", import("..").ButtonProps & import("..").IconButtonProps & import("type-fest").Except<import("..").IconButtonProps, "icon"> & {
12
- restingIcon: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
13
- pressedIcon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
14
- pressed?: boolean | undefined;
15
- }>>;
5
+ export declare const Default: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"button", import("./toggle-button").ToggleButtonProps<import("..").IconButtonProps<import("..").ButtonProps>>>>;
6
+ export declare const MultipleIcons: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"button", import("./toggle-button").ToggleButtonProps<import("..").IconButtonProps<import("..").ButtonProps>>>>;
16
7
  //# sourceMappingURL=toggle-button.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/toggle-button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,YAAY,CAmB7C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO;;;;GAAoB,CAAC;AAEzC,eAAO,MAAM,aAAa;;;;GAAoB,CAAC"}
1
+ {"version":3,"file":"toggle-button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/toggle-button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,YAAY,CAmB7C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,sLAAoB,CAAC;AAEzC,eAAO,MAAM,aAAa,sLAAoB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ToggleButton } from './toggle-button';
3
3
  const story = {
4
- title: 'Components/Actions/Toggle button',
4
+ title: 'Actions/Toggle button',
5
5
  component: ToggleButton,
6
6
  args: {
7
7
  dimension: 'regular',
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1 +1,16 @@
1
+ /*
2
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export { Tooltip } from './tooltip';
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,EACkD,SAAS,EACjE,MAAM,OAAO,CAAC;AAQf,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,kBAAkB,CAAC;IAC/D;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,eAAe,CAAC,YAAY,CAiFjD,CAAC"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,EACgE,SAAS,EAC/E,MAAM,OAAO,CAAC;AAQf,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,kBAAkB,CAAC;IAC/D;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,eAAe,CAAC,YAAY,CAkFjD,CAAC"}
@@ -10,7 +10,9 @@ export const Tooltip = ({ children, trigger, placement = 'bottom-start', open, s
10
10
  const [isOpen, setIsOpen] = useState(false);
11
11
  const tooltipContainerRef = useRef(null);
12
12
  useKeyPress('esc', () => setIsOpen(false));
13
- const { getArrowProps, getTooltipProps, setTooltipRef, setTriggerRef, visible, } = usePopperTooltip({
13
+ const { getArrowProps, getTooltipProps, setTooltipRef, setTriggerRef,
14
+ /* eslint-disable @typescript-eslint/naming-convention */
15
+ visible, } = usePopperTooltip({
14
16
  delayShow: delay,
15
17
  delayHide: 300,
16
18
  trigger: ['hover'],
@@ -1 +1 @@
1
- .Tooltip{display:contents}.Balloon{word-wrap:break-word;background-color:#31363f;border-radius:.25rem;font-size:1rem;max-inline-size:var(--max-w);padding:.5rem 1rem;position:relative;z-index:2}.Balloon[data-popper-reference-hidden=true]{pointer-events:none;visibility:hidden}.Arrow:before{background-color:#31363f;block-size:12px;content:"";inline-size:12px;position:absolute;transform:rotate(45deg);visibility:visible}.Balloon[data-popper-reference-hidden=true] .Arrow{pointer-events:none;visibility:hidden}.Balloon[data-popper-placement^=top] .Arrow{bottom:6px}.Balloon[data-popper-placement^=top] .Arrow:before{transform:translateX(-50%) rotate(45deg)}.Balloon[data-popper-placement^=left] .Arrow{right:6px}.Balloon[data-popper-placement^=left] .Arrow:before{transform:translateY(-50%) rotate(45deg)}.Balloon[data-popper-placement^=bottom] .Arrow{top:-6px}.Balloon[data-popper-placement^=bottom] .Arrow:before{transform:translateX(-50%) rotate(45deg)}.Balloon[data-popper-placement^=right] .Arrow{left:-6px}.Balloon[data-popper-placement^=right] .Arrow:before{transform:translateY(-50%) rotate(45deg)}
1
+ @layer components{.Tooltip{display:contents}.Balloon{word-wrap:break-word;background-color:#31363f;border-radius:.25rem;font-size:1rem;max-inline-size:var(--max-w);padding:.5rem 1rem;position:relative;z-index:2}.Balloon[data-popper-reference-hidden=true]{pointer-events:none;visibility:hidden}.Arrow:before{background-color:#31363f;block-size:12px;content:"";inline-size:12px;position:absolute;transform:rotate(45deg);visibility:visible}.Balloon[data-popper-reference-hidden=true] .Arrow{pointer-events:none;visibility:hidden}.Balloon[data-popper-placement^=top] .Arrow{bottom:6px}.Balloon[data-popper-placement^=top] .Arrow:before{transform:translateX(-50%) rotate(45deg)}.Balloon[data-popper-placement^=left] .Arrow{right:6px}.Balloon[data-popper-placement^=left] .Arrow:before{transform:translateY(-50%) rotate(45deg)}.Balloon[data-popper-placement^=bottom] .Arrow{top:-6px}.Balloon[data-popper-placement^=bottom] .Arrow:before{transform:translateX(-50%) rotate(45deg)}.Balloon[data-popper-placement^=right] .Arrow{left:-6px}.Balloon[data-popper-placement^=right] .Arrow:before{transform:translateY(-50%) rotate(45deg)}}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { Button, Text } from '../..';
3
3
  import { Tooltip } from './tooltip';
4
4
  const story = {
5
- title: 'Components/Dialogs/Tooltip',
5
+ title: 'Dialogs/Tooltip',
6
6
  component: Tooltip,
7
7
  args: {
8
8
  trigger: _jsx(Text, { as: "span", children: "HTML" }),
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,18 @@
1
+ /*
2
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export * from './components';
2
17
  export * from './providers';
3
18
  export * from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC"}
@@ -1,3 +1,18 @@
1
+ /*
2
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export { OverlayProvider, useOverlayContext } from './overlay';
2
17
  export { ResponsiveProvider, useResponsiveContext } from './responsive';
3
18
  export { UIDReset as IdProvider } from 'react-uid';
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/providers/overlay.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAE1F,aAAK,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC,GAAG;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,eAAO,MAAM,cAAc,8CAGzB,CAAC;AAIH,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,mBAAmB,CAiB3D,CAAC;AAEF,eAAO,MAAM,iBAAiB,2BAQ7B,CAAC"}
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/providers/overlay.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAE1F,aAAK,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC,GAAG;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,eAAO,MAAM,cAAc,8CAGzB,CAAC;AAIH,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,mBAAmB,CAiB3D,CAAC;AAEF,eAAO,MAAM,iBAAiB,2BAS7B,CAAC"}
@@ -1,4 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
2
17
  /* eslint-disable @typescript-eslint/no-empty-function */
3
18
  import { createContext, useContext } from 'react';
4
19
  import { useUIDSeed } from 'react-uid';
@@ -1 +1 @@
1
- {"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../src/providers/responsive.tsx"],"names":[],"mappings":";AAKA,aAAK,sBAAsB,GAAG;IAC5B;;MAEE;IACF,WAAW,EAAE;QACX,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF;;MAEE;IACF,OAAO,EAAE,MAAM,CAAC,MAAM,sBAAsB,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;CACvE,CAAA;AAED,aAAK,uBAAuB,GAAG;IAC7B,WAAW,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACrD,CAAA;AAUD,eAAO,MAAM,iBAAiB,iDAS5B,CAAC;AAIH,eAAO,MAAM,kBAAkB,EAAE,UAAU,CAAC,uBAAuB,CAuBlE,CAAC;AAEF,eAAO,MAAM,oBAAoB,8BAQhC,CAAC"}
1
+ {"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../src/providers/responsive.tsx"],"names":[],"mappings":";AAqBA,aAAK,sBAAsB,GAAG;IAC5B;;MAEE;IACF,WAAW,EAAE;QACX,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF;;MAEE;IACF,OAAO,EAAE,MAAM,CAAC,MAAM,sBAAsB,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;CACvE,CAAA;AAED,aAAK,uBAAuB,GAAG;IAC7B,WAAW,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACrD,CAAA;AAUD,eAAO,MAAM,iBAAiB,iDAS5B,CAAC;AAIH,eAAO,MAAM,kBAAkB,EAAE,UAAU,CAAC,uBAAuB,CAuBlE,CAAC;AAEF,eAAO,MAAM,oBAAoB,8BAShC,CAAC"}
@@ -1,4 +1,19 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
2
17
  import { configResponsive, useResponsive as responsiveAhook } from 'ahooks';
3
18
  import { createContext, useContext, useEffect, useState, } from 'react';
4
19
  const DEFAULT_BREAKPOINTS = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC"}
@@ -1 +1,16 @@
1
+ /*
2
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export * as Polymorphic from './polymorphic';
@@ -17,12 +17,7 @@ declare type IntrinsicElement<E> = E extends ForwardRefComponent<infer I, any> ?
17
17
  declare type ForwardRefExoticComponent<E, OwnProps> = React.ForwardRefExoticComponent<Merge<E extends React.ElementType ? React.ComponentPropsWithRef<E> : never, OwnProps & {
18
18
  as?: E;
19
19
  }>>;
20
- interface ForwardRefComponent<IntrinsicElementString, OwnProps = Record<string, unknown>
21
- /**
22
- * Extends original type to ensure built in React types play nice
23
- * with polymorphic components still e.g. `React.ElementRef` etc.
24
- */
25
- > extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
20
+ interface ForwardRefComponent<IntrinsicElementString, OwnProps = Record<string, unknown>> extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
26
21
  /**
27
22
  * When `as` prop is passed, use this overload.
28
23
  * Merges original own props (without DOM props) and the inferred props
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/polymorphic/index.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,aAAK,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC;AAEjG;;GAEG;AACH,aAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7F;;GAEG;AACH,aAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEnF,aAAK,yBAAyB,CAAC,CAAC,EAAE,QAAQ,IAAI,KAAK,CAAC,yBAAyB,CAC7E,KAAK,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,GAAG;IAAE,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,CACjG,CAAC;AAMF,UAAU,mBAAmB,CAC3B,sBAAsB,EACtB,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;AAClC;;;GAGG;CACH,SAAQ,yBAAyB,CAAC,sBAAsB,EAAE,QAAQ,CAAC;IACnE;;;;;;;OAOG;IACH,CAAC,EAAE,GAAG,sBAAsB,EAC1B,KAAK,EAAE,EAAE,SAAS,EAAE,GAChB;QAAE,EAAE,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAA;KAAE,GACnC,EAAE,SAAS,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GACrC,KAAK,CAAC,CAAC,EAAE,QAAQ,GAAG;QAAE,EAAE,EAAE,EAAE,CAAA;KAAE,CAAC,GAC/B,EAAE,SAAS,MAAM,GAAG,CAAC,iBAAiB,GACpC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG;QAAE,EAAE,EAAE,EAAE,CAAA;KAAE,CAAC,GACvD,KAAK,GACZ,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;CAC9B;AAED,YAAY,EACV,mBAAmB,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,GACvD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/polymorphic/index.ts"],"names":[],"mappings":"AAiBA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,aAAK,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC;AAEjG;;GAEG;AACH,aAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7F;;GAEG;AACH,aAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEnF,aAAK,yBAAyB,CAAC,CAAC,EAAE,QAAQ,IAAI,KAAK,CAAC,yBAAyB,CAC7E,KAAK,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,GAAG;IAAE,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,CACjG,CAAC;AAMF,UAAU,mBAAmB,CAC3B,sBAAsB,EACtB,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKlC,SAAQ,yBAAyB,CAAC,sBAAsB,EAAE,QAAQ,CAAC;IACnE;;;;;;;OAOG;IACH,CAAC,EAAE,GAAG,sBAAsB,EAC1B,KAAK,EAAE,EAAE,SAAS,EAAE,GAChB;QAAE,EAAE,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAA;KAAE,GACnC,EAAE,SAAS,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GACrC,KAAK,CAAC,CAAC,EAAE,QAAQ,GAAG;QAAE,EAAE,EAAE,EAAE,CAAA;KAAE,CAAC,GAC/B,EAAE,SAAS,MAAM,GAAG,CAAC,iBAAiB,GACpC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG;QAAE,EAAE,EAAE,EAAE,CAAA;KAAE,CAAC,GACvD,KAAK,GACZ,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;CAC9B;AAED,YAAY,EACV,mBAAmB,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,GACvD,CAAC"}
@@ -1 +1,16 @@
1
+ /*
2
+ * Copyright 2022 Wonderflow <authored by Mattia Astorino>
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export {};