@servicetitan/anvil2 0.7.0 → 0.8.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 (553) hide show
  1. package/Alert-34e59155.cjs +2 -0
  2. package/Alert-34e59155.cjs.map +1 -0
  3. package/Alert-824b3ad4.js +88 -0
  4. package/Alert-824b3ad4.js.map +1 -0
  5. package/Alert.cjs +1 -1
  6. package/Alert.css +1 -1
  7. package/Alert.d.ts +11 -3
  8. package/Alert.js +1 -1
  9. package/{Announcement-55ce78e1.js → Announcement-ba080c3e.js} +34 -35
  10. package/Announcement-ba080c3e.js.map +1 -0
  11. package/Announcement-f76d3977.cjs +2 -0
  12. package/Announcement-f76d3977.cjs.map +1 -0
  13. package/Announcement.cjs +1 -1
  14. package/Announcement.css +1 -1
  15. package/Announcement.d.ts +11 -3
  16. package/Announcement.js +1 -1
  17. package/AnvilProvider.cjs +1 -1
  18. package/AnvilProvider.d.ts +9 -3
  19. package/AnvilProvider.js +1 -1
  20. package/Avatar-22bb74ca.js +118 -0
  21. package/Avatar-22bb74ca.js.map +1 -0
  22. package/Avatar-4e72aaae.cjs +2 -0
  23. package/Avatar-4e72aaae.cjs.map +1 -0
  24. package/Avatar.cjs +1 -1
  25. package/Avatar.css +1 -1
  26. package/Avatar.d.ts +31 -3
  27. package/Avatar.js +1 -1
  28. package/{Badge-0f0115d7.js → Badge-da23aed3.js} +12 -12
  29. package/Badge-da23aed3.js.map +1 -0
  30. package/Badge-ecee5e54.cjs +2 -0
  31. package/Badge-ecee5e54.cjs.map +1 -0
  32. package/Badge.cjs +1 -1
  33. package/Badge.css +1 -1
  34. package/Badge.d.ts +19 -3
  35. package/Badge.js +1 -1
  36. package/Button-66b9c955.js +274 -0
  37. package/Button-66b9c955.js.map +1 -0
  38. package/Button-bf9d62af.cjs +2 -0
  39. package/Button-bf9d62af.cjs.map +1 -0
  40. package/Button.cjs +1 -1
  41. package/Button.css +1 -1
  42. package/Button.d.ts +11 -3
  43. package/Button.js +1 -1
  44. package/ButtonCompound.cjs +1 -1
  45. package/ButtonCompound.d.ts +15 -3
  46. package/ButtonCompound.js +1 -1
  47. package/ButtonLink.cjs +1 -1
  48. package/ButtonLink.d.ts +25 -3
  49. package/ButtonLink.js +1 -1
  50. package/ButtonToggle.cjs +1 -1
  51. package/ButtonToggle.d.ts +22 -3
  52. package/ButtonToggle.js +1 -1
  53. package/{Calendar-eab84d20.js → Calendar-4d7aca93.js} +67 -68
  54. package/{Calendar-eab84d20.js.map → Calendar-4d7aca93.js.map} +1 -1
  55. package/Calendar-e1d1d08b.cjs +2 -0
  56. package/{Calendar-0180be99.cjs.map → Calendar-e1d1d08b.cjs.map} +1 -1
  57. package/Calendar.cjs +1 -1
  58. package/Calendar.d.ts +135 -3
  59. package/Calendar.js +1 -1
  60. package/Card-407156d2.cjs +2 -0
  61. package/Card-407156d2.cjs.map +1 -0
  62. package/Card-6ded141e.js +48 -0
  63. package/Card-6ded141e.js.map +1 -0
  64. package/Card.cjs +1 -1
  65. package/Card.css +1 -1
  66. package/Card.d.ts +11 -3
  67. package/Card.js +1 -1
  68. package/Checkbox-4cfbca71.cjs +2 -0
  69. package/Checkbox-4cfbca71.cjs.map +1 -0
  70. package/Checkbox-8d294c5e.js +146 -0
  71. package/Checkbox-8d294c5e.js.map +1 -0
  72. package/Checkbox.cjs +1 -1
  73. package/Checkbox.css +1 -1
  74. package/Checkbox.d.ts +32 -3
  75. package/Checkbox.js +1 -1
  76. package/Chip-2c170535.js +56 -0
  77. package/Chip-2c170535.js.map +1 -0
  78. package/Chip-befa36a3.cjs +2 -0
  79. package/Chip-befa36a3.cjs.map +1 -0
  80. package/Chip.cjs +1 -1
  81. package/Chip.css +1 -1
  82. package/Chip.d.ts +19 -3
  83. package/Chip.js +1 -1
  84. package/Combobox-087839e6.cjs +23 -0
  85. package/Combobox-087839e6.cjs.map +1 -0
  86. package/Combobox-8913ce4e.js +2771 -0
  87. package/Combobox-8913ce4e.js.map +1 -0
  88. package/Combobox.cjs +1 -1
  89. package/Combobox.css +1 -1
  90. package/Combobox.d.ts +24 -3
  91. package/Combobox.js +1 -1
  92. package/Details-54b5e7aa.js +120 -0
  93. package/Details-54b5e7aa.js.map +1 -0
  94. package/Details-c03ffac1.cjs +2 -0
  95. package/Details-c03ffac1.cjs.map +1 -0
  96. package/Details.cjs +1 -1
  97. package/Details.css +1 -1
  98. package/Details.d.ts +45 -3
  99. package/Details.js +1 -1
  100. package/Dialog-d409d130.js +180 -0
  101. package/Dialog-d409d130.js.map +1 -0
  102. package/Dialog-d53be5d6.cjs +2 -0
  103. package/Dialog-d53be5d6.cjs.map +1 -0
  104. package/Dialog.cjs +1 -1
  105. package/Dialog.css +1 -1
  106. package/Dialog.d.ts +78 -3
  107. package/Dialog.js +1 -1
  108. package/Divider-076892dc.cjs +2 -0
  109. package/Divider-076892dc.cjs.map +1 -0
  110. package/Divider-38187d6d.js +74 -0
  111. package/Divider-38187d6d.js.map +1 -0
  112. package/Divider.cjs +1 -1
  113. package/Divider.css +1 -1
  114. package/Divider.d.ts +18 -3
  115. package/Divider.js +1 -1
  116. package/{Drawer-cd9a525f.js → Drawer-ddd7914b.js} +28 -28
  117. package/{Drawer-cd9a525f.js.map → Drawer-ddd7914b.js.map} +1 -1
  118. package/{Drawer-13fddcc2.cjs → Drawer-ef353cb7.cjs} +2 -2
  119. package/{Drawer-13fddcc2.cjs.map → Drawer-ef353cb7.cjs.map} +1 -1
  120. package/Drawer.cjs +1 -1
  121. package/Drawer.d.ts +83 -3
  122. package/Drawer.js +1 -1
  123. package/Flex-516baf92.cjs +2 -0
  124. package/Flex-516baf92.cjs.map +1 -0
  125. package/Flex-f1146ad5.js +70 -0
  126. package/Flex-f1146ad5.js.map +1 -0
  127. package/Flex.cjs +1 -1
  128. package/Flex.css +1 -1
  129. package/Flex.d.ts +117 -3
  130. package/Flex.js +1 -1
  131. package/Grid-234bc5d1.js +78 -0
  132. package/Grid-234bc5d1.js.map +1 -0
  133. package/Grid-b47a9218.cjs +2 -0
  134. package/Grid-b47a9218.cjs.map +1 -0
  135. package/Grid.cjs +1 -1
  136. package/Grid.css +1 -1
  137. package/Grid.d.ts +129 -3
  138. package/Grid.js +1 -1
  139. package/{Label-e9a57a2f.cjs → Label-07b0f38c.cjs} +2 -2
  140. package/{Label-e9a57a2f.cjs.map → Label-07b0f38c.cjs.map} +1 -1
  141. package/{Label-578ce53c.js → Label-9db08425.js} +9 -9
  142. package/{Label-578ce53c.js.map → Label-9db08425.js.map} +1 -1
  143. package/Layout.cjs +2 -0
  144. package/Layout.cjs.map +1 -0
  145. package/Layout.d.ts +54 -0
  146. package/Layout.js +143 -0
  147. package/Layout.js.map +1 -0
  148. package/Link-0f117696.cjs +2 -0
  149. package/Link-0f117696.cjs.map +1 -0
  150. package/Link-e07677c7.js +46 -0
  151. package/Link-e07677c7.js.map +1 -0
  152. package/Link.cjs +1 -1
  153. package/Link.css +1 -1
  154. package/Link.d.ts +11 -3
  155. package/Link.js +1 -1
  156. package/ListView-29cf9116.js +411 -0
  157. package/ListView-29cf9116.js.map +1 -0
  158. package/ListView-650be398.cjs +2 -0
  159. package/ListView-650be398.cjs.map +1 -0
  160. package/ListView.cjs +1 -1
  161. package/ListView.cjs.map +1 -1
  162. package/ListView.css +1 -0
  163. package/ListView.d.ts +30 -3
  164. package/ListView.js +13 -341
  165. package/ListView.js.map +1 -1
  166. package/Listbox-30a94e14.cjs +2 -0
  167. package/Listbox-30a94e14.cjs.map +1 -0
  168. package/Listbox-b3bdffa7.js +319 -0
  169. package/Listbox-b3bdffa7.js.map +1 -0
  170. package/Listbox.cjs +1 -1
  171. package/Listbox.css +1 -1
  172. package/Listbox.d.ts +45 -3
  173. package/Listbox.js +4 -4
  174. package/LocalizationProvider.d.ts +18 -3
  175. package/Menu-8b2d56a2.cjs +2 -0
  176. package/Menu-8b2d56a2.cjs.map +1 -0
  177. package/{Menu-2d3d189e.js → Menu-ab1b5fb6.js} +97 -94
  178. package/Menu-ab1b5fb6.js.map +1 -0
  179. package/Menu.cjs +1 -1
  180. package/Menu.d.ts +28 -3
  181. package/Menu.js +1 -1
  182. package/Overflow.cjs +1 -1
  183. package/Overflow.cjs.map +1 -1
  184. package/Overflow.d.ts +18 -3
  185. package/Overflow.js +79 -80
  186. package/Overflow.js.map +1 -1
  187. package/Page.cjs +1 -1
  188. package/Page.d.ts +52 -3
  189. package/Page.js +16 -16
  190. package/Page.js.map +1 -1
  191. package/{Popover-0c9a593d.cjs → Popover-01a92903.cjs} +2 -2
  192. package/{Popover-0c9a593d.cjs.map → Popover-01a92903.cjs.map} +1 -1
  193. package/{Popover-c9e991b5.js → Popover-c03e96a7.js} +22 -22
  194. package/{Popover-c9e991b5.js.map → Popover-c03e96a7.js.map} +1 -1
  195. package/Popover.cjs +1 -1
  196. package/Popover.d.ts +116 -3
  197. package/Popover.js +1 -1
  198. package/ProgressBar-4f893820.cjs +2 -0
  199. package/ProgressBar-4f893820.cjs.map +1 -0
  200. package/{ProgressBar-0a9cc187.js → ProgressBar-ef621dd5.js} +23 -24
  201. package/ProgressBar-ef621dd5.js.map +1 -0
  202. package/ProgressBar.cjs +1 -1
  203. package/ProgressBar.d.ts +11 -3
  204. package/ProgressBar.js +1 -1
  205. package/Radio-5e9e9c5d.cjs +2 -0
  206. package/Radio-5e9e9c5d.cjs.map +1 -0
  207. package/Radio-dab030c5.js +122 -0
  208. package/Radio-dab030c5.js.map +1 -0
  209. package/Radio.cjs +1 -1
  210. package/Radio.css +1 -1
  211. package/Radio.d.ts +32 -3
  212. package/Radio.js +1 -1
  213. package/SideNav-a46daccc.cjs +2 -0
  214. package/SideNav-a46daccc.cjs.map +1 -0
  215. package/SideNav-abd95834.js +229 -0
  216. package/SideNav-abd95834.js.map +1 -0
  217. package/SideNav.cjs +2 -2
  218. package/SideNav.css +1 -1
  219. package/SideNav.d.ts +84 -3
  220. package/SideNav.js +1 -1
  221. package/{Spinner-0883e1ca-d594e9d0.js → Spinner-041df00b-fa2fcb57.js} +3 -3
  222. package/{Spinner-0883e1ca-d594e9d0.js.map → Spinner-041df00b-fa2fcb57.js.map} +1 -1
  223. package/Spinner-041df00b-fd40dc86.cjs +2 -0
  224. package/{Spinner-0883e1ca-fceb4a08.cjs.map → Spinner-041df00b-fd40dc86.cjs.map} +1 -1
  225. package/{SrOnly-de546b91.js → SrOnly-219e862e.js} +2 -2
  226. package/{SrOnly-de546b91.js.map → SrOnly-219e862e.js.map} +1 -1
  227. package/SrOnly-ed780dfc.cjs +2 -0
  228. package/{SrOnly-708eb40d.cjs.map → SrOnly-ed780dfc.cjs.map} +1 -1
  229. package/SrOnly.cjs +1 -1
  230. package/SrOnly.d.ts +8 -3
  231. package/SrOnly.js +1 -1
  232. package/Stepper-a7c03bda.cjs +2 -0
  233. package/Stepper-a7c03bda.cjs.map +1 -0
  234. package/{Stepper-80fa9d45.js → Stepper-acc83b95.js} +67 -68
  235. package/Stepper-acc83b95.js.map +1 -0
  236. package/Stepper.cjs +1 -1
  237. package/Stepper.css +1 -1
  238. package/Stepper.d.ts +132 -3
  239. package/Stepper.js +1 -1
  240. package/Switch-bad8af12.cjs +2 -0
  241. package/Switch-bad8af12.cjs.map +1 -0
  242. package/Switch-de621e8b.js +53 -0
  243. package/Switch-de621e8b.js.map +1 -0
  244. package/Switch.cjs +1 -1
  245. package/Switch.css +1 -1
  246. package/Switch.d.ts +20 -3
  247. package/Switch.js +1 -1
  248. package/{Tab-d436d249.js → Tab-2efb0b29.js} +129 -130
  249. package/Tab-2efb0b29.js.map +1 -0
  250. package/Tab-a7f56361.cjs +10 -0
  251. package/Tab-a7f56361.cjs.map +1 -0
  252. package/Tab.cjs +1 -1
  253. package/Tab.css +1 -1
  254. package/Tab.d.ts +51 -3
  255. package/Tab.js +12 -12
  256. package/Text-10643eec.js +103 -0
  257. package/Text-10643eec.js.map +1 -0
  258. package/Text-2c217682.cjs +2 -0
  259. package/Text-2c217682.cjs.map +1 -0
  260. package/Text.cjs +1 -1
  261. package/Text.css +1 -1
  262. package/Text.d.ts +11 -3
  263. package/Text.js +1 -1
  264. package/TextField-0e4b1063.cjs +2 -0
  265. package/TextField-0e4b1063.cjs.map +1 -0
  266. package/TextField-72d16321.js +116 -0
  267. package/TextField-72d16321.js.map +1 -0
  268. package/TextField.cjs +1 -1
  269. package/TextField.css +1 -1
  270. package/TextField.d.ts +38 -3
  271. package/TextField.js +4 -4
  272. package/Textarea-218e3338.cjs +2 -0
  273. package/Textarea-218e3338.cjs.map +1 -0
  274. package/Textarea-9332ebd4.js +113 -0
  275. package/Textarea-9332ebd4.js.map +1 -0
  276. package/Textarea.cjs +1 -1
  277. package/Textarea.css +1 -1
  278. package/Textarea.d.ts +9 -3
  279. package/Textarea.js +4 -4
  280. package/ThemeProvider.cjs +1 -1
  281. package/ThemeProvider.d.ts +12 -3
  282. package/ThemeProvider.js +1 -1
  283. package/{Tooltip-14c639ee.js → Tooltip-6f564b63.js} +27 -27
  284. package/Tooltip-6f564b63.js.map +1 -0
  285. package/Tooltip-ce4148a7.cjs +2 -0
  286. package/Tooltip-ce4148a7.cjs.map +1 -0
  287. package/Tooltip.cjs +1 -1
  288. package/Tooltip.css +1 -1
  289. package/Tooltip.d.ts +24 -3
  290. package/Tooltip.js +1 -1
  291. package/anvil2.cjs +1 -1
  292. package/anvil2.d.ts +1279 -1
  293. package/anvil2.js +159 -158
  294. package/anvil2.js.map +1 -1
  295. package/index-34a59514-84846dd5.cjs +2 -0
  296. package/index-34a59514-84846dd5.cjs.map +1 -0
  297. package/index-34a59514-87e04c7f.js +196 -0
  298. package/index-34a59514-87e04c7f.js.map +1 -0
  299. package/index-34a59514.css +1 -0
  300. package/index-4a524f55.js +594 -0
  301. package/index-4a524f55.js.map +1 -0
  302. package/{index-2901dc30.cjs → index-4deb58f0.cjs} +2 -2
  303. package/{index-2901dc30.cjs.map → index-4deb58f0.cjs.map} +1 -1
  304. package/{index-3540395e.cjs → index-5af41bd1.cjs} +2 -2
  305. package/{index-3540395e.cjs.map → index-5af41bd1.cjs.map} +1 -1
  306. package/index-870600c9.cjs +174 -0
  307. package/index-870600c9.cjs.map +1 -0
  308. package/index-8a331c33.cjs +2 -0
  309. package/index-8a331c33.cjs.map +1 -0
  310. package/{index-4e32870a.js → index-b6ca5fc4.js} +2 -2
  311. package/{index-4e32870a.js.map → index-b6ca5fc4.js.map} +1 -1
  312. package/{index-193c7238.js → index-bbef83ec.js} +2 -2
  313. package/{index-193c7238.js.map → index-bbef83ec.js.map} +1 -1
  314. package/index-ccf0845b.js +23330 -0
  315. package/index-ccf0845b.js.map +1 -0
  316. package/index.css +1 -1
  317. package/index2.css +1 -1
  318. package/index4.css +1 -1
  319. package/package.json +27 -25
  320. package/{sizeToToken-ec2a44d1-00f4b579.cjs → sizeToToken-ec2a44d1-7f023360.cjs} +2 -2
  321. package/{sizeToToken-ec2a44d1-00f4b579.cjs.map → sizeToToken-ec2a44d1-7f023360.cjs.map} +1 -1
  322. package/{sizeToToken-ec2a44d1-b81d7121.js → sizeToToken-ec2a44d1-bd89b4fa.js} +2 -2
  323. package/{sizeToToken-ec2a44d1-b81d7121.js.map → sizeToToken-ec2a44d1-bd89b4fa.js.map} +1 -1
  324. package/token.cjs +1 -1
  325. package/token.d.ts +4 -1
  326. package/token.js +1 -1
  327. package/useAccessibleColor.cjs +7 -5
  328. package/useAccessibleColor.cjs.map +1 -1
  329. package/useAccessibleColor.d.ts +6 -3
  330. package/useAccessibleColor.js +368 -311
  331. package/useAccessibleColor.js.map +1 -1
  332. package/usePrefersColorScheme-129544ad-b018d158.cjs +2 -0
  333. package/usePrefersColorScheme-129544ad-b018d158.cjs.map +1 -0
  334. package/{useAccessibleColor-3358f4f6-ddcfc9d6.js → usePrefersColorScheme-129544ad-f17399b0.js} +18 -18
  335. package/usePrefersColorScheme-129544ad-f17399b0.js.map +1 -0
  336. package/usePrefersColorScheme.cjs +1 -1
  337. package/usePrefersColorScheme.d.ts +6 -3
  338. package/usePrefersColorScheme.js +40 -39
  339. package/usePrefersColorScheme.js.map +1 -1
  340. package/useSize.d.ts +7 -3
  341. package/useSwipe.cjs +1 -1
  342. package/useSwipe.d.ts +6 -3
  343. package/useSwipe.js +39 -38
  344. package/useSwipe.js.map +1 -1
  345. package/Alert-5d565d02.cjs +0 -2
  346. package/Alert-5d565d02.cjs.map +0 -1
  347. package/Alert-cbfb26da.js +0 -89
  348. package/Alert-cbfb26da.js.map +0 -1
  349. package/Announcement-55ce78e1.js.map +0 -1
  350. package/Announcement-b7adf6c2.cjs +0 -2
  351. package/Announcement-b7adf6c2.cjs.map +0 -1
  352. package/Avatar-40698488.cjs +0 -2
  353. package/Avatar-40698488.cjs.map +0 -1
  354. package/Avatar-9a600991.js +0 -119
  355. package/Avatar-9a600991.js.map +0 -1
  356. package/Badge-0f0115d7.js.map +0 -1
  357. package/Badge-86767c59.cjs +0 -2
  358. package/Badge-86767c59.cjs.map +0 -1
  359. package/Button-45b5f34d.cjs +0 -2
  360. package/Button-45b5f34d.cjs.map +0 -1
  361. package/Button-a1d54612.js +0 -266
  362. package/Button-a1d54612.js.map +0 -1
  363. package/Calendar-0180be99.cjs +0 -2
  364. package/Card-a32e3a24.cjs +0 -2
  365. package/Card-a32e3a24.cjs.map +0 -1
  366. package/Card-df3afa75.js +0 -48
  367. package/Card-df3afa75.js.map +0 -1
  368. package/Checkbox-2afa867d.js +0 -140
  369. package/Checkbox-2afa867d.js.map +0 -1
  370. package/Checkbox-f391e391.cjs +0 -2
  371. package/Checkbox-f391e391.cjs.map +0 -1
  372. package/Chip-30904c6b.cjs +0 -2
  373. package/Chip-30904c6b.cjs.map +0 -1
  374. package/Chip-796feb5f.js +0 -57
  375. package/Chip-796feb5f.js.map +0 -1
  376. package/Combobox-0dbca8b9.cjs +0 -18
  377. package/Combobox-0dbca8b9.cjs.map +0 -1
  378. package/Combobox-78c98d99.js +0 -2660
  379. package/Combobox-78c98d99.js.map +0 -1
  380. package/Details-28451aba.js +0 -121
  381. package/Details-28451aba.js.map +0 -1
  382. package/Details-7cf82b2a.cjs +0 -2
  383. package/Details-7cf82b2a.cjs.map +0 -1
  384. package/Dialog-376e879f.js +0 -180
  385. package/Dialog-376e879f.js.map +0 -1
  386. package/Dialog-ee763250.cjs +0 -2
  387. package/Dialog-ee763250.cjs.map +0 -1
  388. package/Divider-18854176.js +0 -76
  389. package/Divider-18854176.js.map +0 -1
  390. package/Divider-4b53e9bc.cjs +0 -2
  391. package/Divider-4b53e9bc.cjs.map +0 -1
  392. package/Flex-91d902ab.js +0 -78
  393. package/Flex-91d902ab.js.map +0 -1
  394. package/Flex-fbbfca2c.cjs +0 -2
  395. package/Flex-fbbfca2c.cjs.map +0 -1
  396. package/Grid-7255ac0e.cjs +0 -2
  397. package/Grid-7255ac0e.cjs.map +0 -1
  398. package/Grid-b826f76e.js +0 -78
  399. package/Grid-b826f76e.js.map +0 -1
  400. package/Link-00858801.cjs +0 -2
  401. package/Link-00858801.cjs.map +0 -1
  402. package/Link-11e411de.js +0 -47
  403. package/Link-11e411de.js.map +0 -1
  404. package/Listbox-25f615e4.cjs +0 -2
  405. package/Listbox-25f615e4.cjs.map +0 -1
  406. package/Listbox-b77bf5db.js +0 -321
  407. package/Listbox-b77bf5db.js.map +0 -1
  408. package/Menu-1254197b.cjs +0 -2
  409. package/Menu-1254197b.cjs.map +0 -1
  410. package/Menu-2d3d189e.js.map +0 -1
  411. package/ProgressBar-0a9cc187.js.map +0 -1
  412. package/ProgressBar-a30e79f7.cjs +0 -2
  413. package/ProgressBar-a30e79f7.cjs.map +0 -1
  414. package/Radio-7a7d5069.js +0 -120
  415. package/Radio-7a7d5069.js.map +0 -1
  416. package/Radio-efc0b8b2.cjs +0 -2
  417. package/Radio-efc0b8b2.cjs.map +0 -1
  418. package/SideNav-044309df.js +0 -230
  419. package/SideNav-044309df.js.map +0 -1
  420. package/SideNav-c3ecdddf.cjs +0 -2
  421. package/SideNav-c3ecdddf.cjs.map +0 -1
  422. package/Spinner-0883e1ca-fceb4a08.cjs +0 -2
  423. package/SrOnly-708eb40d.cjs +0 -2
  424. package/Stepper-42d5bb17.cjs +0 -2
  425. package/Stepper-42d5bb17.cjs.map +0 -1
  426. package/Stepper-80fa9d45.js.map +0 -1
  427. package/Switch-8c2230ac.cjs +0 -2
  428. package/Switch-8c2230ac.cjs.map +0 -1
  429. package/Switch-accd063a.js +0 -54
  430. package/Switch-accd063a.js.map +0 -1
  431. package/Tab-d436d249.js.map +0 -1
  432. package/Tab-da39692d.cjs +0 -10
  433. package/Tab-da39692d.cjs.map +0 -1
  434. package/Text-1fa57df0.js +0 -103
  435. package/Text-1fa57df0.js.map +0 -1
  436. package/Text-c5b018fb.cjs +0 -2
  437. package/Text-c5b018fb.cjs.map +0 -1
  438. package/TextField-4d28f369.js +0 -117
  439. package/TextField-4d28f369.js.map +0 -1
  440. package/TextField-f582ca36.cjs +0 -2
  441. package/TextField-f582ca36.cjs.map +0 -1
  442. package/Textarea-074a1a2c.cjs +0 -2
  443. package/Textarea-074a1a2c.cjs.map +0 -1
  444. package/Textarea-d788d92b.js +0 -114
  445. package/Textarea-d788d92b.js.map +0 -1
  446. package/Tooltip-14c639ee.js.map +0 -1
  447. package/Tooltip-9b89dc01.cjs +0 -2
  448. package/Tooltip-9b89dc01.cjs.map +0 -1
  449. package/components/Alert/Alert.d.ts +0 -5
  450. package/components/Alert/Alert.stories.d.ts +0 -12
  451. package/components/Alert/index.d.ts +0 -2
  452. package/components/Announcement/Announcement.d.ts +0 -5
  453. package/components/Announcement/Announcement.stories.d.ts +0 -12
  454. package/components/Announcement/index.d.ts +0 -2
  455. package/components/Avatar/AvatarGroup.stories.d.ts +0 -13
  456. package/components/Avatar/index.d.ts +0 -2
  457. package/components/Badge/index.d.ts +0 -2
  458. package/components/Button/index.d.ts +0 -2
  459. package/components/ButtonCompound/ButtonCompound.d.ts +0 -7
  460. package/components/ButtonCompound/ButtonCompound.stories.d.ts +0 -12
  461. package/components/ButtonCompound/index.d.ts +0 -2
  462. package/components/ButtonLink/ButtonLink.d.ts +0 -15
  463. package/components/ButtonLink/ButtonLink.stories.d.ts +0 -20
  464. package/components/ButtonLink/index.d.ts +0 -2
  465. package/components/ButtonToggle/ButtonToggle.d.ts +0 -13
  466. package/components/ButtonToggle/ButtonToggle.stories.d.ts +0 -19
  467. package/components/ButtonToggle/index.d.ts +0 -2
  468. package/components/Calendar/index.d.ts +0 -2
  469. package/components/Card/Card.d.ts +0 -5
  470. package/components/Card/Card.stories.d.ts +0 -11
  471. package/components/Card/index.d.ts +0 -2
  472. package/components/Checkbox/index.d.ts +0 -2
  473. package/components/Chip/index.d.ts +0 -2
  474. package/components/Combobox/Combobox.d.ts +0 -12
  475. package/components/Combobox/index.d.ts +0 -2
  476. package/components/Details/index.d.ts +0 -2
  477. package/components/Dialog/index.d.ts +0 -2
  478. package/components/Divider/index.d.ts +0 -2
  479. package/components/Drawer/index.d.ts +0 -2
  480. package/components/Flex/index.d.ts +0 -2
  481. package/components/Grid/index.d.ts +0 -2
  482. package/components/Link/Link.d.ts +0 -5
  483. package/components/Link/Link.stories.d.ts +0 -11
  484. package/components/Link/index.d.ts +0 -2
  485. package/components/ListView/ListView.d.ts +0 -19
  486. package/components/ListView/ListView.stories.d.ts +0 -19
  487. package/components/ListView/index.d.ts +0 -2
  488. package/components/Listbox/Listbox.d.ts +0 -30
  489. package/components/Listbox/Listbox.stories.d.ts +0 -24
  490. package/components/Listbox/index.d.ts +0 -2
  491. package/components/Menu/Menu.d.ts +0 -15
  492. package/components/Menu/Menu.stories.d.ts +0 -17
  493. package/components/Menu/index.d.ts +0 -2
  494. package/components/Overflow/Overflow.d.ts +0 -9
  495. package/components/Overflow/Overflow.stories.d.ts +0 -10
  496. package/components/Overflow/index.d.ts +0 -2
  497. package/components/Page/Page.d.ts +0 -35
  498. package/components/Page/Page.stories.d.ts +0 -23
  499. package/components/Page/index.d.ts +0 -2
  500. package/components/Popover/index.d.ts +0 -2
  501. package/components/ProgressBar/ProgressBar.d.ts +0 -5
  502. package/components/ProgressBar/ProgressBar.stories.d.ts +0 -12
  503. package/components/ProgressBar/index.d.ts +0 -2
  504. package/components/Radio/index.d.ts +0 -2
  505. package/components/SideNav/index.d.ts +0 -2
  506. package/components/SrOnly/SrOnly.d.ts +0 -3
  507. package/components/SrOnly/SrOnly.stories.d.ts +0 -10
  508. package/components/SrOnly/index.d.ts +0 -2
  509. package/components/Stepper/index.d.ts +0 -2
  510. package/components/Switch/index.d.ts +0 -2
  511. package/components/Tab/index.d.ts +0 -2
  512. package/components/Text/Text.d.ts +0 -5
  513. package/components/Text/Text.stories.d.ts +0 -12
  514. package/components/Text/index.d.ts +0 -2
  515. package/components/TextField/index.d.ts +0 -2
  516. package/components/Textarea/Textarea.d.ts +0 -4
  517. package/components/Textarea/Textarea.stories.d.ts +0 -12
  518. package/components/Textarea/index.d.ts +0 -2
  519. package/components/Tooltip/Tooltip.d.ts +0 -11
  520. package/components/Tooltip/Tooltip.stories.d.ts +0 -15
  521. package/components/Tooltip/index.d.ts +0 -2
  522. package/components/index.d.ts +0 -36
  523. package/hooks/index.d.ts +0 -3
  524. package/hooks/useAccessibleColor/index.d.ts +0 -1
  525. package/hooks/usePrefersColorScheme/index.d.ts +0 -1
  526. package/hooks/useSize/index.d.ts +0 -4
  527. package/hooks/useSwipe/index.d.ts +0 -1
  528. package/index-01c2436e.js +0 -593
  529. package/index-01c2436e.js.map +0 -1
  530. package/index-11e70fb8-0028c824.cjs +0 -2
  531. package/index-11e70fb8-0028c824.cjs.map +0 -1
  532. package/index-11e70fb8-1d736146.js +0 -99
  533. package/index-11e70fb8-1d736146.js.map +0 -1
  534. package/index-11e70fb8.css +0 -1
  535. package/index-31788abb.cjs +0 -2
  536. package/index-31788abb.cjs.map +0 -1
  537. package/index-376d3301.js +0 -23084
  538. package/index-376d3301.js.map +0 -1
  539. package/index-3f97b6ab.cjs +0 -174
  540. package/index-3f97b6ab.cjs.map +0 -1
  541. package/index.d.ts +0 -3
  542. package/layoutPropsUtil-4ba98964-13bb2adf.cjs +0 -2
  543. package/layoutPropsUtil-4ba98964-13bb2adf.cjs.map +0 -1
  544. package/layoutPropsUtil-4ba98964-b3aa4269.js +0 -97
  545. package/layoutPropsUtil-4ba98964-b3aa4269.js.map +0 -1
  546. package/providers/AnvilProvider/index.d.ts +0 -1
  547. package/providers/LocalizationProvider/index.d.ts +0 -1
  548. package/providers/ThemeProvider/index.d.ts +0 -1
  549. package/providers/index.d.ts +0 -3
  550. package/token/index.d.ts +0 -1
  551. package/useAccessibleColor-3358f4f6-ddcfc9d6.js.map +0 -1
  552. package/useAccessibleColor-3358f4f6-ff947a77.cjs +0 -2
  553. package/useAccessibleColor-3358f4f6-ff947a77.cjs.map +0 -1
