themelia-react-ui 2.0.2 → 2.0.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 (435) hide show
  1. package/CHANGELOG.md +67 -7
  2. package/README.md +70 -37
  3. package/THIRD_PARTY_NOTICES.md +6 -12
  4. package/dist/{accordion-Cjb6sx0G.js → accordion-96o0pN62.js} +5 -5
  5. package/dist/{accordion-Cjb6sx0G.js.map → accordion-96o0pN62.js.map} +1 -1
  6. package/dist/action-menu-CHgs8vmj.js +281 -0
  7. package/dist/action-menu-CHgs8vmj.js.map +1 -0
  8. package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-B8yGOr8-.js} +7 -1
  9. package/dist/affordance-geometry.generated-B8yGOr8-.js.map +1 -0
  10. package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-BZUGwBq6.js} +277 -276
  11. package/dist/ai-artifact-BZUGwBq6.js.map +1 -0
  12. package/dist/{app-shell-C4FhvCqF.js → app-shell-D63ATkIK.js} +84 -83
  13. package/dist/app-shell-D63ATkIK.js.map +1 -0
  14. package/dist/{attachment-BxDfL2mw.js → attachment-DkoqHPPl.js} +7 -7
  15. package/dist/{attachment-BxDfL2mw.js.map → attachment-DkoqHPPl.js.map} +1 -1
  16. package/dist/{auth-ax2BqjrI.js → auth-D2FVZ1MH.js} +10 -10
  17. package/dist/{auth-ax2BqjrI.js.map → auth-D2FVZ1MH.js.map} +1 -1
  18. package/dist/{avatar-DAPlDvhJ.js → avatar-DWO_HHhB.js} +5 -5
  19. package/dist/{avatar-DAPlDvhJ.js.map → avatar-DWO_HHhB.js.map} +1 -1
  20. package/dist/{badge-HpFqoqSY.js → badge-DErMA7ul.js} +4 -4
  21. package/dist/{badge-HpFqoqSY.js.map → badge-DErMA7ul.js.map} +1 -1
  22. package/dist/base/accordion.js +1 -1
  23. package/dist/base/action-menu.js +1 -1
  24. package/dist/base/attachment.js +1 -1
  25. package/dist/base/avatar.js +1 -1
  26. package/dist/base/badge.js +1 -1
  27. package/dist/base/batch-action-bar.js +1 -1
  28. package/dist/base/buttons.js +1 -1
  29. package/dist/base/cards.js +2 -2
  30. package/dist/base/carousel.js +3 -3
  31. package/dist/base/cascader.js +13 -13
  32. package/dist/base/chart.js +1 -1
  33. package/dist/base/choice-inputs.js +2 -2
  34. package/dist/base/code-block.js +1 -1
  35. package/dist/base/combobox.js +2 -2
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +2 -2
  39. package/dist/base/display.js +6 -6
  40. package/dist/base/feedback.js +3 -3
  41. package/dist/base/forms-numeric.js +1 -1
  42. package/dist/base/forms.js +3 -3
  43. package/dist/base/inline-edit.js +10 -10
  44. package/dist/base/item.js +1 -1
  45. package/dist/base/media-gallery.js +1 -1
  46. package/dist/base/metadata-list.js +1 -1
  47. package/dist/base/navigation.js +6 -6
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +1 -1
  51. package/dist/base/repeaters.js +9 -9
  52. package/dist/base/sheet.js +1 -1
  53. package/dist/base/sidebar.js +1 -1
  54. package/dist/base/signature-pad.js +6 -6
  55. package/dist/base/skeleton.js +1 -1
  56. package/dist/base/spinner.js +4 -4
  57. package/dist/base/structure.js +1 -1
  58. package/dist/base/table.js +1 -1
  59. package/dist/base/text-inputs.js +2 -2
  60. package/dist/base/toaster.js +3 -3
  61. package/dist/base/tree.js +1 -1
  62. package/dist/base/upload-queue.js +1 -1
  63. package/dist/base/upload.js +3 -3
  64. package/dist/base/value-inputs.js +1 -1
  65. package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-CdfIkCsV.js} +4 -4
  66. package/dist/{batch-action-bar-DnUJ21NQ.js.map → batch-action-bar-CdfIkCsV.js.map} +1 -1
  67. package/dist/blocks/admin.js +20 -20
  68. package/dist/blocks/admin.js.map +1 -1
  69. package/dist/blocks/ai.js +15 -15
  70. package/dist/blocks/analytics/usage-card.js +1 -1
  71. package/dist/blocks/analytics.js +17 -17
  72. package/dist/blocks/analytics.js.map +1 -1
  73. package/dist/blocks/collaboration.js +1 -1
  74. package/dist/blocks/commerce/receipt.js +1 -1
  75. package/dist/blocks/commerce.js +570 -567
  76. package/dist/blocks/commerce.js.map +1 -1
  77. package/dist/blocks/data-display.js +2 -2
  78. package/dist/blocks/onboarding.js +5 -5
  79. package/dist/blocks/planning.js +11 -11
  80. package/dist/blocks/timelines.js +1 -1
  81. package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-B-WFKecD.js} +4 -4
  82. package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-B-WFKecD.js.map} +1 -1
  83. package/dist/{button-DVzspB_G.js → button-DkmK-z8E.js} +2 -2
  84. package/dist/{button-DVzspB_G.js.map → button-DkmK-z8E.js.map} +1 -1
  85. package/dist/{buttons-DPZekJFu.js → buttons-BbfzgczK.js} +8 -8
  86. package/dist/{buttons-DPZekJFu.js.map → buttons-BbfzgczK.js.map} +1 -1
  87. package/dist/{cards-BaBZR-AU.js → cards-4JTWqvVe.js} +10 -10
  88. package/dist/cards-4JTWqvVe.js.map +1 -0
  89. package/dist/{chart-ZOYyK2xG.js → chart-C19flDQb.js} +4 -4
  90. package/dist/{chart-ZOYyK2xG.js.map → chart-C19flDQb.js.map} +1 -1
  91. package/dist/{checkbox-AWIhNhmo.js → checkbox-CzYUTPeJ.js} +9 -5
  92. package/dist/checkbox-CzYUTPeJ.js.map +1 -0
  93. package/dist/{choice-inputs-CNHvARCJ.js → choice-inputs-JLtij2y4.js} +182 -176
  94. package/dist/choice-inputs-JLtij2y4.js.map +1 -0
  95. package/dist/{code-block-DeneBJR_.js → code-block-CGNaUtAE.js} +7 -7
  96. package/dist/{code-block-DeneBJR_.js.map → code-block-CGNaUtAE.js.map} +1 -1
  97. package/dist/{collapsible-C-_l4hpy.js → collapsible-Do4G0zcC.js} +3 -3
  98. package/dist/{collapsible-C-_l4hpy.js.map → collapsible-Do4G0zcC.js.map} +1 -1
  99. package/dist/{collection-content-By56pLog.js → collection-content-C0e8SsTm.js} +3 -3
  100. package/dist/{collection-content-By56pLog.js.map → collection-content-C0e8SsTm.js.map} +1 -1
  101. package/dist/{combobox-C0EQW6dr.js → combobox-CBJDs6w_.js} +349 -347
  102. package/dist/combobox-CBJDs6w_.js.map +1 -0
  103. package/dist/{combobox-xCQ2RMNE.js → combobox-hbhSS18O.js} +158 -112
  104. package/dist/combobox-hbhSS18O.js.map +1 -0
  105. package/dist/{command-C25VMRII.js → command-D8NrBj-b.js} +7 -7
  106. package/dist/{command-C25VMRII.js.map → command-D8NrBj-b.js.map} +1 -1
  107. package/dist/{comments-BYYlTA8E.js → comments-Di4w0H_S.js} +383 -382
  108. package/dist/comments-Di4w0H_S.js.map +1 -0
  109. package/dist/components/base/action-menu/action-menu.d.ts +2 -0
  110. package/dist/components/base/cards/card.recipes.d.ts +12 -5
  111. package/dist/components/base/cards/smart-card.types.d.ts +12 -7
  112. package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
  113. package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
  114. package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
  115. package/dist/components/base/combobox/combobox-field.d.ts +16 -0
  116. package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
  117. package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
  118. package/dist/components/base/forms/form-field.d.ts +5 -3
  119. package/dist/components/base/forms/index.d.ts +1 -0
  120. package/dist/components/base/forms/server-errors.d.ts +16 -0
  121. package/dist/components/base/forms/workflow.d.ts +5 -2
  122. package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
  123. package/dist/components/base/navigation/page-header/page-header.d.ts +4 -2
  124. package/dist/components/base/structure/composition.recipes.d.ts +17 -0
  125. package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
  126. package/dist/components/base/text-inputs/input.d.ts +4 -2
  127. package/dist/components/base/text-inputs/textarea.d.ts +4 -2
  128. package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
  129. package/dist/components/base/value-inputs/slider.d.ts +5 -1
  130. package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
  131. package/dist/components/typography/text.styles.d.ts +26 -1
  132. package/dist/components/ui/combobox-dismiss.d.ts +16 -0
  133. package/dist/components/ui/combobox.d.ts +11 -6
  134. package/dist/components/ui/dialog.d.ts +1 -1
  135. package/dist/components/ui/popover.d.ts +1 -1
  136. package/dist/components/ui/sheet.d.ts +1 -1
  137. package/dist/composition.recipes-COdiFhxB.js +19 -0
  138. package/dist/composition.recipes-COdiFhxB.js.map +1 -0
  139. package/dist/containers-CRmHf7GP.js +104 -0
  140. package/dist/containers-CRmHf7GP.js.map +1 -0
  141. package/dist/{copyable-ClBuk_UK.js → copyable-CnGCZdX4.js} +4 -4
  142. package/dist/{copyable-ClBuk_UK.js.map → copyable-CnGCZdX4.js.map} +1 -1
  143. package/dist/{data-display-DT_khPl_.js → data-display-D4oujtx0.js} +239 -238
  144. package/dist/data-display-D4oujtx0.js.map +1 -0
  145. package/dist/{date-DCrsDTZc.js → date-Q7jnXxpk.js} +5 -5
  146. package/dist/{date-DCrsDTZc.js.map → date-Q7jnXxpk.js.map} +1 -1
  147. package/dist/{date-picker-ay0Pha_a.js → date-picker-zOt1oNss.js} +102 -90
  148. package/dist/date-picker-zOt1oNss.js.map +1 -0
  149. package/dist/date-pickers-cj8IXbDC.js +179 -0
  150. package/dist/date-pickers-cj8IXbDC.js.map +1 -0
  151. package/dist/{display-hAc1HjpI.js → display-BB4BL_-K.js} +8 -8
  152. package/dist/{display-hAc1HjpI.js.map → display-BB4BL_-K.js.map} +1 -1
  153. package/dist/{dropdown-menu-Cl4X7L5S.js → dropdown-menu-CjY8Vt7W.js} +8 -8
  154. package/dist/{dropdown-menu-Cl4X7L5S.js.map → dropdown-menu-CjY8Vt7W.js.map} +1 -1
  155. package/dist/features/activities.js +11 -11
  156. package/dist/features/ai-chat.js +9 -9
  157. package/dist/features/appointment-calendar.js +222 -220
  158. package/dist/features/appointment-calendar.js.map +1 -1
  159. package/dist/features/async-preview.js +8 -8
  160. package/dist/features/combobox.js +1 -1
  161. package/dist/features/comments.js +1 -1
  162. package/dist/features/data-view.js +10 -10
  163. package/dist/features/email-composer.js +275 -274
  164. package/dist/features/email-composer.js.map +1 -1
  165. package/dist/features/event-calendar.js +199 -198
  166. package/dist/features/event-calendar.js.map +1 -1
  167. package/dist/features/filters.js +1 -1
  168. package/dist/features/global-search.js +12 -12
  169. package/dist/features/kanban.js +4 -4
  170. package/dist/features/map.js +7 -7
  171. package/dist/features/media-library.js +623 -622
  172. package/dist/features/media-library.js.map +1 -1
  173. package/dist/features/mentions.js +1 -1
  174. package/dist/features/overlays.js +1 -1
  175. package/dist/features/products.js +973 -969
  176. package/dist/features/products.js.map +1 -1
  177. package/dist/features/questionnaire.js +12 -12
  178. package/dist/features/resource-assignment.js +8 -8
  179. package/dist/features/resource.js +113 -112
  180. package/dist/features/resource.js.map +1 -1
  181. package/dist/features/rich-text-editor.js +2 -2
  182. package/dist/features/schema-form.js +254 -253
  183. package/dist/features/schema-form.js.map +1 -1
  184. package/dist/features/suggestions.js +3 -3
  185. package/dist/features/sync.js +3 -3
  186. package/dist/features/table.js +1 -1
  187. package/dist/features/theme-tweaker.js +19 -19
  188. package/dist/features/theme-tweaker.js.map +1 -1
  189. package/dist/{feedback-BYIhtitP.js → feedback-DZNL5Lg1.js} +9 -9
  190. package/dist/{feedback-BYIhtitP.js.map → feedback-DZNL5Lg1.js.map} +1 -1
  191. package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DjwGx8eM.js} +2 -2
  192. package/dist/{field-affordance-recipes-DZhnIL_Y.js.map → field-affordance-recipes-DjwGx8eM.js.map} +1 -1
  193. package/dist/{filters-BGfvjP4d.js → filters-BcT-uoFy.js} +19 -19
  194. package/dist/{filters-BGfvjP4d.js.map → filters-BcT-uoFy.js.map} +1 -1
  195. package/dist/{form-field-CwH9y77i.js → form-field-CsgRmdit.js} +14 -8
  196. package/dist/form-field-CsgRmdit.js.map +1 -0
  197. package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-NXgjkmBG.js} +3 -3
  198. package/dist/{form-sizing-BdP_Mf5p.js.map → form-sizing-NXgjkmBG.js.map} +1 -1
  199. package/dist/{forms-B9G_xwzi.js → forms-BV5m5aQF.js} +83 -65
  200. package/dist/forms-BV5m5aQF.js.map +1 -0
  201. package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-Cd33AKbD.js} +288 -288
  202. package/dist/forms-numeric-Cd33AKbD.js.map +1 -0
  203. package/dist/{header-CGXuhcRm.js → header-BA697l4a.js} +14 -14
  204. package/dist/{header-CGXuhcRm.js.map → header-BA697l4a.js.map} +1 -1
  205. package/dist/hooks/useFormErrors.d.ts +1 -1
  206. package/dist/{hooks-Dkz0K2WT.js → hooks-BQ-L7Uu2.js} +2 -2
  207. package/dist/{hooks-Dkz0K2WT.js.map → hooks-BQ-L7Uu2.js.map} +1 -1
  208. package/dist/{icon-badge-DYKIwvOV.js → icon-badge-COWbCCWu.js} +3 -3
  209. package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-COWbCCWu.js.map} +1 -1
  210. package/dist/index.js +2 -2
  211. package/dist/input-Cdw4k0fb.js +289 -0
  212. package/dist/input-Cdw4k0fb.js.map +1 -0
  213. package/dist/{input-CZw8iU99.js → input-DOPL5_QE.js} +3 -3
  214. package/dist/{input-CZw8iU99.js.map → input-DOPL5_QE.js.map} +1 -1
  215. package/dist/item-BvZ2DR_x.js +277 -0
  216. package/dist/item-BvZ2DR_x.js.map +1 -0
  217. package/dist/layout/app-shell.js +1 -1
  218. package/dist/layout/auth.js +1 -1
  219. package/dist/layout/containers.js +1 -1
  220. package/dist/layout/header.js +1 -1
  221. package/dist/layout/hooks.js +1 -1
  222. package/dist/layout/navigation.js +1 -1
  223. package/dist/layout/page.js +1 -1
  224. package/dist/layout/settings.js +1 -1
  225. package/dist/layout/sidebar.js +2 -2
  226. package/dist/layout/workspace.js +1 -1
  227. package/dist/layout.js +10 -10
  228. package/dist/lib/affordance-geometry.generated.d.ts +6 -0
  229. package/dist/lib/ui-provider/types.d.ts +1 -1
  230. package/dist/lib/use-popup-focus-recovery.d.ts +8 -0
  231. package/dist/lib/utils.js +1 -1
  232. package/dist/{media-gallery-3zIVLMWH.js → media-gallery-CSl5W1Fy.js} +6 -6
  233. package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-CSl5W1Fy.js.map} +1 -1
  234. package/dist/{mentions-utuUvH1K.js → mentions-RKOQaaIB.js} +8 -8
  235. package/dist/{mentions-utuUvH1K.js.map → mentions-RKOQaaIB.js.map} +1 -1
  236. package/dist/{message-DZ_ruyUV.js → message-INU2xsxu.js} +4 -4
  237. package/dist/{message-DZ_ruyUV.js.map → message-INU2xsxu.js.map} +1 -1
  238. package/dist/metadata-list-qVV7AVxa.js +443 -0
  239. package/dist/metadata-list-qVV7AVxa.js.map +1 -0
  240. package/dist/{navigation-BzhHI3lo.js → navigation-BQNcg1jT.js} +8 -8
  241. package/dist/{navigation-BzhHI3lo.js.map → navigation-BQNcg1jT.js.map} +1 -1
  242. package/dist/{navigation-Bnotn4AQ.js → navigation-DLF3E1IC.js} +7 -7
  243. package/dist/{navigation-Bnotn4AQ.js.map → navigation-DLF3E1IC.js.map} +1 -1
  244. package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-WZEs-hYo.js} +2 -2
  245. package/dist/{navigation-row-recipes-BFLCk_Aq.js.map → navigation-row-recipes-WZEs-hYo.js.map} +1 -1
  246. package/dist/{number-DbV1Dija.js → number-E_OiIfJz.js} +5 -5
  247. package/dist/{number-DbV1Dija.js.map → number-E_OiIfJz.js.map} +1 -1
  248. package/dist/{overflow-tab-bar-CWY7Nogn.js → overflow-tab-bar-CrbqMteP.js} +107 -105
  249. package/dist/overflow-tab-bar-CrbqMteP.js.map +1 -0
  250. package/dist/{overlays-DNWmZrJ4.js → overlays-BlKynmde.js} +322 -319
  251. package/dist/overlays-BlKynmde.js.map +1 -0
  252. package/dist/page-CIwNUtGr.js +227 -0
  253. package/dist/page-CIwNUtGr.js.map +1 -0
  254. package/dist/page-header-commands-DFMlNYzN.js +128 -0
  255. package/dist/page-header-commands-DFMlNYzN.js.map +1 -0
  256. package/dist/{pagination-BL25hu2s.js → pagination-Ch8X_47u.js} +5 -5
  257. package/dist/{pagination-BL25hu2s.js.map → pagination-Ch8X_47u.js.map} +1 -1
  258. package/dist/{popover-menu-B9WWygpa.js → popover-menu-BYaCdFhf.js} +6 -6
  259. package/dist/{popover-menu-B9WWygpa.js.map → popover-menu-BYaCdFhf.js.map} +1 -1
  260. package/dist/{popover-7_m66eYW.js → popover-uwzX2vo7.js} +65 -63
  261. package/dist/popover-uwzX2vo7.js.map +1 -0
  262. package/dist/{primitives-BFK08r9M.js → primitives-Du64iDbb.js} +6 -6
  263. package/dist/{primitives-BFK08r9M.js.map → primitives-Du64iDbb.js.map} +1 -1
  264. package/dist/primitives.js +4 -4
  265. package/dist/{progress-B1VnCT0K.js → progress-BvF2oCdV.js} +5 -5
  266. package/dist/{progress-B1VnCT0K.js.map → progress-BvF2oCdV.js.map} +1 -1
  267. package/dist/{receipt-BVSOH3Xo.js → receipt-D789Jwyy.js} +6 -6
  268. package/dist/{receipt-BVSOH3Xo.js.map → receipt-D789Jwyy.js.map} +1 -1
  269. package/dist/{rich-text-GOUyKQ-s.js → rich-text-CLJEf76s.js} +4 -4
  270. package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-CLJEf76s.js.map} +1 -1
  271. package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-Cm1dpUpQ.js} +10 -10
  272. package/dist/{rich-text-editor-cRLC-eBK.js.map → rich-text-editor-Cm1dpUpQ.js.map} +1 -1
  273. package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-L__e4x47.js} +4 -4
  274. package/dist/{rich-text-editor-toolbar-DfXg0-VC.js.map → rich-text-editor-toolbar-L__e4x47.js.map} +1 -1
  275. package/dist/{scroll-area-DcI-M1UT.js → scroll-area-La5RXsEk.js} +2 -2
  276. package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-La5RXsEk.js.map} +1 -1
  277. package/dist/{separator-Bom7NsGO.js → separator-DAEV0w65.js} +2 -2
  278. package/dist/{separator-Bom7NsGO.js.map → separator-DAEV0w65.js.map} +1 -1
  279. package/dist/{separator-BDV-Y648.js → separator-GNfPG-90.js} +3 -3
  280. package/dist/{separator-BDV-Y648.js.map → separator-GNfPG-90.js.map} +1 -1
  281. package/dist/services/actions.js +1 -1
  282. package/dist/settings-BA2iboic.js +174 -0
  283. package/dist/settings-BA2iboic.js.map +1 -0
  284. package/dist/{sheet-CGpB3omz.js → sheet-DoAxTb2J.js} +75 -73
  285. package/dist/sheet-DoAxTb2J.js.map +1 -0
  286. package/dist/{sidebar-A0ElHINE.js → sidebar-ByqKR_W5.js} +13 -13
  287. package/dist/{sidebar-A0ElHINE.js.map → sidebar-ByqKR_W5.js.map} +1 -1
  288. package/dist/{sidebar-CPx_7YBa.js → sidebar-D2iSnGJ7.js} +11 -11
  289. package/dist/{sidebar-CPx_7YBa.js.map → sidebar-D2iSnGJ7.js.map} +1 -1
  290. package/dist/{skeleton-Byjnt7qr.js → skeleton-CUj8O5Bd.js} +3 -3
  291. package/dist/{skeleton-Byjnt7qr.js.map → skeleton-CUj8O5Bd.js.map} +1 -1
  292. package/dist/smart-card-CqkzQsK-.js +614 -0
  293. package/dist/smart-card-CqkzQsK-.js.map +1 -0
  294. package/dist/{structure-BmisBK-3.js → structure-C0V0_Fyf.js} +3 -3
  295. package/dist/{structure-BmisBK-3.js.map → structure-C0V0_Fyf.js.map} +1 -1
  296. package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
  297. package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
  298. package/dist/style.css +1 -1
  299. package/dist/{table-DsfzoUia.js → table-CpvnzJn9.js} +3 -3
  300. package/dist/{table-DsfzoUia.js.map → table-CpvnzJn9.js.map} +1 -1
  301. package/dist/{table-BweFy_P9.js → table-DH7rozUv.js} +19 -19
  302. package/dist/{table-BweFy_P9.js.map → table-DH7rozUv.js.map} +1 -1
  303. package/dist/{tabs-CDocW5D1.js → tabs-eqVsJZWO.js} +7 -7
  304. package/dist/{tabs-CDocW5D1.js.map → tabs-eqVsJZWO.js.map} +1 -1
  305. package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-DXItiR0O.js} +101 -98
  306. package/dist/text-inputs-DXItiR0O.js.map +1 -0
  307. package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
  308. package/dist/text.styles-B64My8RZ.js.map +1 -0
  309. package/dist/theme.css +152 -112
  310. package/dist/{timelines-CwM_9IhD.js → timelines-DmtztAY_.js} +10 -10
  311. package/dist/{timelines-CwM_9IhD.js.map → timelines-DmtztAY_.js.map} +1 -1
  312. package/dist/{tooltip-yiRJUFjp.js → tooltip-B4hjKtoV.js} +3 -3
  313. package/dist/{tooltip-yiRJUFjp.js.map → tooltip-B4hjKtoV.js.map} +1 -1
  314. package/dist/{tree-WnKQzwbq.js → tree-CV11PURP.js} +8 -8
  315. package/dist/{tree-WnKQzwbq.js.map → tree-CV11PURP.js.map} +1 -1
  316. package/dist/typography/rich-text.js +1 -1
  317. package/dist/typography-CSyJrh28.js +117 -0
  318. package/dist/typography-CSyJrh28.js.map +1 -0
  319. package/dist/typography.js +1 -1
  320. package/dist/{ui-provider-C_U0Xma4.js → ui-provider-CQCuCBcy.js} +3 -3
  321. package/dist/ui-provider-CQCuCBcy.js.map +1 -0
  322. package/dist/ui-provider.js +1 -1
  323. package/dist/{upload-CXyxmQBP.js → upload-C9SA0X-8.js} +11 -11
  324. package/dist/{upload-CXyxmQBP.js.map → upload-C9SA0X-8.js.map} +1 -1
  325. package/dist/{upload-queue-Boscubn9.js → upload-queue-DhQJiSRc.js} +9 -9
  326. package/dist/{upload-queue-Boscubn9.js.map → upload-queue-DhQJiSRc.js.map} +1 -1
  327. package/dist/{usage-card-BhO5eqkX.js → usage-card-DVTRDmGz.js} +134 -133
  328. package/dist/usage-card-DVTRDmGz.js.map +1 -0
  329. package/dist/use-popup-focus-recovery-C0QPvgOR.js +36 -0
  330. package/dist/use-popup-focus-recovery-C0QPvgOR.js.map +1 -0
  331. package/dist/{utils-BRhFDwuU.js → utils-CF3c95Io.js} +68 -5
  332. package/dist/utils-CF3c95Io.js.map +1 -0
  333. package/dist/value-inputs-C0o70p-U.js +980 -0
  334. package/dist/value-inputs-C0o70p-U.js.map +1 -0
  335. package/dist/{value-typography-BP8OG6h5.js → value-typography-ClupF0Gz.js} +2 -2
  336. package/dist/{value-typography-BP8OG6h5.js.map → value-typography-ClupF0Gz.js.map} +1 -1
  337. package/dist/workspace-9EFVXUyk.js +410 -0
  338. package/dist/workspace-9EFVXUyk.js.map +1 -0
  339. package/docs/consumer-skill/SKILL.md +14 -129
  340. package/docs/consumer-skill/examples/app-layout.tsx +22 -12
  341. package/docs/consumer-skill/examples/authentication.tsx +77 -0
  342. package/docs/consumer-skill/examples/edit.tsx +30 -38
  343. package/docs/consumer-skill/examples/manifest.json +51 -1
  344. package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
  345. package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
  346. package/docs/consumer-skill/examples/rhf-overlay-form.tsx +92 -0
  347. package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
  348. package/docs/consumer-skill/references/agents-md.md +17 -7
  349. package/docs/consumer-skill/references/authentication.md +42 -0
  350. package/docs/consumer-skill/references/component-contracts.json +319824 -0
  351. package/docs/consumer-skill/references/composition-mapping.md +92 -0
  352. package/docs/consumer-skill/references/composition.md +43 -19
  353. package/docs/consumer-skill/references/design-contract.md +32 -0
  354. package/docs/consumer-skill/references/discovery.md +84 -7
  355. package/docs/consumer-skill/references/installation.md +45 -35
  356. package/docs/consumer-skill/references/integration.md +6 -2
  357. package/docs/consumer-skill/references/public-api.json +1520 -66
  358. package/docs/consumer-skill/references/review.md +9 -4
  359. package/docs/consumer-skill/references/rhf-workflows.md +86 -0
  360. package/docs/consumer-skill/references/screen-archetypes.md +22 -0
  361. package/docs/consumer-skill/references/theming.md +8 -9
  362. package/docs/consumer-skill/references/tokens.json +12 -3
  363. package/docs/consumer-skill/references/workflows.md +7 -5
  364. package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
  365. package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
  366. package/docs/consumer-skill/scripts/composition.mjs +198 -0
  367. package/docs/consumer-skill/scripts/discovery.mjs +42 -10
  368. package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
  369. package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
  370. package/docs/consumer-skill/scripts/inspection.mjs +138 -0
  371. package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
  372. package/docs/consumer-skill/scripts/setup-skills.mjs +76 -0
  373. package/docs/consumer-skills/themelia-components/SKILL.md +30 -0
  374. package/docs/consumer-skills/themelia-composition/SKILL.md +35 -0
  375. package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
  376. package/docs/consumer-skills/themelia-foundation/SKILL.md +14 -0
  377. package/docs/consumer-skills/themelia-tokenization/SKILL.md +35 -0
  378. package/package.json +6 -4
  379. package/templates/README.md +39 -0
  380. package/templates/admin-shell-template.tsx +382 -0
  381. package/templates/analytics-operations-template.tsx +376 -0
  382. package/templates/customers-template.tsx +509 -0
  383. package/templates/index.ts +29 -0
  384. package/templates/orders-template.tsx +1102 -0
  385. package/templates/products-template.tsx +834 -0
  386. package/templates/user-permissions-template.tsx +450 -0
  387. package/dist/action-menu-CllU52Mm.js +0 -280
  388. package/dist/action-menu-CllU52Mm.js.map +0 -1
  389. package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
  390. package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
  391. package/dist/app-shell-C4FhvCqF.js.map +0 -1
  392. package/dist/cards-BaBZR-AU.js.map +0 -1
  393. package/dist/checkbox-AWIhNhmo.js.map +0 -1
  394. package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
  395. package/dist/combobox-C0EQW6dr.js.map +0 -1
  396. package/dist/combobox-xCQ2RMNE.js.map +0 -1
  397. package/dist/comments-BYYlTA8E.js.map +0 -1
  398. package/dist/containers-Mu1LMGV1.js +0 -103
  399. package/dist/containers-Mu1LMGV1.js.map +0 -1
  400. package/dist/data-display-DT_khPl_.js.map +0 -1
  401. package/dist/date-picker-ay0Pha_a.js.map +0 -1
  402. package/dist/date-pickers-Ccw8DL2b.js +0 -175
  403. package/dist/date-pickers-Ccw8DL2b.js.map +0 -1
  404. package/dist/form-field-CwH9y77i.js.map +0 -1
  405. package/dist/forms-B9G_xwzi.js.map +0 -1
  406. package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
  407. package/dist/input-DQdEd0YD.js +0 -263
  408. package/dist/input-DQdEd0YD.js.map +0 -1
  409. package/dist/item-K5_ghvze.js +0 -275
  410. package/dist/item-K5_ghvze.js.map +0 -1
  411. package/dist/metadata-list-8N16ZMW_.js +0 -405
  412. package/dist/metadata-list-8N16ZMW_.js.map +0 -1
  413. package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
  414. package/dist/overlays-DNWmZrJ4.js.map +0 -1
  415. package/dist/page-Bgl1F560.js +0 -224
  416. package/dist/page-Bgl1F560.js.map +0 -1
  417. package/dist/page-header-commands-DOb6WsfD.js +0 -126
  418. package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
  419. package/dist/popover-7_m66eYW.js.map +0 -1
  420. package/dist/settings-ybnjVwbd.js +0 -171
  421. package/dist/settings-ybnjVwbd.js.map +0 -1
  422. package/dist/sheet-CGpB3omz.js.map +0 -1
  423. package/dist/smart-card-DiC5aac3.js +0 -604
  424. package/dist/smart-card-DiC5aac3.js.map +0 -1
  425. package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
  426. package/dist/text.styles-g4He6UIW.js.map +0 -1
  427. package/dist/typography-UTnveOEy.js +0 -117
  428. package/dist/typography-UTnveOEy.js.map +0 -1
  429. package/dist/ui-provider-C_U0Xma4.js.map +0 -1
  430. package/dist/usage-card-BhO5eqkX.js.map +0 -1
  431. package/dist/utils-BRhFDwuU.js.map +0 -1
  432. package/dist/value-inputs-DXPDjvBU.js +0 -963
  433. package/dist/value-inputs-DXPDjvBU.js.map +0 -1
  434. package/dist/workspace-Cdrg7k9f.js +0 -408
  435. package/dist/workspace-Cdrg7k9f.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"upload-queue-Boscubn9.js","names":["_Fragment","useDensityConfig","resolveComponentScale","cn","Button","Text","Stack","SecondaryValue","FileSize","Badge","useFileDropTarget","uploadDropTargetRecipes","AttachmentFileIcon","AttachmentTitle","AttachmentDescription","AttachmentActions","AttachmentMedia","AttachmentContent","AttachmentProgress","Attachment","Fragment$1","FilePickerInput","forwardRef","props","handleClick","event","onClick","handleChange","files","onFiles","className","defaultDropzoneStrings","SIZE_CHROME","assignInputRef","forwardedRef","node","DropzoneImpl","sizeProp","stringsProp","strings","useStrings","generatedId","useId","inputId","inputProps","onDrop","chrome","defaultScale","dropTargetProps","disabled","invalid","isDragging","icon","UploadCloud","children","Dropzone","defaultUploadProgressListStrings","STATUS_TONE","Clock","Check","AlertCircle","X","UploadProgressList","statusLabel","items","tone","item","Icon","pct","showProgress","onPreview","Eye","onDownload","Download","onCancel","onRetry","RefreshCw","onRemove","defaultUploadTrayStrings","countStatus","completed","failed","uploading","queued","UploadTray","handleDrop","useCallback","onAddFiles","hasItems","dropzone","onClearAll","listStrings"],"sources":["../src/components/base/upload/file-picker-input.tsx","../src/components/base/upload/dropzone.tsx","../src/components/base/upload-queue/upload-progress-list.tsx","../src/components/base/upload-queue/upload-tray.tsx"],"sourcesContent":["import {\n\tforwardRef,\n\ttype ChangeEvent,\n\ttype InputHTMLAttributes,\n\ttype MouseEvent,\n} from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype DataAttributes = {\n\t[key: `data-${string}`]: string | number | boolean | undefined;\n};\n\nexport type FilePickerNativeInputProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t'type' | 'value' | 'defaultValue' | 'onChange' | 'children'\n> & DataAttributes;\n\nexport type FilePickerInputProps = FilePickerNativeInputProps & {\n\t/** Return `false` when the native FileList must be cleared (for example, after rejection). */\n\tonFiles: (files: File[]) => boolean | void;\n};\n\n/** Shared native-input plumbing for FileUpload and Dropzone. Not a public export. */\nexport const FilePickerInput = forwardRef<HTMLInputElement, FilePickerInputProps>(\n\tfunction FilePickerInput(\n\t\t{ className, onFiles, onClick, ...props },\n\t\tref,\n\t) {\n\t\tconst handleClick = (event: MouseEvent<HTMLInputElement>) => {\n\t\t\tevent.stopPropagation();\n\t\t\tonClick?.(event);\n\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t// Clearing before the picker opens makes choosing the same file again\n\t\t\t\t// observable without retaining an opaque native FileList as state.\n\t\t\t\tevent.currentTarget.value = '';\n\t\t\t}\n\t\t};\n\n\t\tconst handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n\t\t\tconst files = event.currentTarget.files;\n\t\t\tif (files?.length && onFiles(Array.from(files)) === false) {\n\t\t\t\tevent.currentTarget.value = '';\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t\ttype=\"file\"\n\t\t\t\tdata-slot=\"file-picker-input\"\n\t\t\t\tclassName={cn('file-picker-input--component sr-only', className)}\n\t\t\t\tonClick={handleClick}\n\t\t\t\tonChange={handleChange}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nFilePickerInput.displayName = 'FilePickerInput';\n","/**\n * Dropzone — accessible drag-and-drop chrome with a native file-input fallback.\n * It owns no validation or file state; consumers receive local `File` values.\n */\nimport { forwardRef, useId, type ForwardedRef, type ReactNode } from 'react';\nimport { UploadCloud } from 'lucide-react';\n\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { useDensityConfig, type ComponentScale } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\n\nimport {\n\tFilePickerInput,\n\ttype FilePickerNativeInputProps,\n} from './file-picker-input';\nimport { useFileDropTarget } from './use-file-drop-target';\nimport { uploadDropTargetRecipes } from './upload.recipes';\n\nexport type DropzoneSize = ComponentScale;\n\nexport interface DropzoneStrings {\n\tinstruction: string;\n\thelper: string;\n\tdragOver: string;\n}\n\nexport const defaultDropzoneStrings: DropzoneStrings = {\n\tinstruction: 'Drag files here or click to browse',\n\thelper: '',\n\tdragOver: 'Release to select',\n};\n\nexport type DropzoneInputProps = Omit<\n\tFilePickerNativeInputProps,\n\t'accept' | 'disabled' | 'multiple'\n>;\n\nexport interface DropzoneProps {\n\tonDrop: (files: File[]) => void;\n\t/** Accepted MIME types or extensions. */\n\taccept?: string;\n\t/** Allows more than one file to be dropped. */\n\tmultiple?: boolean;\n\t/** Disables the control and blocks drops. */\n\tdisabled?: boolean;\n\t/** Applies the invalid styling. */\n\tinvalid?: boolean;\n\t/** Height preset for the drop target. */\n\tsize?: DropzoneSize;\n\t/** Glyph shown inside the drop target. */\n\ticon?: ReactNode;\n\tclassName?: string;\n\t/** Native form, ARIA, data, and event attributes forwarded to the file input. */\n\tinputProps?: DropzoneInputProps;\n\t/** Optional action rendered outside the input label, so nested controls remain valid. */\n\tchildren?: ReactNode;\n\t/** Overrides the prompt and constraint copy. */\n\tstrings?: StringsProp<DropzoneStrings>;\n}\n\nconst SIZE_CHROME: Record<\n\tDropzoneSize,\n\t{ padding: string; minHeight: string; iconSize: string }\n> = {\n\tsm: {\n\t\tpadding: 'p-surface-xs',\n\t\tminHeight: 'min-h-24',\n\t\ticonSize: 'size-icon',\n\t},\n\tmd: {\n\t\tpadding: 'p-surface',\n\t\tminHeight: 'min-h-32',\n\t\ticonSize: 'size-icon-lg',\n\t},\n\tlg: {\n\t\tpadding: 'p-surface-lg',\n\t\tminHeight: 'min-h-40',\n\t\ticonSize: 'size-icon-lg',\n\t},\n};\n\nfunction assignInputRef(\n\tnode: HTMLInputElement | null,\n\tforwardedRef: ForwardedRef<HTMLInputElement>,\n) {\n\tif (typeof forwardedRef === 'function') forwardedRef(node);\n\telse if (forwardedRef) forwardedRef.current = node;\n}\n\nfunction DropzoneImpl(\n\t{\n\t\tonDrop,\n\t\taccept,\n\t\tmultiple = false,\n\t\tdisabled = false,\n\t\tinvalid = false,\n\t\tsize: sizeProp,\n\t\ticon,\n\t\tclassName,\n\t\tinputProps,\n\t\tchildren,\n\t\tstrings: stringsProp,\n\t}: DropzoneProps,\n\tforwardedRef: ForwardedRef<HTMLInputElement>,\n) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst strings = useStrings(defaultDropzoneStrings, stringsProp);\n\tconst generatedId = useId();\n\tconst inputId = inputProps?.id ?? `dropzone-${generatedId}`;\n\tconst { isDragging, dropTargetProps } = useFileDropTarget({\n\t\tdisabled,\n\t\tonFiles: onDrop,\n\t});\n\tconst resolvedSize = resolveComponentScale(sizeProp, defaultScale);\n\tconst chrome = SIZE_CHROME[resolvedSize];\n\n\treturn (\n\t\t<div\n\t\t\t{...dropTargetProps}\n\t\t\tdata-disabled={disabled || undefined}\n\t\t\tdata-invalid={invalid || undefined}\n\t\t\tdata-dragging={isDragging || undefined}\n\t\t\tclassName={cn(\n\t\t\t\t'dropzone--component relative flex flex-col items-center justify-center gap-space-md rounded-radius border border-dashed text-center transition-colors duration-150',\n\t\t\t\t'has-[[data-slot=file-picker-input]:focus-visible]:ring-3',\n\t\t\t\tchrome.minHeight,\n\t\t\t\tchrome.padding,\n\t\t\t\tinvalid ? cn(uploadDropTargetRecipes.invalid, uploadDropTargetRecipes.focus.filePicker.invalid) : cn(uploadDropTargetRecipes.idle, uploadDropTargetRecipes.focus.filePicker.valid),\n\t\t\t\tinvalid\n\t\t\t\t\t? !disabled && uploadDropTargetRecipes.invalidHover\n\t\t\t\t\t: !disabled && uploadDropTargetRecipes.hover,\n\t\t\t\tdisabled && 'cursor-not-allowed opacity-50',\n\t\t\t\t!disabled && isDragging && (\n\t\t\t\t\tinvalid\n\t\t\t\t\t\t? uploadDropTargetRecipes.invalidDragging\n\t\t\t\t\t\t: uploadDropTargetRecipes.dragging\n\t\t\t\t),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<FilePickerInput\n\t\t\t\t{...inputProps}\n\t\t\t\tref={(node) => assignInputRef(node, forwardedRef)}\n\t\t\t\tid={inputId}\n\t\t\t\taccept={accept}\n\t\t\t\tmultiple={multiple}\n\t\t\t\tdisabled={disabled}\n\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\tclassName={cn('dropzone--input', inputProps?.className)}\n\t\t\t\tonFiles={onDrop}\n\t\t\t/>\n\n\t\t\t<label\n\t\t\t\thtmlFor={disabled ? undefined : inputId}\n\t\t\t\taria-disabled={disabled || undefined}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'dropzone--trigger flex w-full flex-1 cursor-pointer flex-col items-center justify-center gap-space-md',\n\t\t\t\t\tdisabled && 'cursor-not-allowed',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{/* The glyph names the affordance; it needs no tinted tile around it. */}\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"dropzone--icon inline-flex items-center justify-center text-muted-foreground\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{icon ?? <UploadCloud className={chrome.iconSize} />}\n\t\t\t\t</span>\n\n\t\t\t\t{/* Text sets its own start alignment, and the copy column is as wide as\n\t\t\t\t its longest line, so each line centres itself. */}\n\t\t\t\t<span className=\"dropzone--copy grid gap-normal\">\n\t\t\t\t\t<Text\n\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\tweight=\"medium\"\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tclassName=\"dropzone--instruction\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{isDragging ? strings.dragOver : strings.instruction}\n\t\t\t\t\t</Text>\n\t\t\t\t\t{!!strings.helper && (\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t\tclassName=\"dropzone--helper\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{strings.helper}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t</label>\n\n\t\t\t{!!children && <div className=\"dropzone--action\">{children}</div>}\n\t\t</div>\n\t);\n}\n\nconst Dropzone = forwardRef<HTMLInputElement, DropzoneProps>(DropzoneImpl);\nDropzone.displayName = 'Dropzone';\n\nexport { Dropzone };\n","/**\n * UploadProgressList — render-only list of in-flight uploads. Each row shows\n * a status icon (queued / uploading / done / error / cancelled), filename,\n * size, a progress bar driven by `progress` (0–100), and an action button\n * that maps to the row's status (cancel while uploading, retry on error,\n * remove when done). Pair with FileUpload / MediaGallery / Dropzone — those\n * components emit raw `File` instances; this one displays the upload UI\n * once the consumer has wired them to its API.\n *\n * Strings overridable for i18n.\n */\nimport { AlertCircle, Check, Clock, RefreshCw, UploadCloud, X, Eye, Download } from 'lucide-react';\nimport { Button } from '../buttons';\nimport { Stack } from '../structure';\nimport { SecondaryValue } from '../../primitives';\nimport { Attachment, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentProgress, AttachmentFileIcon, type AttachmentKind } from '../attachment';\nimport { FileSize } from '../../primitives';\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nexport type UploadStatus = 'queued' | 'uploading' | 'done' | 'error' | 'cancelled';\n\nexport interface UploadItem {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Displayed file name. */\n\tname: string;\n\t/** Pre-formatted size string (e.g. \"2.4 MB\"). */\n\tsize?: string;\n\t/** Numeric file size used when the formatted size is absent. */\n\tbytes?: number;\n\tkind?: AttachmentKind;\n\t/** Upload progress 0–100. Omit for an indeterminate transfer. Ignored when status is `done`/`error`/`cancelled`. */\n\tprogress?: number;\n\tstatus: UploadStatus;\n\t/** Error message rendered under the row when status is `error`. */\n\terror?: string;\n\t/**\n\t * Optional thumbnail URL, shown in place of the status icon.\n\t * The status remains visible beside the file name.\n\t */\n\tpreview?: string;\n}\n\nexport interface UploadProgressListStrings {\n\tqueued: string;\n\tuploading: string;\n\tdone: string;\n\terror: string;\n\tcancelled: string;\n\tcancel: string;\n\tretry: string;\n\tremove: string;\n\tpreview?: string;\n\tdownload?: string;\n}\n\nexport const defaultUploadProgressListStrings: UploadProgressListStrings = {\n\tqueued: 'Queued',\n\tuploading: 'Uploading',\n\tdone: 'Uploaded',\n\terror: 'Failed',\n\tcancelled: 'Cancelled',\n\tcancel: 'Cancel',\n\tretry: 'Retry',\n\tremove: 'Remove',\n\tpreview: 'Preview',\n\tdownload: 'Download',\n};\n\nexport interface UploadProgressListProps {\n\t/** Entries to render, in order. */\n\titems: UploadItem[];\n\t/** File preview action; consumers own the effect. */\n\tonPreview?: (id: string) => void;\n\t/** Download action for completed files. Receives the stable item identity. */\n\tonDownload?: (id: string) => void;\n\tonCancel?: (id: string) => void;\n\tonRetry?: (id: string) => void;\n\tonRemove?: (id: string) => void;\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<UploadProgressListStrings>;\n}\n\n// Colour is reserved for the state that needs attention. A finished upload shows\n// its neutral file-type icon, like a selected FileUpload row.\nconst STATUS_TONE: Record<UploadStatus, { icon: typeof Check; fg: string }> = {\n\tqueued: { icon: Clock, fg: 'text-muted-foreground' },\n\tuploading: { icon: UploadCloud, fg: 'text-primary-accent' },\n\tdone: { icon: Check, fg: 'text-muted-foreground' },\n\terror: { icon: AlertCircle, fg: 'text-destructive' },\n\tcancelled: { icon: X, fg: 'text-muted-foreground' },\n};\n\nexport function UploadProgressList({\n\titems,\n\tonPreview,\n\tonDownload,\n\tonCancel,\n\tonRetry,\n\tonRemove,\n\tclassName,\n\tstrings: stringsProp,\n}: UploadProgressListProps) {\n\tconst strings = useStrings(defaultUploadProgressListStrings, stringsProp);\n\tconst statusLabel: Record<UploadStatus, string> = {\n\t\tqueued: strings.queued,\n\t\tuploading: strings.uploading,\n\t\tdone: strings.done,\n\t\terror: strings.error,\n\t\tcancelled: strings.cancelled,\n\t};\n\n\tif (items.length === 0) return null;\n\n\treturn (\n\t\t<Stack render={<ul />} gap=\"sm\" className={cn('upload-progress-list--component m-0 p-0 list-none', className)}>\n\t\t\t{items.map((item) => {\n\t\t\t\tconst tone = STATUS_TONE[item.status];\n\t\t\t\tconst Icon = tone.icon;\n\t\t\t\tconst pct = item.progress === undefined ? null : Number.isFinite(item.progress) ? Math.max(0, Math.min(100, item.progress ?? 0)) : 0;\n\t\t\t\tconst showProgress = item.status === 'uploading' || item.status === 'queued';\n\t\t\t\treturn (\n\t\t\t\t\t<Attachment key={item.id} render={<li />} variant=\"outline\" className=\"upload-progress-list--item flex-nowrap bg-card text-card-foreground\">\n\t\t\t\t\t\t<AttachmentMedia variant={item.preview ? 'image' : 'icon'} className={cn('upload-progress-list--media self-center group-has-data-[slot=item-description]/item:self-center', tone.fg)}>\n\t\t\t\t\t\t\t{item.preview ? <img src={item.preview} alt=\"\" /> : item.status === 'done' ? <AttachmentFileIcon name={item.name} kind={item.kind} /> : <Icon aria-hidden=\"true\" className={cn('size-icon', item.status === 'uploading' && 'animate-pulse motion-reduce:animate-none')} />}\n\t\t\t\t\t\t</AttachmentMedia>\n\t\t\t\t\t\t{/* Same anatomy as Attachment: name, size line, status line, one gap. */}\n\t\t\t\t\t\t<AttachmentContent className=\"min-w-0 gap-space-xs\">\n\t\t\t\t\t\t\t<AttachmentTitle className=\"min-w-0 max-w-full\" title={item.name}><Text tag=\"span\" type=\"inherit\" weight=\"medium\" className=\"truncate\">{item.name}</Text></AttachmentTitle>\n\t\t\t\t\t\t\t{(item.size !== undefined || item.bytes !== undefined) && (\n\t\t\t\t\t\t\t\t<AttachmentDescription clamp={1}>\n\t\t\t\t\t\t\t\t\t<SecondaryValue size=\"xs\" className=\"tabular-nums\">{item.size ?? <FileSize value={item.bytes} size=\"xs\" type=\"secondary\" />}</SecondaryValue>\n\t\t\t\t\t\t\t\t</AttachmentDescription>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<AttachmentDescription clamp=\"none\"><Text tag=\"span\" size=\"xs\" type={item.status === 'error' ? 'error' : 'secondary'} role={item.status === 'error' ? 'alert' : undefined}>{`${statusLabel[item.status]}${item.status === 'error' && item.error ? ` — ${item.error}` : ''}`}</Text></AttachmentDescription>\n\t\t\t\t\t\t\t{showProgress && <AttachmentProgress value={item.status === 'queued' && pct === null ? 0 : pct} aria-label={item.name} size=\"sm\" tone={item.status === 'queued' ? 'neutral' : 'primary'} className=\"upload-progress-list--progress\" />}\n\t\t\t\t\t\t</AttachmentContent>\n\t\t\t\t\t\t<AttachmentActions className=\"shrink-0\">\n {!!onPreview && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={`${strings.preview ?? 'Preview'} ${item.name}`} onClick={() => onPreview(item.id)}><Eye aria-hidden=\"true\" className=\"size-icon-md\" /></Button>}\n {!!onDownload && item.status === 'done' && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={`${strings.download ?? 'Download'} ${item.name}`} onClick={() => onDownload(item.id)}><Download aria-hidden=\"true\" className=\"size-icon-md\" /></Button>}\n\n\t\t\t\t\t\t\t\t{(item.status === 'uploading' || item.status === 'queued') && !!onCancel && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\t\t\taria-label={`${strings.cancel} ${item.name}`}\n\t\t\t\t\t\t\t\t\t\tonClick={() => onCancel(item.id)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<X className=\"size-icon-md\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{item.status === 'error' && !!onRetry && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\t\t\taria-label={`${strings.retry} ${item.name}`}\n\t\t\t\t\t\t\t\t\t\tonClick={() => onRetry(item.id)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-icon-md\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{(item.status === 'done' || item.status === 'error' || item.status === 'cancelled' || (item.status === 'queued' && !onCancel)) && !!onRemove && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\t\t\taria-label={`${strings.remove} ${item.name}`}\n\t\t\t\t\t\t\t\t\t\tonClick={() => onRemove(item.id)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<X className=\"size-icon-md\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</AttachmentActions>\n\t\t\t\t\t</Attachment>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Stack>\n\t);\n}\n\nUploadProgressList.displayName = 'UploadProgressList';\n","/**\n * UploadTray — the canonical \"drag-and-drop area + per-file progress\n * rows + summary toolbar\" surface. Composes:\n *\n * - `Dropzone` — drag/drop chrome + click-to-browse\n * - `UploadProgressList` — per-file row with status icon + progress\n * bar + cancel/retry/remove actions\n * - `Badge` — status counters in the toolbar\n * - `Button` — \"Clear all\" action\n *\n * Framework-agnostic. Every action is callback-driven — the library\n * doesn't perform the upload; it surfaces the UX. The consumer wires\n * the actual transfer (XHR, fetch, S3 multipart, …) and feeds back\n * `progress` / `status` updates by mutating the `items` array.\n *\n * Pair with `useFiles` (the existing client-side validation hook) at\n * the call site if you want pre-flight size/type rejection.\n */\nimport { forwardRef, useCallback } from 'react';\n\nimport { Badge } from '../badge';\nimport { Button } from '../buttons';\nimport { Stack } from '../structure';\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { Dropzone, type DropzoneProps } from '../upload/dropzone';\nimport { UploadProgressList, type UploadItem, type UploadProgressListStrings } from './upload-progress-list';\n\nexport interface UploadTrayStrings {\n\theading: string;\n\tcompletedLabel: string;\n\tfailedLabel: string;\n\tuploadingLabel: string;\n\tqueuedLabel: string;\n\tclearAll: string;\n}\n\nexport const defaultUploadTrayStrings: UploadTrayStrings = {\n\theading: 'Upload progress',\n\tcompletedLabel: 'Completed',\n\tfailedLabel: 'Failed',\n\tuploadingLabel: 'Uploading',\n\tqueuedLabel: 'Queued',\n\tclearAll: 'Clear all',\n};\n\nexport interface UploadTrayProps {\n\t/** Files currently in the tray (queued / uploading / done / error / cancelled). */\n\titems: UploadItem[];\n\t/**\n\t * Fires when the user drops or browses files. The library does NOT\n\t * write to the items array — the consumer turns these into queued\n\t * `UploadItem`s, kicks off the actual transfer, and updates progress.\n\t */\n\tonAddFiles: (files: File[]) => void;\n\t/** Preview callback forwarded with the item identity. */\n\tonPreview?: (id: string) => void;\n\t/** Download callback for completed files, forwarded with the item identity. */\n\tonDownload?: (id: string) => void;\n\t/** Per-row cancel handler (passed through to UploadProgressList). */\n\tonCancel?: (id: string) => void;\n\t/** Per-row retry handler. */\n\tonRetry?: (id: string) => void;\n\t/** Per-row remove handler. */\n\tonRemove?: (id: string) => void;\n\t/**\n\t * Clears the entire tray. When omitted, the \"Clear all\" button is\n\t * hidden — useful for surfaces where in-flight uploads can't be\n\t * cancelled in bulk.\n\t */\n\tonClearAll?: () => void;\n\t/** Forwarded to the inner `<Dropzone>`. Only the meaningful subset. */\n\tdropzone?: Pick<DropzoneProps, 'accept' | 'multiple' | 'size' | 'disabled' | 'invalid' | 'strings'>;\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<UploadTrayStrings>;\n\t/** Strings forwarded to the inner `<UploadProgressList>`. */\n\tlistStrings?: StringsProp<UploadProgressListStrings>;\n}\n\nfunction countStatus(items: UploadItem[]) {\n\tlet completed = 0;\n\tlet failed = 0;\n\tlet uploading = 0;\n\tlet queued = 0;\n\tfor (const item of items) {\n\t\tif (item.status === 'done') completed += 1;\n\t\telse if (item.status === 'error') failed += 1;\n\t\telse if (item.status === 'uploading') uploading += 1;\n\t\telse if (item.status === 'queued') queued += 1;\n\t}\n\treturn { completed, failed, uploading, queued };\n}\n\nexport const UploadTray = forwardRef<HTMLDivElement, UploadTrayProps>(function UploadTray(\n\t{\n\t\titems,\n\t\tonAddFiles,\n\t\tonPreview,\n\t\tonDownload,\n\t\tonCancel,\n\t\tonRetry,\n\t\tonRemove,\n\t\tonClearAll,\n\t\tdropzone,\n\t\tclassName,\n\t\tstrings: stringsProp,\n\t\tlistStrings,\n\t},\n\tref,\n) {\n\tconst strings = useStrings(defaultUploadTrayStrings, stringsProp);\n\tconst { completed, failed, uploading, queued } = countStatus(items);\n\n\tconst handleDrop = useCallback(\n\t\t(files: File[]) => {\n\t\t\tif (files.length > 0) onAddFiles(files);\n\t\t},\n\t\t[onAddFiles],\n\t);\n\n\tconst hasItems = items.length > 0;\n\n\treturn (\n\t\t<Stack ref={ref} gap=\"md\" className={cn('upload-tray--component', className)}>\n\t\t\t<Dropzone\n\t\t\t\tonDrop={handleDrop}\n\t\t\t\taccept={dropzone?.accept}\n\t\t\t\tmultiple={dropzone?.multiple}\n\t\t\t\tsize={dropzone?.size}\n\t\t\t\tdisabled={dropzone?.disabled}\n\t\t\t\tinvalid={dropzone?.invalid}\n\t\t\t\tstrings={dropzone?.strings}\n\t\t\t/>\n\n\t\t\t{!!hasItems && (\n\t\t\t\t<>\n\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" justify=\"between\" gap=\"md\">\n\t\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"md\">\n\t\t\t\t\t\t\t<Text tag=\"span\" type=\"inherit\" weight=\"semibold\">\n\t\t\t\t\t\t\t\t{strings.heading}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t{completed > 0 && (\n\t\t\t\t\t\t\t\t<Badge tone=\"success\">\n\t\t\t\t\t\t\t\t\t{strings.completedLabel}: {completed}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{failed > 0 && (\n\t\t\t\t\t\t\t\t<Badge tone=\"destructive\">\n\t\t\t\t\t\t\t\t\t{strings.failedLabel}: {failed}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{uploading > 0 && (\n\t\t\t\t\t\t\t\t<Badge tone=\"info\">\n\t\t\t\t\t\t\t\t\t{strings.uploadingLabel}: {uploading}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{queued > 0 && (\n\t\t\t\t\t\t\t\t<Badge tone=\"secondary\">\n\t\t\t\t\t\t\t\t\t{strings.queuedLabel}: {queued}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t{!!onClearAll && (\n\t\t\t\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" onClick={onClearAll}>\n\t\t\t\t\t\t\t\t{strings.clearAll}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\n\t\t\t\t\t<UploadProgressList\n\t\t\t\t\t\titems={items}\n\t\t\t\t\t\tonPreview={onPreview}\n\t\t\t\t\t\tonDownload={onDownload}\n\t\t\t\t\t\tonCancel={onCancel}\n\t\t\t\t\t\tonRetry={onRetry}\n\t\t\t\t\t\tonRemove={onRemove}\n\t\t\t\t\t\tstrings={listStrings}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</Stack>\n\t);\n});\n\nUploadTray.displayName = 'UploadTray';\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,IAAaqB,IAAkBC,EAC9B,SACC,EAAE,cAAW,YAAS,YAAS,GAAGC,KAClC,GACC;CACD,IAAMC,KAAe,MAAwC;EAG5D,AAFAC,EAAM,gBAAgB,GACtBC,IAAUD,CAAK,GACVA,EAAM,qBAGV,EAAM,cAAc,QAAQ;CAE9B,GAEME,KAAgB,MAAyC;EAC9D,IAAMC,IAAQH,EAAM,cAAc;EAClC,AAAIG,GAAO,UAAUC,EAAQ,MAAM,KAAKD,CAAK,CAAC,MAAM,OACnD,EAAM,cAAc,QAAQ;CAE9B;CAEA,OACC,kBAAC,SAAD;EACC,GAAIL;EACC;EACL,MAAK;EACL,aAAU;EACV,WAAWpB,EAAG,wCAAwC2B,CAAS;EAC/D,SAASN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ACrC,UAAAkC,EAAQ;KACJ,CAAA;KACLyC,IAAY,KACZ,kBAACvE,GAAD;MAAO,MAAK;MAAZ,UAAA;OACE8B,EAAQ;OAAe;OAAGyC;MACrB;;KAEPC,IAAS,KACT,kBAACxE,GAAD;MAAO,MAAK;MAAZ,UAAA;OACE8B,EAAQ;OAAY;OAAG0C;MAClB;;KAEPC,IAAY,KACZ,kBAACzE,GAAD;MAAO,MAAK;MAAZ,UAAA;OACE8B,EAAQ;OAAe;OAAG2C;MACrB;;KAEPC,IAAS,KACT,kBAAC1E,GAAD;MAAO,MAAK;MAAZ,UAAA;OACE8B,EAAQ;OAAY;OAAG4C;MAClB;;IAEF;GACN,CAAA,GAAA,CAAC,CAACO,KACF,kBAACtF,GAAD;IAAQ,MAAK;IAAS,MAAK;IAAY,aAAY;IAAQ,SAASsF;IAClE,UAAAnD,EAAQ;GACF,CAAA,CAEH;EAEP,CAAA,GAAA,kBAACuB,GAAD;GACQ;GACI;GACC;GACF;GACD;GACC;GACV,SAAS6B;EACT,CAAA,CACA,EAAA,CAAA,CAEG;;AAET,CAAC;AAED,EAAW,cAAc"}
