asta-ui 0.9.2 → 0.9.4

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 (448) hide show
  1. package/css/asta.css +2 -2
  2. package/css/asta.js +248 -1
  3. package/css/components.css +722 -44
  4. package/css/runtime/core.css +5 -5
  5. package/css/runtime/data.css +2 -2
  6. package/css/runtime/modules.css +49 -0
  7. package/css/runtime/modules.js +245 -0
  8. package/css/runtime/overlays.css +22 -9
  9. package/css/src/blocks.css +3 -3
  10. package/css/src/core.css +8 -8
  11. package/css/src/data.css +3 -3
  12. package/css/src/display.css +6 -5
  13. package/css/src/forms.css +6 -6
  14. package/css/src/modules.css +616 -0
  15. package/css/src/overlays.css +3 -3
  16. package/css/tokens.css +6 -2
  17. package/dist/ai-chat.js +1 -1
  18. package/dist/avatar-group.js +2 -2
  19. package/dist/avatar.js +1 -1
  20. package/dist/base/ai-chat.js +1 -1
  21. package/dist/base/avatar-group.js +2 -2
  22. package/dist/base/avatar.js +1 -1
  23. package/dist/base/billing.d.ts +2 -0
  24. package/dist/base/billing.js +11 -0
  25. package/dist/base/bubble-wrap.js +1 -1
  26. package/dist/base/candlestick.js +1 -1
  27. package/dist/base/card-checkout.js +1 -1
  28. package/dist/base/chart-card.d.ts +2 -0
  29. package/dist/base/chart-card.js +11 -0
  30. package/dist/base/chat-thread.js +1 -1
  31. package/dist/base/checkbox.js +1 -1
  32. package/dist/base/checkout.js +3 -3
  33. package/dist/base/color-picker.js +1 -1
  34. package/dist/base/combo-lock.js +1 -1
  35. package/dist/base/combobox-aui-046.js +1 -1
  36. package/dist/base/combobox-aui-047.js +1 -1
  37. package/dist/base/combobox.js +1 -1
  38. package/dist/base/command-palette.js +1 -1
  39. package/dist/base/comments.js +2 -2
  40. package/dist/base/context-menu.js +1 -1
  41. package/dist/base/cookie-consent.d.ts +2 -0
  42. package/dist/base/cookie-consent.js +13 -0
  43. package/dist/base/countdown.d.ts +2 -0
  44. package/dist/base/countdown.js +9 -0
  45. package/dist/base/data-table.js +1 -1
  46. package/dist/base/dialog.js +1 -1
  47. package/dist/base/dropdown-menu.js +1 -1
  48. package/dist/base/field.js +1 -1
  49. package/dist/base/file-manager.d.ts +2 -0
  50. package/dist/base/file-manager.js +19 -0
  51. package/dist/base/flash-sale.d.ts +2 -0
  52. package/dist/base/flash-sale.js +7 -0
  53. package/dist/base/footer-aui-027.js +1 -1
  54. package/dist/base/footer-aui-028.js +1 -1
  55. package/dist/base/footer.js +1 -1
  56. package/dist/base/hover-card.js +1 -1
  57. package/dist/base/inbox.d.ts +2 -0
  58. package/dist/base/inbox.js +11 -0
  59. package/dist/base/inline-edit.js +1 -1
  60. package/dist/base/input-aui-029.js +1 -1
  61. package/dist/base/input-aui-030.js +1 -1
  62. package/dist/base/input-aui-031.js +1 -1
  63. package/dist/base/input-aui-032.js +1 -1
  64. package/dist/base/input-aui-033.js +1 -1
  65. package/dist/base/input-aui-034.js +1 -1
  66. package/dist/base/input.js +1 -1
  67. package/dist/base/invoice.d.ts +2 -0
  68. package/dist/base/invoice.js +10 -0
  69. package/dist/base/kanban.js +2 -2
  70. package/dist/base/menubar.d.ts +2 -0
  71. package/dist/base/menubar.js +9 -0
  72. package/dist/base/meter.d.ts +2 -0
  73. package/dist/base/meter.js +9 -0
  74. package/dist/base/morse-tap.js +1 -1
  75. package/dist/base/navbar-aui-009.js +1 -1
  76. package/dist/base/navbar-aui-011.js +1 -1
  77. package/dist/base/navbar-aui-012.js +1 -1
  78. package/dist/base/navbar-aui-013.js +1 -1
  79. package/dist/base/navbar.js +1 -1
  80. package/dist/base/notification-center.js +3 -3
  81. package/dist/base/number-input.js +1 -1
  82. package/dist/base/order-book.js +1 -1
  83. package/dist/base/otp-input-aui-041.js +1 -1
  84. package/dist/base/otp-input-aui-042.js +1 -1
  85. package/dist/base/otp-input.js +1 -1
  86. package/dist/base/password-input-aui-039.js +1 -1
  87. package/dist/base/password-input-aui-040.js +1 -1
  88. package/dist/base/password-input.js +1 -1
  89. package/dist/base/payment-received.js +1 -1
  90. package/dist/base/phone-input.d.ts +2 -0
  91. package/dist/base/phone-input.js +13 -0
  92. package/dist/base/popover.js +1 -1
  93. package/dist/base/price-alert.d.ts +2 -0
  94. package/dist/base/price-alert.js +7 -0
  95. package/dist/base/price-chart.js +1 -1
  96. package/dist/base/properties-panel.js +1 -1
  97. package/dist/base/radio-group.js +1 -1
  98. package/dist/base/select-aui-045.js +1 -1
  99. package/dist/base/select.js +1 -1
  100. package/dist/base/settings-panel.js +1 -1
  101. package/dist/base/shipment-tracker.js +1 -1
  102. package/dist/base/sidebar.js +2 -2
  103. package/dist/base/sign-in-aui-015.js +1 -1
  104. package/dist/base/sign-in-aui-016.js +1 -1
  105. package/dist/base/sign-in-aui-017.js +1 -1
  106. package/dist/base/sign-in-aui-018.js +1 -1
  107. package/dist/base/sign-in-aui-019.js +1 -1
  108. package/dist/base/sign-in-aui-020.js +1 -1
  109. package/dist/base/sign-in.js +1 -1
  110. package/dist/base/snap-grid.js +1 -1
  111. package/dist/base/sortable-list.d.ts +2 -0
  112. package/dist/base/sortable-list.js +9 -0
  113. package/dist/base/split-bill.d.ts +2 -0
  114. package/dist/base/split-bill.js +7 -0
  115. package/dist/base/stat-card.js +1 -1
  116. package/dist/base/tag-input-aui-048.js +1 -1
  117. package/dist/base/tag-input-aui-049.js +1 -1
  118. package/dist/base/tag-input.js +1 -1
  119. package/dist/base/team-members.js +3 -3
  120. package/dist/base/testimonials.d.ts +2 -0
  121. package/dist/base/testimonials.js +10 -0
  122. package/dist/base/textarea-aui-001.js +1 -1
  123. package/dist/base/textarea-aui-002.js +1 -1
  124. package/dist/base/textarea-aui-003.js +1 -1
  125. package/dist/base/textarea-aui-004.js +1 -1
  126. package/dist/base/textarea-aui-005.js +1 -1
  127. package/dist/base/textarea-aui-006.js +1 -1
  128. package/dist/base/textarea-aui-007.js +1 -1
  129. package/dist/base/textarea-aui-008.js +1 -1
  130. package/dist/base/textarea-aui-035.js +1 -1
  131. package/dist/base/textarea-aui-036.js +1 -1
  132. package/dist/base/textarea-aui-037.js +1 -1
  133. package/dist/base/textarea-aui-038.js +1 -1
  134. package/dist/base/textarea.js +1 -1
  135. package/dist/base/token-swap.js +1 -1
  136. package/dist/base/tooltip.js +1 -1
  137. package/dist/base/trade-ticket.js +1 -1
  138. package/dist/base/watchlist.d.ts +2 -0
  139. package/dist/base/watchlist.js +7 -0
  140. package/dist/base.js +166 -90
  141. package/dist/billing.d.ts +2 -0
  142. package/dist/billing.js +11 -0
  143. package/dist/bubble-wrap.js +1 -1
  144. package/dist/candlestick.js +1 -1
  145. package/dist/card-checkout.js +1 -1
  146. package/dist/chart-card.d.ts +2 -0
  147. package/dist/chart-card.js +11 -0
  148. package/dist/chat-thread.js +1 -1
  149. package/dist/checkbox.js +1 -1
  150. package/dist/checkout.js +3 -3
  151. package/dist/{chunk-7TK42PS3.js → chunk-25RCKHWV.js} +19 -4
  152. package/dist/{chunk-4L4EKC46.js → chunk-2EBWWZPS.js} +1 -1
  153. package/dist/chunk-2F5CE6ZB.js +269 -0
  154. package/dist/{chunk-SATIWCJQ.js → chunk-2LM3VHNO.js} +3 -2
  155. package/dist/{chunk-5VQV2I7C.js → chunk-2PPF4GK5.js} +9 -6
  156. package/dist/{chunk-ZRGPSYW6.js → chunk-2PQIPQGO.js} +10 -6
  157. package/dist/{chunk-HB7DFNZP.js → chunk-3PQTSFOS.js} +1 -1
  158. package/dist/{chunk-VPZP6TCT.js → chunk-3UQIYJTI.js} +7 -3
  159. package/dist/{chunk-FY6BRODJ.js → chunk-3ZFF6VC5.js} +4 -2
  160. package/dist/{chunk-V3SPSN3A.js → chunk-45KDL3JM.js} +1 -1
  161. package/dist/{chunk-EVSTTLOT.js → chunk-4SLC3EK6.js} +18 -4
  162. package/dist/{chunk-VWYHP4SB.js → chunk-4WCMPLE3.js} +13 -4
  163. package/dist/chunk-5DLY6FGD.js +160 -0
  164. package/dist/{chunk-SRGDJSW7.js → chunk-5GGS6VP5.js} +1 -0
  165. package/dist/chunk-5N2G462S.js +338 -0
  166. package/dist/{chunk-FKHNK5VC.js → chunk-6C52ZQRB.js} +2 -1
  167. package/dist/{chunk-VVAL2JZJ.js → chunk-6MPEI6V5.js} +2 -2
  168. package/dist/{chunk-HNO6EUGJ.js → chunk-6RA7LJ3K.js} +7 -1
  169. package/dist/{chunk-RRHQBGRO.js → chunk-77RFV2MG.js} +7 -2
  170. package/dist/{chunk-RIWKIBEP.js → chunk-7MBTBYTJ.js} +3 -3
  171. package/dist/{chunk-XIU7K2YE.js → chunk-ADZI4ROA.js} +1 -1
  172. package/dist/{chunk-SAJ4D3Z2.js → chunk-AMVX4DDT.js} +7 -3
  173. package/dist/{chunk-7JNO265Q.js → chunk-B4XRAVHL.js} +33 -17
  174. package/dist/{chunk-MDI73RL6.js → chunk-B7MVYR7C.js} +7 -4
  175. package/dist/{chunk-OFPZUTBI.js → chunk-BEV2X4YL.js} +2 -1
  176. package/dist/chunk-BG2W2KVE.js +200 -0
  177. package/dist/chunk-BKHH2CJA.js +146 -0
  178. package/dist/{chunk-XRVVZA2Y.js → chunk-CACW5LH3.js} +1 -1
  179. package/dist/{chunk-I2WXKWTQ.js → chunk-CBJUY4WE.js} +10 -5
  180. package/dist/{chunk-746WX2DF.js → chunk-CSTI5CTF.js} +8 -2
  181. package/dist/{chunk-3KS5EN3Q.js → chunk-D2JJSUXI.js} +1 -1
  182. package/dist/chunk-D4AYULMF.js +338 -0
  183. package/dist/{chunk-4XM6DKEO.js → chunk-DD2TBHSJ.js} +2 -1
  184. package/dist/{chunk-B5OESWCR.js → chunk-DPLH3EGO.js} +1 -1
  185. package/dist/{chunk-5TSQZY34.js → chunk-DU3CZ3K7.js} +1 -1
  186. package/dist/{chunk-YON5SU2G.js → chunk-DWA62IYV.js} +5 -2
  187. package/dist/{chunk-FUNXYRSG.js → chunk-DWZT455C.js} +24 -9
  188. package/dist/{chunk-WSTQ6WZO.js → chunk-ECGJ6D5D.js} +3 -2
  189. package/dist/{chunk-3JNUC3FU.js → chunk-EN6XBXW5.js} +1 -1
  190. package/dist/{chunk-GJ3R6IZL.js → chunk-EOZDJA7Z.js} +1 -1
  191. package/dist/{chunk-KXWC2UHE.js → chunk-FBIGYEFN.js} +6 -3
  192. package/dist/{chunk-RS3XHHDE.js → chunk-FDE3S2YK.js} +1 -1
  193. package/dist/{chunk-DRX3KRNL.js → chunk-FFRJW5O7.js} +3 -2
  194. package/dist/{chunk-UEOEWP7L.js → chunk-FIPWA5KL.js} +3 -2
  195. package/dist/chunk-FLCT7THQ.js +75 -0
  196. package/dist/{chunk-RTAHGY6P.js → chunk-FOJRZASV.js} +7 -1
  197. package/dist/{chunk-CA7YQ5BJ.js → chunk-FQ4YUKAE.js} +3 -3
  198. package/dist/{chunk-33N6SZB5.js → chunk-FXXR3FM3.js} +6 -3
  199. package/dist/{chunk-BGVAXPHD.js → chunk-G7WTEBMX.js} +21 -6
  200. package/dist/{chunk-HPVPHWDM.js → chunk-IATF2OTU.js} +1 -1
  201. package/dist/{chunk-CLCP2GFW.js → chunk-IDXERBKL.js} +3 -3
  202. package/dist/{chunk-NB7X26PY.js → chunk-IF6CWIUB.js} +1 -1
  203. package/dist/{chunk-WVIV4JBH.js → chunk-ITGWD7ZY.js} +2 -2
  204. package/dist/{chunk-2LZM435Z.js → chunk-IVCHYE55.js} +7 -1
  205. package/dist/{chunk-BH2DLHFW.js → chunk-JE2MAZGR.js} +3 -2
  206. package/dist/{chunk-W57O4RLL.js → chunk-JF4BKHFK.js} +37 -9
  207. package/dist/{chunk-QDRBMWRX.js → chunk-JLCSRNI2.js} +7 -3
  208. package/dist/{chunk-7L4YE6HM.js → chunk-JNNMKFEQ.js} +1 -1
  209. package/dist/{chunk-GDTSCUHY.js → chunk-JRD6FENH.js} +1 -1
  210. package/dist/{chunk-F5I6EK7F.js → chunk-JSS4QASL.js} +1 -1
  211. package/dist/{chunk-B5F775GP.js → chunk-JWBGI7FN.js} +1 -1
  212. package/dist/{chunk-WTNNS7AX.js → chunk-JX7V6EFT.js} +36 -9
  213. package/dist/{chunk-7SNVRPED.js → chunk-KEMC4RIF.js} +2 -1
  214. package/dist/chunk-KVARQNGF.js +123 -0
  215. package/dist/chunk-LDTCIVDX.js +146 -0
  216. package/dist/{chunk-45VUWOHQ.js → chunk-LKRE4HLZ.js} +4 -2
  217. package/dist/{chunk-ZN3W5PAI.js → chunk-LOHFV5JF.js} +1 -1
  218. package/dist/chunk-LS6CFF6X.js +80 -0
  219. package/dist/{chunk-I5NZSWDW.js → chunk-MAKFUH34.js} +33 -17
  220. package/dist/{chunk-OQU6KGVR.js → chunk-MDB4RFMV.js} +1 -1
  221. package/dist/{chunk-FDHU3RWR.js → chunk-MJJU6OLM.js} +1 -1
  222. package/dist/{chunk-PIC5ZIR3.js → chunk-MPH64VG7.js} +1 -1
  223. package/dist/{chunk-AYSC7AIC.js → chunk-MVE7RJJ6.js} +1 -1
  224. package/dist/{chunk-2SQQFICY.js → chunk-N3X4T5OR.js} +25 -8
  225. package/dist/{chunk-CNY76NHF.js → chunk-NFJDL44V.js} +7 -3
  226. package/dist/{chunk-FJGGXXTT.js → chunk-NPVUFQGC.js} +1 -1
  227. package/dist/{chunk-QSLS3ENY.js → chunk-NVLYF4UL.js} +1 -1
  228. package/dist/chunk-O626XQW2.js +165 -0
  229. package/dist/chunk-OH5VAD27.js +224 -0
  230. package/dist/{chunk-TIAKMX7U.js → chunk-OIOZQP2H.js} +1 -1
  231. package/dist/{chunk-56BEMYK3.js → chunk-OU3EEX4Y.js} +1 -1
  232. package/dist/{chunk-6AZKJUL4.js → chunk-OUIOJROO.js} +1 -1
  233. package/dist/{chunk-OLNMOTAD.js → chunk-PAXDHYBX.js} +18 -4
  234. package/dist/chunk-PIE76JKF.js +224 -0
  235. package/dist/{chunk-6B6NTRMC.js → chunk-PIXHOFUT.js} +7 -2
  236. package/dist/{chunk-FATLQKRY.js → chunk-PZ2ZUHC3.js} +3 -3
  237. package/dist/chunk-Q5A5OTLI.js +192 -0
  238. package/dist/{chunk-TXRLBMFL.js → chunk-QASSYLQQ.js} +3 -2
  239. package/dist/{chunk-TCID6NNE.js → chunk-QJXVIEB5.js} +1 -1
  240. package/dist/{chunk-K5PWBSVO.js → chunk-QWOO4V7N.js} +2 -2
  241. package/dist/chunk-RGVRHFKY.js +213 -0
  242. package/dist/{chunk-J6GK2V2C.js → chunk-RQNXELUL.js} +2 -1
  243. package/dist/{chunk-KQCXQY5K.js → chunk-RXOVKEYG.js} +2 -1
  244. package/dist/{chunk-NICNFGHT.js → chunk-S2VTHA6G.js} +2 -2
  245. package/dist/chunk-SCQ6A4ZG.js +247 -0
  246. package/dist/{chunk-EVCUN45S.js → chunk-SMZVKQKM.js} +3 -2
  247. package/dist/{chunk-GERWW3CA.js → chunk-SR4NYQWO.js} +2 -2
  248. package/dist/{chunk-DQWKBQBT.js → chunk-TAAAYFBT.js} +2 -2
  249. package/dist/{chunk-S2DJLW6B.js → chunk-TBMUSER2.js} +1 -1
  250. package/dist/chunk-TMOEFAXQ.js +165 -0
  251. package/dist/chunk-TXC6CCSA.js +75 -0
  252. package/dist/chunk-UC55XR76.js +193 -0
  253. package/dist/{chunk-5U4H2CXC.js → chunk-UJYZZSII.js} +11 -4
  254. package/dist/chunk-UOOGRGEC.js +185 -0
  255. package/dist/{chunk-ZBF2UYXP.js → chunk-USDST2TI.js} +1 -1
  256. package/dist/{chunk-W7RITVDV.js → chunk-UX6CWJT7.js} +1 -1
  257. package/dist/{chunk-U7BYEW3Y.js → chunk-UZF7SCRT.js} +13 -5
  258. package/dist/{chunk-Q7OHWQP2.js → chunk-V7JUJQNR.js} +1 -0
  259. package/dist/{chunk-WWQV7LE7.js → chunk-VNUX5LOC.js} +24 -9
  260. package/dist/{chunk-CTO36MY2.js → chunk-VS3GQ4JR.js} +2 -2
  261. package/dist/{chunk-UMDVPRJW.js → chunk-VTTXURIB.js} +1 -1
  262. package/dist/{chunk-6NNHSXFD.js → chunk-W2S6JDBM.js} +1 -1
  263. package/dist/{chunk-3XMVXIOF.js → chunk-W5M3EHJL.js} +4 -2
  264. package/dist/chunk-X2VID7XY.js +228 -0
  265. package/dist/{chunk-H7D6G3GQ.js → chunk-X4JYOCFA.js} +7 -1
  266. package/dist/{chunk-6VQTFRSP.js → chunk-XKA3LTJZ.js} +37 -9
  267. package/dist/{chunk-7GKCX4IE.js → chunk-XUZH4Y52.js} +1 -1
  268. package/dist/{chunk-UAP47MSR.js → chunk-Y4JOW2UW.js} +11 -5
  269. package/dist/{chunk-T4SOPNM5.js → chunk-YCXZ3TYF.js} +1 -1
  270. package/dist/{chunk-2KJNBHUV.js → chunk-YF3XSH54.js} +2 -1
  271. package/dist/{chunk-66OZ7CBK.js → chunk-YJAZHJY3.js} +1 -1
  272. package/dist/{chunk-4WK3F76T.js → chunk-YLILJ2FH.js} +1 -1
  273. package/dist/{chunk-FGQPCDXI.js → chunk-YNPG4WOS.js} +1 -1
  274. package/dist/chunk-YPFZXGPT.js +160 -0
  275. package/dist/{chunk-KYFZ5TTK.js → chunk-YRPLUNP4.js} +3 -1
  276. package/dist/{chunk-P3USWDWR.js → chunk-YVGC7QT7.js} +4 -2
  277. package/dist/{chunk-4ZJEAWNG.js → chunk-Z2DF2YL5.js} +4 -2
  278. package/dist/{chunk-JAQANAOP.js → chunk-ZUH7XRX7.js} +19 -4
  279. package/dist/{chunk-UWQ26LYZ.js → chunk-ZYI6J34Q.js} +2 -2
  280. package/dist/{chunk-BOJCW7Z7.js → chunk-ZZ25XSK2.js} +3 -2
  281. package/dist/color-picker.js +1 -1
  282. package/dist/combo-lock.js +1 -1
  283. package/dist/combobox-aui-046.js +1 -1
  284. package/dist/combobox-aui-047.js +1 -1
  285. package/dist/combobox.js +1 -1
  286. package/dist/command-palette.js +1 -1
  287. package/dist/comments.js +2 -2
  288. package/dist/context-menu.js +1 -1
  289. package/dist/cookie-consent.d.ts +2 -0
  290. package/dist/cookie-consent.js +13 -0
  291. package/dist/countdown.d.ts +2 -0
  292. package/dist/countdown.js +9 -0
  293. package/dist/data-table.js +1 -1
  294. package/dist/dialog.js +1 -1
  295. package/dist/dropdown-menu.js +1 -1
  296. package/dist/field.js +1 -1
  297. package/dist/file-manager.d.ts +2 -0
  298. package/dist/file-manager.js +19 -0
  299. package/dist/flash-sale.d.ts +2 -0
  300. package/dist/flash-sale.js +7 -0
  301. package/dist/footer-aui-027.js +1 -1
  302. package/dist/footer-aui-028.js +1 -1
  303. package/dist/footer.js +1 -1
  304. package/dist/hover-card.js +1 -1
  305. package/dist/inbox.d.ts +2 -0
  306. package/dist/inbox.js +11 -0
  307. package/dist/index.js +166 -90
  308. package/dist/inline-edit.js +1 -1
  309. package/dist/input-aui-029.js +1 -1
  310. package/dist/input-aui-030.js +1 -1
  311. package/dist/input-aui-031.js +1 -1
  312. package/dist/input-aui-032.js +1 -1
  313. package/dist/input-aui-033.js +1 -1
  314. package/dist/input-aui-034.js +1 -1
  315. package/dist/input.js +1 -1
  316. package/dist/invoice.d.ts +2 -0
  317. package/dist/invoice.js +10 -0
  318. package/dist/kanban.js +2 -2
  319. package/dist/menubar.d.ts +2 -0
  320. package/dist/menubar.js +9 -0
  321. package/dist/meter.d.ts +2 -0
  322. package/dist/meter.js +9 -0
  323. package/dist/morse-tap.js +1 -1
  324. package/dist/navbar-aui-009.js +1 -1
  325. package/dist/navbar-aui-011.js +1 -1
  326. package/dist/navbar-aui-012.js +1 -1
  327. package/dist/navbar-aui-013.js +1 -1
  328. package/dist/navbar.js +1 -1
  329. package/dist/notification-center.js +3 -3
  330. package/dist/number-input.js +1 -1
  331. package/dist/order-book.js +1 -1
  332. package/dist/otp-input-aui-041.js +1 -1
  333. package/dist/otp-input-aui-042.js +1 -1
  334. package/dist/otp-input.js +1 -1
  335. package/dist/password-input-aui-039.js +1 -1
  336. package/dist/password-input-aui-040.js +1 -1
  337. package/dist/password-input.js +1 -1
  338. package/dist/payment-received.js +1 -1
  339. package/dist/phone-input.d.ts +2 -0
  340. package/dist/phone-input.js +13 -0
  341. package/dist/popover.js +1 -1
  342. package/dist/price-alert.d.ts +2 -0
  343. package/dist/price-alert.js +7 -0
  344. package/dist/price-chart.js +1 -1
  345. package/dist/properties-panel.js +1 -1
  346. package/dist/radio-group.js +1 -1
  347. package/dist/select-aui-045.js +1 -1
  348. package/dist/select.js +1 -1
  349. package/dist/settings-panel.js +1 -1
  350. package/dist/shipment-tracker.js +1 -1
  351. package/dist/sidebar.js +2 -2
  352. package/dist/sign-in-aui-015.js +1 -1
  353. package/dist/sign-in-aui-016.js +1 -1
  354. package/dist/sign-in-aui-017.js +1 -1
  355. package/dist/sign-in-aui-018.js +1 -1
  356. package/dist/sign-in-aui-019.js +1 -1
  357. package/dist/sign-in-aui-020.js +1 -1
  358. package/dist/sign-in.js +1 -1
  359. package/dist/snap-grid.js +1 -1
  360. package/dist/sortable-list.d.ts +2 -0
  361. package/dist/sortable-list.js +9 -0
  362. package/dist/split-bill.d.ts +2 -0
  363. package/dist/split-bill.js +7 -0
  364. package/dist/stat-card.js +1 -1
  365. package/dist/styles.css +2 -2
  366. package/dist/tag-input-aui-048.js +1 -1
  367. package/dist/tag-input-aui-049.js +1 -1
  368. package/dist/tag-input.js +1 -1
  369. package/dist/team-members.js +3 -3
  370. package/dist/testimonials.d.ts +2 -0
  371. package/dist/testimonials.js +10 -0
  372. package/dist/textarea-aui-001.js +1 -1
  373. package/dist/textarea-aui-002.js +1 -1
  374. package/dist/textarea-aui-003.js +1 -1
  375. package/dist/textarea-aui-004.js +1 -1
  376. package/dist/textarea-aui-005.js +1 -1
  377. package/dist/textarea-aui-006.js +1 -1
  378. package/dist/textarea-aui-007.js +1 -1
  379. package/dist/textarea-aui-008.js +1 -1
  380. package/dist/textarea-aui-035.js +1 -1
  381. package/dist/textarea-aui-036.js +1 -1
  382. package/dist/textarea-aui-037.js +1 -1
  383. package/dist/textarea-aui-038.js +1 -1
  384. package/dist/textarea.js +1 -1
  385. package/dist/token-swap.js +1 -1
  386. package/dist/tooltip.js +1 -1
  387. package/dist/trade-ticket.js +1 -1
  388. package/dist/types/components/kit/base/billing.d.ts +53 -0
  389. package/dist/types/components/kit/base/cookie-consent.d.ts +37 -0
  390. package/dist/types/components/kit/base/file-manager.d.ts +41 -0
  391. package/dist/types/components/kit/base/inbox.d.ts +33 -0
  392. package/dist/types/components/kit/base/invoice.d.ts +45 -0
  393. package/dist/types/components/kit/base/testimonials.d.ts +25 -0
  394. package/dist/types/components/kit/billing.d.ts +53 -0
  395. package/dist/types/components/kit/chart-card.d.ts +43 -0
  396. package/dist/types/components/kit/cookie-consent.d.ts +37 -0
  397. package/dist/types/components/kit/countdown.d.ts +21 -0
  398. package/dist/types/components/kit/file-manager.d.ts +41 -0
  399. package/dist/types/components/kit/inbox.d.ts +33 -0
  400. package/dist/types/components/kit/invoice.d.ts +45 -0
  401. package/dist/types/components/kit/menubar.d.ts +41 -0
  402. package/dist/types/components/kit/meter.d.ts +32 -0
  403. package/dist/types/components/kit/number-input.d.ts +3 -1
  404. package/dist/types/components/kit/phone-input.d.ts +42 -0
  405. package/dist/types/components/kit/sortable-list.d.ts +25 -0
  406. package/dist/types/components/kit/tag-input.d.ts +3 -1
  407. package/dist/types/components/kit/testimonials.d.ts +25 -0
  408. package/dist/types/components/lab/blocks/FlashSale.d.ts +2 -0
  409. package/dist/types/components/lab/blocks/PriceAlert.d.ts +2 -0
  410. package/dist/types/components/lab/blocks/SplitBill.d.ts +2 -0
  411. package/dist/types/components/lab/blocks/Watchlist.d.ts +2 -0
  412. package/dist/types/packages/asta-ui/src/base/billing.d.ts +2 -0
  413. package/dist/types/packages/asta-ui/src/base/chart-card.d.ts +2 -0
  414. package/dist/types/packages/asta-ui/src/base/cookie-consent.d.ts +2 -0
  415. package/dist/types/packages/asta-ui/src/base/countdown.d.ts +2 -0
  416. package/dist/types/packages/asta-ui/src/base/file-manager.d.ts +2 -0
  417. package/dist/types/packages/asta-ui/src/base/flash-sale.d.ts +2 -0
  418. package/dist/types/packages/asta-ui/src/base/inbox.d.ts +2 -0
  419. package/dist/types/packages/asta-ui/src/base/invoice.d.ts +2 -0
  420. package/dist/types/packages/asta-ui/src/base/menubar.d.ts +2 -0
  421. package/dist/types/packages/asta-ui/src/base/meter.d.ts +2 -0
  422. package/dist/types/packages/asta-ui/src/base/phone-input.d.ts +2 -0
  423. package/dist/types/packages/asta-ui/src/base/price-alert.d.ts +2 -0
  424. package/dist/types/packages/asta-ui/src/base/sortable-list.d.ts +2 -0
  425. package/dist/types/packages/asta-ui/src/base/split-bill.d.ts +2 -0
  426. package/dist/types/packages/asta-ui/src/base/testimonials.d.ts +2 -0
  427. package/dist/types/packages/asta-ui/src/base/watchlist.d.ts +2 -0
  428. package/dist/types/packages/asta-ui/src/base.d.ts +29 -1
  429. package/dist/types/packages/asta-ui/src/billing.d.ts +2 -0
  430. package/dist/types/packages/asta-ui/src/chart-card.d.ts +2 -0
  431. package/dist/types/packages/asta-ui/src/cookie-consent.d.ts +2 -0
  432. package/dist/types/packages/asta-ui/src/countdown.d.ts +2 -0
  433. package/dist/types/packages/asta-ui/src/file-manager.d.ts +2 -0
  434. package/dist/types/packages/asta-ui/src/flash-sale.d.ts +2 -0
  435. package/dist/types/packages/asta-ui/src/inbox.d.ts +2 -0
  436. package/dist/types/packages/asta-ui/src/index.d.ts +29 -1
  437. package/dist/types/packages/asta-ui/src/invoice.d.ts +2 -0
  438. package/dist/types/packages/asta-ui/src/menubar.d.ts +2 -0
  439. package/dist/types/packages/asta-ui/src/meter.d.ts +2 -0
  440. package/dist/types/packages/asta-ui/src/phone-input.d.ts +2 -0
  441. package/dist/types/packages/asta-ui/src/price-alert.d.ts +2 -0
  442. package/dist/types/packages/asta-ui/src/sortable-list.d.ts +2 -0
  443. package/dist/types/packages/asta-ui/src/split-bill.d.ts +2 -0
  444. package/dist/types/packages/asta-ui/src/testimonials.d.ts +2 -0
  445. package/dist/types/packages/asta-ui/src/watchlist.d.ts +2 -0
  446. package/dist/watchlist.d.ts +2 -0
  447. package/dist/watchlist.js +7 -0
  448. package/package.json +1 -1