@@ -1,67 +1,97 @@
1
1
  import "./index4.css";
2
- import { D as me } from "./Alert-cbfb26da.js";
3
- import "./Announcement-55ce78e1.js";
4
- import "./Avatar-9a600991.js";
5
- import "./Badge-0f0115d7.js";
6
- import { C as R } from "./Button-a1d54612.js";
7
- import { E as pe } from "./Calendar-eab84d20.js";
8
- import "./Card-df3afa75.js";
9
- import "./Checkbox-2afa867d.js";
10
- import "./Chip-796feb5f.js";
11
- import "./Combobox-78c98d99.js";
12
- import "./Details-28451aba.js";
13
- import "./Dialog-376e879f.js";
14
- import "./Divider-18854176.js";
15
- import "./Drawer-cd9a525f.js";
16
- import "./Flex-91d902ab.js";
17
- import "./Grid-b826f76e.js";
18
- import "./index-11e70fb8-1d736146.js";
19
- import "./Label-578ce53c.js";
20
- import "./Link-11e411de.js";
21
- import "./Listbox-b77bf5db.js";
22
- import "./Menu-2d3d189e.js";
23
- import "./Popover-c9e991b5.js";
24
- import "./ProgressBar-0a9cc187.js";
25
- import "./Radio-7a7d5069.js";
26
- import "./SideNav-044309df.js";
27
- import { p as he } from "./SrOnly-de546b91.js";
28
- import { f as l } from "./jsx-runtime-944c88e2-e73fa629.js";
29
- import { L as O } from "./index-4e32870a.js";
30
- import "./Stepper-80fa9d45.js";
31
- import "./Switch-accd063a.js";
32
- import "./Tab-d436d249.js";
33
- import "./Text-1fa57df0.js";
34
- import "./Textarea-d788d92b.js";
35
- import "./TextField-4d28f369.js";
36
- import "./Tooltip-14c639ee.js";
37
- import { g as Ct, g as Nt } from "./useAccessibleColor-3358f4f6-ddcfc9d6.js";
38
- import { createContext as fe, forwardRef as J, useRef as v, useState as N, useEffect as q, useCallback as xe, useMemo as Q, useContext as ge } from "react";
39
- import "./index-376d3301.js";
2
+ import { D as Te } from "./Alert-824b3ad4.js";
3
+ import "./Announcement-ba080c3e.js";
4
+ import "./Avatar-22bb74ca.js";
5
+ import "./Badge-da23aed3.js";
6
+ import { k as G } from "./Button-66b9c955.js";
7
+ import { E as _e } from "./Calendar-4d7aca93.js";
8
+ import "./Card-6ded141e.js";
9
+ import "./Checkbox-8d294c5e.js";
10
+ import "./Chip-2c170535.js";
11
+ import "./Combobox-8913ce4e.js";
12
+ import "./Details-54b5e7aa.js";
13
+ import "./Dialog-d409d130.js";
14
+ import "./Divider-38187d6d.js";
15
+ import "./Drawer-ddd7914b.js";
16
+ import "./Flex-f1146ad5.js";
17
+ import "./Grid-234bc5d1.js";
18
+ import "./index-34a59514-87e04c7f.js";
19
+ import "./Label-9db08425.js";
20
+ import "./Link-e07677c7.js";
21
+ import "./Listbox-b3bdffa7.js";
22
+ import "./ListView-29cf9116.js";
23
+ import "./Menu-ab1b5fb6.js";
24
+ import "./Popover-c03e96a7.js";
25
+ import "./ProgressBar-ef621dd5.js";
26
+ import "./Radio-dab030c5.js";
27
+ import "./SideNav-abd95834.js";
28
+ import { p as we } from "./SrOnly-219e862e.js";
29
+ import { f as c } from "./jsx-runtime-944c88e2-e73fa629.js";
30
+ import { q as K } from "./index-b6ca5fc4.js";
31
+ import "./Stepper-acc83b95.js";
32
+ import "./Switch-de621e8b.js";
33
+ import "./Tab-2efb0b29.js";
34
+ import "./Text-10643eec.js";
35
+ import "./Textarea-9332ebd4.js";
36
+ import "./TextField-72d16321.js";
37
+ import "./Tooltip-6f564b63.js";
38
+ import { f as Ut, f as Rt } from "./usePrefersColorScheme-129544ad-f17399b0.js";
39
+ import { createContext as ve, forwardRef as Z, useRef as y, useState as S, useEffect as N, useCallback as ye, useMemo as J, useContext as be } from "react";
40
+ import "./index-ccf0845b.js";
40
41
  import "./LocalizationProvider.js";
