@nldd/design-system 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (576) hide show
  1. package/custom-elements.json +521 -57
  2. package/dist/cdn/autoloader.js +181 -0
  3. package/dist/cdn/chunks/activity-indicator-JglZJ8dh.js +356 -0
  4. package/dist/cdn/chunks/activity-indicator.i18n-D7mCy6d2.js +3 -0
  5. package/dist/cdn/chunks/avatar-ASqePVhU.js +308 -0
  6. package/dist/cdn/chunks/avatar-group-rknt4FBO.js +338 -0
  7. package/dist/cdn/chunks/avatar-group.i18n-BYw_9wt_.js +7 -0
  8. package/dist/cdn/chunks/avatar.i18n-CMwQjBkS.js +7 -0
  9. package/dist/cdn/chunks/badge-Cc2Nufoc.js +323 -0
  10. package/dist/cdn/chunks/badge.i18n-DqW7hLQj.js +3 -0
  11. package/dist/cdn/chunks/banner-BLVKM07M.js +325 -0
  12. package/dist/cdn/chunks/banner.i18n-BOCM9rGN.js +3 -0
  13. package/dist/cdn/chunks/bar-split-view-Clbg-p9H.js +259 -0
  14. package/dist/cdn/chunks/base-CfuoYRhN.js +3 -0
  15. package/dist/cdn/chunks/blockquote-BoOqbGdm.js +189 -0
  16. package/dist/cdn/chunks/box-WkhyjQVy.js +88 -0
  17. package/dist/cdn/chunks/breadcrumbs-D9YxZzRj.js +162 -0
  18. package/dist/cdn/chunks/breadcrumbs.i18n-zmO8jaTO.js +3 -0
  19. package/dist/cdn/chunks/breakpoints-Cwor8TRP.js +15 -0
  20. package/dist/cdn/chunks/button-DO90Lo6q.js +863 -0
  21. package/dist/cdn/chunks/button-bar-Bxgdbyh3.js +225 -0
  22. package/dist/cdn/chunks/button-group-BYGPPLmZ.js +205 -0
  23. package/dist/{components/button.i18n-DiDGynnq.js → cdn/chunks/button.i18n-BGFt7Z9u.js} +2 -2
  24. package/dist/cdn/chunks/card-BP0jfOkS.js +262 -0
  25. package/dist/cdn/chunks/card.i18n-CpafLm3i.js +8 -0
  26. package/dist/cdn/chunks/carried-context-DlMSujiJ.js +37 -0
  27. package/dist/cdn/chunks/cell-BRD2ilQh.js +144 -0
  28. package/dist/cdn/chunks/checkbox-Cazx8CQn.js +296 -0
  29. package/dist/cdn/chunks/checkbox-field-DDZ-B6vH.js +157 -0
  30. package/dist/cdn/chunks/class-map-CXSdNjt8.js +26 -0
  31. package/dist/cdn/chunks/code-editor-D6Q55oaY.js +286 -0
  32. package/dist/cdn/chunks/code-viewer-DspLH2T1.js +766 -0
  33. package/dist/cdn/chunks/code-viewer.i18n-BHfSDRbK.js +13 -0
  34. package/dist/cdn/chunks/codemirror-input-Db65x22n.js +1232 -0
  35. package/dist/cdn/chunks/collection-NVtkvDls.js +396 -0
  36. package/dist/cdn/chunks/collection.i18n-DqWPGnZO.js +8 -0
  37. package/dist/cdn/chunks/combo-box-DyBQSaQl.js +512 -0
  38. package/dist/cdn/chunks/combo-box.i18n-BorzYnJ2.js +6 -0
  39. package/dist/cdn/chunks/container-rrbwk0z4.js +602 -0
  40. package/dist/cdn/chunks/custom-element-BW8Ua4c7.js +7 -0
  41. package/dist/cdn/chunks/custom-element-q6NzoL5b.js +301 -0
  42. package/dist/cdn/chunks/custom-font-size-D7KNr84p.js +57 -0
  43. package/dist/cdn/chunks/date-field-Clti_wKN.js +654 -0
  44. package/dist/cdn/chunks/date-field.i18n-BTzc0E9a.js +15 -0
  45. package/dist/cdn/chunks/date-picker-2TCQLd5D.js +993 -0
  46. package/dist/cdn/chunks/date-picker.i18n-Dsc_M5QK.js +82 -0
  47. package/dist/cdn/chunks/decorate-TduJMFD_.js +280 -0
  48. package/dist/cdn/chunks/defer-focus-F73ud2D9.js +9 -0
  49. package/dist/cdn/chunks/described-by-mixin-daRE7orX.js +32 -0
  50. package/dist/cdn/chunks/description-cell-CQwOj_rN.js +166 -0
  51. package/dist/cdn/chunks/dev-checks-zW_W-hnh.js +2695 -0
  52. package/dist/cdn/chunks/directive-CwRgozUW.js +27 -0
  53. package/dist/cdn/chunks/dismiss-from-title-bar-C6mP7sWP.js +5 -0
  54. package/dist/cdn/chunks/dist-3C80SZN9.js +849 -0
  55. package/dist/cdn/chunks/dist-A7_1pHX0.js +379 -0
  56. package/dist/cdn/chunks/dist-BEfLdOvy.js +1346 -0
  57. package/dist/cdn/chunks/dist-BTUxFM2V.js +268 -0
  58. package/dist/cdn/chunks/dist-CP3G1pSK.js +1037 -0
  59. package/dist/cdn/chunks/dist-C_dGY6zR.js +468 -0
  60. package/dist/{components/dist-B9YBOGFW.js → cdn/chunks/dist-ChmCRv39.js} +109 -153
  61. package/dist/{components/dist-CJm4tkNC.js → cdn/chunks/dist-D2qap2OY.js} +23 -31
  62. package/dist/cdn/chunks/dist-DPUBF0MZ.js +1593 -0
  63. package/dist/{components/dist-4g23YHP0.js → cdn/chunks/dist-DrTzvgE7.js} +291 -404
  64. package/dist/cdn/chunks/dist-EM4MWLQq.js +385 -0
  65. package/dist/cdn/chunks/dist-EgIBI-FG.js +293 -0
  66. package/dist/{components/dist-Bf823YyL.js → cdn/chunks/dist-Rm6FvrSR.js} +272 -551
  67. package/dist/cdn/chunks/divider-CCNbnplA.js +53 -0
  68. package/dist/cdn/chunks/document-tab-bar-CUc4WWY3.js +973 -0
  69. package/dist/cdn/chunks/document-tab-bar.i18n-DKrA9TnB.js +9 -0
  70. package/dist/cdn/chunks/drag-handle-cell-CbzDYebG.js +206 -0
  71. package/dist/cdn/chunks/drag-handle-cell.i18n-CKUrbm2q.js +3 -0
  72. package/dist/cdn/chunks/dropdown-DZTZtkm5.js +350 -0
  73. package/dist/cdn/chunks/element-state-B-44fVqq.js +20 -0
  74. package/dist/cdn/chunks/file-field-Bff6_1pp.js +1484 -0
  75. package/dist/cdn/chunks/file-field.i18n-pDM7Utud.js +40 -0
  76. package/dist/cdn/chunks/floating-ui.dom-B8J1rV2c.js +753 -0
  77. package/dist/cdn/chunks/focus-target-DSLGcCWq.js +24 -0
  78. package/dist/cdn/chunks/form-actions-C_7hINq-.js +90 -0
  79. package/dist/cdn/chunks/form-associated-mixin--GIbl98p.js +62 -0
  80. package/dist/cdn/chunks/form-field--4nWJ_DK.js +364 -0
  81. package/dist/cdn/chunks/form-hXLgy_tY.js +84 -0
  82. package/dist/cdn/chunks/form-section-By-D4un0.js +64 -0
  83. package/dist/cdn/chunks/full-bleed-section-Dg4sIJG1.js +161 -0
  84. package/dist/cdn/chunks/gherkin-eseYvsxh.js +29 -0
  85. package/dist/cdn/chunks/hero-CQQMNCT_.js +761 -0
  86. package/dist/{components/icon-CrBk3W-t.js → cdn/chunks/icon-BORlalt0.js} +298 -309
  87. package/dist/cdn/chunks/icon-button-rKiIHs7A.js +632 -0
  88. package/dist/{components/icon-button.i18n-1_N-wN6x.js → cdn/chunks/icon-button.i18n-DpZOfIS4.js} +2 -4
  89. package/dist/cdn/chunks/icon-cell-rk4NQid2.js +156 -0
  90. package/dist/cdn/chunks/identity-Cg1l0HhB.js +187 -0
  91. package/dist/cdn/chunks/if-defined-CaKKERku.js +4 -0
  92. package/dist/cdn/chunks/image-DZMW6JgL.js +659 -0
  93. package/dist/cdn/chunks/image.i18n-ONcm1h7o.js +3 -0
  94. package/dist/cdn/chunks/implicit-submission-Csbcor_E.js +27 -0
  95. package/dist/cdn/chunks/inline-dialog-WlqtPBPJ.js +259 -0
  96. package/dist/cdn/chunks/input-modality-XE0B7yCn.js +42 -0
  97. package/dist/cdn/chunks/just-in-time-education-DRcb5g7x.js +611 -0
  98. package/dist/cdn/chunks/just-in-time-education.i18n-CW_dsaxf.js +6 -0
  99. package/dist/cdn/chunks/kanban-Ca_mfqsA.js +400 -0
  100. package/dist/cdn/chunks/kanban-column-fgIMc7pw.js +375 -0
  101. package/dist/cdn/chunks/kanban.i18n-CWqc3e0B.js +11 -0
  102. package/dist/cdn/chunks/keyboard-shortcut-EknnW7Ub.js +267 -0
  103. package/dist/cdn/chunks/languages-yKikVFv_.js +8893 -0
  104. package/dist/cdn/chunks/link-FBSAJ3UC.js +229 -0
  105. package/dist/cdn/chunks/link-group-90qVfKa0.js +111 -0
  106. package/dist/cdn/chunks/link-hint-KFhgr5Ng.js +24 -0
  107. package/dist/cdn/chunks/link-rel-DvrTEfVT.js +8 -0
  108. package/dist/cdn/chunks/link.i18n-DJPobGmu.js +8 -0
  109. package/dist/cdn/chunks/list-CaWl3q0Z.js +880 -0
  110. package/dist/cdn/chunks/list-item-Cagnf6eG.js +802 -0
  111. package/dist/cdn/chunks/list-item-segment-BRzBF1y_.js +315 -0
  112. package/dist/cdn/chunks/list-item-segment.i18n-DHnrQL4V.js +8 -0
  113. package/dist/{components/list-item.i18n-89uqlBMK.js → cdn/chunks/list-item.i18n-Br6J5Ev9.js} +2 -2
  114. package/dist/cdn/chunks/list-items-Du0RCWsY.js +6 -0
  115. package/dist/{components/list.i18n-CKqbhFQ_.js → cdn/chunks/list.i18n-C40ltgdI.js} +2 -2
  116. package/dist/cdn/chunks/loading-tags-DtUr-DR7.js +3 -0
  117. package/dist/cdn/chunks/menu-BOu_pD1Q.js +719 -0
  118. package/dist/cdn/chunks/menu-bar-0NFXvq-v.js +253 -0
  119. package/dist/cdn/chunks/menu-bar-item-DGSC_ETi.js +365 -0
  120. package/dist/cdn/chunks/menu-bar.i18n-BoMu4Eoz.js +3 -0
  121. package/dist/cdn/chunks/menu-divider-CLLRgMll.js +15 -0
  122. package/dist/cdn/chunks/menu-group-BL24ChpR.js +23 -0
  123. package/dist/cdn/chunks/menu-item-CooKfrFa.js +140 -0
  124. package/dist/cdn/chunks/menu.i18n-C6uYJsG3.js +10 -0
  125. package/dist/cdn/chunks/menu.template-C6rbfI-u.js +642 -0
  126. package/dist/cdn/chunks/modal-dialog-BrUMP4Jm.js +240 -0
  127. package/dist/cdn/chunks/multi-line-text-field-D7hXhyOn.js +318 -0
  128. package/dist/cdn/chunks/navigation-split-view-B2ZQhxEb.js +621 -0
  129. package/dist/cdn/chunks/nl.generated-D6T41jG3.js +112 -0
  130. package/dist/cdn/chunks/notification-DSGP14d1.js +492 -0
  131. package/dist/cdn/chunks/notification.i18n-BKUSLN5c.js +6 -0
  132. package/dist/cdn/chunks/number-field-B8op14Y_.js +301 -0
  133. package/dist/cdn/chunks/number-field.i18n-BS0bINWY.js +7 -0
  134. package/dist/cdn/chunks/one-half-one-half-section-ZYmHYf4Q.js +213 -0
  135. package/dist/cdn/chunks/one-third-two-thirds-section-Ds10K6AS.js +213 -0
  136. package/dist/cdn/chunks/one-time-code-field-Cgy_tTS4.js +693 -0
  137. package/dist/cdn/chunks/open-when-rendered-CW_2_WUZ.js +20 -0
  138. package/dist/cdn/chunks/owned-attribute-x9OCTy_4.js +6 -0
  139. package/dist/cdn/chunks/owner-form-Cq8tT7ac.js +7 -0
  140. package/dist/cdn/chunks/page-CBf_Decp.js +431 -0
  141. package/dist/cdn/chunks/page-footer-CSv1dU7M.js +396 -0
  142. package/dist/cdn/chunks/page-footer.i18n-pbdr4lN3.js +3 -0
  143. package/dist/cdn/chunks/page-section-mixin-Dp6X8GKd.js +132 -0
  144. package/dist/cdn/chunks/pagination-CMUcFB53.js +485 -0
  145. package/dist/cdn/chunks/pagination.i18n-QQMx14CQ.js +9 -0
  146. package/dist/cdn/chunks/password-field-C76Vm3rm.js +368 -0
  147. package/dist/cdn/chunks/password-field.i18n-CzdBn-1b.js +8 -0
  148. package/dist/cdn/chunks/popover-C-CVVtfl.js +334 -0
  149. package/dist/cdn/chunks/popover-target-B25dxnmt.js +10 -0
  150. package/dist/cdn/chunks/popover.i18n-DmFBHUvB.js +3 -0
  151. package/dist/cdn/chunks/popup-anchor-controller-VZw0bXf2.js +30 -0
  152. package/dist/cdn/chunks/progress-bar-BLiHaRUS.js +674 -0
  153. package/dist/cdn/chunks/progress-bar.i18n-Cr5miGTx.js +8 -0
  154. package/dist/cdn/chunks/progress-circle-CjkovRbL.js +667 -0
  155. package/dist/cdn/chunks/progress-circle.i18n-CRrXuY4V.js +8 -0
  156. package/dist/cdn/chunks/query-ChDzi9FQ.js +28 -0
  157. package/dist/cdn/chunks/radio-button-GHyO-GQB.js +338 -0
  158. package/dist/cdn/chunks/radio-button-field-C-Z6Lnd4.js +192 -0
  159. package/dist/cdn/chunks/radio-button-group-ChTqBCnQ.js +118 -0
  160. package/dist/cdn/chunks/radio-position-CXWYAjaz.js +10 -0
  161. package/dist/cdn/chunks/reflect-non-default-Bu3rpCvg.js +9 -0
  162. package/dist/cdn/chunks/render-marked-DX_5ISZE.js +37 -0
  163. package/dist/cdn/chunks/repeat-Ch_5OsXE.js +76 -0
  164. package/dist/cdn/chunks/return-focus-Xmagtk6r.js +52 -0
  165. package/dist/cdn/chunks/rich-text-CQ2uwMSp.js +47 -0
  166. package/dist/cdn/chunks/rich-text.i18n-BlJ68YuU.js +3 -0
  167. package/dist/cdn/chunks/row-header-mixin-CgqvREoV.js +16 -0
  168. package/dist/cdn/chunks/sanitize-url-CBuGmY0W.js +7 -0
  169. package/dist/cdn/chunks/scroll-mode-controller-COUD1-3P.js +42 -0
  170. package/dist/cdn/chunks/search-field-BGNfERhn.js +396 -0
  171. package/dist/cdn/chunks/search-field.i18n-B_Oc7hc-.js +6 -0
  172. package/dist/cdn/chunks/segmented-control-BYAG4VRp.js +671 -0
  173. package/dist/cdn/chunks/shadow-resets-6SToDsPu.js +12 -0
  174. package/dist/cdn/chunks/sheet-BdVCqm2H.js +340 -0
  175. package/dist/cdn/chunks/shell-C9rds_D9.js +146 -0
  176. package/dist/cdn/chunks/shell-DmJOYhyF.js +108 -0
  177. package/dist/cdn/chunks/side-by-side-split-view-C5oX4c6Z.js +166 -0
  178. package/dist/cdn/chunks/sidebar-section-DP4jnS7g.js +353 -0
  179. package/dist/cdn/chunks/sidebar-section.i18n-BuGfRMpD.js +6 -0
  180. package/dist/cdn/chunks/simple-section-qrCqXeBa.js +192 -0
  181. package/dist/cdn/chunks/skip-link-DWh4W6-J.js +161 -0
  182. package/dist/cdn/chunks/skip-link.i18n--PbEdAmJ.js +3 -0
  183. package/dist/cdn/chunks/slider--hODfOwh.js +772 -0
  184. package/dist/cdn/chunks/slider.i18n-DVw0c8AG.js +6 -0
  185. package/dist/cdn/chunks/slot-content-BLuPqVXw.js +13 -0
  186. package/dist/cdn/chunks/spacer-CFzq_JCh.js +237 -0
  187. package/dist/cdn/chunks/spacer-cell-DuVOgIj8.js +68 -0
  188. package/dist/cdn/chunks/spacing-scale-SufIjHeN.js +28 -0
  189. package/dist/cdn/chunks/split-button-BeXnOUTt.js +268 -0
  190. package/dist/cdn/chunks/split-button.i18n-DtClSMga.js +3 -0
  191. package/dist/cdn/chunks/split-view-divider-jzcPmnMh.js +100 -0
  192. package/dist/cdn/chunks/split-view-pane-BLsZz263.js +128 -0
  193. package/dist/cdn/chunks/stacked-split-view-CcOR8LrJ.js +157 -0
  194. package/dist/cdn/chunks/static-html-Cf4ccUIg.js +26 -0
  195. package/dist/cdn/chunks/status-bar-CINbOihq.js +284 -0
  196. package/dist/cdn/chunks/status-bar-change-CR9l0Gyk.js +3 -0
  197. package/dist/cdn/chunks/step-bar-6FvZL1Ti.js +474 -0
  198. package/dist/cdn/chunks/step-bar.i18n-DocExlD7.js +9 -0
  199. package/dist/cdn/chunks/step-cell-CejRisgS.js +287 -0
  200. package/dist/cdn/chunks/stepper-CY2rJWOJ.js +223 -0
  201. package/dist/cdn/chunks/stepper.i18n-COOAkaBl.js +7 -0
  202. package/dist/cdn/chunks/style-map-DsIw6lkq.js +29 -0
  203. package/dist/cdn/chunks/style-mod-DGMhzWuk.js +1583 -0
  204. package/dist/cdn/chunks/swatch-picker-BY3DBIl6.js +430 -0
  205. package/dist/cdn/chunks/swatch-picker.i18n-_G0nmnGe.js +22 -0
  206. package/dist/cdn/chunks/switch-DDSsZFwK.js +275 -0
  207. package/dist/cdn/chunks/switch-field-CMoM9I38.js +137 -0
  208. package/dist/cdn/chunks/tab-bar-DmslEoPD.js +697 -0
  209. package/dist/cdn/chunks/tab-bar.i18n-Crsc7ShA.js +3 -0
  210. package/dist/cdn/chunks/table-DwXjCSD5.js +308 -0
  211. package/dist/cdn/chunks/table.i18n-Bmb_uw_w.js +3 -0
  212. package/dist/cdn/chunks/tag-DM3APy3B.js +306 -0
  213. package/dist/cdn/chunks/text-B1CatNR1.js +421 -0
  214. package/dist/cdn/chunks/text-cell-BkEsGI3g.js +299 -0
  215. package/dist/cdn/chunks/text-editor-BvTiMeNV.js +3743 -0
  216. package/dist/cdn/chunks/text-editor.i18n-sJKiRQ4i.js +17 -0
  217. package/dist/cdn/chunks/text-field-CUyh1-V8.js +398 -0
  218. package/dist/cdn/chunks/time-field-Cj5WojfO.js +597 -0
  219. package/dist/cdn/chunks/time-field.i18n-CLH5vmS7.js +11 -0
  220. package/dist/cdn/chunks/time-picker-W0xYXLy8.js +508 -0
  221. package/dist/cdn/chunks/time-picker.i18n-BilOCXlS.js +7 -0
  222. package/dist/cdn/chunks/title-BuT7tWqN.js +437 -0
  223. package/dist/cdn/chunks/title-bar-label-controller-DSxdKZOg.js +24 -0
  224. package/dist/cdn/chunks/title-cell-8d8psUBX.js +327 -0
  225. package/dist/cdn/chunks/toggle-button-DNXWXZpE.js +528 -0
  226. package/dist/cdn/chunks/toggle-button-group-ByowJYgs.js +156 -0
  227. package/dist/cdn/chunks/token-CnkEB3hB.js +266 -0
  228. package/dist/cdn/chunks/token-field-hvDB3l6O.js +664 -0
  229. package/dist/cdn/chunks/token-field.i18n-BclzoR8F.js +9 -0
  230. package/dist/cdn/chunks/token.i18n-RGD5zAtl.js +7 -0
  231. package/dist/cdn/chunks/toml-w97zZfFO.js +27 -0
  232. package/dist/cdn/chunks/toolbar-iNd1VmuG.js +408 -0
  233. package/dist/cdn/chunks/toolbar-item-DpPfPxCi.js +50 -0
  234. package/dist/cdn/chunks/toolbar-title-KBMpfL9d.js +84 -0
  235. package/dist/cdn/chunks/toolbar.i18n-QwS37CBC.js +8 -0
  236. package/dist/cdn/chunks/toolbar.styles-BQkG4gVc.js +383 -0
  237. package/dist/cdn/chunks/tooltip-BsAHJjci.js +325 -0
  238. package/dist/cdn/chunks/top-navigation-bar-D1hjWIF3.js +925 -0
  239. package/dist/cdn/chunks/top-navigation-bar.i18n-C-lcH1nB.js +10 -0
  240. package/dist/cdn/chunks/top-title-bar-iNFB2zQL.js +344 -0
  241. package/dist/cdn/chunks/translations-wxBSz213.js +8 -0
  242. package/dist/cdn/chunks/two-thirds-one-third-section-D-UANbHC.js +213 -0
  243. package/dist/cdn/chunks/validation-list-C5BhHZIG.js +202 -0
  244. package/dist/cdn/chunks/validation-list.i18n-CM6In8zD.js +12 -0
  245. package/dist/cdn/chunks/visibility-mixin-COAZ9pON.js +74 -0
  246. package/dist/cdn/chunks/visually-hidden-BPgATaH0.js +43 -0
  247. package/dist/cdn/chunks/window-t5iFkMLY.js +227 -0
  248. package/dist/cdn/chunks/window.i18n-CsEnUPAk.js +3 -0
  249. package/dist/cdn/chunks/with-translations-XX14GKFh.js +16 -0
  250. package/dist/components/actions/button/button.d.ts +5 -5
  251. package/dist/components/actions/button/button.d.ts.map +1 -1
  252. package/dist/components/actions/button/button.js +6 -6
  253. package/dist/components/actions/button/button.js.map +1 -1
  254. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  255. package/dist/components/actions/button/button.template.js +6 -8
  256. package/dist/components/actions/button/button.template.js.map +1 -1
  257. package/dist/components/actions/button-bar/button-bar.d.ts.map +1 -1
  258. package/dist/components/actions/button-bar/button-bar.js +15 -4
  259. package/dist/components/actions/button-bar/button-bar.js.map +1 -1
  260. package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
  261. package/dist/components/actions/button-group/button-group.js +7 -1
  262. package/dist/components/actions/button-group/button-group.js.map +1 -1
  263. package/dist/components/actions/button-group/button-group.styles.js +2 -2
  264. package/dist/components/actions/icon-button/icon-button.d.ts +3 -3
  265. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  266. package/dist/components/actions/icon-button/icon-button.js +4 -4
  267. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  268. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  269. package/dist/components/actions/icon-button/icon-button.template.js +2 -4
  270. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  271. package/dist/components/actions/menu/menu-item.d.ts +12 -3
  272. package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
  273. package/dist/components/actions/menu/menu-item.js +27 -6
  274. package/dist/components/actions/menu/menu-item.js.map +1 -1
  275. package/dist/components/actions/menu/menu.d.ts +31 -8
  276. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  277. package/dist/components/actions/menu/menu.js +108 -32
  278. package/dist/components/actions/menu/menu.js.map +1 -1
  279. package/dist/components/actions/menu/menu.pointer.d.ts +7 -0
  280. package/dist/components/actions/menu/menu.pointer.d.ts.map +1 -1
  281. package/dist/components/actions/menu/menu.pointer.js +17 -0
  282. package/dist/components/actions/menu/menu.pointer.js.map +1 -1
  283. package/dist/components/actions/menu/menu.safe-triangle.d.ts +6 -5
  284. package/dist/components/actions/menu/menu.safe-triangle.d.ts.map +1 -1
  285. package/dist/components/actions/menu/menu.safe-triangle.js +3 -3
  286. package/dist/components/actions/menu/menu.safe-triangle.js.map +1 -1
  287. package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
  288. package/dist/components/actions/menu/menu.styles.js +6 -0
  289. package/dist/components/actions/menu/menu.styles.js.map +1 -1
  290. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  291. package/dist/components/actions/menu/menu.template.js +17 -9
  292. package/dist/components/actions/menu/menu.template.js.map +1 -1
  293. package/dist/components/actions/toolbar/toolbar-title.js +2 -2
  294. package/dist/components/actions/toolbar/toolbar-title.js.map +1 -1
  295. package/dist/components/content/avatar/avatar.js +1 -1
  296. package/dist/components/content/avatar/avatar.js.map +1 -1
  297. package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
  298. package/dist/components/content/avatar-group/avatar-group.js +2 -1
  299. package/dist/components/content/avatar-group/avatar-group.js.map +1 -1
  300. package/dist/components/content/image/image.js +1 -1
  301. package/dist/components/content/image/image.js.map +1 -1
  302. package/dist/components/content/tag/tag.d.ts +3 -3
  303. package/dist/components/content/tag/tag.js +3 -3
  304. package/dist/components/content/tag/tag.template.js +3 -3
  305. package/dist/components/content/tag/tag.template.js.map +1 -1
  306. package/dist/components/content/title/title.js +1 -1
  307. package/dist/components/content/title/title.js.map +1 -1
  308. package/dist/components/content/token/token.d.ts +6 -4
  309. package/dist/components/content/token/token.d.ts.map +1 -1
  310. package/dist/components/content/token/token.js +6 -4
  311. package/dist/components/content/token/token.js.map +1 -1
  312. package/dist/components/content/token/token.template.js +1 -1
  313. package/dist/components/content/token/token.template.js.map +1 -1
  314. package/dist/components/inputs/dropdown/dropdown.d.ts +22 -2
  315. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  316. package/dist/components/inputs/dropdown/dropdown.js +67 -11
  317. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  318. package/dist/components/inputs/file-field/file-field.js +1 -1
  319. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  320. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.d.ts.map +1 -1
  321. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js +4 -2
  322. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js.map +1 -1
  323. package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js +2 -2
  324. package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js.map +1 -1
  325. package/dist/components/inputs/segmented-control/segmented-control.d.ts +2 -2
  326. package/dist/components/inputs/segmented-control/segmented-control.js +4 -4
  327. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  328. package/dist/components/inputs/segmented-control/segmented-control.template.js +2 -2
  329. package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
  330. package/dist/components/inputs/swatch-picker/swatch-picker.js +1 -1
  331. package/dist/components/inputs/swatch-picker/swatch-picker.js.map +1 -1
  332. package/dist/components/inputs/time-picker/time-picker.js +1 -1
  333. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  334. package/dist/components/inputs/toggle-button/toggle-button.d.ts +2 -2
  335. package/dist/components/inputs/toggle-button/toggle-button.js +3 -3
  336. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  337. package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
  338. package/dist/components/inputs/toggle-button/toggle-button.template.js +7 -10
  339. package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
  340. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +1 -1
  341. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  342. package/dist/components/inputs/toggle-button-group/toggle-button-group.styles.js +3 -3
  343. package/dist/components/layout/card/card.js +1 -1
  344. package/dist/components/layout/card/card.js.map +1 -1
  345. package/dist/components/layout/card/card.styles.d.ts.map +1 -1
  346. package/dist/components/layout/card/card.styles.js +3 -1
  347. package/dist/components/layout/card/card.styles.js.map +1 -1
  348. package/dist/components/layout/container/container.d.ts +15 -2
  349. package/dist/components/layout/container/container.d.ts.map +1 -1
  350. package/dist/components/layout/container/container.js +38 -3
  351. package/dist/components/layout/container/container.js.map +1 -1
  352. package/dist/components/layout/container/container.styles.js +1 -1
  353. package/dist/components/layout/container/container.template.js +1 -1
  354. package/dist/components/layout/container/container.template.js.map +1 -1
  355. package/dist/components/layout/kanban/kanban.d.ts.map +1 -1
  356. package/dist/components/layout/kanban/kanban.js +2 -1
  357. package/dist/components/layout/kanban/kanban.js.map +1 -1
  358. package/dist/components/layout/page/page.d.ts.map +1 -1
  359. package/dist/components/layout/page/page.js +3 -2
  360. package/dist/components/layout/page/page.js.map +1 -1
  361. package/dist/components/layout/page/page.styles.d.ts.map +1 -1
  362. package/dist/components/layout/page/page.styles.js +3 -2
  363. package/dist/components/layout/page/page.styles.js.map +1 -1
  364. package/dist/components/layout/page-footer/page-footer.d.ts +5 -2
  365. package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
  366. package/dist/components/layout/page-footer/page-footer.js +5 -2
  367. package/dist/components/layout/page-footer/page-footer.js.map +1 -1
  368. package/dist/components/layout/page-footer/page-footer.template.d.ts.map +1 -1
  369. package/dist/components/layout/page-footer/page-footer.template.js +2 -4
  370. package/dist/components/layout/page-footer/page-footer.template.js.map +1 -1
  371. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +1 -1
  372. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  373. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +2 -2
  374. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  375. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  376. package/dist/components/layout/page-sections/hero/hero.js +2 -2
  377. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  378. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +1 -1
  379. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  380. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +2 -2
  381. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  382. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +1 -1
  383. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  384. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +2 -2
  385. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  386. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +1 -1
  387. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
  388. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +4 -4
  389. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
  390. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +1 -1
  391. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  392. package/dist/components/layout/page-sections/simple-section/simple-section.js +2 -2
  393. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  394. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +1 -1
  395. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  396. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +2 -2
  397. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  398. package/dist/components/layout/popover/popover.d.ts +1 -2
  399. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  400. package/dist/components/layout/popover/popover.js +10 -12
  401. package/dist/components/layout/popover/popover.js.map +1 -1
  402. package/dist/components/layout/sheet/sheet.d.ts +1 -0
  403. package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
  404. package/dist/components/layout/sheet/sheet.js +6 -1
  405. package/dist/components/layout/sheet/sheet.js.map +1 -1
  406. package/dist/components/layout/spacer/spacer.js +1 -1
  407. package/dist/components/layout/spacer/spacer.js.map +1 -1
  408. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
  409. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +2 -1
  410. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
  411. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
  412. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +3 -2
  413. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
  414. package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts.map +1 -1
  415. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +2 -1
  416. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
  417. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
  418. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +3 -2
  419. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
  420. package/dist/components/layout/window/window.d.ts +1 -0
  421. package/dist/components/layout/window/window.d.ts.map +1 -1
  422. package/dist/components/layout/window/window.js +7 -1
  423. package/dist/components/layout/window/window.js.map +1 -1
  424. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts +5 -2
  425. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts.map +1 -1
  426. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js +7 -4
  427. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js.map +1 -1
  428. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.template.js +3 -3
  429. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.template.js.map +1 -1
  430. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
  431. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js +2 -1
  432. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js.map +1 -1
  433. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +2 -2
  434. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +2 -2
  435. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +2 -2
  436. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +2 -2
  437. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  438. package/dist/components/lists-and-tables/list/list.js +4 -1
  439. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  440. package/dist/components/lists-and-tables/list-item/list-item.d.ts +19 -9
  441. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  442. package/dist/components/lists-and-tables/list-item/list-item.js +30 -14
  443. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  444. package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
  445. package/dist/components/lists-and-tables/list-item/list-item.styles.js +20 -0
  446. package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
  447. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +11 -1
  448. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
  449. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +19 -3
  450. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
  451. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
  452. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +6 -0
  453. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
  454. package/dist/components/lists-and-tables/table/table.js +5 -5
  455. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  456. package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts +5 -2
  457. package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  458. package/dist/components/navigation/breadcrumbs/breadcrumbs.js +5 -2
  459. package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -1
  460. package/dist/components/navigation/breadcrumbs/breadcrumbs.template.d.ts.map +1 -1
  461. package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js +2 -4
  462. package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js.map +1 -1
  463. package/dist/components/navigation/link/link.d.ts +7 -4
  464. package/dist/components/navigation/link/link.d.ts.map +1 -1
  465. package/dist/components/navigation/link/link.js +7 -4
  466. package/dist/components/navigation/link/link.js.map +1 -1
  467. package/dist/components/navigation/link/link.template.js +5 -5
  468. package/dist/components/navigation/link/link.template.js.map +1 -1
  469. package/dist/components/navigation/menu-bar-item/menu-bar-item.js +1 -1
  470. package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
  471. package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
  472. package/dist/components/navigation/pagination/pagination.js +3 -2
  473. package/dist/components/navigation/pagination/pagination.js.map +1 -1
  474. package/dist/components/navigation/tab-bar/tab-bar.d.ts +18 -2
  475. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  476. package/dist/components/navigation/tab-bar/tab-bar.js +51 -3
  477. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  478. package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
  479. package/dist/components/navigation/tab-bar/tab-bar.template.js +5 -3
  480. package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
  481. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +2 -2
  482. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  483. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts +4 -0
  484. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts.map +1 -1
  485. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js +26 -2
  486. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js.map +1 -1
  487. package/dist/components/status-and-feedback/banner/banner.js +1 -1
  488. package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
  489. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +2 -2
  490. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
  491. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js +1 -1
  492. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js.map +1 -1
  493. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +1 -1
  494. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
  495. package/dist/components/status-and-feedback/notification/notification.js +2 -2
  496. package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
  497. package/dist/components/status-and-feedback/progress-bar/progress-bar.js +4 -4
  498. package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
  499. package/dist/components/status-and-feedback/progress-circle/progress-circle.js +4 -4
  500. package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
  501. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +5 -2
  502. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
  503. package/dist/components/status-and-feedback/step-bar/step-bar.js +6 -3
  504. package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
  505. package/dist/components/status-and-feedback/step-bar/step-bar.template.js +1 -1
  506. package/dist/components/status-and-feedback/step-bar/step-bar.template.js.map +1 -1
  507. package/dist/css/variables.css +6 -0
  508. package/dist/nldd.min.js +784 -728
  509. package/dist/types/react.d.ts +3323 -0
  510. package/dist/types/vue.d.ts +26 -14
  511. package/dist/utilities/autoloader.d.ts +33 -0
  512. package/dist/utilities/autoloader.d.ts.map +1 -0
  513. package/dist/utilities/autoloader.generated.d.ts +3 -0
  514. package/dist/utilities/autoloader.generated.d.ts.map +1 -0
  515. package/dist/utilities/autoloader.generated.js +141 -0
  516. package/dist/utilities/autoloader.generated.js.map +1 -0
  517. package/dist/utilities/autoloader.js +94 -0
  518. package/dist/utilities/autoloader.js.map +1 -0
  519. package/dist/utilities/dev-checks.d.ts +9 -0
  520. package/dist/utilities/dev-checks.d.ts.map +1 -1
  521. package/dist/utilities/dev-checks.js +45 -3
  522. package/dist/utilities/dev-checks.js.map +1 -1
  523. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  524. package/dist/utilities/dev-rules.generated.js +17 -2
  525. package/dist/utilities/dev-rules.generated.js.map +1 -1
  526. package/dist/utilities/input-modality.d.ts.map +1 -1
  527. package/dist/utilities/input-modality.js +4 -2
  528. package/dist/utilities/input-modality.js.map +1 -1
  529. package/dist/utilities/loading-tags.d.ts +7 -0
  530. package/dist/utilities/loading-tags.d.ts.map +1 -0
  531. package/dist/utilities/loading-tags.js +7 -0
  532. package/dist/utilities/loading-tags.js.map +1 -0
  533. package/dist/utilities/owner-form.d.ts +3 -3
  534. package/dist/utilities/owner-form.d.ts.map +1 -1
  535. package/dist/utilities/owner-form.js +6 -3
  536. package/dist/utilities/owner-form.js.map +1 -1
  537. package/dist/utilities/page-section-mixin.d.ts +10 -4
  538. package/dist/utilities/page-section-mixin.d.ts.map +1 -1
  539. package/dist/utilities/page-section-mixin.js +29 -23
  540. package/dist/utilities/page-section-mixin.js.map +1 -1
  541. package/dist/utilities/return-focus.d.ts +44 -0
  542. package/dist/utilities/return-focus.d.ts.map +1 -0
  543. package/dist/utilities/return-focus.js +99 -0
  544. package/dist/utilities/return-focus.js.map +1 -0
  545. package/dist/utilities/slot-content.d.ts +30 -0
  546. package/dist/utilities/slot-content.d.ts.map +1 -0
  547. package/dist/utilities/slot-content.js +38 -0
  548. package/dist/utilities/slot-content.js.map +1 -0
  549. package/lint/data.generated.json +1 -1
  550. package/package.json +50 -11
  551. package/dist/components/breakpoints-DtL62nLI.js +0 -45
  552. package/dist/components/components.js +0 -67895
  553. package/dist/components/decorate-C7khEuc7.js +0 -16
  554. package/dist/components/defer-focus-BQ3c4mzj.js +0 -176
  555. package/dist/components/dev-checks-lQ-gHUjV.js +0 -2706
  556. package/dist/components/dist-245LaK9m.js +0 -1479
  557. package/dist/components/dist-BFZM0YsR.js +0 -15772
  558. package/dist/components/dist-BNkeFjc3.js +0 -1180
  559. package/dist/components/dist-CSC1dG3L.js +0 -365
  560. package/dist/components/dist-CeMOOqgP.js +0 -1509
  561. package/dist/components/dist-DFjwTlJV.js +0 -624
  562. package/dist/components/dist-DHhnz3Gv.js +0 -381
  563. package/dist/components/dist-PeUX4vPq.js +0 -2857
  564. package/dist/components/dist-m70B83qb.js +0 -463
  565. package/dist/components/element-state-BnarBv0M.js +0 -42
  566. package/dist/components/gherkin-DzYbEwDO.js +0 -107
  567. package/dist/components/icon-button-CfpnGzYQ.js +0 -2308
  568. package/dist/components/input-modality-CiPLYYMN.js +0 -42
  569. package/dist/components/just-in-time-education.i18n-BqU1ImP4.js +0 -423
  570. package/dist/components/nl.generated-DzZkOgnP.js +0 -64
  571. package/dist/components/reflect-non-default-B9wQcnne.js +0 -36
  572. package/dist/components/rolldown-runtime-D8jQpDG7.js +0 -12
  573. package/dist/components/shadow-resets-BwOyyZFH.js +0 -60
  574. package/dist/components/shell-Dh5IwHd-.js +0 -222
  575. package/dist/components/toml-D0Pix_8Q.js +0 -58
  576. package/dist/components/visibility-mixin-BMtETgjk.js +0 -153