@@ -272,7 +272,7 @@ function SnippetTextarea({
272
272
  {
273
273
  ref: shade,
274
274
  "aria-hidden": true,
275
- className: "pointer-events-none absolute inset-0 m-0 overflow-visible whitespace-pre pl-[52px] pr-4 font-mono text-[12.5px] text-paper/75 will-change-transform",
275
+ className: "pointer-events-none absolute inset-0 m-0 overflow-visible whitespace-pre pl-[52px] pr-4 font-mono text-[16px] sm:text-[12.5px] text-paper/75 will-change-transform",
276
276
  style: { lineHeight: `${LH}px`, paddingTop: PAD, paddingBottom: PAD, tabSize },
277
277
  children: [
278
278
  tokens(code, lang?.id ?? "").map((tk, i) => tk.k ? /* @__PURE__ */ jsx("span", { className: TONE[tk.k], children: tk.t }, i) : tk.t),
@@ -301,7 +301,7 @@ function SnippetTextarea({
301
301
  onSelect: track,
302
302
  onFocus: track,
303
303
  onScroll: () => paint(pos.line),
304
- className: "absolute inset-0 h-full w-full resize-none overflow-auto whitespace-pre bg-transparent pl-[52px] pr-4 font-mono text-[12.5px] text-transparent caret-paper outline-none selection:bg-brand/40 selection:text-transparent",
304
+ className: "absolute inset-0 h-full w-full resize-none overflow-auto whitespace-pre bg-transparent pl-[52px] pr-4 font-mono text-[16px] sm:text-[12.5px] text-transparent caret-paper outline-none selection:bg-brand/40 selection:text-transparent",
305
305
  style: { lineHeight: `${LH}px`, paddingTop: PAD, paddingBottom: PAD, tabSize }
306
306
  }
307
307
  )
@@ -11,7 +11,13 @@ var SIZE = {
11
11
  lg: { box: "h-12 w-12", text: "text-[16px]", dot: "h-3 w-3" },
12
12
  xl: { box: "h-16 w-16", text: "text-[20px]", dot: "h-3.5 w-3.5" }
13
13
  };
14
- var STATUS = { online: "#30a46c", away: "#f5a524", busy: "#e5484d", offline: "var(--mute)" };
14
+ var PAPER = "var(--paper)";
15
+ var STATUS = {
16
+ online: "#30a46c",
17
+ away: `radial-gradient(closest-side at 30% 30%, ${PAPER} 92%, #f5a524 100%)`,
18
+ busy: `linear-gradient(${PAPER}, ${PAPER}) center / 60% 20% no-repeat, #e5484d`,
19
+ offline: `radial-gradient(closest-side, ${PAPER} 48%, var(--mute) 56%)`
20
+ };
15
21
  var FILLS = [
16
22
  "bg-ink text-paper",
17
23
  "bg-brand text-white",
@@ -71,7 +71,7 @@ function SocialSignIn({
71
71
  const input = useRef(null);
72
72
  const box = useRef(null);
73
73
  const opener = useRef(null);
74
- const error = !email.trim() ? "Enter your email." : !validEmail(email) ? "That doesn't look like an email address." : "";
74
+ const error = !email.trim() ? "Enter your email." : !validEmail(email) ? "Enter an email like name@company.com." : "";
75
75
  const shown = touched && error || formError;
76
76
  const hasError = !!shown;
77
77
  const count = providers.length;
@@ -251,13 +251,18 @@ function SocialSignIn({
251
251
  {
252
252
  ref: input,
253
253
  id: `${id}-email`,
254
+ name: "email",
254
255
  type: "email",
255
256
  autoComplete: "email",
257
+ inputMode: "email",
258
+ autoCapitalize: "none",
259
+ spellCheck: false,
256
260
  placeholder: "you@company.com",
257
261
  value: email,
258
262
  onChange: (e) => {
259
263
  setEmail(e.target.value);
260
264
  setFormError("");
265
+ if (touched && validEmail(e.target.value)) setTouched(false);
261
266
  },
262
267
  onBlur: () => email && setTouched(true),
263
268
  onKeyDown: (e) => {
@@ -269,7 +274,7 @@ function SocialSignIn({
269
274
  "aria-invalid": hasError || void 0,
270
275
  "aria-describedby": hasError ? `${id}-err` : void 0,
271
276
  className: cx(
272
- "h-11 w-full rounded-[10px] bg-paper px-3.5 text-[14px] text-ink outline-none transition-shadow duration-200 placeholder:text-mute focus-visible:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_14%,transparent)]",
277
+ "h-11 w-full rounded-[10px] bg-paper px-3.5 text-[16px] sm:text-[14px] text-ink outline-none transition-shadow duration-200 placeholder:text-mute focus-visible:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_14%,transparent)]",
273
278
  hasError ? "shadow-[inset_0_0_0_1.5px_var(--ink)]" : RING
274
279
  )
275
280
  }
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  Avatar
4
- } from "./chunk-HNO6EUGJ.js";
4
+ } from "./chunk-6RA7LJ3K.js";
5
5
  import {
6
6
  Popover
7
- } from "./chunk-HPVPHWDM.js";
7
+ } from "./chunk-IATF2OTU.js";
8
8
 
9
9
  // components/kit/notification-center.tsx
10
10
  import { useId, useMemo, useRef, useState } from "react";
@@ -143,7 +143,7 @@ function Panel({
143
143
  t
144
144
  ))
145
145
  ] }),
146
- /* @__PURE__ */ jsx("div", { id: `${tabsId}-panel`, role: "tabpanel", "aria-labelledby": `${tabsId}-${tab}`, className: "mt-2 min-h-0 flex-1 overflow-y-auto pb-2 [scrollbar-width:thin]", children: groups.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center px-6 py-12 text-center", style: { animation: `kit-nc-in .4s ${CURVE}` }, children: [
146
+ /* @__PURE__ */ jsx("div", { id: `${tabsId}-panel`, role: "tabpanel", "aria-labelledby": `${tabsId}-${tab}`, className: "mt-2 min-h-0 flex-1 overflow-y-auto overscroll-contain pb-2 [scrollbar-width:thin]", children: groups.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center px-6 py-12 text-center", style: { animation: `kit-nc-in .4s ${CURVE}` }, children: [
147
147
  /* @__PURE__ */ jsx("span", { className: "grid h-11 w-11 place-items-center rounded-full bg-paper-2 text-mute", children: /* @__PURE__ */ jsx(BellIcon, { className: "h-5 w-5" }) }),
148
148
  /* @__PURE__ */ jsx("p", { className: "mt-4 text-[14px] font-medium text-ink", children: tab === "unread" ? "You're all caught up" : "No notifications yet" }),
149
149
  /* @__PURE__ */ jsx("p", { className: "mt-1 text-[12.5px] text-mute", children: tab === "unread" ? "New activity will show up here." : "When something happens, you'll see it here." })
@@ -30,7 +30,7 @@ function AutoGrowTextarea({ minRows = 2, maxRows = 8, className, ...rest }) {
30
30
  ro.observe(el);
31
31
  return () => ro.disconnect();
32
32
  }, [value, minRows, maxRows]);
33
- const text = "block w-full px-3.5 py-3 text-[14px] leading-[1.55] whitespace-pre-wrap break-words";
33
+ const text = "block w-full px-3.5 py-3 text-[16px] sm:text-[14px] leading-[1.55] whitespace-pre-wrap break-words";
34
34
  return /* @__PURE__ */ jsxs("div", { className: cx("relative w-full", className), children: [
35
35
  /* @__PURE__ */ jsx(
36
36
  "textarea",
@@ -17,7 +17,7 @@ var panel = (origin) => cx(
17
17
  "z-50 overflow-hidden rounded-xl bg-paper p-1 outline-none",
18
18
  "shadow-[0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_12px_32px_-8px_rgb(0_0_0/0.22),0_4px_8px_-4px_rgb(0_0_0/0.08)]",
19
19
  origin,
20
- "data-[state=open]:animate-[kit-select-in_.22s_cubic-bezier(.16,1,.3,1)_both] data-[state=closed]:animate-[kit-select-out_.12s_ease-in_both] motion-reduce:!animate-none"
20
+ "data-[state=open]:animate-[kit-select-in_.22s_cubic-bezier(.16,1,.3,1)_both] data-[state=closed]:animate-[kit-select-out_.12s_cubic-bezier(.16,1,.3,1)_both] motion-reduce:!animate-none"
21
21
  );
22
22
  var row = "flex cursor-pointer select-none items-center gap-2.5 rounded-md px-2.5 py-2 text-[14px] text-ink-2 outline-none transition-colors duration-150";
23
23
  function Chevron() {
@@ -161,12 +161,16 @@ function SearchSelect({ options, value, defaultValue, onChange, placeholder = "S
161
161
  setQ(e.target.value);
162
162
  setActive(0);
163
163
  },
164
- placeholder: "Search",
164
+ type: "search",
165
+ autoComplete: "off",
166
+ spellCheck: false,
167
+ placeholder: "Search\u2026",
168
+ "aria-label": "Search options",
165
169
  role: "combobox",
166
170
  "aria-expanded": true,
167
171
  "aria-controls": `${uid}-list`,
168
172
  "aria-activedescendant": shown[active] ? `${uid}-o-${active}` : void 0,
169
- className: "h-9 min-w-0 flex-1 bg-transparent text-[14px] text-ink outline-none placeholder:text-mute"
173
+ className: "h-9 min-w-0 flex-1 bg-transparent text-[16px] sm:text-[14px] text-ink outline-none placeholder:text-mute [&::-webkit-search-cancel-button]:hidden"
170
174
  }
171
175
  )
172
176
  ] }),
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  Select
4
- } from "./chunk-SAJ4D3Z2.js";
4
+ } from "./chunk-AMVX4DDT.js";
5
5
  import {
6
6
  Button
7
7
  } from "./chunk-ZWBJUJTR.js";
8
8
  import {
9
9
  Input
10
- } from "./chunk-U7BYEW3Y.js";
10
+ } from "./chunk-UZF7SCRT.js";
11
11
 
12
12
  // components/kit/checkout.tsx
13
13
  import { useEffect, useId, useMemo, useRef, useState } from "react";
@@ -49,20 +49,26 @@ function check(f, d) {
49
49
  case "email":
50
50
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v) ? null : "Enter an email like you@example.com.";
51
51
  case "cardNumber":
52
- return (isAmex(v) ? v.length === 15 : v.length >= 13 && v.length <= 19) ? null : "Check the card number.";
52
+ return (isAmex(v) ? v.length === 15 : v.length >= 13 && v.length <= 19) ? null : isAmex(v) ? "Enter all 15 digits on the front of the card." : "Enter the full card number from the front of the card.";
53
53
  case "cardExpiry": {
54
54
  const [m, y] = v.split("/").map(Number);
55
- if (!/^\d{2}\/\d{2}$/.test(v) || !m || m > 12) return "Use MM / YY.";
55
+ if (!/^\d{2}\/\d{2}$/.test(v) || !m || m > 12) return "Enter the expiry as MM / YY, like 08 / 29.";
56
56
  const now = /* @__PURE__ */ new Date();
57
57
  const end = new Date(2e3 + y, m, 1);
58
- return end > now ? null : "This card has expired.";
58
+ return end > now ? null : "This card has expired. Use one with a later date.";
59
59
  }
60
60
  case "cardCvc":
61
- return v.length >= 3 ? null : "3 or 4 digits, on the back.";
61
+ return v.length >= 3 ? null : "Enter the 3 or 4 digits on the back of the card.";
62
62
  default:
63
- return v ? null : "Required.";
63
+ return v ? null : REQUIRED[f] ?? "Fill in this field.";
64
64
  }
65
65
  }
66
+ var REQUIRED = {
67
+ name: "Enter your full name.",
68
+ address: "Enter your street address.",
69
+ city: "Enter your city.",
70
+ postal: "Enter your postal code."
71
+ };
66
72
  function RollChar({ c, animate, delay }) {
67
73
  const [on] = useState(animate);
68
74
  return /* @__PURE__ */ jsx("span", { className: "inline-block whitespace-pre", style: on ? { animation: `kit-co-roll .5s ${CURVE} ${delay}ms both` } : void 0, children: c });
@@ -181,7 +187,11 @@ function Checkout({
181
187
  const errors = Object.fromEntries(ORDER.map((f) => [f, check(f, d)]));
182
188
  const shown = (f) => touched[f] ? errors[f] : null;
183
189
  const locked = state !== "idle";
184
- const set = (f, v) => setD((p) => ({ ...p, [f]: v }));
190
+ const set = (f, v) => {
191
+ setD((p) => ({ ...p, [f]: v }));
192
+ const k = f;
193
+ if (ORDER.includes(k) && touched[k] && !check(k, { ...d, [f]: v })) setTouched((t) => ({ ...t, [k]: false }));
194
+ };
185
195
  const blur = (f) => setTouched((t) => ({ ...t, [f]: true }));
186
196
  const formatted = (f, fmt, max) => (e) => {
187
197
  const el = e.currentTarget;
@@ -203,13 +213,13 @@ function Checkout({
203
213
  const applyPromo = () => {
204
214
  const code = promoText.trim().toUpperCase();
205
215
  const hit = Object.entries(promoCodes).find(([k]) => k.toUpperCase() === code);
206
- if (!code) return;
216
+ if (!code) return setPromoMsg("Enter a promo code first.");
207
217
  if (hit) {
208
218
  setPromo({ code: hit[0].toUpperCase(), off: hit[1] });
209
219
  setPromoMsg(`${hit[0].toUpperCase()} applied.`);
210
220
  setPromoText("");
211
221
  setPromoOpen(false);
212
- } else setPromoMsg("That code isn't valid.");
222
+ } else setPromoMsg("That code isn't valid. Check the spelling and try again.");
213
223
  };
214
224
  const pay = async () => {
215
225
  if (locked) return;
@@ -234,6 +244,7 @@ function Checkout({
234
244
  Input,
235
245
  {
236
246
  id: id(f),
247
+ name: f,
237
248
  value: f === "cardNumber" ? fmtCard(d[f]) : f === "cardExpiry" ? fmtExpiry(digits(d[f])) : d[f],
238
249
  onChange: (e) => set(f, e.target.value),
239
250
  onBlur: () => blur(f),
@@ -270,17 +281,17 @@ function Checkout({
270
281
  pay();
271
282
  },
272
283
  children: [
273
- /* @__PURE__ */ jsx(Section, { n: 1, title: "Contact", children: /* @__PURE__ */ jsx(Labeled, { id: id("email"), label: "Email", error: shown("email"), children: input("email", { type: "email", autoComplete: "email", placeholder: "you@example.com" }) }) }),
284
+ /* @__PURE__ */ jsx(Section, { n: 1, title: "Contact", children: /* @__PURE__ */ jsx(Labeled, { id: id("email"), label: "Email", error: shown("email"), children: input("email", { type: "email", autoComplete: "email", inputMode: "email", autoCapitalize: "none", spellCheck: false, placeholder: "you@example.com" }) }) }),
274
285
  /* @__PURE__ */ jsxs(Section, { n: 2, title: "Shipping", children: [
275
286
  /* @__PURE__ */ jsx(Labeled, { id: id("name"), label: "Full name", error: shown("name"), children: input("name", { autoComplete: "name" }) }),
276
- /* @__PURE__ */ jsx(Labeled, { id: id("address"), label: "Address", error: shown("address"), children: input("address", { autoComplete: "street-address" }) }),
287
+ /* @__PURE__ */ jsx(Labeled, { id: id("address"), label: "Address", error: shown("address"), children: input("address", { autoComplete: "address-line1" }) }),
277
288
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
278
289
  /* @__PURE__ */ jsx(Labeled, { id: id("city"), label: "City", error: shown("city"), children: input("city", { autoComplete: "address-level2" }) }),
279
- /* @__PURE__ */ jsx(Labeled, { id: id("postal"), label: "Postal code", error: shown("postal"), children: input("postal", { autoComplete: "postal-code", inputMode: "numeric" }) })
290
+ /* @__PURE__ */ jsx(Labeled, { id: id("postal"), label: "Postal code", error: shown("postal"), children: input("postal", { autoComplete: "postal-code", autoCapitalize: "characters" }) })
280
291
  ] }),
281
292
  /* @__PURE__ */ jsxs("div", { children: [
282
293
  /* @__PURE__ */ jsx("p", { className: "mb-1.5 text-[12.5px] text-ink-2", children: "Country" }),
283
- /* @__PURE__ */ jsx(Select, { label: "Country", options: countries, value: d.country, onChange: (v) => set("country", v), disabled: locked })
294
+ /* @__PURE__ */ jsx(Select, { label: "Country", name: "country", options: countries, value: d.country, onChange: (v) => set("country", v), disabled: locked })
284
295
  ] }),
285
296
  /* @__PURE__ */ jsx("div", { role: "radiogroup", "aria-label": "Shipping speed", className: "mt-1 grid gap-2 sm:grid-cols-2", children: shippingOptions.map((s) => {
286
297
  const on = s.id === d.shipping;
@@ -365,8 +376,13 @@ function Checkout({
365
376
  Input,
366
377
  {
367
378
  size: "sm",
379
+ name: "promo",
368
380
  "aria-label": "Promo code",
369
- placeholder: "Promo code",
381
+ "aria-describedby": promoMsg ? `${uid}-promo-msg` : void 0,
382
+ placeholder: "Enter code\u2026",
383
+ autoComplete: "off",
384
+ autoCapitalize: "characters",
385
+ spellCheck: false,
370
386
  value: promoText,
371
387
  autoFocus: true,
372
388
  disabled: locked,
@@ -382,7 +398,7 @@ function Checkout({
382
398
  }
383
399
  }
384
400
  ),
385
- /* @__PURE__ */ jsx(Button, { size: "sm", variant: "outline", onClick: applyPromo, disabled: locked || !promoText.trim(), children: "Apply" })
401
+ /* @__PURE__ */ jsx(Button, { size: "sm", variant: "outline", onClick: applyPromo, disabled: locked, children: "Apply" })
386
402
  ] }) : /* @__PURE__ */ jsx(
387
403
  "button",
388
404
  {
@@ -393,7 +409,7 @@ function Checkout({
393
409
  children: "Add a promo code"
394
410
  }
395
411
  ),
396
- /* @__PURE__ */ jsx("p", { className: "mt-1.5 min-h-4 text-[12px] text-mute", "aria-live": "polite", children: promoMsg })
412
+ /* @__PURE__ */ jsx("p", { id: `${uid}-promo-msg`, className: "mt-1.5 min-h-4 text-[12px] text-mute", "aria-live": "polite", children: promoMsg })
397
413
  ] }),
398
414
  /* @__PURE__ */ jsxs("dl", { className: "mt-3 grid gap-2", children: [
399
415
  /* @__PURE__ */ jsxs("div", { className: rowCls, children: [
@@ -141,8 +141,9 @@ function StatusFooter({
141
141
  {
142
142
  onPointerEnter: () => setHover(i),
143
143
  className: cx(
144
- "aui-f28-bar h-full flex-1 rounded-[2px] transition-opacity duration-200",
145
- v >= 1 ? "bg-brand" : "bg-ink/35",
144
+ "aui-f28-bar flex-1 rounded-[2px] transition-opacity duration-200",
145
+ // A day with an incident is shorter as well as grey, so it reads without the colour.
146
+ v >= 1 ? "h-full bg-brand" : "h-[60%] bg-ink/35",
146
147
  shown !== null && shown !== i && "opacity-40"
147
148
  ),
148
149
  style: step(i)
@@ -153,7 +154,8 @@ function StatusFooter({
153
154
  avg.toFixed(2),
154
155
  "% uptime over the last ",
155
156
  uptime.length,
156
- " days"
157
+ " days",
158
+ uptime.some((v) => v < 1) && `, ${uptime.filter((v) => v < 1).length} with incidents`
157
159
  ] }),
158
160
  /* @__PURE__ */ jsxs("div", { "aria-hidden": true, className: "mt-2 flex justify-between font-mono text-[10.5px] text-mute", children: [
159
161
  /* @__PURE__ */ jsxs("span", { className: cx("transition-opacity duration-200", shown !== null && "opacity-0"), children: [
@@ -205,12 +207,13 @@ function StatusFooter({
205
207
  "select",
206
208
  {
207
209
  id: langId,
210
+ name: "language",
208
211
  value: lang,
209
212
  onChange: (e) => {
210
213
  setOwn(e.target.value);
211
214
  onLanguageChange?.(e.target.value);
212
215
  },
213
- className: cx("h-9 w-full cursor-pointer appearance-none rounded-[8px] bg-paper-2 pl-8 pr-8 text-[12.5px] text-ink transition-shadow duration-300 hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)]", ring),
216
+ className: cx("h-9 w-full cursor-pointer appearance-none rounded-[8px] bg-paper-2 pl-8 pr-8 text-[16px] sm:text-[12.5px] text-ink transition-shadow duration-300 hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)]", ring),
214
217
  children: languages.map((l) => /* @__PURE__ */ jsx("option", { value: l.value, children: l.label }, l.value))
215
218
  }
216
219
  ),
@@ -186,7 +186,8 @@ function PriceChart() {
186
186
  className: "rounded-md px-2 py-1 font-mono text-[12px] leading-none tabular-nums transition-[color,background-color] duration-700",
187
187
  style: { color: pill, background: `color-mix(in srgb, ${pill} 14%, transparent)`, transitionTimingFunction: EASE },
188
188
  children: [
189
- up ? "\u25B2" : "\u25BC",
189
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: up ? "\u25B2" : "\u25BC" }),
190
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: up ? "Up" : "Down" }),
190
191
  " ",
191
192
  Math.abs(pct).toFixed(2),
192
193
  "%"
@@ -0,0 +1,200 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/SplitBill.tsx
4
+ import { useEffect, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var EASE = "cubic-bezier(.16,1,.3,1)";
7
+ var RING = "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]";
8
+ var DIGITS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
9
+ var TOTAL = 186.4;
10
+ var PEOPLE = [
11
+ { name: "You", tone: "bg-ink text-paper" },
12
+ { name: "Ingrid S.", tone: "bg-brand text-paper" },
13
+ { name: "Kwame A.", tone: "bg-paper-2 text-ink" },
14
+ { name: "Yuki T.", tone: "bg-[color-mix(in_srgb,var(--brand)_16%,var(--paper))] text-brand" }
15
+ ];
16
+ var LAST = 8;
17
+ var money = (n) => `$${n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
18
+ var initials = (n) => n === "You" ? "Y" : n.replace(/[^A-Za-z ]/g, "").split(" ").map((w) => w[0]).join("");
19
+ function Roll({ value, instant }) {
20
+ const chars = value.split("");
21
+ return /* @__PURE__ */ jsx("span", { className: "inline-flex items-start leading-[1.1em] tabular-nums", "aria-label": value, children: chars.map((c, i) => {
22
+ const key = chars.length - i;
23
+ if (!/\d/.test(c))
24
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-block h-[1.1em]", children: c }, `s${key}`);
25
+ return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative inline-block h-[1.1em] overflow-hidden leading-[1.1em]", children: [
26
+ /* @__PURE__ */ jsx("span", { className: "invisible", children: "0" }),
27
+ /* @__PURE__ */ jsx(
28
+ "span",
29
+ {
30
+ className: "absolute left-0 top-0 flex flex-col motion-reduce:transition-none",
31
+ style: { transform: `translateY(-${Number(c) * 1.1}em)`, transition: instant ? "none" : `transform .8s ${EASE} ${(chars.length - i) * 22}ms` },
32
+ children: DIGITS.map((d) => /* @__PURE__ */ jsx("span", { className: "block h-[1.1em]", children: d }, d))
33
+ }
34
+ )
35
+ ] }, `d${key}`);
36
+ }) });
37
+ }
38
+ var Check = ({ className = "" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className, fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m3.5 8.5 3 3 6-7", pathLength: 1, className: "lab-sb-draw" }) });
39
+ function SplitBill() {
40
+ const [phase, setPhase] = useState(1);
41
+ const [fade, setFade] = useState(false);
42
+ const [instant, setInstant] = useState(false);
43
+ const [hover, setHover] = useState(false);
44
+ const [visible, setVisible] = useState(true);
45
+ const root = useRef(null);
46
+ const k = useRef(1);
47
+ const paused = hover || !visible;
48
+ useEffect(() => {
49
+ const el = root.current;
50
+ if (!el) return;
51
+ let seen = true;
52
+ const sync = () => setVisible(seen && !document.hidden);
53
+ const io = new IntersectionObserver(([e]) => {
54
+ seen = e.isIntersecting;
55
+ sync();
56
+ });
57
+ io.observe(el);
58
+ document.addEventListener("visibilitychange", sync);
59
+ return () => {
60
+ io.disconnect();
61
+ document.removeEventListener("visibilitychange", sync);
62
+ };
63
+ }, []);
64
+ useEffect(() => {
65
+ if (paused) return;
66
+ const t = [];
67
+ let alive = true;
68
+ const later = (ms, f) => t.push(setTimeout(() => alive && f(), ms));
69
+ const cycle = () => {
70
+ if (k.current >= LAST) {
71
+ setFade(true);
72
+ later(450, () => {
73
+ k.current = 1;
74
+ setInstant(true);
75
+ setPhase(1);
76
+ });
77
+ later(560, () => setInstant(false));
78
+ later(620, () => setFade(false));
79
+ later(1700, cycle);
80
+ return;
81
+ }
82
+ setPhase(++k.current);
83
+ later(k.current === 4 || k.current === 5 ? 2e3 : 1500, cycle);
84
+ };
85
+ later(1200, cycle);
86
+ return () => {
87
+ alive = false;
88
+ t.forEach(clearTimeout);
89
+ setFade(false);
90
+ };
91
+ }, [paused]);
92
+ const n = Math.min(phase, 4);
93
+ const share = Math.round(TOTAL / n * 100) / 100;
94
+ const sent = phase >= 5;
95
+ const paidCount = Math.max(0, phase - 5);
96
+ const collected = sent ? share * (1 + paidCount) : share;
97
+ const toggle = () => setHover((h) => !h);
98
+ return /* @__PURE__ */ jsxs(
99
+ "div",
100
+ {
101
+ ref: root,
102
+ role: "group",
103
+ tabIndex: 0,
104
+ "aria-label": `Split bill ${money(TOTAL)} between ${n}. ${money(share)} each. ${hover ? "Paused" : "Live"}. Press space to ${hover ? "resume" : "pause"}`,
105
+ onPointerEnter: (e) => e.pointerType === "mouse" && setHover(true),
106
+ onPointerLeave: (e) => e.pointerType === "mouse" && setHover(false),
107
+ onPointerUp: (e) => e.pointerType !== "mouse" && toggle(),
108
+ onKeyDown: (e) => {
109
+ if (e.key === " " || e.key === "Enter") {
110
+ e.preventDefault();
111
+ toggle();
112
+ }
113
+ },
114
+ className: "flex h-full w-full items-center justify-center px-5 pb-5 pt-11 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand/50",
115
+ style: { containerType: "size" },
116
+ children: [
117
+ /* @__PURE__ */ jsx("style", { href: "asta-splitbill", precedence: "asta", children: `
118
+ @keyframes lab-sb-pop { 0% { transform: scale(.4); opacity: 0 } 60% { transform: scale(1.12) } 100% { transform: none; opacity: 1 } }
119
+ @keyframes lab-sb-in { from { opacity: 0; transform: translateY(-30%) } }
120
+ @keyframes lab-sb-draw { from { stroke-dashoffset: 1 } to { stroke-dashoffset: 0 } }
121
+ .lab-sb-pop { animation: lab-sb-pop .5s ${EASE} both }
122
+ .lab-sb-in { animation: lab-sb-in .5s ${EASE} both }
123
+ .lab-sb-draw { stroke-dasharray: 1; animation: lab-sb-draw .5s ${EASE} .1s both }
124
+ @media (prefers-reduced-motion: reduce) { .lab-sb-pop, .lab-sb-in, .lab-sb-draw { animation: none } }
125
+ ` }),
126
+ /* @__PURE__ */ jsxs(
127
+ "div",
128
+ {
129
+ className: `flex w-full max-w-[400px] flex-col gap-[max(8px,2.8cqh)] rounded-[14px] bg-paper p-[clamp(12px,4cqmin,18px)] ${RING} shadow-[0_18px_40px_-28px_rgb(0_0_0/0.35)]`,
130
+ style: { opacity: fade ? 0 : 1, transition: `opacity .45s ${EASE}` },
131
+ children: [
132
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
133
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
134
+ /* @__PURE__ */ jsx("p", { className: "text-[12px] text-mute", children: "Dinner at Juniper \xB7 Fri" }),
135
+ /* @__PURE__ */ jsxs("p", { className: "text-[13.5px] font-medium text-ink", children: [
136
+ "Total ",
137
+ money(TOTAL)
138
+ ] })
139
+ ] }),
140
+ /* @__PURE__ */ jsx("div", { className: "flex -space-x-1.5", "aria-hidden": true, children: PEOPLE.slice(0, n).map((p) => /* @__PURE__ */ jsx("span", { className: `lab-sb-pop grid h-7 w-7 place-items-center rounded-full text-[10px] font-semibold ring-2 ring-paper ${p.tone}`, children: initials(p.name) }, p.name)) })
141
+ ] }),
142
+ /* @__PURE__ */ jsxs("div", { className: "rounded-[11px] bg-paper-2 px-3.5 py-3", children: [
143
+ /* @__PURE__ */ jsxs("p", { className: "font-mono text-[10.5px] uppercase tracking-wider text-mute", children: [
144
+ "Each pays \xB7 split ",
145
+ n,
146
+ " ways"
147
+ ] }),
148
+ /* @__PURE__ */ jsx("p", { className: "mt-1 font-medium tracking-[-0.035em] text-ink", style: { fontSize: "clamp(24px, 9cqmin, 36px)", lineHeight: 1 }, children: /* @__PURE__ */ jsx(Roll, { value: money(share), instant }) })
149
+ ] }),
150
+ /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-0.5", "aria-live": "polite", children: PEOPLE.slice(0, n).map((p, i) => {
151
+ const paid = i === 0 || i <= paidCount;
152
+ return /* @__PURE__ */ jsxs("li", { className: `flex h-[clamp(28px,9cqh,36px)] items-center gap-2.5 px-1 ${instant ? "" : "lab-sb-in"}`, children: [
153
+ /* @__PURE__ */ jsx("span", { className: `grid h-6 w-6 shrink-0 place-items-center rounded-full text-[9.5px] font-semibold ${p.tone}`, children: initials(p.name) }),
154
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[12.5px] text-ink", children: p.name }),
155
+ /* @__PURE__ */ jsx("span", { className: "text-[12.5px] tabular-nums text-ink-2", children: money(share) }),
156
+ /* @__PURE__ */ jsx("span", { className: "flex w-[78px] shrink-0 justify-end", children: i === 0 ? /* @__PURE__ */ jsx("span", { className: "text-[11px] text-mute", children: "Paid the bill" }) : paid ? /* @__PURE__ */ jsxs("span", { className: "lab-sb-pop inline-flex items-center gap-1 rounded-md bg-brand/12 px-1.5 py-0.5 text-[11px] font-medium text-brand", children: [
157
+ /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" }),
158
+ "Paid"
159
+ ] }, "paid") : sent ? /* @__PURE__ */ jsx("span", { className: "lab-sb-pop rounded-md bg-paper-2 px-1.5 py-0.5 text-[11px] text-ink-2", children: "Requested" }, "req") : /* @__PURE__ */ jsx("span", { className: "text-[11px] text-mute", children: "Joined" }) })
160
+ ] }, p.name);
161
+ }) }),
162
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
163
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-[11.5px]", children: [
164
+ /* @__PURE__ */ jsx("span", { className: "text-mute", children: "Collected" }),
165
+ /* @__PURE__ */ jsxs("span", { className: "tabular-nums text-ink", children: [
166
+ money(Math.min(TOTAL, collected)),
167
+ " of ",
168
+ money(TOTAL)
169
+ ] })
170
+ ] }),
171
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 overflow-hidden rounded-full bg-paper-2", children: /* @__PURE__ */ jsx(
172
+ "div",
173
+ {
174
+ className: "h-full origin-left rounded-full bg-brand",
175
+ style: { transform: `scaleX(${Math.min(1, collected / TOTAL)})`, transition: instant ? "none" : `transform .8s ${EASE}` }
176
+ }
177
+ ) }),
178
+ /* @__PURE__ */ jsx(
179
+ "div",
180
+ {
181
+ className: `relative mt-1 flex h-9 items-center justify-center overflow-hidden rounded-[9px] text-[13px] font-medium ${sent ? "bg-paper-2 text-ink" : "bg-ink text-paper"}`,
182
+ style: { transition: `background-color .4s ${EASE}, color .4s ${EASE}` },
183
+ children: sent ? /* @__PURE__ */ jsxs("span", { className: "lab-sb-in inline-flex items-center gap-1.5", children: [
184
+ /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-brand" }),
185
+ paidCount >= 3 ? "Everyone\u2019s paid" : `Requests sent \xB7 ${paidCount} of 3 paid`
186
+ ] }, "s") : /* @__PURE__ */ jsx("span", { children: n === 1 ? "Add friends to split" : `Request ${money(share)} from ${n - 1} ${n === 2 ? "friend" : "friends"}` }, "r")
187
+ }
188
+ )
189
+ ] })
190
+ ]
191
+ }
192
+ )
193
+ ]
194
+ }
195
+ );
196
+ }
197
+
198
+ export {
199
+ SplitBill
200
+ };