41
- import "./index-193c7238.js";
42
- import { u as we } from "./use-reduced-motion-68bea567.js";
43
- const _e = "_toaster_1qiex_4", Te = "_hidden_1qiex_61", ve = "_stacked_1qiex_68", be = "_open_1qiex_155", ke = "_slideIn_1qiex_1", ye = "_close_1qiex_158", Ce = "_slideOut_1qiex_1", i = {
44
- toaster: _e,
45
- "toast-wrapper": "_toast-wrapper_1qiex_28",
46
- "toast-alert": "_toast-alert_1qiex_42",
47
- "alert-action": "_alert-action_1qiex_47",
48
- "show-extra-toast": "_show-extra-toast_1qiex_58",
49
- hidden: Te,
50
- stacked: ve,
51
- "stack-one": "_stack-one_1qiex_71",
52
- "stack-two": "_stack-two_1qiex_71",
53
- "message-container": "_message-container_1qiex_77",
54
- "stacked-show-extra": "_stacked-show-extra_1qiex_87",
55
- "stacked-extra": "_stacked-extra_1qiex_101",
56
- "show-more-button-container": "_show-more-button-container_1qiex_114",
57
- "show-collapse-button-container": "_show-collapse-button-container_1qiex_115",
58
- "show-more-button": "_show-more-button_1qiex_114",
59
- "show-collapse-button": "_show-collapse-button_1qiex_115",
60
- open: be,
61
- slideIn: ke,
62
- close: ye,
63
- slideOut: Ce
64
- }, se = fe({
42
+ import "./index-bbef83ec.js";
43
+ import { u as ke } from "./use-reduced-motion-68bea567.js";
44
+ let F;
45
+ const Ee = new Uint8Array(16);
46
+ function $e() {
47
+ if (!F && (F = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !F))
48
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
49
+ return F(Ee);
50
+ }
51
+ const u = [];
52
+ for (let e = 0; e < 256; ++e)
53
+ u.push((e + 256).toString(16).slice(1));
54
+ function Ce(e, t = 0) {
55
+ return u[e[t + 0]] + u[e[t + 1]] + u[e[t + 2]] + u[e[t + 3]] + "-" + u[e[t + 4]] + u[e[t + 5]] + "-" + u[e[t + 6]] + u[e[t + 7]] + "-" + u[e[t + 8]] + u[e[t + 9]] + "-" + u[e[t + 10]] + u[e[t + 11]] + u[e[t + 12]] + u[e[t + 13]] + u[e[t + 14]] + u[e[t + 15]];
56
+ }
57
+ const Se = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ee = {
58
+ randomUUID: Se
59
+ };
60
+ function Ne(e, t, r) {
61
+ if (ee.randomUUID && !t && !e)
62
+ return ee.randomUUID();
63
+ e = e || {};
64
+ const s = e.random || (e.rng || $e)();
65
+ if (s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, t) {
66
+ r = r || 0;
67
+ for (let o = 0; o < 16; ++o)
68
+ t[r + o] = s[o];
69
+ return t;
70
+ }
71
+ return Ce(s);
72
+ }
73
+ const je = "_toaster_15ia4_4", He = "_hidden_15ia4_61", Ie = "_stacked_15ia4_68", Be = "_open_15ia4_155", Ve = "_slideIn_15ia4_1", De = "_close_15ia4_158", Me = "_slideOut_15ia4_1", i = {
74
+ toaster: je,
75
+ "toast-wrapper": "_toast-wrapper_15ia4_28",
76
+ "toast-alert": "_toast-alert_15ia4_42",
77
+ "alert-action": "_alert-action_15ia4_47",
78
+ "show-extra-toast": "_show-extra-toast_15ia4_58",
79
+ hidden: He,
80
+ stacked: Ie,
81
+ "stack-one": "_stack-one_15ia4_71",
82
+ "stack-two": "_stack-two_15ia4_71",
83
+ "message-container": "_message-container_15ia4_77",
84
+ "stacked-show-extra": "_stacked-show-extra_15ia4_87",
85
+ "stacked-extra": "_stacked-extra_15ia4_101",
86
+ "show-more-button-container": "_show-more-button-container_15ia4_114",
87
+ "show-collapse-button-container": "_show-collapse-button-container_15ia4_115",
88
+ "show-more-button": "_show-more-button_15ia4_114",
89
+ "show-collapse-button": "_show-collapse-button_15ia4_115",
90
+ open: Be,
91
+ slideIn: Ve,
92
+ close: De,
93
+ slideOut: Me
94
+ }, ne = ve({
65
95
  toasts: [],
66
96
  setToasts: () => [],
67
97
  toastHeights: [],
@@ -71,47 +101,47 @@ const _e = "_toaster_1qiex_4", Te = "_hidden_1qiex_61", ve = "_stacked_1qiex_68"
71
101
  setToastsBeforeStack: () => [],
72
102
  extraToastsVisible: !1,
73
103
  setExtraToastsVisible: () => []
74
- }), Ne = (e) => new Set(e).size !== e.length, qe = (e) => {
75
- const [s, r] = N([]), [t, o] = N([]), [c, a] = N(3), [d, b] = N(!1);
76
- q(() => {
77
- if (Ne(s.map((n) => n.id)))
104
+ }), Ue = (e) => new Set(e).size !== e.length, Re = (e) => {
105
+ const [t, r] = S([]), [s, o] = S([]), [n, a] = S(3), [x, H] = S(!1);
106
+ N(() => {
107
+ if (Ue(t.map((m) => m.id)))
78
108
  throw new Error(
79
109
  "The Hammer ToastProvider has detected multiple toasts with the same id. Each toast id needs to be unique."
80
110
  );
81
- }, [s]);
82
- const x = xe(
83
- (n) => {
84
- const _ = t.filter((f, u) => n !== void 0 ? u > n : !0).map((f) => f.height);
85
- return _.length > 0 ? d ? _.reduce((f, u) => f + u) : _.filter((f, u) => u >= _.length - c).reduce((f, u) => f + u) : 0;
111
+ }, [t]);
112
+ const h = ye(
113
+ (m) => {
114
+ const k = s.filter((d, l) => m !== void 0 ? l > m : !0).map((d) => d.height);
115
+ return k.length > 0 ? x ? k.reduce((d, l) => d + l) : k.filter((d, l) => l >= k.length - n).reduce((d, l) => d + l) : 0;
86
116
  },
87
- [t, d, c]
88
- ), j = Q(
117
+ [s, x, n]
118
+ ), b = J(
89
119
  () => ({
90
- toasts: s,
120
+ toasts: t,
91
121
  setToasts: r,
92
- toastHeights: t,
122
+ toastHeights: s,
93
123
  setToastHeights: o,
94
- getToasterHeight: x,
95
- toastsBeforeStack: c,
124
+ getToasterHeight: h,
125
+ toastsBeforeStack: n,
96
126
  setToastsBeforeStack: a,
97
- extraToastsVisible: d,
98
- setExtraToastsVisible: b
127
+ extraToastsVisible: x,
128
+ setExtraToastsVisible: H
99
129
  }),
100
130
  [
101
- d,
102
131
  x,
103
- t,
132
+ h,
104
133
  s,
105
- c
134
+ t,
135
+ n
106
136
  ]
107
137
  );
108
- return /* @__PURE__ */ l.jsx(se.Provider, { value: j, ...e });
138
+ return /* @__PURE__ */ c.jsx(ne.Provider, { value: b, ...e });
109
139
  }, A = () => {
110
- const e = ge(se);
140
+ const e = be(ne);
111
141
  if (e == null)
112
142
  throw new Error("useToasts must be wrapped in <ToastProvider />");
113
143
  return e;
114
- }, w = () => {
144
+ }, _ = () => {
115
145
  console.error(
116
146
  `Please use one of the following toast methods:
117
147
  `,
@@ -126,37 +156,38 @@ const _e = "_toaster_1qiex_4", Te = "_hidden_1qiex_61", ve = "_stacked_1qiex_68"
126
156
  ].map((e) => ` toast.${e}()
127
157
  `)
128
158
  );
129
- }, X = "hammer-toast", Ee = ["info", "success", "warning", "danger"], D = {};
130
- Ee.forEach((e) => {
131
- D[e] = (s) => {
132
- const r = new CustomEvent(X, {
159
+ }, Y = "hammer-toast", Ae = ["info", "success", "warning", "danger"], P = {};
160
+ Ae.forEach((e) => {
161
+ P[e] = (t) => {
162
+ const r = Ne(), s = new CustomEvent(Y, {
133
163
  composed: !0,
134
164
  detail: {
165
+ id: r,
135
166
  eventType: "add",
136
167
  status: e,
137
168
  createdAt: Date.now(),
138
- ...s
169
+ ...t
139
170
  }
140
171
  });
141
- dispatchEvent(r);
172
+ return dispatchEvent(s), r;
142
173
  };
143
174
  });
144
- const je = (e, s) => {
175
+ const Pe = (e, t) => {
145
176
  const r = new CustomEvent(
146
- X,
177
+ Y,
147
178
  {
148
179
  composed: !0,
149
180
  detail: {
150
181
  eventType: "update",
151
182
  id: e,
152
- ...s
183
+ ...t
153
184
  }
154
185
  }
155
186
  );
156
187
  dispatchEvent(r);
157
- }, $e = (e) => {
158
- const s = new CustomEvent(
159
- X,
188
+ }, ze = (e) => {
189
+ const t = new CustomEvent(
190
+ Y,
160
191
  {
161
192
  composed: !0,
162
193
  detail: {
@@ -165,209 +196,211 @@ const je = (e, s) => {
165
196
  }
166
197
  }
167
198
  );
168
- dispatchEvent(s);
169
- }, Se = async (e, s, r) => {
170
- w.info({ id: s, ...r.loading, duration: !1 }), await Promise.resolve(e).then((t) => {
171
- w.update(s, {
172
- ...r.success(t),
199
+ dispatchEvent(t);
200
+ }, Le = async (e, t) => {
201
+ const r = _.info({ ...t.loading, duration: !1 });
202
+ return await Promise.resolve(e).then((s) => {
203
+ _.update(r, {
204
+ ...t.success(s),
173
205
  status: "success"
174
206
  });
175
- }).catch((t) => {
176
- w.update(s, {
177
- ...r.error(t),
207
+ }).catch((s) => {
208
+ _.update(r, {
209
+ ...t.error(s),
178
210
  status: "danger"
179
211
  });
180
- });
212
+ }), r;
181
213
  };
182
- w.info = D.info;
183
- w.success = D.success;
184
- w.warning = D.warning;
185
- w.danger = D.danger;
186
- w.update = je;
187
- w.dismiss = $e;
188
- w.promise = Se;
189
- const He = () => {
190
- const { toastHeights: e, toastsBeforeStack: s } = A(), r = e.length, t = r > s + 1 ? "2rem" : "1rem";
214
+ _.info = P.info;
215
+ _.success = P.success;
216
+ _.warning = P.warning;
217
+ _.danger = P.danger;
218
+ _.update = Pe;
219
+ _.dismiss = ze;
220
+ _.promise = Le;
221
+ const Oe = () => {
222
+ const { toastHeights: e, toastsBeforeStack: t } = A(), r = e.length, s = r > t + 1 ? "2rem" : "1rem";
191
223
  return {
192
224
  // -0.75px fixes hover issue when 1rem != 16px due to pixel rounding
193
- top: `calc(${Q(() => r > s ? e.filter((o, c) => c >= r - s).map((o) => o.height).reduce((o, c) => o + c) : "unset", [e, s])}px + ${t} - 0.75px)`,
225
+ top: `calc(${J(() => r > t ? e.filter((o, n) => n >= r - t).map((o) => o.height).reduce((o, n) => o + n) : "unset", [e, t])}px + ${s} - 0.75px)`,
194
226
  position: "absolute",
195
- display: r > s ? void 0 : "none"
227
+ display: r > t ? void 0 : "none"
196
228
  };
197
- }, Z = "5.3125rem", W = "1rem", Y = `${24 / 16}rem`, Be = (e) => {
229
+ }, te = "5.3125rem", se = "1rem", re = `${24 / 16}rem`, qe = (e) => {
198
230
  const {
199
- toasts: s,
231
+ toasts: t,
200
232
  toastHeights: r,
201
- getToasterHeight: t,
233
+ getToasterHeight: s,
202
234
  toastsBeforeStack: o,
203
- extraToastsVisible: c
204
- } = A(), a = s.length, d = t(e);
205
- return Q(() => {
235
+ extraToastsVisible: n
236
+ } = A(), a = t.length, x = s(e);
237
+ return J(() => {
206
238
  if (e === a - 1)
207
239
  return {
208
- top: Y,
240
+ top: re,
209
241
  zIndex: 3
210
242
  };
211
243
  if (
212
244
  // all toasts when show more is clicked
213
- c || // or visible toasts when stacked
214
- !c && (a <= o || a > o && e >= a - o)
245
+ n || // or visible toasts when stacked
246
+ !n && (a <= o || a > o && e >= a - o)
215
247
  )
216
248
  return {
217
- top: `calc(${d}px + ${Y})`
249
+ top: `calc(${x}px + ${re})`
218
250
  };
219
251
  if (a > o) {
220
252
  if (e === a - o - 1)
221
253
  return {
222
- top: `calc(${d || 0}px - ${Z} +
223
- ${W})`,
254
+ top: `calc(${x || 0}px - ${te} +
255
+ ${se})`,
224
256
  zIndex: 1
225
257
  };
226
258
  if (e <= a - o - 2)
227
259
  return {
228
- top: `calc(${d || 0}px -
229
- ${Z}
230
- + ${W} * 2)`,
260
+ top: `calc(${x || 0}px -
261
+ ${te}
262
+ + ${se} * 2)`,
231
263
  zIndex: 0
232
264
  };
233
265
  }
234
266
  }, [r]);
235
- }, ee = (e, s, r) => {
236
- r((t) => t.find((o) => o.id === e) ? t.map((o) => o.id === e ? { ...o, height: s } : o) : [
237
- ...t,
267
+ }, oe = (e, t, r) => {
268
+ r((s) => s.find((o) => o.id === e) ? s.map((o) => o.id === e ? { ...o, height: t } : o) : [
269
+ ...s,
238
270
  {
239
271
  id: e,
240
- height: s
272
+ height: t
241
273
  }
242
274
  ]);
243
- }, te = (e, s, r) => {
244
- e((t) => r ? t.filter((o) => o.id !== r) : []), s((t) => r ? t.filter((o) => o.id !== r) : []);
245
- }, Ie = (e, s, r, t) => {
275
+ }, ae = (e, t, r) => {
276
+ e((s) => r ? s.filter((o) => o.id !== r) : []), t((s) => r ? s.filter((o) => o.id !== r) : []);
277
+ }, Fe = (e, t, r, s) => {
246
278
  globalThis.matchMedia(
247
279
  "(prefers-reduced-motion: reduce)"
248
- ).matches ? te(e, s, t) : (e(
249
- (o) => o.map((c) => !t || c.id === t ? {
250
- ...c,
280
+ ).matches ? ae(e, t, s) : (e(
281
+ (o) => o.map((n) => !s || n.id === s ? {
282
+ ...n,
251
283
  toastClassName: r
252
- } : c)
284
+ } : n)
253
285
  ), setTimeout(() => {
254
- te(e, s, t);
286
+ ae(e, t, s);
255
287
  }, 290));
256
- }, oe = (e) => {
257
- const { setToasts: s, setToastHeights: r } = A();
258
- return (t) => {
259
- Ie(s, r, e, t);
288
+ }, ie = (e) => {
289
+ const { setToasts: t, setToastHeights: r } = A();
290
+ return (s) => {
291
+ Fe(t, r, e, s);
260
292
  };
261
- }, re = J(
293
+ }, ce = Z(
262
294
  ({
263
295
  actions: e,
264
- containerClassName: s,
296
+ containerClassName: t,
265
297
  createdAt: r,
266
- duration: t,
298
+ duration: s,
267
299
  index: o = 0,
268
- isBelowStackIndex: c,
300
+ isBelowStackIndex: n,
269
301
  isStacked: a,
270
- message: d,
271
- onClose: b,
272
- pausedStatus: x,
273
- toastClassName: j,
274
- ...n
275
- }, _) => {
276
- const { setToastHeights: f, extraToastsVisible: u } = A(), m = oe(i.close), L = we(), z = Be(o), $ = v(null), T = v(), S = v(0), E = v(r ?? 0), H = v(!1), [B, V] = N(
302
+ message: x,
303
+ onClose: H,
304
+ pausedStatus: h,
305
+ toastClassName: b,
306
+ ...m
307
+ }, k) => {
308
+ const { setToastHeights: d, extraToastsVisible: l } = A(), I = ie(i.close), M = ke(), g = qe(o), j = y(null), w = y(), B = y(0), V = y(r ?? 0), U = y(!1), [R, z] = S(
277
309
  i.hidden
278
- ), [I, P] = N(!1), K = O(
310
+ ), [$, D] = S(!1), L = K(
279
311
  i["toast-alert"],
280
- j,
281
- B
312
+ b,
313
+ R
282
314
  );
283
- q(() => {
284
- I || (V(i.open), L && P(!0));
285
- }, []), q(() => {
286
- if ($.current && I && !a)
287
- if (c && u)
315
+ N(() => {
316
+ $ || (z(i.open), M && D(!0));
317
+ }, []), N(() => {
318
+ if (j.current && $ && !a)
319
+ if (n && l)
288
320
  setTimeout(() => {
289
- const k = $.current.clientHeight;
290
- ee(n.id, k, f);
321
+ const v = j.current.clientHeight;
322
+ oe(m.id, v, d);
291
323
  }, 300);
292
324
  else {
293
- const k = $.current.clientHeight;
294
- ee(n.id, k, f);
325
+ const v = j.current.clientHeight;
326
+ oe(m.id, v, d);
295
327
  }
296
328
  }, [
297
- I,
329
+ $,
298
330
  a,
299
- u,
331
+ l,
300
332
  // toast updates
301
333
  e,
302
- d,
303
- n.title
304
- ]), q(() => {
305
- if (t && !a)
306
- if (x) {
307
- if (typeof x == "number")
308
- clearTimeout(T.current), S.current = x;
309
- else if (x === "resumed") {
310
- const k = (
334
+ x,
335
+ m.title
336
+ ]), N(() => {
337
+ if (s && !a)
338
+ if (h) {
339
+ if (typeof h == "number")
340
+ clearTimeout(w.current), B.current = h;
341
+ else if (h === "resumed") {
342
+ const v = (
311
343
  // rendering new toast after initial hover
312
- S.current === 0 ? t : (
344
+ B.current === 0 ? s : (
313
345
  // resume timer after valid hover
314
- t + (E.current || 0) - S.current
346
+ s + (V.current || 0) - B.current
315
347
  )
316
348
  );
317
- return T.current = setTimeout(() => {
318
- m(n.id), S.current = 0;
319
- }, k), () => clearTimeout(T.current);
349
+ return w.current = setTimeout(() => {
350
+ I(m.id), B.current = 0;
351
+ }, v), () => clearTimeout(w.current);
320
352
  }
321
353
  } else
322
- return T.current = setTimeout(
323
- () => m(n.id),
324
- t
325
- ), () => clearTimeout(T.current);
326
- }, [E.current, t, x]), q(() => {
327
- if (t) {
354
+ return w.current = setTimeout(
355
+ () => I(m.id),
356
+ s
357
+ ), () => clearTimeout(w.current);
358
+ }, [V.current, s, h]), N(() => {
359
+ if (s) {
328
360
  if (a)
329
- clearTimeout(T.current), H.current = !0;
330
- else if (!a && H.current && typeof x != "number")
331
- return E.current = Date.now(), T.current = setTimeout(() => {
332
- m(n.id), H.current = !1;
333
- }, t), () => clearTimeout(T.current);
361
+ clearTimeout(w.current), U.current = !0;
362
+ else if (!a && U.current && typeof h != "number")
363
+ return V.current = Date.now(), w.current = setTimeout(() => {
364
+ I(m.id), U.current = !1;
365
+ }, s), () => clearTimeout(w.current);
334
366
  }
335
- }, [a, t]);
336
- const F = (k) => {
337
- if (k === "right") {
338
- w.dismiss(n.id);
367
+ }, [a, s]);
368
+ const O = (v) => {
369
+ if (v === "right") {
370
+ _.dismiss(m.id);
339
371
  return;
340
372
  }
341
- }, { direction: G, ...M } = pe(F), U = a && !u ? {} : {
373
+ }, { direction: W, ...Q } = _e(O), X = a && !l ? {} : {
342
374
  closable: !0,
343
- onClose: b
375
+ onClose: H
344
376
  };
345
- if (t !== !1 && e)
377
+ if (s !== !1 && e)
346
378
  throw new Error(
347
379
  "If actions are provided to toast message, duration must be false."
348
380
  );
349
- return /* @__PURE__ */ l.jsx(
381
+ return /* @__PURE__ */ c.jsx(
350
382
  "div",
351
383
  {
352
- className: s,
353
- style: z ?? { top: "1.5rem" },
354
- ref: $,
355
- onAnimationStart: () => P(!0),
384
+ "data-anv": "Toast",
385
+ className: t,
386
+ style: g ?? { top: "1.5rem" },
387
+ ref: j,
388
+ onAnimationStart: () => D(!0),
356
389
  role: a ? "presentation" : void 0,
357
- ...M,
358
- children: /* @__PURE__ */ l.jsxs(
359
- me,
390
+ ...Q,
391
+ children: /* @__PURE__ */ c.jsxs(
392
+ Te,
360
393
  {
361
- className: K,
362
- ...n,
363
- ...U,
364
- ref: _,
365
- tabIndex: a && !u ? -1 : 0,
394
+ className: L,
395
+ ...m,
396
+ ...X,
397
+ ref: k,
398
+ tabIndex: a && !l ? -1 : 0,
366
399
  children: [
367
- /* @__PURE__ */ l.jsx("div", { className: i["message-container"], children: d }),
368
- e && t === !1 && /* @__PURE__ */ l.jsxs("div", { className: i["alert-action"], children: [
369
- /* @__PURE__ */ l.jsx(R, { appearance: e.primary.appearance, size: "small", children: e.primary.label }),
370
- e.secondary && /* @__PURE__ */ l.jsx(R, { appearance: e.secondary.appearance, size: "small", children: e.secondary.label })
400
+ /* @__PURE__ */ c.jsx("div", { className: i["message-container"], children: x }),
401
+ e && s === !1 && /* @__PURE__ */ c.jsxs("div", { className: i["alert-action"], children: [
402
+ /* @__PURE__ */ c.jsx(G, { appearance: e.primary.appearance, size: "small", children: e.primary.label }),
403
+ e.secondary && /* @__PURE__ */ c.jsx(G, { appearance: e.secondary.appearance, size: "small", children: e.secondary.label })
371
404
  ] })
372
405
  ]
373
406
  }
@@ -376,123 +409,147 @@ const He = () => {
376
409
  );
377
410
  }
378
411
  );
379
- re.displayName = "Toast";
380
- const Me = J(
381
- (e, s) => /* @__PURE__ */ l.jsx(qe, { children: /* @__PURE__ */ l.jsx(ae, { ...e, ...s }) })
382
- ), ae = J(
412
+ ce.displayName = "Toast";
413
+ const Ke = Z(
414
+ (e, t) => /* @__PURE__ */ c.jsx(Re, { children: /* @__PURE__ */ c.jsx(de, { ...e, ...t }) })
415
+ ), de = Z(
383
416
  ({
384
417
  className: e,
385
- duration: s = !1,
418
+ duration: t = !1,
386
419
  focusKey: r = "t",
387
- focusKeyCode: t = "KeyT",
388
- toastsBeforeStack: o = 3,
389
- ...c
390
- }, a) => {
391
- const d = v(null), b = v(null), {
392
- toasts: x,
393
- setToastsBeforeStack: j,
394
- extraToastsVisible: n,
395
- setExtraToastsVisible: _,
396
- setToasts: f,
397
- getToasterHeight: u
398
- } = A(), m = x.length, L = v(0), z = oe(i.close), [$, T] = N(0);
399
- q(() => {
420
+ focusKeyCode: s = "KeyT",
421
+ forceRender: o = !1,
422
+ id: n,
423
+ toastsBeforeStack: a = 3,
424
+ ...x
425
+ }, H) => {
426
+ const h = y(null), b = y(null), {
427
+ toasts: m,
428
+ setToastsBeforeStack: k,
429
+ extraToastsVisible: d,
430
+ setExtraToastsVisible: l,
431
+ setToasts: I,
432
+ getToasterHeight: M
433
+ } = A(), g = m.length, j = y(0), w = ie(i.close), [B, V] = S(0);
434
+ N(() => {
400
435
  window.addEventListener("hammer-toast", (p) => {
401
- const { eventType: h, ...y } = p.detail;
402
- h === "add" ? f((g) => [...g, y]) : h === "update" ? f((g) => g.map((C) => C.id === y.id ? {
436
+ const { eventType: f, ...E } = p.detail;
437
+ f === "add" ? I((T) => [...T, E]) : f === "update" ? I((T) => T.map((C) => C.id === E.id ? {
403
438
  ...C,
404
- ...y
405
- } : C)) : h === "dismiss" && (y.id ? z(y.id) : z());
439
+ ...E
440
+ } : C)) : f === "dismiss" && (E.id ? w(E.id) : w());
406
441
  });
407
- }, []), q(() => {
408
- m > L.current ? T(u()) : setTimeout(() => T(u()), 290), L.current = m;
409
- }, [u]), q(() => {
410
- j(o);
411
- }, [j, o]);
412
- const S = He(), [E, H] = N(void 0), B = v(null), V = v(!1);
413
- if (m === 0)
442
+ }, []), N(() => {
443
+ g > j.current ? V(M()) : setTimeout(() => V(M()), 290), j.current = g;
444
+ }, [M]), N(() => {
445
+ k(a);
446
+ }, [k, a]);
447
+ const U = Oe(), [R, z] = S(void 0), $ = y(null), D = y(!1);
448
+ if (g === 0)
449
+ return;
450
+ if (document.querySelectorAll(`[data-toaster-id=${n}]`).length > 1) {
451
+ console.error(
452
+ `Multiple Hammer Toasters with id=${n} detected. Toaster ids should be unique. These Toasters will not render.`
453
+ );
414
454
  return;
415
- const I = !n && m > o, P = m - o, K = `${P} more message${P > 1 ? "s" : ""}`, F = O(i.toaster, e, {
416
- [i["show-more-button"]]: I,
417
- [i["show-extra-toast"]]: n
418
- }), G = () => {
419
- (E === "resumed" || E === void 0) && H(Date.now());
420
- }, M = () => {
421
- var p, h;
422
- _(!1), H("resumed"), (p = d.current) != null && p.scrollTo && ((h = d.current) == null || h.scrollTo(0, 0));
423
- }, U = async (p) => {
424
- const { activeElement: h } = document;
425
- (h == null ? void 0 : h.tagName.toLowerCase()) !== "input" && (h == null ? void 0 : h.tagName.toLowerCase()) !== "textarea" && m > 0 && p.code === t ? (p.preventDefault(), _(!0), B.current = document.activeElement, V.current = !0, setTimeout(() => {
455
+ }
456
+ const L = document.querySelectorAll("[data-anv='Toaster']");
457
+ if (L.length > 1 && L[0].getAttribute("data-toaster-id") !== n)
458
+ if (o)
459
+ console.warn(
460
+ "Multiple Hammer Toasters detected. `forceRender` was used so multiple may be rendered. Avoid doing this in production code."
461
+ );
462
+ else {
463
+ console.error(
464
+ `Multiple Hammer Toasters detected. Only one can be rendered at a time to prevent duplicate toast messages.
465
+
466
+ Toaster with id=${n} was not rendered.`
467
+ );
468
+ return;
469
+ }
470
+ const O = !d && g > a, W = g - a, Q = `${W} more message${W > 1 ? "s" : ""}`, X = K(i.toaster, e, {
471
+ [i["show-more-button"]]: O,
472
+ [i["show-extra-toast"]]: d
473
+ }), v = () => {
474
+ (R === "resumed" || R === void 0) && z(Date.now());
475
+ }, q = () => {
476
+ var p, f;
477
+ l(!1), z("resumed"), (p = h.current) != null && p.scrollTo && ((f = h.current) == null || f.scrollTo(0, 0));
478
+ }, le = async (p) => {
479
+ const { activeElement: f } = document;
480
+ (f == null ? void 0 : f.tagName.toLowerCase()) !== "input" && (f == null ? void 0 : f.tagName.toLowerCase()) !== "textarea" && g > 0 && p.code === s ? (p.preventDefault(), l(!0), $.current = document.activeElement, D.current = !0, setTimeout(() => {
426
481
  b.current && (b.current.focus(), b.current.scrollTo && b.current.scrollTo());
427
- }, 300)) : p.code === "Escape" && V.current === !0 && (_(!1), M(), B.current && B.current.tagName.toLowerCase() !== "body" ? B.current.focus() : document.activeElement.blur(), V.current = !1);
482
+ }, 300)) : p.code === "Escape" && D.current === !0 && (l(!1), q(), $.current && $.current.tagName.toLowerCase() !== "body" ? $.current.focus() : document.activeElement.blur(), D.current = !1);
428
483
  };
429
- document.addEventListener("keydown", U);
430
- const k = () => {
484
+ document.addEventListener("keydown", le);
485
+ const ue = () => {
431
486
  var p;
432
- (p = d.current) != null && p.matches(":focus-within") || M();
487
+ (p = h.current) != null && p.matches(":focus-within") || q();
433
488
  };
434
- return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
435
- /* @__PURE__ */ l.jsxs(
489
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
490
+ /* @__PURE__ */ c.jsxs(
436
491
  "div",
437
492
  {
438
- className: F,
493
+ "data-anv": "Toaster",
494
+ "data-toaster-id": n,
495
+ className: X,
439
496
  ref: (p) => {
440
- d.current = p, typeof a == "function" && a(p);
497
+ h.current = p, typeof H == "function" && H(p);
441
498
  },
442
- onMouseOver: G,
443
- onMouseLeave: M,
444
- onFocus: G,
445
- onBlur: k,
499
+ onMouseOver: v,
500
+ onMouseLeave: q,
501
+ onFocus: v,
502
+ onBlur: ue,
446
503
  style: {
447
- height: n ? "100vh" : `calc(${$}px + 2rem + var(--toaster-padding))`
504
+ height: d ? "100vh" : `calc(${B}px + 2rem + var(--toaster-padding))`
448
505
  },
449
- ...c,
506
+ ...x,
450
507
  children: [
451
- x.map(({ toastClassName: p, onClose: h, ...y }, g) => {
452
- const C = !n && g < m - o, ie = g === m - o, ne = g < m - o - 2, ce = O(i.toast, p), le = O(i["toast-wrapper"], {
453
- [i.stacked]: C || ie,
454
- [i["stack-one"]]: C && g === m - o - 1,
455
- [i["stack-two"]]: C && g === m - o - 2,
456
- [i["stacked-extra"]]: ne,
457
- [i["stacked-show-extra"]]: n
458
- }), de = (ue) => {
459
- h && h(ue), w.dismiss(y.id);
508
+ m.map(({ toastClassName: p, onClose: f, ...E }, T) => {
509
+ const C = !d && T < g - a, me = T === g - a, pe = T < g - a - 2, he = K(i.toast, p), ge = K(i["toast-wrapper"], {
510
+ [i.stacked]: C || me,
511
+ [i["stack-one"]]: C && T === g - a - 1,
512
+ [i["stack-two"]]: C && T === g - a - 2,
513
+ [i["stacked-extra"]]: pe,
514
+ [i["stacked-show-extra"]]: d
515
+ }), fe = (xe) => {
516
+ f && f(xe), _.dismiss(E.id);
460
517
  };
461
- return /* @__PURE__ */ l.jsx(
462
- re,
518
+ return /* @__PURE__ */ c.jsx(
519
+ ce,
463
520
  {
464
- containerClassName: le,
465
- duration: s,
466
- index: g,
521
+ containerClassName: ge,
522
+ duration: t,
523
+ index: T,
467
524
  isStacked: C,
468
- isBelowStackIndex: g < m - o,
469
- onClose: de,
470
- pausedStatus: E,
471
- toastClassName: ce,
472
- ref: g === 0 ? b : void 0,
473
- ...y
525
+ isBelowStackIndex: T < g - a,
526
+ onClose: fe,
527
+ pausedStatus: R,
528
+ toastClassName: he,
529
+ ref: T === 0 ? b : void 0,
530
+ ...E
474
531
  },
475
- y.id
532
+ E.id
476
533
  );
477
534
  }),
478
- I && /* @__PURE__ */ l.jsx(
535
+ O && /* @__PURE__ */ c.jsx(
479
536
  "div",
480
537
  {
481
538
  className: i["show-more-button-container"],
482
- style: S,
483
- children: /* @__PURE__ */ l.jsx(
484
- R,
539
+ style: U,
540
+ children: /* @__PURE__ */ c.jsx(
541
+ G,
485
542
  {
486
543
  className: i.showMoreButton,
487
- onClick: () => _(!0),
544
+ onClick: () => l(!0),
488
545
  appearance: "secondary",
489
546
  tabIndex: 0,
490
- children: K
547
+ children: Q
491
548
  }
492
549
  )
493
550
  }
494
551
  ),
495
- /* @__PURE__ */ l.jsxs(he, { "aria-live": "polite", children: [
552
+ /* @__PURE__ */ c.jsxs(we, { "aria-live": "polite", children: [
496
553
  "New toast message appeared. Press the ",
497
554
  r,
498
555
  " key to focus on the toast messages. Press escape to return focus to previous position."
@@ -500,11 +557,11 @@ const Me = J(
500
557
  ]
501
558
  }
502
559
  ),
503
- n && /* @__PURE__ */ l.jsx("div", { className: i["show-collapse-button-container"], children: /* @__PURE__ */ l.jsx(
504
- R,
560
+ d && /* @__PURE__ */ c.jsx("div", { className: i["show-collapse-button-container"], children: /* @__PURE__ */ c.jsx(
561
+ G,
505
562
  {
506
563
  className: i["show-collapse-button"],
507
- onClick: M,
564
+ onClick: q,
508
565
  appearance: "secondary",
509
566
  children: "Collapse Messages"
510
567
  }
@@ -512,10 +569,10 @@ const Me = J(
512
569
  ] });
513
570
  }
514
571
  );
515
- Me.displayName = "Toaster";
516
- ae.displayName = "ToasterContent";
572
+ Ke.displayName = "Toaster";
573
+ de.displayName = "ToasterContent";
517
574
  export {
518
- Ct as default,
519
- Nt as useAccessibleColor
575
+ Ut as default,
576
+ Rt as useAccessibleColor
520
577
  };
521
578
  //# sourceMappingURL=useAccessibleColor.js.map