@@ -0,0 +1,1484 @@
1
+ import "./icon-BORlalt0.js";
2
+ import { i as e, n as t, t as n } from "./custom-element-q6NzoL5b.js";
3
+ import { n as r, o as i, r as a, t as o } from "./decorate-TduJMFD_.js";
4
+ import { t as s } from "./custom-element-BW8Ua4c7.js";
5
+ import { t as c } from "./query-ChDzi9FQ.js";
6
+ import { t as l } from "./reflect-non-default-Bu3rpCvg.js";
7
+ import { t as u } from "./shadow-resets-6SToDsPu.js";
8
+ import "./button-DO90Lo6q.js";
9
+ import { t as d } from "./translations-wxBSz213.js";
10
+ import "./activity-indicator-JglZJ8dh.js";
11
+ import { t as f } from "./class-map-CXSdNjt8.js";
12
+ import { t as p } from "./described-by-mixin-daRE7orX.js";
13
+ import { t as m } from "./defer-focus-F73ud2D9.js";
14
+ import "./icon-button-rKiIHs7A.js";
15
+ import "./tooltip-BsAHJjci.js";
16
+ import "./menu-BOu_pD1Q.js";
17
+ import { t as h } from "./form-associated-mixin--GIbl98p.js";
18
+ import { t as g } from "./file-field.i18n-pDM7Utud.js";
19
+ // src/components/inputs/file-field/file-field.styles.ts
20
+ var ee = e`
21
+ :host {
22
+ box-sizing: border-box;
23
+ }
24
+
25
+
26
+ /* # Host */
27
+
28
+ :host {
29
+ --_file-field-width: 100%;
30
+ --_file-field-corner-radius: var(--semantics-controls-md-corner-radius);
31
+ --_file-field-min-size: var(--semantics-controls-md-min-size);
32
+ --_file-field-inline-padding: var(--semantics-controls-md-inline-padding);
33
+ --_file-field-value-color: var(--semantics-content-color);
34
+ --_file-field-text-font: var(--semantics-input-fields-md-text-font);
35
+ --_file-field-clear-button-padding-right: calc((var(--_file-field-min-size) - var(--semantics-controls-sm-min-size)) / 2);
36
+ --_file-field-more-button-padding-right: var(--_file-field-clear-button-padding-right);
37
+ --_file-field-validation-icon-area-padding-right: var(--_file-field-inline-padding);
38
+ --_file-field-validation-icon-size: var(--semantics-input-fields-md-validation-icon-size);
39
+ --_file-field-highlight-border-width: var(--semantics-surfaces-highlight-border-width);
40
+ --_file-field-highlight-border-color: var(--semantics-surfaces-tinted-highlight-border-color);
41
+ --_file-field-background-color: var(--semantics-surfaces-tinted-background-color);
42
+ --_file-field-drop-border-width: var(--semantics-drop-targets-border-width);
43
+ --_file-field-page-drag-border-color: var(--semantics-drop-targets-is-available-border-color);
44
+ --_file-field-drop-border-color: var(--semantics-drop-targets-is-over-border-color);
45
+ --_file-field-drop-background-color: var(--semantics-drop-targets-is-over-background-color);
46
+ --_file-field-rejected-color: var(--semantics-content-critical-color);
47
+ --_file-field-rejected-border-color: var(--semantics-drop-targets-is-rejected-border-color);
48
+ --_file-field-rejected-background-color: var(--semantics-drop-targets-is-rejected-background-color);
49
+ --_file-field-file-icon-size: var(--primitives-space-24);
50
+ --_file-field-file-icon-gap: var(--primitives-space-8);
51
+ --_file-field-button-group-gap: var(--primitives-space-6);
52
+ --_file-field-choose-text-color: var(--semantics-controls-is-selected-indicator-color);
53
+ --_file-field-choose-button-is-hovered-highlight-border-color: light-dark(var(--primitives-color-neutral-100), var(--primitives-color-neutral-250));
54
+ --_file-field-choose-button-is-active-highlight-border-color: light-dark(var(--primitives-color-neutral-150), var(--primitives-color-neutral-300));
55
+ --_file-field-choose-button-is-hovered-background-color: light-dark(var(--primitives-color-neutral-50), var(--primitives-color-neutral-100));
56
+ --_file-field-choose-button-is-active-background-color: light-dark(var(--primitives-color-neutral-75), var(--primitives-color-neutral-150));
57
+ --_file-field-choose-text-font: var(--semantics-buttons-md-primary-text-font);
58
+ --_file-field-area-min-height: var(--primitives-area-160);
59
+ --_file-field-area-padding: var(--primitives-space-16);
60
+ --_file-field-area-gap: var(--primitives-space-2);
61
+ --_file-field-area-icon-size: var(--primitives-space-40);
62
+ --_file-field-area-edit-button-group-padding-top: var(--primitives-space-8);
63
+ --_file-field-area-choose-button-group-margin-top: var(--primitives-space-4);
64
+ --_file-field-area-choose-button-group-margin-bottom: var(--primitives-space-8);
65
+ --_file-field-drop-area-drop-hint-text-color: var(--semantics-content-color);
66
+ --_file-field-accepted-types-color: var(--semantics-content-secondary-color);
67
+ --_file-field-accepted-types-font: var(--primitives-font-body-sm-regular-tight);
68
+
69
+ ${u}
70
+ display: block;
71
+ width: var(--_file-field-width);
72
+ max-width: 100%;
73
+ min-width: 0;
74
+ -webkit-tap-highlight-color: transparent;
75
+ }
76
+
77
+ :host([hidden]) {
78
+ display: none;
79
+ }
80
+
81
+ :host([size="sm"]) {
82
+ --_file-field-corner-radius: var(--semantics-controls-sm-corner-radius);
83
+ --_file-field-min-size: var(--semantics-controls-sm-min-size);
84
+ --_file-field-inline-padding: var(--semantics-controls-sm-inline-padding);
85
+ --_file-field-text-font: var(--semantics-input-fields-sm-text-font);
86
+ --_file-field-clear-button-padding-right: calc((var(--_file-field-min-size) - var(--semantics-controls-xs-min-size)) / 2);
87
+ --_file-field-more-button-padding-right: var(--primitives-space-6);
88
+ --_file-field-validation-icon-size: var(--semantics-input-fields-sm-validation-icon-size);
89
+ --_file-field-file-icon-size: var(--primitives-space-20);
90
+ --_file-field-file-icon-gap: var(--primitives-space-6);
91
+ --_file-field-choose-text-font: var(--semantics-buttons-sm-primary-text-font);
92
+ --_file-field-area-icon-size: var(--primitives-space-32);
93
+ --_file-field-area-min-height: var(--primitives-area-120);
94
+ --_file-field-area-padding: var(--primitives-space-12);
95
+ --_file-field-accepted-types-font: var(--primitives-font-body-xs-regular-tight);
96
+ }
97
+
98
+ :host([variant="area"]:not([size="sm"])) {
99
+ --_file-field-button-group-gap: var(--primitives-space-8);
100
+ }
101
+
102
+ :host([directory]) {
103
+ --_file-field-area-min-height: var(--primitives-area-200);
104
+ --_file-field-area-stacked-min-height: var(--primitives-area-240);
105
+ }
106
+
107
+ :host([directory][size="sm"]) {
108
+ --_file-field-area-min-height: var(--primitives-area-160);
109
+ --_file-field-area-stacked-min-height: var(--primitives-area-200);
110
+ }
111
+
112
+ :host([disabled]) {
113
+ opacity: var(--primitives-opacity-disabled);
114
+ pointer-events: none;
115
+ }
116
+
117
+
118
+ /* # Block */
119
+
120
+ .file-field {
121
+ box-sizing: border-box;
122
+ display: flex;
123
+ position: relative;
124
+ border-radius: var(--_file-field-corner-radius);
125
+ background-color: var(--_file-field-background-color);
126
+ width: 100%;
127
+ min-width: 0;
128
+ min-height: var(--_file-field-min-size);
129
+ align-items: center;
130
+ }
131
+
132
+ .file-field::before {
133
+ box-sizing: border-box;
134
+ position: absolute;
135
+ inset: 0;
136
+ border: var(--_file-field-highlight-border-width) solid var(--_file-field-highlight-border-color);
137
+ border-radius: inherit;
138
+ content: "";
139
+ pointer-events: none;
140
+ }
141
+
142
+ .file-field:not([class*="is-drag-"]):has(> .file-field__choose-button:hover) {
143
+ --_file-field-highlight-border-color: var(--_file-field-choose-button-is-hovered-highlight-border-color);
144
+ }
145
+
146
+ .file-field:not([class*="is-drag-"]):has(> .file-field__choose-button:active) {
147
+ --_file-field-highlight-border-color: var(--_file-field-choose-button-is-active-highlight-border-color);
148
+ }
149
+
150
+ .file-field.is-refused {
151
+ cursor: default;
152
+ user-select: none;
153
+ }
154
+
155
+ .file-field.is-refused:hover {
156
+ --_file-field-highlight-border-color: var(--_file-field-choose-button-is-hovered-highlight-border-color);
157
+ --_file-field-background-color: var(--_file-field-choose-button-is-hovered-background-color);
158
+ }
159
+
160
+ .file-field.is-refused:active {
161
+ --_file-field-highlight-border-color: var(--_file-field-choose-button-is-active-highlight-border-color);
162
+ --_file-field-background-color: var(--_file-field-choose-button-is-active-background-color);
163
+ }
164
+
165
+ .file-field.is-drag-page {
166
+ --_file-field-highlight-border-width: var(--_file-field-drop-border-width);
167
+ --_file-field-highlight-border-color: var(--_file-field-page-drag-border-color);
168
+ }
169
+
170
+ .file-field.is-drag-over {
171
+ --_file-field-highlight-border-width: var(--_file-field-drop-border-width);
172
+ --_file-field-highlight-border-color: var(--_file-field-drop-border-color);
173
+ --_file-field-background-color: var(--_file-field-drop-background-color);
174
+ }
175
+
176
+ .file-field.is-drag-rejected {
177
+ --_file-field-highlight-border-width: var(--_file-field-drop-border-width);
178
+ --_file-field-highlight-border-color: var(--_file-field-rejected-border-color);
179
+ --_file-field-background-color: var(--_file-field-rejected-background-color);
180
+ }
181
+
182
+
183
+ /* # Elements */
184
+
185
+ .file-field__input,
186
+ .file-field__folder-input {
187
+ display: none;
188
+ }
189
+
190
+ .file-field__menu-anchor {
191
+ position: absolute;
192
+ pointer-events: none;
193
+ width: 0;
194
+ height: 0;
195
+ }
196
+
197
+ .file-field__choose-button,
198
+ .file-field__drop-area,
199
+ .file-field__replace-area {
200
+ box-sizing: border-box;
201
+ display: flex;
202
+ margin: 0;
203
+ border: none;
204
+ border-radius: inherit;
205
+ padding: 0;
206
+ background: none;
207
+ min-width: 0;
208
+ min-height: var(--_file-field-min-size);
209
+ flex-grow: 1;
210
+ align-self: stretch;
211
+ align-items: center;
212
+ justify-content: flex-start;
213
+ color: inherit;
214
+ font: inherit;
215
+ text-align: start;
216
+ }
217
+
218
+ .file-field:not([class*="is-drag-"]) > .file-field__choose-button:hover {
219
+ background-color: var(--_file-field-choose-button-is-hovered-background-color);
220
+ }
221
+
222
+ .file-field:not([class*="is-drag-"]) > .file-field__choose-button:active {
223
+ background-color: var(--_file-field-choose-button-is-active-background-color);
224
+ }
225
+
226
+ .file-field__dismiss-button {
227
+ position: absolute;
228
+ inset: 0;
229
+ z-index: 1;
230
+ margin: 0;
231
+ border: none;
232
+ border-radius: inherit;
233
+ padding: 0;
234
+ background: none;
235
+ cursor: default;
236
+ }
237
+
238
+ .file-field__dismiss-button:focus-visible,
239
+ .file-field__choose-button:focus-visible {
240
+ outline: var(--semantics-focus-ring-outline);
241
+ outline-offset: var(--semantics-focus-ring-outline-offset);
242
+ box-shadow: var(--semantics-focus-ring-box-shadow);
243
+ }
244
+
245
+ .file-field__dismiss-button:focus:not(:focus-visible),
246
+ .file-field__choose-button:focus:not(:focus-visible) {
247
+ outline: none;
248
+ }
249
+
250
+ .file-field__text,
251
+ .file-field__value {
252
+ display: grid;
253
+ grid-template-columns: minmax(0, 1fr);
254
+ align-items: center;
255
+ }
256
+
257
+ .file-field__text {
258
+ padding-block: var(--primitives-space-8);
259
+ white-space: normal;
260
+ overflow-wrap: anywhere;
261
+ text-wrap: balance;
262
+ }
263
+
264
+ .file-field__chosen-area {
265
+ container: file-field-chosen-area / inline-size;
266
+ display: grid;
267
+ min-width: 0;
268
+ flex-grow: 1;
269
+ align-self: stretch;
270
+ grid-template-columns: minmax(0, 1fr);
271
+ }
272
+
273
+ .file-field__chosen-file {
274
+ display: flex;
275
+ min-width: 0;
276
+ align-items: center;
277
+ }
278
+
279
+ .file-field__chosen-file,
280
+ .file-field__replace-area {
281
+ grid-area: 1 / 1;
282
+ }
283
+
284
+ .file-field__chosen-file:not(.is-active),
285
+ .file-field__replace-area:not(.is-active) {
286
+ visibility: hidden;
287
+ }
288
+
289
+ :is(.file-field__text, .file-field__value) > * {
290
+ grid-area: 1 / 1;
291
+ min-width: 0;
292
+ }
293
+
294
+ :is(.file-field__text, .file-field__value) > :not(.is-active) {
295
+ visibility: hidden;
296
+ }
297
+
298
+ .file-field__choose-text {
299
+ color: var(--_file-field-choose-text-color);
300
+ font: var(--_file-field-choose-text-font);
301
+ }
302
+
303
+ .file-field__file-icon,
304
+ .file-field__upload-icon {
305
+ flex-shrink: 0;
306
+ margin-left: var(--_file-field-inline-padding);
307
+ width: var(--_file-field-file-icon-size);
308
+ height: var(--_file-field-file-icon-size);
309
+ color: var(--semantics-content-color);
310
+ }
311
+
312
+ .file-field__upload-icon {
313
+ color: var(--_file-field-accepted-types-color);
314
+ }
315
+
316
+ .file-field:not(.file-field--area) .file-field__upload-icon + .file-field__text {
317
+ padding-left: var(--_file-field-file-icon-gap);
318
+ }
319
+
320
+ .file-field:not(.file-field--area) .file-field__chosen-file {
321
+ @container file-field-chosen-area (max-width: 14.9375rem) {
322
+ .file-field__file-icon {
323
+ display: none;
324
+ }
325
+
326
+ .file-field__value {
327
+ padding-left: var(--_file-field-inline-padding);
328
+ }
329
+ }
330
+
331
+ @container file-field-chosen-area (max-width: 19.9375rem) {
332
+ :is(.file-field__change-button, .file-field__clear-button) {
333
+ display: none;
334
+ }
335
+
336
+ .file-field__edit-button-group:last-child {
337
+ padding-right: var(--_file-field-more-button-padding-right);
338
+ }
339
+ }
340
+
341
+ @container file-field-chosen-area (min-width: 20rem) {
342
+ .file-field__more-button {
343
+ display: none;
344
+ }
345
+ }
346
+ }
347
+
348
+ .file-field__chosen-file {
349
+ @container file-field-chosen-area (max-width: 19.9375rem) {
350
+ .file-field__folder.file-field__folder--full {
351
+ display: none;
352
+ }
353
+ }
354
+
355
+ @container file-field-chosen-area (min-width: 20rem) {
356
+ .file-field__folder.file-field__folder--short {
357
+ display: none;
358
+ }
359
+ }
360
+ }
361
+
362
+ .file-field__value,
363
+ .file-field__text {
364
+ box-sizing: border-box;
365
+ min-width: 0;
366
+ padding-right: var(--_file-field-inline-padding);
367
+ padding-left: var(--_file-field-inline-padding);
368
+ flex-grow: 1;
369
+ color: var(--_file-field-value-color);
370
+ font: var(--_file-field-text-font);
371
+ }
372
+
373
+ .file-field__value {
374
+ padding-left: var(--_file-field-file-icon-gap);
375
+ white-space: nowrap;
376
+ overflow: hidden;
377
+ }
378
+
379
+ .file-field__value > * {
380
+ text-overflow: ellipsis;
381
+ overflow: hidden;
382
+ }
383
+
384
+ :is(.file-field__drag-text, .file-field__drop-text, .file-field__rejected-text) {
385
+ font: var(--_file-field-choose-text-font);
386
+ }
387
+
388
+ .file-field__drop-text {
389
+ color: var(--_file-field-choose-text-color);
390
+ }
391
+
392
+ .file-field__rejected-text {
393
+ color: var(--_file-field-rejected-color);
394
+ }
395
+
396
+ .file-field__reading-text {
397
+ display: flex;
398
+ height: 1lh;
399
+ align-items: center;
400
+ justify-content: flex-start;
401
+ }
402
+
403
+ .file-field__drop-hint-text {
404
+ color: var(--semantics-content-secondary-color);
405
+ }
406
+
407
+ .file-field__drop-area .file-field__drop-hint-text {
408
+ color: var(--_file-field-drop-area-drop-hint-text-color);
409
+ }
410
+
411
+ @media (hover: none) {
412
+ :is(.file-field__drag-text, .file-field__drop-text, .file-field__rejected-text, .file-field__drop-hint-text),
413
+ .file-field__drop-area .file-field__text {
414
+ display: none;
415
+ }
416
+ }
417
+
418
+ .file-field__choose-button-group {
419
+ display: flex;
420
+ margin-top: var(--_file-field-area-choose-button-group-margin-top);
421
+ margin-bottom: var(--_file-field-area-choose-button-group-margin-bottom);
422
+ flex-wrap: wrap;
423
+ justify-content: center;
424
+ gap: var(--_file-field-button-group-gap);
425
+ }
426
+
427
+ .file-field__name {
428
+ display: flex;
429
+ min-width: 0;
430
+ overflow: hidden;
431
+ }
432
+
433
+ .file-field__folder {
434
+ display: flex;
435
+ min-width: 0;
436
+ }
437
+
438
+ :is(.file-field__name, .file-field__folder).is-wrapped {
439
+ display: block;
440
+ white-space: normal;
441
+ overflow-wrap: anywhere;
442
+ text-wrap: balance;
443
+ }
444
+
445
+ .file-field__name.is-wrapped .file-field__name-start {
446
+ white-space: normal;
447
+ }
448
+
449
+ .file-field__folder-name {
450
+ min-width: 0;
451
+ white-space: pre;
452
+ text-overflow: ellipsis;
453
+ overflow: hidden;
454
+ }
455
+
456
+ .file-field__folder-rest {
457
+ flex-shrink: 0;
458
+ white-space: pre;
459
+ }
460
+
461
+ .file-field__full-name,
462
+ .file-field__status {
463
+ position: absolute;
464
+ width: 1px;
465
+ height: 1px;
466
+ clip-path: inset(50%);
467
+ white-space: nowrap;
468
+ overflow: hidden;
469
+ }
470
+
471
+ .file-field__name-start {
472
+ min-width: 0;
473
+ white-space: pre;
474
+ text-overflow: ellipsis;
475
+ overflow: hidden;
476
+ }
477
+
478
+ .file-field__name-end {
479
+ flex-shrink: 0;
480
+ white-space: pre;
481
+ }
482
+
483
+ .file-field__edit-button-group {
484
+ display: flex;
485
+ position: relative;
486
+ flex-shrink: 0;
487
+ gap: var(--_file-field-button-group-gap);
488
+ padding-right: var(--_file-field-clear-button-padding-right);
489
+ align-items: center;
490
+ }
491
+
492
+ .file-field__edit-button-group:not(:last-child) {
493
+ padding-right: var(--primitives-space-0);
494
+ }
495
+
496
+ .file-field__validation-icon-area {
497
+ display: flex;
498
+ height: 100%;
499
+ flex-shrink: 0;
500
+ padding-right: var(--_file-field-validation-icon-area-padding-right);
501
+ align-items: center;
502
+ justify-content: center;
503
+ }
504
+
505
+ :host([valid]) .file-field__validation-icon-area {
506
+ color: var(--semantics-input-fields-is-valid-icon-color);
507
+ }
508
+
509
+ :host([invalid]) .file-field__validation-icon-area {
510
+ color: var(--semantics-input-fields-is-invalid-icon-color);
511
+ }
512
+
513
+ .file-field__validation-icon {
514
+ width: var(--_file-field-validation-icon-size);
515
+ height: var(--_file-field-validation-icon-size);
516
+ }
517
+
518
+
519
+ /* # Area */
520
+
521
+ .file-field--area {
522
+ min-height: var(--_file-field-area-min-height);
523
+ container: file-field-area / inline-size;
524
+ }
525
+
526
+ @container file-field-area (max-width: 22.4375rem) {
527
+ :host([directory]:not([size="sm"])) .file-field--area > :is(.file-field__choose-button, .file-field__drop-area, .file-field__chosen-area) {
528
+ min-height: var(--_file-field-area-stacked-min-height);
529
+ }
530
+ }
531
+
532
+ @container file-field-area (max-width: 18.6875rem) {
533
+ :host([directory][size="sm"]) .file-field--area > :is(.file-field__choose-button, .file-field__drop-area, .file-field__chosen-area) {
534
+ min-height: var(--_file-field-area-stacked-min-height);
535
+ }
536
+ }
537
+
538
+ .file-field--area :is(.file-field__choose-button, .file-field__drop-area, .file-field__replace-area, .file-field__chosen-file) {
539
+ padding: var(--_file-field-area-padding);
540
+ flex-direction: column;
541
+ gap: var(--_file-field-area-gap);
542
+ align-items: center;
543
+ justify-content: center;
544
+ }
545
+
546
+ .file-field--area :is(.file-field__upload-icon, .file-field__file-icon) {
547
+ flex-shrink: 0;
548
+ margin: 0;
549
+ width: var(--_file-field-area-icon-size);
550
+ height: var(--_file-field-area-icon-size);
551
+ }
552
+
553
+ .file-field.is-drag-over :is(.file-field__upload-icon, .file-field__accepted-types) {
554
+ color: var(--_file-field-choose-text-color);
555
+ }
556
+
557
+ .file-field.is-drag-rejected :is(.file-field__upload-icon, .file-field__accepted-types),
558
+ .file-field.is-refused .file-field__upload-icon {
559
+ color: var(--_file-field-rejected-color);
560
+ }
561
+
562
+ .file-field--area :is(.file-field__text, .file-field__value) {
563
+ padding-block: 0;
564
+ width: 100%;
565
+ flex-grow: 0;
566
+ text-align: center;
567
+ }
568
+
569
+ /* The surface has a fixed height and centers its content, so only the
570
+ shown text takes room; a hidden one that wraps would push the rest apart. */
571
+ .file-field--area :is(.file-field__text, .file-field__value) > :not(.is-active) {
572
+ display: none;
573
+ }
574
+
575
+ .file-field--area :is(.file-field__name, .file-field__folder, .file-field__reading-text) {
576
+ justify-content: center;
577
+ }
578
+
579
+ .file-field--area .file-field__accepted-types {
580
+ color: var(--_file-field-accepted-types-color);
581
+ font: var(--_file-field-accepted-types-font);
582
+ }
583
+
584
+ .file-field--area .file-field__edit-button-group {
585
+ flex-wrap: wrap;
586
+ justify-content: center;
587
+ padding-top: var(--_file-field-area-edit-button-group-padding-top);
588
+ padding-right: var(--primitives-space-0);
589
+ }
590
+
591
+ .file-field--area .file-field__validation-icon-area {
592
+ position: absolute;
593
+ top: var(--_file-field-area-padding);
594
+ right: var(--_file-field-area-padding);
595
+ height: auto;
596
+ padding-right: var(--primitives-space-0);
597
+ }
598
+
599
+
600
+ /* # High contrast */
601
+
602
+ @media (forced-colors: active) {
603
+ .file-field::before {
604
+ border-color: CanvasText;
605
+ }
606
+
607
+ .file-field.is-drag-over::before {
608
+ border-color: Highlight;
609
+ }
610
+
611
+ .file-field.is-drag-rejected::before {
612
+ border-style: dashed;
613
+ }
614
+ }
615
+ `, _ = "…";
616
+ function v(e) {
617
+ let t = e.lastIndexOf(".");
618
+ return t > 0 ? [e.slice(0, t), e.slice(t)] : [e, ""];
619
+ }
620
+ var y = 8;
621
+ function b(e) {
622
+ let [t, n] = v(e), r = Math.max(0, t.length - y);
623
+ return [t.slice(0, r), t.slice(r) + n];
624
+ }
625
+ function x(e, t, n) {
626
+ return `${e.slice(0, Math.ceil(n / 2)).trimEnd()}${_}${e.slice(e.length - Math.floor(n / 2)).trimStart()}${t}`;
627
+ }
628
+ function S(e, t, n) {
629
+ return C(e, (e) => n(e) <= t);
630
+ }
631
+ function C(e, t, { keepExtension: n = !0 } = {}) {
632
+ if (t(e)) return {
633
+ text: e,
634
+ truncated: !1
635
+ };
636
+ let [r, i] = n ? v(e) : [e, ""], a = 0, o = r.length - 1;
637
+ for (; a < o;) {
638
+ let e = Math.ceil((a + o) / 2);
639
+ t(x(r, i, e)) ? a = e : o = e - 1;
640
+ }
641
+ return {
642
+ text: x(r, i, a),
643
+ truncated: !0
644
+ };
645
+ }
646
+ function te(e, t, n) {
647
+ let r = document.createElement("span");
648
+ r.style.cssText = `position: absolute; visibility: hidden; display: block; width: ${t}px; white-space: normal; overflow-wrap: anywhere;`, e.append(r);
649
+ let i = parseFloat(getComputedStyle(r).lineHeight);
650
+ return {
651
+ fits: (e) => (r.textContent = e, r.getBoundingClientRect().height <= n * i + .5),
652
+ done: () => r.remove()
653
+ };
654
+ }
655
+ function ne(e) {
656
+ let t = document.createElement("span");
657
+ return t.style.cssText = "position: absolute; visibility: hidden; white-space: pre;", e.append(t), {
658
+ measure: (e) => (t.textContent = e, t.getBoundingClientRect().width),
659
+ done: () => t.remove()
660
+ };
661
+ }
662
+ // src/components/inputs/file-field/file-field.template.ts
663
+ var re = {
664
+ pdf: "file-pdf",
665
+ png: "file-png",
666
+ jpg: "file-jpg",
667
+ jpeg: "file-jpg",
668
+ gif: "file-gif",
669
+ webp: "file-webp",
670
+ svg: "file-svg",
671
+ heic: "file-heic",
672
+ tif: "file-tiff",
673
+ tiff: "file-tiff",
674
+ md: "file-markdown",
675
+ markdown: "file-markdown",
676
+ txt: "file-text",
677
+ odt: "file-odt",
678
+ ods: "file-ods",
679
+ odp: "file-odp",
680
+ odg: "file-odg",
681
+ odf: "file-odf"
682
+ };
683
+ function ie(e) {
684
+ let t = e.files;
685
+ return e._folderName() ? "folder" : t.length > 1 ? "file-on-file" : re[v(t[0].name)[1].slice(1).toLowerCase()] ?? "file";
686
+ }
687
+ function w(e) {
688
+ return !e.invalid && !e.valid ? a : i`
689
+ <div class="file-field__validation-icon-area">
690
+ <nldd-icon class="file-field__validation-icon"
691
+ icon=${e.invalid ? "invalid" : "valid"}
692
+ aria-hidden="true"
693
+ ></nldd-icon>
694
+ </div>
695
+ `;
696
+ }
697
+ function T(e, t) {
698
+ return i`
699
+ <span class="file-field__${e}">${t.map((e) => i`
700
+ <span class=${f({
701
+ [`file-field__${e.kind}-text`]: !0,
702
+ "is-active": e.active
703
+ })}>${e.content}</span>
704
+ `)}</span>
705
+ `;
706
+ }
707
+ function E(e, t, n) {
708
+ let r = e._dragRejection ?? e._rejection, i = !r && e._drag !== "none";
709
+ return [
710
+ {
711
+ content: t,
712
+ kind: "drag",
713
+ active: i && e._drag === "page"
714
+ },
715
+ {
716
+ content: n,
717
+ kind: "drop",
718
+ active: i && e._drag === "over"
719
+ },
720
+ ...O(e, r)
721
+ ];
722
+ }
723
+ function D(e) {
724
+ if (e.variant === "area") return [];
725
+ let t = (t) => e._t(`components.file-field.${t}`), n = (e, n) => i`<span class="file-field__choose-text">${t(e)}</span> <span class="file-field__drop-hint-text">${t(n)}</span>`;
726
+ return [
727
+ [n("to-choose-file-action", "drop-hint-lowercase-text"), "idle"],
728
+ [n("to-choose-files-action", "drop-hint-multiple-lowercase-text"), "idle"],
729
+ ...e.directory ? [[n("to-choose-files-or-folder-action", "drop-hint-multiple-lowercase-text"), "idle"]] : [],
730
+ ...[
731
+ "drag-here-text",
732
+ "drag-here-multiple-text",
733
+ "replace-drag-text"
734
+ ].map((e) => [t(e), "drag"]),
735
+ ...[
736
+ "drop-here-text",
737
+ "drop-here-multiple-text",
738
+ "replace-drop-text"
739
+ ].map((e) => [t(e), "drop"]),
740
+ ...[
741
+ "type",
742
+ "count",
743
+ "folder",
744
+ "empty-folder",
745
+ "unreadable-folder"
746
+ ].map((t) => [e._rejectionText(t), "rejected"]),
747
+ [t("wrong-file-type-error-text"), "rejected"]
748
+ ].map(([e, t]) => ({
749
+ content: e,
750
+ kind: t,
751
+ active: !1
752
+ }));
753
+ }
754
+ function O(e, t) {
755
+ return (e._multiple ? [
756
+ "type",
757
+ "empty-folder",
758
+ "unreadable-folder"
759
+ ] : [
760
+ "type",
761
+ "folder",
762
+ "count"
763
+ ]).map((n) => ({
764
+ content: e._rejectionText(n),
765
+ kind: "rejected",
766
+ active: t === n
767
+ }));
768
+ }
769
+ function k(e) {
770
+ let t = e.variant === "area", n = e.size === "sm";
771
+ return i`<nldd-activity-indicator class="file-field__reading-indicator"
772
+ timing="instant"
773
+ size=${t ? n ? "24" : "32" : n ? "20" : "24"}
774
+ ?show-text=${t}
775
+ ></nldd-activity-indicator>`;
776
+ }
777
+ function A(e) {
778
+ return i`
779
+ <nldd-menu-item
780
+ icon="files"
781
+ text=${e._t("components.file-field.to-choose-files-menu-action")}
782
+ @select=${e._chooseFiles}
783
+ ></nldd-menu-item>
784
+ <nldd-menu-item
785
+ icon="folder"
786
+ text=${e._t("components.file-field.to-choose-folder-menu-action")}
787
+ @select=${e._chooseFolder}
788
+ ></nldd-menu-item>
789
+ `;
790
+ }
791
+ function j(e, t) {
792
+ return i`
793
+ <nldd-button class="file-field__change-button"
794
+ appearance="neutral-tinted"
795
+ size=${t}
796
+ text=${e._t("components.file-field.to-change-action")}
797
+ popup-type=${e.directory ? "menu" : a}
798
+ ?expandable=${e.directory}
799
+ ?expanded=${e._menuOpen}
800
+ accessible-label=${e._changeAccessibleLabel() || a}
801
+ ?disabled=${e.disabled}
802
+ @click=${(t) => e._handleChoose(t)}
803
+ ></nldd-button>
804
+ `;
805
+ }
806
+ function ae(e) {
807
+ let t = (t) => [t, e.accessibleLabel].filter(Boolean).join(", "), n = e._t("components.file-field.to-choose-files-action"), r = e._t("components.file-field.to-choose-folder-action");
808
+ return i`
809
+ <div class="file-field__choose-button-group">
810
+ <nldd-button
811
+ appearance="neutral-tinted"
812
+ size=${e.size}
813
+ start-icon="files"
814
+ text=${n}
815
+ accessible-label=${t(n)}
816
+ ?disabled=${e.disabled}
817
+ @click=${e._chooseFiles}
818
+ ></nldd-button>
819
+ <nldd-button
820
+ appearance="neutral-tinted"
821
+ size=${e.size}
822
+ start-icon="folder"
823
+ text=${r}
824
+ accessible-label=${t(r)}
825
+ ?disabled=${e.disabled}
826
+ @click=${e._chooseFolder}
827
+ ></nldd-button>
828
+ </div>
829
+ `;
830
+ }
831
+ function oe(e) {
832
+ let t = E(e, e._multiple ? e._t("components.file-field.drag-here-multiple-text") : e._t("components.file-field.drag-here-text"), e._multiple ? e._t("components.file-field.drop-here-multiple-text") : e._t("components.file-field.drop-here-text")), n = e.variant === "area", r = n && e.directory, o = i`<span class="file-field__drop-hint-text">${e._multiple ? e._t("components.file-field.drop-hint-multiple-lowercase-text") : e._t("components.file-field.drop-hint-lowercase-text")}</span>`, s = r ? o : i`<span class="file-field__choose-text">${e._chooseLabel()}</span> ${o}`, c = n && e._refused, l = n && !c ? e._acceptTypes() : null, u = t.some((e) => e.active), d = e._reading && !u, f = T("text", [
833
+ {
834
+ content: s,
835
+ kind: "idle",
836
+ active: !d && !u
837
+ },
838
+ ...t,
839
+ ...n ? [] : [{
840
+ content: d ? k(e) : "",
841
+ kind: "reading",
842
+ active: d
843
+ }],
844
+ ...D(e)
845
+ ]), p = i`<nldd-icon class="file-field__upload-icon" icon="upload-to-cloud" aria-hidden="true"></nldd-icon>`, m = r && !c ? ae(e) : a, h = l ? i`<span class="file-field__accepted-types">${e._t("components.file-field.accepted-types-text", { types: l })}</span>` : a, g = n && d ? i`${k(e)}${w(e)}` : i`${p}${m}${f}${h}${w(e)}`;
846
+ return r ? i`<div class="file-field__drop-area" ?inert=${e._refused}>${g}</div>` : i`
847
+ <button class="file-field__choose-button"
848
+ type="button"
849
+ ?inert=${e._refused}
850
+ aria-label=${e._chooseAccessibleLabel()}
851
+ aria-haspopup=${e.directory ? "menu" : a}
852
+ aria-expanded=${e.directory ? String(e._menuOpen) : a}
853
+ ?disabled=${e.disabled}
854
+ @click=${(t) => e._handleChoose(t)}
855
+ >${g}</button>
856
+ `;
857
+ }
858
+ function se(e, t) {
859
+ let [n, r] = b(t), o = e._fittedName === null ? i`<span class="file-field__name-start">${n}</span>${r ? i`<span class="file-field__name-end">${r}</span>` : a}` : i`<span class="file-field__name-start">${e._fittedName}</span>`;
860
+ return i`
861
+ <nldd-tooltip text=${t} timing=${e._nameTruncated ? "delay" : "never"}>
862
+ <span class=${f({
863
+ "file-field__name": !0,
864
+ "is-wrapped": e._nameLines > 1
865
+ })} aria-hidden="true">${o}</span>
866
+ </nldd-tooltip>
867
+ <span class="file-field__full-name">${t}</span>
868
+ `;
869
+ }
870
+ function ce(e, t) {
871
+ let n = e._valueLabel(), r = e._t("components.file-field.folder-count-short-text", {
872
+ folder: t,
873
+ count: e.files.length
874
+ }), o = e._nameLines > 1, s = (n, r) => {
875
+ let s = n.indexOf(t);
876
+ if (o) {
877
+ let a = s < 0 ? n : n.slice(0, s) + (e._fittedFolder ?? t) + n.slice(s + t.length);
878
+ return i`<span class="file-field__folder file-field__folder--${r} is-wrapped" aria-hidden="true">${a}</span>`;
879
+ }
880
+ let [c, l, u] = s < 0 ? [
881
+ "",
882
+ n,
883
+ ""
884
+ ] : [
885
+ n.slice(0, s),
886
+ t,
887
+ n.slice(s + t.length)
888
+ ];
889
+ return i`<span class="file-field__folder file-field__folder--${r}" aria-hidden="true">${c ? i`<span class="file-field__folder-rest">${c}</span>` : a}<span class="file-field__folder-name">${l}</span>${u ? i`<span class="file-field__folder-rest">${u}</span>` : a}</span>`;
890
+ };
891
+ return i`${s(n, "full")}${s(r, "short")}<span class="file-field__full-name">${n}</span>`;
892
+ }
893
+ function le(e, t) {
894
+ return i`
895
+ <nldd-icon-button class="file-field__more-button"
896
+ appearance="neutral-tinted"
897
+ size=${t}
898
+ icon="more"
899
+ text=${e._t("components.file-field.show-options-action")}
900
+ tooltip-timing="never"
901
+ accessible-label=${e._moreAccessibleLabel()}
902
+ ?disabled=${e.disabled}
903
+ >
904
+ <nldd-menu slot="popup">
905
+ ${e.directory ? A(e) : i`
906
+ <nldd-menu-item
907
+ icon="edit"
908
+ text=${e._t("components.file-field.to-change-action")}
909
+ @select=${e._chooseFiles}
910
+ ></nldd-menu-item>
911
+ `}
912
+ <nldd-menu-divider></nldd-menu-divider>
913
+ <nldd-menu-item
914
+ icon="dismiss"
915
+ text=${e._t("components.file-field.clear-action")}
916
+ destructive
917
+ @select=${e._handleClear}
918
+ ></nldd-menu-item>
919
+ </nldd-menu>
920
+ </nldd-icon-button>
921
+ `;
922
+ }
923
+ function ue(e) {
924
+ let t = e.files, n = e.variant === "area", r = e.size === "sm" ? "xs" : "sm", a = e._drag !== "none" || e._rejection !== null, o = E(e, e._t("components.file-field.replace-drag-text"), e._t("components.file-field.replace-drop-text")).map((e) => ({
925
+ ...e,
926
+ active: e.active && a
927
+ })), s = e._folderName(), c = s ? ce(e, s) : t.length === 1 ? se(e, t[0].name) : e._valueLabel();
928
+ return i`
929
+ <div class="file-field__chosen-area" ?inert=${e._refused}>
930
+ <div class=${f({
931
+ "file-field__chosen-file": !0,
932
+ "is-active": !a
933
+ })}>
934
+ <nldd-icon class="file-field__file-icon" icon=${ie(e)} aria-hidden="true"></nldd-icon>
935
+ ${T("value", [{
936
+ content: c,
937
+ kind: "idle",
938
+ active: !0
939
+ }])}
940
+ ${n ? i`
941
+ <div class="file-field__edit-button-group">
942
+ ${j(e, e.size)}
943
+ <nldd-button
944
+ appearance="neutral-base"
945
+ size=${e.size}
946
+ text=${e._t("components.file-field.clear-action")}
947
+ accessible-label=${e._clearAccessibleLabel()}
948
+ ?disabled=${e.disabled}
949
+ @click=${e._handleClear}
950
+ ></nldd-button>
951
+ </div>
952
+ ` : i`
953
+ <div class="file-field__edit-button-group">
954
+ ${j(e, r)}
955
+ <nldd-icon-button class="file-field__clear-button"
956
+ appearance="neutral-transparent"
957
+ size=${r}
958
+ icon="dismiss"
959
+ text=${e._t("components.file-field.clear-action")}
960
+ accessible-label=${e._clearAccessibleLabel()}
961
+ tooltip-timing="never"
962
+ ?disabled=${e.disabled}
963
+ @click=${e._handleClear}
964
+ ></nldd-icon-button>
965
+ ${le(e, r)}
966
+ </div>
967
+ `}
968
+ ${w(e)}
969
+ </div>
970
+ <div class=${f({
971
+ "file-field__replace-area": !0,
972
+ "is-active": a
973
+ })}>
974
+ <nldd-icon class="file-field__upload-icon" icon="upload-to-cloud" aria-hidden="true"></nldd-icon>
975
+ ${T("text", [...o, ...D(e)])}
976
+ ${w(e)}
977
+ </div>
978
+ </div>
979
+ `;
980
+ }
981
+ function de(e) {
982
+ let t = e.files.length > 0 && !e._reading;
983
+ return i`
984
+ <div aria-busy=${e._reading ? "true" : a} class=${f({
985
+ "file-field": !0,
986
+ "file-field--area": e.variant === "area",
987
+ "has-files": t,
988
+ "is-refused": e._refused,
989
+ [`is-drag-${e._drag}`]: e._drag !== "none"
990
+ })}>
991
+ <input class="file-field__input"
992
+ type="file"
993
+ id=${e.inputId || a}
994
+ accept=${e.accept || a}
995
+ ?multiple=${e._multiple}
996
+ ?disabled=${e.disabled}
997
+ ?required=${e.required}
998
+ aria-label=${e.accessibleLabel || a}
999
+ @change=${e._handleInputChange}
1000
+ >
1001
+ ${e.directory ? i`
1002
+ <input class="file-field__folder-input"
1003
+ type="file"
1004
+ webkitdirectory
1005
+ multiple
1006
+ ?disabled=${e.disabled}
1007
+ @change=${e._handleInputChange}
1008
+ >
1009
+ <span class="file-field__menu-anchor"></span>
1010
+ <nldd-menu class="file-field__choose-menu"
1011
+ @beforetoggle=${(t) => e._handleMenuToggle(t)}
1012
+ >${A(e)}</nldd-menu>
1013
+ ` : a}
1014
+ ${t ? ue(e) : oe(e)}
1015
+ ${e._refused ? i`
1016
+ <button class="file-field__dismiss-button"
1017
+ type="button"
1018
+ aria-label=${e._dismissAccessibleLabel()}
1019
+ @click=${() => e._handleDismiss()}
1020
+ ></button>
1021
+ ` : a}
1022
+ <span class="file-field__status" role="status">${e._rejection ? e._rejectionText(e._rejection) : e._announcement}</span>
1023
+ </div>
1024
+ `;
1025
+ }
1026
+ // src/components/inputs/file-field/file-field.drop.ts
1027
+ var M = {
1028
+ pdf: ["application/pdf"],
1029
+ png: ["image/png"],
1030
+ jpg: ["image/jpeg"],
1031
+ jpeg: ["image/jpeg"],
1032
+ gif: ["image/gif"],
1033
+ webp: ["image/webp"],
1034
+ svg: ["image/svg+xml"],
1035
+ heic: ["image/heic"],
1036
+ tif: ["image/tiff"],
1037
+ tiff: ["image/tiff"],
1038
+ txt: ["text/plain"],
1039
+ csv: ["text/csv"],
1040
+ json: ["application/json"],
1041
+ odt: ["application/vnd.oasis.opendocument.text"],
1042
+ ods: ["application/vnd.oasis.opendocument.spreadsheet"],
1043
+ odp: ["application/vnd.oasis.opendocument.presentation"],
1044
+ docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
1045
+ xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]
1046
+ }, N = {
1047
+ jpeg: "JPG",
1048
+ tif: "TIFF"
1049
+ };
1050
+ function P(e) {
1051
+ let t = [], n = (e) => {
1052
+ t.some((t) => JSON.stringify(t) === JSON.stringify(e)) || t.push(e);
1053
+ };
1054
+ for (let t of I(e)) {
1055
+ if (t.startsWith(".")) {
1056
+ let e = t.slice(1);
1057
+ n(N[e] ?? e.toUpperCase());
1058
+ continue;
1059
+ }
1060
+ let e = /^(image|video|audio)\/\*$/.exec(t)?.[1];
1061
+ if (e) {
1062
+ n({ family: e });
1063
+ continue;
1064
+ }
1065
+ let r = Object.keys(M).find((e) => M[e].includes(t));
1066
+ if (!r) return null;
1067
+ n(N[r] ?? r.toUpperCase());
1068
+ }
1069
+ return t.length > 0 ? t : null;
1070
+ }
1071
+ function F(e) {
1072
+ return {
1073
+ jpeg: "jpg",
1074
+ tif: "tiff"
1075
+ }[e] ?? e;
1076
+ }
1077
+ function I(e) {
1078
+ return e.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
1079
+ }
1080
+ function L(e, t) {
1081
+ return e.endsWith("/*") ? t.startsWith(e.slice(0, -1)) : e === t;
1082
+ }
1083
+ function R(e, t) {
1084
+ let n = I(e);
1085
+ if (n.length === 0) return !0;
1086
+ let r = t.name.toLowerCase(), i = t.type.toLowerCase() || M[r.slice(r.lastIndexOf(".") + 1)]?.[0] || "", a = F(r.slice(r.lastIndexOf(".") + 1));
1087
+ return n.some((e) => e.startsWith(".") ? F(e.slice(1)) === a : L(e, i));
1088
+ }
1089
+ function z(e, t) {
1090
+ let n = I(e);
1091
+ if (n.length === 0 || !t) return !1;
1092
+ let r = t.toLowerCase();
1093
+ return n.every((e) => {
1094
+ if (!e.startsWith(".")) return !L(e, r);
1095
+ let t = M[e.slice(1)];
1096
+ return t !== void 0 && !t.includes(r);
1097
+ });
1098
+ }
1099
+ function B(e) {
1100
+ return Array.from(e.items).some((e) => e.kind === "file" && e.webkitGetAsEntry?.()?.isDirectory);
1101
+ }
1102
+ function V(e) {
1103
+ let t = Array.from(e.items).filter((e) => e.kind === "file").map((e) => e.webkitGetAsEntry?.()).filter((e) => !!e);
1104
+ return Promise.all(t.map(H)).then((e) => e.flat());
1105
+ }
1106
+ function H(e) {
1107
+ let t = e.fullPath.replace(/^\//, "");
1108
+ if (e.isFile) return new Promise((n, r) => {
1109
+ e.file((e) => n([{
1110
+ file: e,
1111
+ path: t
1112
+ }]), r);
1113
+ });
1114
+ let n = e.createReader(), r = () => new Promise((e, t) => n.readEntries(e, t)), i = [], a = () => r().then((e) => e.length === 0 ? i : (i.push(...e), a()));
1115
+ return a().then((e) => Promise.all(e.map(H))).then((e) => e.flat());
1116
+ }
1117
+ function U(e) {
1118
+ return !!e && Array.from(e.types).includes("Files");
1119
+ }
1120
+ function W(e) {
1121
+ let t = e[0];
1122
+ return t instanceof HTMLElement ? t.isContentEditable || t instanceof HTMLTextAreaElement || t instanceof HTMLInputElement && t.type === "file" : !1;
1123
+ }
1124
+ var G = /* @__PURE__ */ new Set(), fe = 1e3, K;
1125
+ function q() {
1126
+ clearTimeout(K);
1127
+ for (let e of G) e._setDrag("none", null);
1128
+ }
1129
+ function J(e) {
1130
+ if (!U(e.dataTransfer)) return;
1131
+ let t = e.composedPath();
1132
+ for (let n of G) n._setDrag(t.includes(n) ? "over" : "page", e.dataTransfer);
1133
+ clearTimeout(K), K = setTimeout(q, fe), !(e.defaultPrevented || W(t)) && (e.preventDefault(), e.dataTransfer.dropEffect = "none");
1134
+ }
1135
+ function Y(e) {
1136
+ U(e.dataTransfer) && (!e.defaultPrevented && !W(e.composedPath()) && e.preventDefault(), q());
1137
+ }
1138
+ function pe(e) {
1139
+ G.size === 0 && (window.addEventListener("dragover", J), window.addEventListener("drop", Y), window.addEventListener("dragend", q)), G.add(e);
1140
+ }
1141
+ function me(e) {
1142
+ G.delete(e), !(G.size > 0) && (window.removeEventListener("dragover", J), window.removeEventListener("drop", Y), window.removeEventListener("dragend", q), clearTimeout(K));
1143
+ }
1144
+ // src/utilities/file-drag-and-drop.ts
1145
+ var X = "(hover: none)";
1146
+ function he() {
1147
+ return typeof matchMedia != "function" || !matchMedia(X).matches;
1148
+ }
1149
+ var Z = class {
1150
+ constructor(e, t) {
1151
+ this._query = typeof matchMedia == "function" ? matchMedia(X) : null, this._handleChange = () => this._onChange(), this._onChange = t ?? (() => e.requestUpdate()), e.addController(this);
1152
+ }
1153
+ hostConnected() {
1154
+ this._query?.addEventListener("change", this._handleChange);
1155
+ }
1156
+ hostDisconnected() {
1157
+ this._query?.removeEventListener("change", this._handleChange);
1158
+ }
1159
+ }, Q, ge = 4e3, _e = 1e3, ve = 300, ye = {
1160
+ image: "components.file-field.image-lowercase",
1161
+ video: "components.file-field.video-lowercase",
1162
+ audio: "components.file-field.audio-file-lowercase"
1163
+ }, $ = (Q = class extends p(h(r)) {
1164
+ constructor(...e) {
1165
+ super(...e), this.variant = "control", this.size = "md", this.accept = "", this.multiple = !1, this.directory = !1, this.accessibleLabel = "", this.inputId = "", this.valid = !1, this.invalid = !1, this.disabled = !1, this.name = "", this.required = !1, this.translations = {}, this._files = [], this._paths = [], this._drag = "none", this._dragRejection = null, this._fittedName = null, this._nameTruncated = !1, this._fittedFolder = null, this._nameLines = 1, this._announcement = "", this._reading = !1, this._rejection = null, this._menuOpen = !1, this._menuClosedAt = -Infinity, this._fileDrag = new Z(this), this._action = 0, this._handleDragOver = (e) => {
1166
+ !this.disabled && e.dataTransfer && U(e.dataTransfer) && (this._judge(e.dataTransfer) || (e.preventDefault(), e.dataTransfer.dropEffect = "copy"));
1167
+ }, this._handleDrop = (e) => {
1168
+ if (!e.dataTransfer || !U(e.dataTransfer) || (e.preventDefault(), this.disabled)) return;
1169
+ let t = ++this._action;
1170
+ this._stopReading();
1171
+ let n = Array.from(e.dataTransfer.files), r = this._judge(e.dataTransfer, n);
1172
+ r ? this._refuse(r) : B(e.dataTransfer) ? (this._readingTimer = setTimeout(() => {
1173
+ this._reading = !0;
1174
+ }, _e), V(e.dataTransfer).then((e) => {
1175
+ t === this._action && (this._stopReading(), e.length ? this._takeDrop(e) : this._refuse("empty-folder"));
1176
+ }, () => {
1177
+ t === this._action && (this._stopReading(), this._refuse("unreadable-folder"));
1178
+ })) : this._takeDrop(n.map((e) => ({
1179
+ file: e,
1180
+ path: e.name
1181
+ })));
1182
+ }, this._clearRejection = () => {
1183
+ let e = this.shadowRoot?.activeElement?.classList.contains("file-field__dismiss-button") ?? !1;
1184
+ clearTimeout(this._rejectionTimer), this._rejection = null, this._announcement = "", e && this.updateComplete.then(() => this.focus());
1185
+ }, this._handleKeydown = (e) => {
1186
+ e.key === "Escape" && this._clearRejection();
1187
+ };
1188
+ }
1189
+ get _multiple() {
1190
+ return this.multiple || this.directory;
1191
+ }
1192
+ get files() {
1193
+ return this._files;
1194
+ }
1195
+ get paths() {
1196
+ return this._paths;
1197
+ }
1198
+ get _refused() {
1199
+ return this._rejection !== null && this._drag === "none";
1200
+ }
1201
+ _t(e, t) {
1202
+ return d(this.translations, g, e, t);
1203
+ }
1204
+ _chooseLabel() {
1205
+ return this.directory ? this._t("components.file-field.to-choose-files-or-folder-action") : this._multiple ? this._t("components.file-field.to-choose-files-action") : this._t("components.file-field.to-choose-file-action");
1206
+ }
1207
+ _chooseAccessibleLabel() {
1208
+ let e = he() ? this._multiple ? this._t("components.file-field.drop-hint-multiple-lowercase-text") : this._t("components.file-field.drop-hint-lowercase-text") : "", t = this.variant === "area" ? this._acceptTypes() : null;
1209
+ return [
1210
+ e ? `${this._chooseLabel()} ${e}` : this._chooseLabel(),
1211
+ t ? this._t("components.file-field.accepted-types-text", { types: t }) : "",
1212
+ this.accessibleLabel
1213
+ ].filter(Boolean).join(", ");
1214
+ }
1215
+ _changeAccessibleLabel() {
1216
+ return [
1217
+ this._t("components.file-field.to-change-action"),
1218
+ this.accessibleLabel,
1219
+ this._valueLabel()
1220
+ ].filter(Boolean).join(", ");
1221
+ }
1222
+ _clearAccessibleLabel() {
1223
+ return `${this._t("components.file-field.clear-action")}, ${this._valueLabel()}`;
1224
+ }
1225
+ _acceptTypes() {
1226
+ let e = P(this.accept);
1227
+ if (!e) return null;
1228
+ let t = e.map((e) => typeof e == "string" ? e : this._t(ye[e.family]));
1229
+ return t.length === 1 ? t[0] : this._t("components.file-field.list-lowercase-text", {
1230
+ items: t.slice(0, -1).join(", "),
1231
+ last: t[t.length - 1]
1232
+ });
1233
+ }
1234
+ _rejectionText(e) {
1235
+ if (e === "count") return this._t("components.file-field.too-many-files-error-text");
1236
+ if (e === "folder") return this._t("components.file-field.folder-error-text");
1237
+ if (e === "empty-folder") return this._t("components.file-field.empty-folder-error-text");
1238
+ if (e === "unreadable-folder") return this._t("components.file-field.unreadable-folder-error-text");
1239
+ let t = this._acceptTypes();
1240
+ return t ? this._multiple ? this._t("components.file-field.files-type-error-text", { types: t }) : this._t("components.file-field.file-type-error-text", { types: t }) : this._t("components.file-field.wrong-file-type-error-text");
1241
+ }
1242
+ _moreAccessibleLabel() {
1243
+ return `${this._t("components.file-field.show-options-action")}, ${this._valueLabel()}`;
1244
+ }
1245
+ _valueLabel() {
1246
+ let e = this._folderName();
1247
+ return e ? this._files.length === 1 ? this._t("components.file-field.folder-one-file-text", { folder: e }) : this._t("components.file-field.folder-count-text", {
1248
+ folder: e,
1249
+ count: this._files.length
1250
+ }) : this._files.length === 1 ? this._files[0].name : this._t("components.file-field.file-count-text", { count: this._files.length });
1251
+ }
1252
+ _folderName() {
1253
+ let e = new Set(this._paths.map((e) => e.includes("/") ? e.split("/")[0] : "")), [t] = e;
1254
+ return e.size === 1 && t ? t : null;
1255
+ }
1256
+ connectedCallback() {
1257
+ super.connectedCallback(), pe(this), this._resizeObserver ?? (this._resizeObserver = new ResizeObserver(() => this._fitName())), this._resizeObserver.observe(this), document.fonts?.ready.then(() => {
1258
+ this.isConnected && this._fitName();
1259
+ }), this.addEventListener("dragover", this._handleDragOver), this.addEventListener("drop", this._handleDrop), this.addEventListener("keydown", this._handleKeydown);
1260
+ }
1261
+ disconnectedCallback() {
1262
+ super.disconnectedCallback(), me(this), this._resizeObserver?.disconnect(), clearTimeout(this._rejectionTimer), this._stopReading(), this._observedValue = void 0, this.removeEventListener("dragover", this._handleDragOver), this.removeEventListener("drop", this._handleDrop), this.removeEventListener("keydown", this._handleKeydown);
1263
+ }
1264
+ updated(e) {
1265
+ (e.has("_files") || e.has("size") || e.has("variant") || e.has("_drag")) && this._fitNameAfterRender();
1266
+ }
1267
+ async _fitNameAfterRender() {
1268
+ let e = this.shadowRoot?.querySelectorAll("nldd-button, nldd-icon-button") ?? [];
1269
+ await Promise.all(Array.from(e, (e) => e.updateComplete)), this._fitName();
1270
+ }
1271
+ _fitName() {
1272
+ let e = this.shadowRoot, t = e?.querySelector(".file-field__value"), n = this._folderName(), r = n ? Array.from(e?.querySelectorAll(".file-field__folder") ?? []).find((e) => e.checkVisibility()) : e?.querySelector(".file-field__name");
1273
+ if (!t || !r || !n && this._files.length !== 1) {
1274
+ this._resetFit();
1275
+ return;
1276
+ }
1277
+ t !== this._observedValue && (this._observedValue && this._resizeObserver?.unobserve(this._observedValue), this._resizeObserver?.observe(t), this._observedValue = t);
1278
+ let i = getComputedStyle(t), a = t.clientWidth - parseFloat(i.paddingLeft) - parseFloat(i.paddingRight);
1279
+ if (a <= 0) {
1280
+ this._resetFit();
1281
+ return;
1282
+ }
1283
+ let o = this._nameLinesFor(t);
1284
+ if (this._nameLines = o, n) {
1285
+ if (o === 1) {
1286
+ this._fittedFolder = null, this._nameTruncated = !1;
1287
+ return;
1288
+ }
1289
+ let e = r.classList.contains("file-field__folder--short") ? this._t("components.file-field.folder-count-short-text", {
1290
+ folder: n,
1291
+ count: this._files.length
1292
+ }) : this._valueLabel(), i = e.indexOf(n), [s, c] = i < 0 ? ["", ""] : [e.slice(0, i), e.slice(i + n.length)], { text: l, truncated: u } = this._cutToLines(t, a, o, n, (e) => s + e + c, !1);
1293
+ this._fittedFolder = l, this._nameTruncated = u;
1294
+ return;
1295
+ }
1296
+ let s = this._files[0].name;
1297
+ if (o === 1) {
1298
+ let { measure: e, done: t } = ne(r);
1299
+ try {
1300
+ let { text: t, truncated: n } = S(s, a, e);
1301
+ this._fittedName = t, this._nameTruncated = n;
1302
+ } finally {
1303
+ t();
1304
+ }
1305
+ return;
1306
+ }
1307
+ let { text: c, truncated: l } = this._cutToLines(t, a, o, s);
1308
+ this._fittedName = c, this._nameTruncated = l;
1309
+ }
1310
+ _cutToLines(e, t, n, r, i = (e) => e, a = !0) {
1311
+ let { fits: o, done: s } = te(e, t, n);
1312
+ try {
1313
+ return C(r, (e) => o(i(e)), { keepExtension: a });
1314
+ } finally {
1315
+ s();
1316
+ }
1317
+ }
1318
+ _nameLinesFor(e) {
1319
+ let t = this.shadowRoot?.querySelector(".file-field__replace-area .file-field__text");
1320
+ if (this.variant === "area" || !t) return 1;
1321
+ let n = getComputedStyle(t), r = t.clientHeight - parseFloat(n.paddingTop) - parseFloat(n.paddingBottom);
1322
+ return Math.max(1, Math.floor((r + .5) / parseFloat(getComputedStyle(e).lineHeight)));
1323
+ }
1324
+ _resetFit() {
1325
+ this._fittedName = null, this._fittedFolder = null, this._nameTruncated = !1, this._nameLines = 1;
1326
+ }
1327
+ willUpdate(e) {
1328
+ e.has("_files") && this._resetFit(), e.has("required") && this._updateValidity(), e.has("accessibleLabel") && (this.internals.ariaLabel = this.accessibleLabel || null);
1329
+ }
1330
+ _handleChoose(e) {
1331
+ this._clearRejection();
1332
+ let t = this._chooseMenu;
1333
+ if (this.directory && t && e?.currentTarget instanceof Element) {
1334
+ if (t.matches(":popover-open")) {
1335
+ t.hidePopover();
1336
+ return;
1337
+ }
1338
+ if (performance.now() - this._menuClosedAt < ve) return;
1339
+ t.anchorElement = e.currentTarget.classList.contains("file-field__choose-button") && this._pointAt(e) || e.currentTarget, t.showPopover();
1340
+ } else this._input?.click();
1341
+ }
1342
+ _pointAt(e) {
1343
+ let t = this._menuAnchor, n = t?.parentElement;
1344
+ if (!(e instanceof MouseEvent) || e.detail === 0 || !t || !n) return null;
1345
+ let r = n.getBoundingClientRect();
1346
+ return t.style.left = `${e.clientX - r.left}px`, t.style.top = `${e.clientY - r.top}px`, t;
1347
+ }
1348
+ _handleMenuToggle(e) {
1349
+ this._menuOpen = e.newState === "open", this._menuOpen || (this._menuClosedAt = performance.now());
1350
+ }
1351
+ _chooseFiles() {
1352
+ this._input?.click();
1353
+ }
1354
+ _chooseFolder() {
1355
+ this._folderInput?.click();
1356
+ }
1357
+ _handleInputChange(e) {
1358
+ e.stopPropagation();
1359
+ let t = e.target;
1360
+ this._action++, this._stopReading();
1361
+ let n = t === this._input ? this._folderInput : this._input;
1362
+ n && (n.value = "");
1363
+ let r = this.matches(":focus-within");
1364
+ this._files = t.files ? Array.from(t.files) : [], this._paths = this._files.map((e) => e.webkitRelativePath || e.name), this._clearRejection(), this._commit(), r && this.updateComplete.then(() => this.focus());
1365
+ }
1366
+ _judge(e, t) {
1367
+ if (t) return !this._multiple && t.length > 1 ? "count" : B(e) ? this._multiple ? null : "folder" : t.every((e) => R(this.accept, e)) ? null : "type";
1368
+ let n = Array.from(e.items).filter((e) => e.kind === "file");
1369
+ return !this._multiple && n.length > 1 ? "count" : n.some((e) => z(this.accept, e.type)) ? "type" : null;
1370
+ }
1371
+ _setDrag(e, t) {
1372
+ this.disabled && (e = "none"), (e === "over" || e !== this._drag) && (e !== "none" && this._drag === "none" && this._clearRejection(), this._dragRejection = e === "over" && t ? this._judge(t) : null, this._drag = this._dragRejection ? "rejected" : e);
1373
+ }
1374
+ _takeDrop(e) {
1375
+ if (!e.every(({ file: e }) => R(this.accept, e))) {
1376
+ this._refuse("type");
1377
+ return;
1378
+ }
1379
+ let t = new DataTransfer();
1380
+ for (let { file: n } of e) t.items.add(n);
1381
+ this._input && (this._input.files = t.files), this._folderInput && (this._folderInput.value = ""), this._files = e.map(({ file: e }) => e), this._paths = e.map(({ path: e }) => e), this._clearRejection(), this._announcement = this._t("components.file-field.file-chosen-text", { name: this._valueLabel() }), this._commit();
1382
+ }
1383
+ _refuse(e) {
1384
+ let t = this.matches(":focus-within");
1385
+ this._rejection = e, clearTimeout(this._rejectionTimer), this._rejectionTimer = setTimeout(() => {
1386
+ this._clearRejection(), this._announcement = this._rejectionText(e);
1387
+ }, ge), t && this.updateComplete.then(() => this.focus());
1388
+ }
1389
+ _stopReading() {
1390
+ clearTimeout(this._readingTimer), this._reading = !1;
1391
+ }
1392
+ _handleDismiss() {
1393
+ this._clearRejection(), this.updateComplete.then(() => this.focus());
1394
+ }
1395
+ _dismissAccessibleLabel() {
1396
+ return this._rejection ? [
1397
+ this._rejectionText(this._rejection),
1398
+ this._t("components.file-field.dismiss-message-lowercase-action"),
1399
+ this.accessibleLabel
1400
+ ].filter(Boolean).join(", ") : "";
1401
+ }
1402
+ _handleClear() {
1403
+ this._action++, this._stopReading(), this._input && (this._input.value = ""), this._folderInput && (this._folderInput.value = ""), this._files = [], this._paths = [], this._commit(), this.updateComplete.then(() => this.focus());
1404
+ }
1405
+ _commit() {
1406
+ this.commitFormValue(), this.dispatchEvent(new CustomEvent("change", {
1407
+ detail: {
1408
+ files: this._files,
1409
+ paths: this._paths
1410
+ },
1411
+ bubbles: !0,
1412
+ composed: !0
1413
+ }));
1414
+ }
1415
+ formValue() {
1416
+ if (!this.name || this._files.length === 0) return null;
1417
+ let e = this._paths.some((e) => e.includes("/"));
1418
+ if (this._files.length === 1 && !e) return this._files[0];
1419
+ let t = new FormData();
1420
+ return this._files.forEach((e, n) => t.append(this.name, e, this._paths[n] ?? e.name)), t;
1421
+ }
1422
+ commitFormValue() {
1423
+ super.commitFormValue(), this._updateValidity();
1424
+ }
1425
+ _updateValidity() {
1426
+ this.required && this._files.length === 0 ? this.internals.setValidity({ valueMissing: !0 }, this._t("components.file-field.required-error-text"), this._input ?? this) : this.internals.setValidity({});
1427
+ }
1428
+ formResetCallback() {
1429
+ this._action++, this._stopReading(), this._clearRejection(), this._input && (this._input.value = ""), this._folderInput && (this._folderInput.value = ""), this._files = [], this._paths = [], this.commitFormValue();
1430
+ }
1431
+ _chooseButton() {
1432
+ let e = this.shadowRoot?.querySelector(".file-field__dismiss-button");
1433
+ if (e) return e;
1434
+ let t = this.shadowRoot?.querySelectorAll(".file-field__choose-button, .file-field__choose-button-group nldd-button, .file-field__change-button, .file-field__more-button") ?? [];
1435
+ return Array.from(t).find((e) => e.checkVisibility?.() ?? !0) ?? t[0] ?? null;
1436
+ }
1437
+ focus(e) {
1438
+ m(this, e) || this._chooseButton()?.focus(e);
1439
+ }
1440
+ describedTarget() {
1441
+ return this._chooseButton();
1442
+ }
1443
+ render() {
1444
+ return de(this);
1445
+ }
1446
+ }, Q.styles = ee, Q.isFormInput = !0, Q);
1447
+ o([t({
1448
+ reflect: !0,
1449
+ converter: l("control")
1450
+ })], $.prototype, "variant", void 0), o([t({
1451
+ reflect: !0,
1452
+ converter: l("md")
1453
+ })], $.prototype, "size", void 0), o([t({
1454
+ reflect: !0,
1455
+ converter: l("")
1456
+ })], $.prototype, "accept", void 0), o([t({
1457
+ type: Boolean,
1458
+ reflect: !0
1459
+ })], $.prototype, "multiple", void 0), o([t({
1460
+ type: Boolean,
1461
+ reflect: !0
1462
+ })], $.prototype, "directory", void 0), o([t({
1463
+ type: String,
1464
+ attribute: "accessible-label"
1465
+ })], $.prototype, "accessibleLabel", void 0), o([t({
1466
+ type: String,
1467
+ attribute: "input-id"
1468
+ })], $.prototype, "inputId", void 0), o([t({
1469
+ type: Boolean,
1470
+ reflect: !0
1471
+ })], $.prototype, "valid", void 0), o([t({
1472
+ type: Boolean,
1473
+ reflect: !0
1474
+ })], $.prototype, "invalid", void 0), o([t({
1475
+ type: Boolean,
1476
+ reflect: !0
1477
+ })], $.prototype, "disabled", void 0), o([t({
1478
+ reflect: !0,
1479
+ converter: l("")
1480
+ })], $.prototype, "name", void 0), o([t({
1481
+ type: Boolean,
1482
+ reflect: !0
1483
+ })], $.prototype, "required", void 0), o([t({ type: Object })], $.prototype, "translations", void 0), o([n()], $.prototype, "_files", void 0), o([n()], $.prototype, "_drag", void 0), o([n()], $.prototype, "_dragRejection", void 0), o([n()], $.prototype, "_fittedName", void 0), o([n()], $.prototype, "_nameTruncated", void 0), o([n()], $.prototype, "_fittedFolder", void 0), o([n()], $.prototype, "_nameLines", void 0), o([n()], $.prototype, "_announcement", void 0), o([n()], $.prototype, "_reading", void 0), o([n()], $.prototype, "_rejection", void 0), o([n()], $.prototype, "_menuOpen", void 0), o([c(".file-field__input")], $.prototype, "_input", void 0), o([c(".file-field__folder-input")], $.prototype, "_folderInput", void 0), o([c(".file-field__choose-menu")], $.prototype, "_chooseMenu", void 0), o([c(".file-field__menu-anchor")], $.prototype, "_menuAnchor", void 0), $ = o([s("nldd-file-field")], $);
1484
+ export { $ as NLDDFileField };