1
+ {"version":3,"file":"upload-queue-DhQJiSRc.js","names":["_Fragment","useDensityConfig","resolveComponentScale","cn","Button","Text","Stack","SecondaryValue","FileSize","Badge","useFileDropTarget","uploadDropTargetRecipes","AttachmentFileIcon","AttachmentTitle","AttachmentDescription","AttachmentActions","AttachmentMedia","AttachmentContent","AttachmentProgress","Attachment","Fragment$1","FilePickerInput","forwardRef","props","handleClick","event","onClick","handleChange","files","onFiles","className","defaultDropzoneStrings","SIZE_CHROME","assignInputRef","forwardedRef","node","DropzoneImpl","sizeProp","stringsProp","strings","useStrings","generatedId","useId","inputId","inputProps","onDrop","chrome","defaultScale","dropTargetProps","disabled","invalid","isDragging","icon","UploadCloud","children","Dropzone","defaultUploadProgressListStrings","STATUS_TONE","Clock","Check","AlertCircle","X","UploadProgressList","statusLabel","items","tone","item","Icon","pct","showProgress","onPreview","Eye","onDownload","Download","onCancel","onRetry","RefreshCw","onRemove","defaultUploadTrayStrings","countStatus","completed","failed","uploading","queued","UploadTray","handleDrop","useCallback","onAddFiles","hasItems","dropzone","onClearAll","listStrings"],"sources":["../src/components/base/upload/file-picker-input.tsx","../src/components/base/upload/dropzone.tsx","../src/components/base/upload-queue/upload-progress-list.tsx","../src/components/base/upload-queue/upload-tray.tsx"],"sourcesContent":["import {\n\tforwardRef,\n\ttype ChangeEvent,\n\ttype InputHTMLAttributes,\n\ttype MouseEvent,\n} from 'react';\n\nimport { cn } from '../../../lib/utils';\n\ntype DataAttributes = {\n\t[key: `data-${string}`]: string | number | boolean | undefined;\n};\n\nexport type FilePickerNativeInputProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t'type' | 'value' | 'defaultValue' | 'onChange' | 'children'\n> & DataAttributes;\n\nexport type FilePickerInputProps = FilePickerNativeInputProps & {\n\t/** Return `false` when the native FileList must be cleared (for example, after rejection). */\n\tonFiles: (files: File[]) => boolean | void;\n};\n\n/** Shared native-input plumbing for FileUpload and Dropzone. Not a public export. */\nexport const FilePickerInput = forwardRef<HTMLInputElement, FilePickerInputProps>(\n\tfunction FilePickerInput(\n\t\t{ className, onFiles, onClick, ...props },\n\t\tref,\n\t) {\n\t\tconst handleClick = (event: MouseEvent<HTMLInputElement>) => {\n\t\t\tevent.stopPropagation();\n\t\t\tonClick?.(event);\n\t\t\tif (!event.defaultPrevented) {\n\t\t\t\t// Clearing before the picker opens makes choosing the same file again\n\t\t\t\t// observable without retaining an opaque native FileList as state.\n\t\t\t\tevent.currentTarget.value = '';\n\t\t\t}\n\t\t};\n\n\t\tconst handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n\t\t\tconst files = event.currentTarget.files;\n\t\t\tif (files?.length && onFiles(Array.from(files)) === false) {\n\t\t\t\tevent.currentTarget.value = '';\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t\ttype=\"file\"\n\t\t\t\tdata-slot=\"file-picker-input\"\n\t\t\t\tclassName={cn('file-picker-input--component sr-only', className)}\n\t\t\t\tonClick={handleClick}\n\t\t\t\tonChange={handleChange}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nFilePickerInput.displayName = 'FilePickerInput';\n","/**\n * Dropzone — accessible drag-and-drop chrome with a native file-input fallback.\n * It owns no validation or file state; consumers receive local `File` values.\n */\nimport { forwardRef, useId, type ForwardedRef, type ReactNode } from 'react';\nimport { UploadCloud } from 'lucide-react';\n\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { useDensityConfig, type ComponentScale } from '../../../lib/ui-provider';\nimport { resolveComponentScale } from '../../../lib/ui-provider/scale';\nimport { cn } from '../../../lib/utils';\n\nimport {\n\tFilePickerInput,\n\ttype FilePickerNativeInputProps,\n} from './file-picker-input';\nimport { useFileDropTarget } from './use-file-drop-target';\nimport { uploadDropTargetRecipes } from './upload.recipes';\n\nexport type DropzoneSize = ComponentScale;\n\nexport interface DropzoneStrings {\n\tinstruction: string;\n\thelper: string;\n\tdragOver: string;\n}\n\nexport const defaultDropzoneStrings: DropzoneStrings = {\n\tinstruction: 'Drag files here or click to browse',\n\thelper: '',\n\tdragOver: 'Release to select',\n};\n\nexport type DropzoneInputProps = Omit<\n\tFilePickerNativeInputProps,\n\t'accept' | 'disabled' | 'multiple'\n>;\n\nexport interface DropzoneProps {\n\tonDrop: (files: File[]) => void;\n\t/** Accepted MIME types or extensions. */\n\taccept?: string;\n\t/** Allows more than one file to be dropped. */\n\tmultiple?: boolean;\n\t/** Disables the control and blocks drops. */\n\tdisabled?: boolean;\n\t/** Applies the invalid styling. */\n\tinvalid?: boolean;\n\t/** Height preset for the drop target. */\n\tsize?: DropzoneSize;\n\t/** Glyph shown inside the drop target. */\n\ticon?: ReactNode;\n\tclassName?: string;\n\t/** Native form, ARIA, data, and event attributes forwarded to the file input. */\n\tinputProps?: DropzoneInputProps;\n\t/** Optional action rendered outside the input label, so nested controls remain valid. */\n\tchildren?: ReactNode;\n\t/** Overrides the prompt and constraint copy. */\n\tstrings?: StringsProp<DropzoneStrings>;\n}\n\nconst SIZE_CHROME: Record<\n\tDropzoneSize,\n\t{ padding: string; minHeight: string; iconSize: string }\n> = {\n\tsm: {\n\t\tpadding: 'p-surface-xs',\n\t\tminHeight: 'min-h-24',\n\t\ticonSize: 'size-icon',\n\t},\n\tmd: {\n\t\tpadding: 'p-surface',\n\t\tminHeight: 'min-h-32',\n\t\ticonSize: 'size-icon-lg',\n\t},\n\tlg: {\n\t\tpadding: 'p-surface-lg',\n\t\tminHeight: 'min-h-40',\n\t\ticonSize: 'size-icon-lg',\n\t},\n};\n\nfunction assignInputRef(\n\tnode: HTMLInputElement | null,\n\tforwardedRef: ForwardedRef<HTMLInputElement>,\n) {\n\tif (typeof forwardedRef === 'function') forwardedRef(node);\n\telse if (forwardedRef) forwardedRef.current = node;\n}\n\nfunction DropzoneImpl(\n\t{\n\t\tonDrop,\n\t\taccept,\n\t\tmultiple = false,\n\t\tdisabled = false,\n\t\tinvalid = false,\n\t\tsize: sizeProp,\n\t\ticon,\n\t\tclassName,\n\t\tinputProps,\n\t\tchildren,\n\t\tstrings: stringsProp,\n\t}: DropzoneProps,\n\tforwardedRef: ForwardedRef<HTMLInputElement>,\n) {\n\tconst { defaultScale } = useDensityConfig();\n\tconst strings = useStrings(defaultDropzoneStrings, stringsProp);\n\tconst generatedId = useId();\n\tconst inputId = inputProps?.id ?? `dropzone-${generatedId}`;\n\tconst { isDragging, dropTargetProps } = useFileDropTarget({\n\t\tdisabled,\n\t\tonFiles: onDrop,\n\t});\n\tconst resolvedSize = resolveComponentScale(sizeProp, defaultScale);\n\tconst chrome = SIZE_CHROME[resolvedSize];\n\n\treturn (\n\t\t<div\n\t\t\t{...dropTargetProps}\n\t\t\tdata-disabled={disabled || undefined}\n\t\t\tdata-invalid={invalid || undefined}\n\t\t\tdata-dragging={isDragging || undefined}\n\t\t\tclassName={cn(\n\t\t\t\t'dropzone--component relative flex flex-col items-center justify-center gap-space-md rounded-radius border border-dashed text-center transition-colors duration-150',\n\t\t\t\t'has-[[data-slot=file-picker-input]:focus-visible]:ring-3',\n\t\t\t\tchrome.minHeight,\n\t\t\t\tchrome.padding,\n\t\t\t\tinvalid ? cn(uploadDropTargetRecipes.invalid, uploadDropTargetRecipes.focus.filePicker.invalid) : cn(uploadDropTargetRecipes.idle, uploadDropTargetRecipes.focus.filePicker.valid),\n\t\t\t\tinvalid\n\t\t\t\t\t? !disabled && uploadDropTargetRecipes.invalidHover\n\t\t\t\t\t: !disabled && uploadDropTargetRecipes.hover,\n\t\t\t\tdisabled && 'cursor-not-allowed opacity-50',\n\t\t\t\t!disabled && isDragging && (\n\t\t\t\t\tinvalid\n\t\t\t\t\t\t? uploadDropTargetRecipes.invalidDragging\n\t\t\t\t\t\t: uploadDropTargetRecipes.dragging\n\t\t\t\t),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<FilePickerInput\n\t\t\t\t{...inputProps}\n\t\t\t\tref={(node) => assignInputRef(node, forwardedRef)}\n\t\t\t\tid={inputId}\n\t\t\t\taccept={accept}\n\t\t\t\tmultiple={multiple}\n\t\t\t\tdisabled={disabled}\n\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\tclassName={cn('dropzone--input', inputProps?.className)}\n\t\t\t\tonFiles={onDrop}\n\t\t\t/>\n\n\t\t\t<label\n\t\t\t\thtmlFor={disabled ? undefined : inputId}\n\t\t\t\taria-disabled={disabled || undefined}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'dropzone--trigger flex w-full flex-1 cursor-pointer flex-col items-center justify-center gap-space-md',\n\t\t\t\t\tdisabled && 'cursor-not-allowed',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{/* The glyph names the affordance; it needs no tinted tile around it. */}\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"dropzone--icon inline-flex items-center justify-center text-muted-foreground\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{icon ?? <UploadCloud className={chrome.iconSize} />}\n\t\t\t\t</span>\n\n\t\t\t\t{/* Text sets its own start alignment, and the copy column is as wide as\n\t\t\t\t its longest line, so each line centres itself. */}\n\t\t\t\t<span className=\"dropzone--copy grid gap-normal\">\n\t\t\t\t\t<Text\n\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\tweight=\"medium\"\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tclassName=\"dropzone--instruction\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{isDragging ? strings.dragOver : strings.instruction}\n\t\t\t\t\t</Text>\n\t\t\t\t\t{!!strings.helper && (\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\ttag=\"span\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t\tclassName=\"dropzone--helper\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{strings.helper}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t</label>\n\n\t\t\t{!!children && <div className=\"dropzone--action\">{children}</div>}\n\t\t</div>\n\t);\n}\n\nconst Dropzone = forwardRef<HTMLInputElement, DropzoneProps>(DropzoneImpl);\nDropzone.displayName = 'Dropzone';\n\nexport { Dropzone };\n","/**\n * UploadProgressList — render-only list of in-flight uploads. Each row shows\n * a status icon (queued / uploading / done / error / cancelled), filename,\n * size, a progress bar driven by `progress` (0–100), and an action button\n * that maps to the row's status (cancel while uploading, retry on error,\n * remove when done). Pair with FileUpload / MediaGallery / Dropzone — those\n * components emit raw `File` instances; this one displays the upload UI\n * once the consumer has wired them to its API.\n *\n * Strings overridable for i18n.\n */\nimport { AlertCircle, Check, Clock, RefreshCw, UploadCloud, X, Eye, Download } from 'lucide-react';\nimport { Button } from '../buttons';\nimport { Stack } from '../structure';\nimport { SecondaryValue } from '../../primitives';\nimport { Attachment, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentProgress, AttachmentFileIcon, type AttachmentKind } from '../attachment';\nimport { FileSize } from '../../primitives';\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nexport type UploadStatus = 'queued' | 'uploading' | 'done' | 'error' | 'cancelled';\n\nexport interface UploadItem {\n\t/** Stable identity for this entry. */\n\tid: string;\n\t/** Displayed file name. */\n\tname: string;\n\t/** Pre-formatted size string (e.g. \"2.4 MB\"). */\n\tsize?: string;\n\t/** Numeric file size used when the formatted size is absent. */\n\tbytes?: number;\n\tkind?: AttachmentKind;\n\t/** Upload progress 0–100. Omit for an indeterminate transfer. Ignored when status is `done`/`error`/`cancelled`. */\n\tprogress?: number;\n\tstatus: UploadStatus;\n\t/** Error message rendered under the row when status is `error`. */\n\terror?: string;\n\t/**\n\t * Optional thumbnail URL, shown in place of the status icon.\n\t * The status remains visible beside the file name.\n\t */\n\tpreview?: string;\n}\n\nexport interface UploadProgressListStrings {\n\tqueued: string;\n\tuploading: string;\n\tdone: string;\n\terror: string;\n\tcancelled: string;\n\tcancel: string;\n\tretry: string;\n\tremove: string;\n\tpreview?: string;\n\tdownload?: string;\n}\n\nexport const defaultUploadProgressListStrings: UploadProgressListStrings = {\n\tqueued: 'Queued',\n\tuploading: 'Uploading',\n\tdone: 'Uploaded',\n\terror: 'Failed',\n\tcancelled: 'Cancelled',\n\tcancel: 'Cancel',\n\tretry: 'Retry',\n\tremove: 'Remove',\n\tpreview: 'Preview',\n\tdownload: 'Download',\n};\n\nexport interface UploadProgressListProps {\n\t/** Entries to render, in order. */\n\titems: UploadItem[];\n\t/** File preview action; consumers own the effect. */\n\tonPreview?: (id: string) => void;\n\t/** Download action for completed files. Receives the stable item identity. */\n\tonDownload?: (id: string) => void;\n\tonCancel?: (id: string) => void;\n\tonRetry?: (id: string) => void;\n\tonRemove?: (id: string) => void;\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<UploadProgressListStrings>;\n}\n\n// Colour is reserved for the state that needs attention. A finished upload shows\n// its neutral file-type icon, like a selected FileUpload row.\nconst STATUS_TONE: Record<UploadStatus, { icon: typeof Check; fg: string }> = {\n\tqueued: { icon: Clock, fg: 'text-muted-foreground' },\n\tuploading: { icon: UploadCloud, fg: 'text-primary-accent' },\n\tdone: { icon: Check, fg: 'text-muted-foreground' },\n\terror: { icon: AlertCircle, fg: 'text-destructive' },\n\tcancelled: { icon: X, fg: 'text-muted-foreground' },\n};\n\nexport function UploadProgressList({\n\titems,\n\tonPreview,\n\tonDownload,\n\tonCancel,\n\tonRetry,\n\tonRemove,\n\tclassName,\n\tstrings: stringsProp,\n}: UploadProgressListProps) {\n\tconst strings = useStrings(defaultUploadProgressListStrings, stringsProp);\n\tconst statusLabel: Record<UploadStatus, string> = {\n\t\tqueued: strings.queued,\n\t\tuploading: strings.uploading,\n\t\tdone: strings.done,\n\t\terror: strings.error,\n\t\tcancelled: strings.cancelled,\n\t};\n\n\tif (items.length === 0) return null;\n\n\treturn (\n\t\t<Stack render={<ul />} gap=\"sm\" className={cn('upload-progress-list--component m-0 p-0 list-none', className)}>\n\t\t\t{items.map((item) => {\n\t\t\t\tconst tone = STATUS_TONE[item.status];\n\t\t\t\tconst Icon = tone.icon;\n\t\t\t\tconst pct = item.progress === undefined ? null : Number.isFinite(item.progress) ? Math.max(0, Math.min(100, item.progress ?? 0)) : 0;\n\t\t\t\tconst showProgress = item.status === 'uploading' || item.status === 'queued';\n\t\t\t\treturn (\n\t\t\t\t\t<Attachment key={item.id} render={<li />} variant=\"outline\" className=\"upload-progress-list--item flex-nowrap bg-card text-card-foreground\">\n\t\t\t\t\t\t<AttachmentMedia variant={item.preview ? 'image' : 'icon'} className={cn('upload-progress-list--media self-center group-has-data-[slot=item-description]/item:self-center', tone.fg)}>\n\t\t\t\t\t\t\t{item.preview ? <img src={item.preview} alt=\"\" /> : item.status === 'done' ? <AttachmentFileIcon name={item.name} kind={item.kind} /> : <Icon aria-hidden=\"true\" className={cn('size-icon', item.status === 'uploading' && 'animate-pulse motion-reduce:animate-none')} />}\n\t\t\t\t\t\t</AttachmentMedia>\n\t\t\t\t\t\t{/* Same anatomy as Attachment: name, size line, status line, one gap. */}\n\t\t\t\t\t\t<AttachmentContent className=\"min-w-0 gap-space-xs\">\n\t\t\t\t\t\t\t<AttachmentTitle className=\"min-w-0 max-w-full\" title={item.name}><Text tag=\"span\" type=\"inherit\" weight=\"medium\" className=\"truncate\">{item.name}</Text></AttachmentTitle>\n\t\t\t\t\t\t\t{(item.size !== undefined || item.bytes !== undefined) && (\n\t\t\t\t\t\t\t\t<AttachmentDescription clamp={1}>\n\t\t\t\t\t\t\t\t\t<SecondaryValue size=\"xs\" className=\"tabular-nums\">{item.size ?? <FileSize value={item.bytes} size=\"xs\" type=\"secondary\" />}</SecondaryValue>\n\t\t\t\t\t\t\t\t</AttachmentDescription>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<AttachmentDescription clamp=\"none\"><Text tag=\"span\" size=\"xs\" type={item.status === 'error' ? 'error' : 'secondary'} role={item.status === 'error' ? 'alert' : undefined}>{`${statusLabel[item.status]}${item.status === 'error' && item.error ? ` — ${item.error}` : ''}`}</Text></AttachmentDescription>\n\t\t\t\t\t\t\t{showProgress && <AttachmentProgress value={item.status === 'queued' && pct === null ? 0 : pct} aria-label={item.name} size=\"sm\" tone={item.status === 'queued' ? 'neutral' : 'primary'} className=\"upload-progress-list--progress\" />}\n\t\t\t\t\t\t</AttachmentContent>\n\t\t\t\t\t\t<AttachmentActions className=\"shrink-0\">\n {!!onPreview && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={`${strings.preview ?? 'Preview'} ${item.name}`} onClick={() => onPreview(item.id)}><Eye aria-hidden=\"true\" className=\"size-icon-md\" /></Button>}\n {!!onDownload && item.status === 'done' && <Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={`${strings.download ?? 'Download'} ${item.name}`} onClick={() => onDownload(item.id)}><Download aria-hidden=\"true\" className=\"size-icon-md\" /></Button>}\n\n\t\t\t\t\t\t\t\t{(item.status === 'uploading' || item.status === 'queued') && !!onCancel && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\t\t\taria-label={`${strings.cancel} ${item.name}`}\n\t\t\t\t\t\t\t\t\t\tonClick={() => onCancel(item.id)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<X className=\"size-icon-md\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{item.status === 'error' && !!onRetry && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\t\t\taria-label={`${strings.retry} ${item.name}`}\n\t\t\t\t\t\t\t\t\t\tonClick={() => onRetry(item.id)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<RefreshCw className=\"size-icon-md\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{(item.status === 'done' || item.status === 'error' || item.status === 'cancelled' || (item.status === 'queued' && !onCancel)) && !!onRemove && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\ticonOnly\n\t\t\t\t\t\t\t\t\t\taria-label={`${strings.remove} ${item.name}`}\n\t\t\t\t\t\t\t\t\t\tonClick={() => onRemove(item.id)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<X className=\"size-icon-md\" />\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</AttachmentActions>\n\t\t\t\t\t</Attachment>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Stack>\n\t);\n}\n\nUploadProgressList.displayName = 'UploadProgressList';\n","/**\n * UploadTray — the canonical \"drag-and-drop area + per-file progress\n * rows + summary toolbar\" surface. Composes:\n *\n * - `Dropzone` — drag/drop chrome + click-to-browse\n * - `UploadProgressList` — per-file row with status icon + progress\n * bar + cancel/retry/remove actions\n * - `Badge` — status counters in the toolbar\n * - `Button` — \"Clear all\" action\n *\n * Framework-agnostic. Every action is callback-driven — the library\n * doesn't perform the upload; it surfaces the UX. The consumer wires\n * the actual transfer (XHR, fetch, S3 multipart, …) and feeds back\n * `progress` / `status` updates by mutating the `items` array.\n *\n * Pair with `useFiles` (the existing client-side validation hook) at\n * the call site if you want pre-flight size/type rejection.\n */\nimport { forwardRef, useCallback } from 'react';\n\nimport { Badge } from '../badge';\nimport { Button } from '../buttons';\nimport { Stack } from '../structure';\nimport { Text } from '../../typography';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { Dropzone, type DropzoneProps } from '../upload/dropzone';\nimport { UploadProgressList, type UploadItem, type UploadProgressListStrings } from './upload-progress-list';\n\nexport interface UploadTrayStrings {\n\theading: string;\n\tcompletedLabel: string;\n\tfailedLabel: string;\n\tuploadingLabel: string;\n\tqueuedLabel: string;\n\tclearAll: string;\n}\n\nexport const defaultUploadTrayStrings: UploadTrayStrings = {\n\theading: 'Upload progress',\n\tcompletedLabel: 'Completed',\n\tfailedLabel: 'Failed',\n\tuploadingLabel: 'Uploading',\n\tqueuedLabel: 'Queued',\n\tclearAll: 'Clear all',\n};\n\nexport interface UploadTrayProps {\n\t/** Files currently in the tray (queued / uploading / done / error / cancelled). */\n\titems: UploadItem[];\n\t/**\n\t * Fires when the user drops or browses files. The library does NOT\n\t * write to the items array — the consumer turns these into queued\n\t * `UploadItem`s, kicks off the actual transfer, and updates progress.\n\t */\n\tonAddFiles: (files: File[]) => void;\n\t/** Preview callback forwarded with the item identity. */\n\tonPreview?: (id: string) => void;\n\t/** Download callback for completed files, forwarded with the item identity. */\n\tonDownload?: (id: string) => void;\n\t/** Per-row cancel handler (passed through to UploadProgressList). */\n\tonCancel?: (id: string) => void;\n\t/** Per-row retry handler. */\n\tonRetry?: (id: string) => void;\n\t/** Per-row remove handler. */\n\tonRemove?: (id: string) => void;\n\t/**\n\t * Clears the entire tray. When omitted, the \"Clear all\" button is\n\t * hidden — useful for surfaces where in-flight uploads can't be\n\t * cancelled in bulk.\n\t */\n\tonClearAll?: () => void;\n\t/** Forwarded to the inner `<Dropzone>`. Only the meaningful subset. */\n\tdropzone?: Pick<DropzoneProps, 'accept' | 'multiple' | 'size' | 'disabled' | 'invalid' | 'strings'>;\n\tclassName?: string;\n\t/** Overrides this surface's own copy. */\n\tstrings?: StringsProp<UploadTrayStrings>;\n\t/** Strings forwarded to the inner `<UploadProgressList>`. */\n\tlistStrings?: StringsProp<UploadProgressListStrings>;\n}\n\nfunction countStatus(items: UploadItem[]) {\n\tlet completed = 0;\n\tlet failed = 0;\n\tlet uploading = 0;\n\tlet queued = 0;\n\tfor (const item of items) {\n\t\tif (item.status === 'done') completed += 1;\n\t\telse if (item.status === 'error') failed += 1;\n\t\telse if (item.status === 'uploading') uploading += 1;\n\t\telse if (item.status === 'queued') queued += 1;\n\t}\n\treturn { completed, failed, uploading, queued };\n}\n\nexport const UploadTray = forwardRef<HTMLDivElement, UploadTrayProps>(function UploadTray(\n\t{\n\t\titems,\n\t\tonAddFiles,\n\t\tonPreview,\n\t\tonDownload,\n\t\tonCancel,\n\t\tonRetry,\n\t\tonRemove,\n\t\tonClearAll,\n\t\tdropzone,\n\t\tclassName,\n\t\tstrings: stringsProp,\n\t\tlistStrings,\n\t},\n\tref,\n) {\n\tconst strings = useStrings(defaultUploadTrayStrings, stringsProp);\n\tconst { completed, failed, uploading, queued } = countStatus(items);\n\n\tconst handleDrop = useCallback(\n\t\t(files: File[]) => {\n\t\t\tif (files.length > 0) onAddFiles(files);\n\t\t},\n\t\t[onAddFiles],\n\t);\n\n\tconst hasItems = items.length > 0;\n\n\treturn (\n\t\t<Stack ref={ref} gap=\"md\" className={cn('upload-tray--component', className)}>\n\t\t\t<Dropzone\n\t\t\t\tonDrop={handleDrop}\n\t\t\t\taccept={dropzone?.accept}\n\t\t\t\tmultiple={dropzone?.multiple}\n\t\t\t\tsize={dropzone?.size}\n\t\t\t\tdisabled={dropzone?.disabled}\n\t\t\t\tinvalid={dropzone?.invalid}\n\t\t\t\tstrings={dropzone?.strings}\n\t\t\t/>\n\n\t\t\t{!!hasItems && (\n\t\t\t\t<>\n\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" justify=\"between\" gap=\"md\">\n\t\t\t\t\t\t<Stack direction=\"horizontal\" wrap align=\"center\" gap=\"md\">\n\t\t\t\t\t\t\t<Text tag=\"span\" type=\"inherit\" weight=\"semibold\">\n\t\t\t\t\t\t\t\t{strings.heading}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t{completed > 0 && (\n\t\t\t\t\t\t\t\t<Badge tone=\"success\">\n\t\t\t\t\t\t\t\t\t{strings.completedLabel}: {completed}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{failed > 0 && (\n\t\t\t\t\t\t\t\t<Badge tone=\"destructive\">\n\t\t\t\t\t\t\t\t\t{strings.failedLabel}: {failed}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{uploading > 0 && (\n\t\t\t\t\t\t\t\t<Badge tone=\"info\">\n\t\t\t\t\t\t\t\t\t{strings.uploadingLabel}: {uploading}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{queued > 0 && (\n\t\t\t\t\t\t\t\t<Badge tone=\"secondary\">\n\t\t\t\t\t\t\t\t\t{strings.queuedLabel}: {queued}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t{!!onClearAll && (\n\t\t\t\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" onClick={onClearAll}>\n\t\t\t\t\t\t\t\t{strings.clearAll}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\n\t\t\t\t\t<UploadProgressList\n\t\t\t\t\t\titems={items}\n\t\t\t\t\t\tonPreview={onPreview}\n\t\t\t\t\t\tonDownload={onDownload}\n\t\t\t\t\t\tonCancel={onCancel}\n\t\t\t\t\t\tonRetry={onRetry}\n\t\t\t\t\t\tonRemove={onRemove}\n\t\t\t\t\t\tstrings={listStrings}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</Stack>\n\t);\n});\n\nUploadTray.displayName = 'UploadTray';\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,IAAaqB,IAAkBC,EAC9B,SACC,EAAE,cAAW,YAAS,YAAS,GAAGC,KAClC,GACC;CACD,IAAMC,KAAe,MAAwC;EAG5D,AAFAC,EAAM,gBAAgB,GACtBC,IAAUD,CAAK,GACVA,EAA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