@redvars/peacock 4.0.0 → 4.1.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 (408) hide show
  1. package/dist/{BaseField-CAog9TIc.js → BaseField-BMumJpkW.js} +6 -3
  2. package/dist/BaseField-BMumJpkW.js.map +1 -0
  3. package/dist/{BaseInput-CcMfg1Y2.js → BaseInput-mWdyYv27.js} +6 -3
  4. package/dist/BaseInput-mWdyYv27.js.map +1 -0
  5. package/dist/accordion.js.map +1 -1
  6. package/dist/ai-badge.js +2 -2
  7. package/dist/ai-summary.js +2 -2
  8. package/dist/alert.js +2 -2
  9. package/dist/anchor-nav.js +2 -2
  10. package/dist/app-shell.js +2 -2
  11. package/dist/assistant-panel.js +2 -2
  12. package/dist/assistant-step.js +2 -2
  13. package/dist/assistant-steps.js +2 -2
  14. package/dist/avatar-group.js +2 -2
  15. package/dist/banner.js +2 -2
  16. package/dist/{base-button-Do2TUy8M.js → base-button-BJMGMcMv.js} +3 -1
  17. package/dist/base-button-BJMGMcMv.js.map +1 -0
  18. package/dist/{base-progress-BiLlZVHJ.js → base-progress-CvLVSjuy.js} +4 -2
  19. package/dist/base-progress-CvLVSjuy.js.map +1 -0
  20. package/dist/bottom-sheet.js +2 -2
  21. package/dist/breadcrumb.js +2 -2
  22. package/dist/button-group.js +4 -4
  23. package/dist/button.js +3 -3
  24. package/dist/calendar.js +2 -2
  25. package/dist/canvas-base-BTQMEVn_.js +788 -0
  26. package/dist/canvas-base-BTQMEVn_.js.map +1 -0
  27. package/dist/canvas-link-CtgsALq4.js +54 -0
  28. package/dist/canvas-link-CtgsALq4.js.map +1 -0
  29. package/dist/{cartesian-chart-C-f1frt0.js → cartesian-chart-DM1FC_XT.js} +3 -2
  30. package/dist/cartesian-chart-DM1FC_XT.js.map +1 -0
  31. package/dist/{cb-group-base-DeuCVx3a.js → cb-group-base-B6fa4Lll.js} +2 -2
  32. package/dist/{cb-group-base-DeuCVx3a.js.map → cb-group-base-B6fa4Lll.js.map} +1 -1
  33. package/dist/cb-group.js +3 -3
  34. package/dist/cb-rule.js +3 -3
  35. package/dist/chart-area.js +5 -4
  36. package/dist/chart-area.js.map +1 -1
  37. package/dist/chart-bar.js +5 -4
  38. package/dist/chart-bar.js.map +1 -1
  39. package/dist/chart-base-Dhxuw_Mw.js +833 -0
  40. package/dist/chart-base-Dhxuw_Mw.js.map +1 -0
  41. package/dist/chart-doughnut.js +4 -3
  42. package/dist/chart-doughnut.js.map +1 -1
  43. package/dist/chart-line.js +5 -4
  44. package/dist/chart-line.js.map +1 -1
  45. package/dist/chart-pie.js +4 -3
  46. package/dist/chart-pie.js.map +1 -1
  47. package/dist/chat-message.js +2 -2
  48. package/dist/chat-thread.js +2 -2
  49. package/dist/checkbox-group.js +4 -4
  50. package/dist/checkbox.js +4 -4
  51. package/dist/chip-set.js +3 -3
  52. package/dist/chip.js +4 -4
  53. package/dist/circular-progress.js +3 -3
  54. package/dist/citation.js +2 -2
  55. package/dist/code-editor.js +5 -4
  56. package/dist/code-editor.js.map +1 -1
  57. package/dist/code-highlighter.js +2 -2
  58. package/dist/color-field.js +5 -5
  59. package/dist/color-picker.js +2 -2
  60. package/dist/command-palette.js +2 -2
  61. package/dist/comment-composer.js +5 -5
  62. package/dist/condition-builder.js +3 -3
  63. package/dist/confirm-dialog.js +2 -2
  64. package/dist/copy-button.js +2 -2
  65. package/dist/currency-field.js +5 -5
  66. package/dist/custom-elements-jsdocs.json +2115 -336
  67. package/dist/custom-elements.json +19483 -615
  68. package/dist/date-field.js +6 -6
  69. package/dist/date-picker.js +4 -2
  70. package/dist/date-picker.js.map +1 -1
  71. package/dist/date-range-field.js +6 -6
  72. package/dist/datetime-field.js +6 -6
  73. package/dist/dependency-map-layout-5KUueabk.js +1390 -0
  74. package/dist/dependency-map-layout-5KUueabk.js.map +1 -0
  75. package/dist/dependency-map.js +1605 -0
  76. package/dist/dependency-map.js.map +1 -0
  77. package/dist/description-item.js +2 -2
  78. package/dist/description-list.js +2 -2
  79. package/dist/diagram-2r11KySs.js +2029 -0
  80. package/dist/diagram-2r11KySs.js.map +1 -0
  81. package/dist/diagram-controls.js +345 -0
  82. package/dist/diagram-controls.js.map +1 -0
  83. package/dist/diagram-minimap.js +216 -0
  84. package/dist/diagram-minimap.js.map +1 -0
  85. package/dist/diagram.js +20 -0
  86. package/dist/diagram.js.map +1 -0
  87. package/dist/diff-viewer.js +2 -2
  88. package/dist/discussion-activity.js +2 -2
  89. package/dist/discussion-comment.js +2 -2
  90. package/dist/discussion.js +5 -5
  91. package/dist/{document-editor-BO7QPbO5.js → document-editor-BnEugM3E.js} +2 -2
  92. package/dist/{document-editor-BO7QPbO5.js.map → document-editor-BnEugM3E.js.map} +1 -1
  93. package/dist/document-editor.js +3 -3
  94. package/dist/draft-card.js +2 -2
  95. package/dist/erd.js +2021 -0
  96. package/dist/erd.js.map +1 -0
  97. package/dist/fab.js +4 -4
  98. package/dist/field.js +257 -43
  99. package/dist/field.js.map +1 -1
  100. package/dist/file-upload.js +37 -15
  101. package/dist/file-upload.js.map +1 -1
  102. package/dist/filter-bar.js +2 -2
  103. package/dist/flow.js +27 -970
  104. package/dist/flow.js.map +1 -1
  105. package/dist/focus-ring.js +2 -0
  106. package/dist/focus-ring.js.map +1 -1
  107. package/dist/{form-associated-D3Tn33s_.js → form-associated-BHbg72PG.js} +3 -1
  108. package/dist/{form-associated-D3Tn33s_.js.map → form-associated-BHbg72PG.js.map} +1 -1
  109. package/dist/{form-submitter-DWwv6K9-.js → form-submitter-beG1CXAn.js} +7 -1
  110. package/dist/{form-submitter-DWwv6K9-.js.map → form-submitter-beG1CXAn.js.map} +1 -1
  111. package/dist/form.js +2 -2
  112. package/dist/{generative-view-DmtpDobn.js → generative-view-BgOcLRXr.js} +13 -13
  113. package/dist/generative-view-BgOcLRXr.js.map +1 -0
  114. package/dist/generative-view.js +3 -3
  115. package/dist/geometry-INg82Lxq.js +305 -0
  116. package/dist/geometry-INg82Lxq.js.map +1 -0
  117. package/dist/history-YbTSQZHj.js +45 -0
  118. package/dist/history-YbTSQZHj.js.map +1 -0
  119. package/dist/host-CZK7xhzh.js +40 -0
  120. package/dist/host-CZK7xhzh.js.map +1 -0
  121. package/dist/html-editor.js +5 -5
  122. package/dist/{hyperlink-DhE9RlVS.js → hyperlink-DycWPKwU.js} +10 -1
  123. package/dist/hyperlink-DycWPKwU.js.map +1 -0
  124. package/dist/{i18n-controller-urcQKYGe.js → i18n-controller-Cp43HjJl.js} +2 -2
  125. package/dist/{i18n-controller-urcQKYGe.js.map → i18n-controller-Cp43HjJl.js.map} +1 -1
  126. package/dist/icon-button.js +4 -4
  127. package/dist/image.js +2 -2
  128. package/dist/index.js +37 -18
  129. package/dist/index.js.map +1 -1
  130. package/dist/inline-edit.js +2 -2
  131. package/dist/input.js +4 -4
  132. package/dist/json-viewer.js +2 -2
  133. package/dist/kanban.js +2 -2
  134. package/dist/kbd.js +2 -2
  135. package/dist/linear-progress.js +3 -3
  136. package/dist/link-button.js +2 -2
  137. package/dist/list-item.js +2 -2
  138. package/dist/list.js +2 -2
  139. package/dist/listbox.js +3 -3
  140. package/dist/loader-full.js +13 -13
  141. package/dist/loader.js +44 -15
  142. package/dist/loader.js.map +1 -1
  143. package/dist/markdown-editor.js +5 -5
  144. package/dist/markers-BFmh1OCz.js +46 -0
  145. package/dist/markers-BFmh1OCz.js.map +1 -0
  146. package/dist/measure-controller-Dmc5hZKg.js +89 -0
  147. package/dist/measure-controller-Dmc5hZKg.js.map +1 -0
  148. package/dist/mention-input.js +6 -5
  149. package/dist/mention-input.js.map +1 -1
  150. package/dist/menu-item.js +3 -2
  151. package/dist/menu-item.js.map +1 -1
  152. package/dist/menu.js +2 -2
  153. package/dist/modal.js +2 -2
  154. package/dist/navigation-bar.js +2 -2
  155. package/dist/navigation-drawer.js +2 -2
  156. package/dist/navigation-rail.js +2 -2
  157. package/dist/notification-center.js +2 -2
  158. package/dist/number-field.js +6 -5
  159. package/dist/number-field.js.map +1 -1
  160. package/dist/option.js +2 -2
  161. package/dist/page-header.js +2 -2
  162. package/dist/pagination.js +2 -2
  163. package/dist/password-field.js +5 -5
  164. package/dist/password-rules.js +2 -2
  165. package/dist/phone-field.js +5 -5
  166. package/dist/{picker-field-B4DtcJfL.js → picker-field-dTlIMAQn.js} +3 -3
  167. package/dist/{picker-field-B4DtcJfL.js.map → picker-field-dTlIMAQn.js.map} +1 -1
  168. package/dist/pin-input.js +5 -5
  169. package/dist/presence-indicator.js +2 -2
  170. package/dist/prompt-input.js +5 -5
  171. package/dist/radio-group.js +1 -0
  172. package/dist/radio-group.js.map +1 -1
  173. package/dist/radio.js +5 -5
  174. package/dist/radio.js.map +1 -1
  175. package/dist/rating.js +5 -4
  176. package/dist/rating.js.map +1 -1
  177. package/dist/redvars-loader.js +2 -2
  178. package/dist/relative-time.js +2 -2
  179. package/dist/resizable-panels.js +2 -2
  180. package/dist/{rich-text-input-DLICqof1.js → rich-text-input-DM_BOzgk.js} +3 -3
  181. package/dist/{rich-text-input-DLICqof1.js.map → rich-text-input-DM_BOzgk.js.map} +1 -1
  182. package/dist/ripple.js +2 -0
  183. package/dist/ripple.js.map +1 -1
  184. package/dist/{schema-hMt-NRLk.js → schema-B8g30A_n.js} +2 -2
  185. package/dist/{schema-hMt-NRLk.js.map → schema-B8g30A_n.js.map} +1 -1
  186. package/dist/search.js +4 -4
  187. package/dist/segmented-button-group.js +1 -1
  188. package/dist/select.js +7 -7
  189. package/dist/side-sheet.js +2 -2
  190. package/dist/signature-pad.js +5 -4
  191. package/dist/signature-pad.js.map +1 -1
  192. package/dist/slider.js +5 -4
  193. package/dist/slider.js.map +1 -1
  194. package/dist/snackbar.js +2 -2
  195. package/dist/sparkline.js +2 -2
  196. package/dist/split-button.js +2 -2
  197. package/dist/src/__internal/diagram/canvas-base.d.ts +105 -0
  198. package/dist/src/__internal/diagram/canvas-link.d.ts +21 -0
  199. package/dist/src/__internal/diagram/geometry.d.ts +49 -0
  200. package/dist/src/__internal/diagram/history.d.ts +17 -0
  201. package/dist/src/__internal/diagram/host.d.ts +45 -0
  202. package/dist/src/__internal/diagram/markers.d.ts +16 -0
  203. package/dist/src/__internal/diagram/measure-controller.d.ts +32 -0
  204. package/dist/src/__internal/diagram/motion.d.ts +22 -0
  205. package/dist/src/__internal/diagram/selection.d.ts +20 -0
  206. package/dist/src/__internal/diagram/types.d.ts +39 -0
  207. package/dist/src/__internal/diagram/viewport-controller.d.ts +89 -0
  208. package/dist/src/__internal/i18n/strings.d.ts +149 -0
  209. package/dist/src/__internal/toggle-base.d.ts +8 -0
  210. package/dist/src/__internal/utils/deprecate.d.ts +3 -3
  211. package/dist/src/accordion/accordion.d.ts +1 -0
  212. package/dist/src/code-editor/code-editor.d.ts +1 -0
  213. package/dist/src/date-picker/date-picker.d.ts +2 -0
  214. package/dist/src/dependency-map/dependency-map-layout.d.ts +48 -0
  215. package/dist/src/dependency-map/dependency-map.d.ts +241 -0
  216. package/dist/src/dependency-map/index.d.ts +2 -0
  217. package/dist/src/diagram/diagram.d.ts +300 -0
  218. package/dist/src/diagram/flow.d.ts +53 -0
  219. package/dist/src/diagram/index.d.ts +4 -0
  220. package/dist/src/diagram-controls/diagram-controls.d.ts +46 -0
  221. package/dist/src/diagram-controls/index.d.ts +1 -0
  222. package/dist/src/diagram-minimap/diagram-minimap.d.ts +39 -0
  223. package/dist/src/diagram-minimap/index.d.ts +1 -0
  224. package/dist/src/erd/erd-layout.d.ts +27 -0
  225. package/dist/src/erd/erd.d.ts +266 -0
  226. package/dist/src/erd/index.d.ts +2 -0
  227. package/dist/src/field/field.d.ts +38 -1
  228. package/dist/src/file-upload/file-upload.d.ts +3 -1
  229. package/dist/src/focus-ring/focus-ring.d.ts +2 -0
  230. package/dist/src/index.d.ts +15 -2
  231. package/dist/src/input/BaseField.d.ts +3 -0
  232. package/dist/src/input/BaseInput.d.ts +3 -0
  233. package/dist/src/menu/menu-item/menu-item.d.ts +1 -0
  234. package/dist/src/number-field/number-field.d.ts +4 -0
  235. package/dist/src/progress/base-progress.d.ts +3 -0
  236. package/dist/src/radio/radio-group.d.ts +1 -0
  237. package/dist/src/rating/rating.d.ts +1 -0
  238. package/dist/src/ripple/ripple.d.ts +2 -0
  239. package/dist/src/signature-pad/signature-pad.d.ts +1 -0
  240. package/dist/src/slider/slider.d.ts +1 -0
  241. package/dist/src/switch/switch.d.ts +1 -0
  242. package/dist/src/tabs/tab.d.ts +2 -0
  243. package/dist/src/tabs/tabs.d.ts +1 -0
  244. package/dist/src/textarea/textarea.d.ts +1 -0
  245. package/dist/src/time-picker/time-picker.d.ts +2 -0
  246. package/dist/src/transfer-list/transfer-list.d.ts +1 -0
  247. package/dist/src/tree-chart/index.d.ts +2 -0
  248. package/dist/src/tree-chart/tree-chart-layout.d.ts +49 -0
  249. package/dist/src/tree-chart/tree-chart.d.ts +221 -0
  250. package/dist/src/workflow/index.d.ts +2 -0
  251. package/dist/src/workflow/workflow-format.d.ts +5 -0
  252. package/dist/src/workflow/workflow-model.d.ts +194 -0
  253. package/dist/src/workflow/workflow.d.ts +313 -0
  254. package/dist/src/workflow-timeline/index.d.ts +1 -0
  255. package/dist/src/workflow-timeline/workflow-timeline.d.ts +41 -0
  256. package/dist/stat.js +2 -2
  257. package/dist/status-indicator.js +2 -2
  258. package/dist/step.js +2 -2
  259. package/dist/stepper.js +2 -2
  260. package/dist/{strings-DmbqMTfs.js → strings-BJPuhKJk.js} +163 -1
  261. package/dist/{strings-DmbqMTfs.js.map → strings-BJPuhKJk.js.map} +1 -1
  262. package/dist/sub-menu.js +2 -2
  263. package/dist/svg.js +2 -2
  264. package/dist/switch.js +5 -4
  265. package/dist/switch.js.map +1 -1
  266. package/dist/tab.js +1 -0
  267. package/dist/tab.js.map +1 -1
  268. package/dist/table.js +2 -2
  269. package/dist/tabs.js +1 -0
  270. package/dist/tabs.js.map +1 -1
  271. package/dist/test/diagram-controls.test.d.ts +1 -0
  272. package/dist/test/diagram-geometry.test.d.ts +1 -0
  273. package/dist/test/diagram.test.d.ts +1 -0
  274. package/dist/test/erd.test.d.ts +1 -0
  275. package/dist/test/toggle-label.test.d.ts +1 -0
  276. package/dist/test/tree-chart.test.d.ts +1 -0
  277. package/dist/test/workflow-debug.test.d.ts +1 -0
  278. package/dist/test/workflow.test.d.ts +1 -0
  279. package/dist/textarea.js +7 -5
  280. package/dist/textarea.js.map +1 -1
  281. package/dist/time-field.js +6 -6
  282. package/dist/time-picker.js +4 -2
  283. package/dist/time-picker.js.map +1 -1
  284. package/dist/timeline-item.js +2 -2
  285. package/dist/timeline.js +2 -2
  286. package/dist/{toggle-base-BQO5pjrU.js → toggle-base-BlaHalfS.js} +19 -3
  287. package/dist/toggle-base-BlaHalfS.js.map +1 -0
  288. package/dist/tour.js +2 -2
  289. package/dist/transfer-list.js +5 -4
  290. package/dist/transfer-list.js.map +1 -1
  291. package/dist/{chart-base-B-gOg2Di.js → transform-CxeQFXXB.js} +9 -839
  292. package/dist/transform-CxeQFXXB.js.map +1 -0
  293. package/dist/tree-chart.js +1986 -0
  294. package/dist/tree-chart.js.map +1 -0
  295. package/dist/tree-item.js +2 -2
  296. package/dist/tree.js +2 -2
  297. package/dist/tsconfig.tsbuildinfo +1 -1
  298. package/dist/typing-indicator.js +2 -2
  299. package/dist/url-field.js +5 -5
  300. package/dist/user-menu.js +2 -2
  301. package/dist/virtual-list.js +2 -2
  302. package/dist/workflow-format-BsyveyeC.js +34 -0
  303. package/dist/workflow-format-BsyveyeC.js.map +1 -0
  304. package/dist/workflow-model-CauduOG2.js +330 -0
  305. package/dist/workflow-model-CauduOG2.js.map +1 -0
  306. package/dist/workflow-timeline.js +354 -0
  307. package/dist/workflow-timeline.js.map +1 -0
  308. package/dist/workflow.js +3337 -0
  309. package/dist/workflow.js.map +1 -0
  310. package/dist/workspace-switcher.js +2 -2
  311. package/package.json +1 -1
  312. package/readme.md +44 -2
  313. package/src/LoaderUtils.ts +9 -2
  314. package/src/__internal/diagram/canvas-base.ts +410 -0
  315. package/src/__internal/diagram/canvas-link.ts +66 -0
  316. package/src/__internal/diagram/geometry.ts +372 -0
  317. package/src/__internal/diagram/history.ts +49 -0
  318. package/src/__internal/diagram/host.ts +76 -0
  319. package/src/__internal/diagram/markers.ts +56 -0
  320. package/src/__internal/diagram/measure-controller.ts +104 -0
  321. package/src/__internal/diagram/motion.ts +89 -0
  322. package/src/__internal/diagram/selection.ts +69 -0
  323. package/src/__internal/diagram/types.ts +56 -0
  324. package/src/__internal/diagram/viewport-controller.ts +494 -0
  325. package/src/__internal/i18n/strings.ts +201 -0
  326. package/src/__internal/mixins/field.ts +3 -0
  327. package/src/__internal/mixins/form-associated.ts +2 -0
  328. package/src/__internal/mixins/form-submitter.ts +6 -0
  329. package/src/__internal/mixins/hyperlink.ts +10 -0
  330. package/src/__internal/toggle-base.ts +16 -0
  331. package/src/__internal/utils/deprecate.ts +5 -4
  332. package/src/accordion/accordion.ts +1 -0
  333. package/src/button/base-button/base-button.ts +2 -0
  334. package/src/code-editor/code-editor.ts +1 -0
  335. package/src/date-picker/date-picker.ts +2 -0
  336. package/src/dependency-map/dependency-map-layout.ts +505 -0
  337. package/src/dependency-map/dependency-map.scss +626 -0
  338. package/src/dependency-map/dependency-map.ts +1280 -0
  339. package/src/dependency-map/index.ts +16 -0
  340. package/src/diagram/diagram.scss +513 -0
  341. package/src/diagram/diagram.ts +1852 -0
  342. package/src/diagram/flow.ts +81 -0
  343. package/src/diagram/index.ts +44 -0
  344. package/src/diagram-controls/diagram-controls.scss +68 -0
  345. package/src/diagram-controls/diagram-controls.ts +255 -0
  346. package/src/diagram-controls/index.ts +1 -0
  347. package/src/diagram-minimap/diagram-minimap.scss +41 -0
  348. package/src/diagram-minimap/diagram-minimap.ts +149 -0
  349. package/src/diagram-minimap/index.ts +1 -0
  350. package/src/erd/erd-layout.ts +92 -0
  351. package/src/erd/erd.scss +636 -0
  352. package/src/erd/erd.ts +1728 -0
  353. package/src/erd/index.ts +17 -0
  354. package/src/field/field.scss +197 -23
  355. package/src/field/field.ts +109 -16
  356. package/src/file-upload/file-upload.scss +37 -10
  357. package/src/file-upload/file-upload.ts +3 -1
  358. package/src/focus-ring/focus-ring.ts +2 -0
  359. package/src/generative-view/catalog.generated.ts +12 -11
  360. package/src/index.ts +121 -2
  361. package/src/input/BaseField.ts +3 -0
  362. package/src/input/BaseInput.ts +3 -0
  363. package/src/loader.ts +25 -0
  364. package/src/mention-input/mention-input.scss +2 -0
  365. package/src/menu/menu-item/menu-item.ts +1 -0
  366. package/src/number-field/number-field.ts +4 -0
  367. package/src/progress/base-progress.ts +3 -0
  368. package/src/radio/radio-group.ts +1 -0
  369. package/src/radio/radio.ts +1 -1
  370. package/src/rating/rating.ts +1 -0
  371. package/src/ripple/ripple.ts +2 -0
  372. package/src/signature-pad/signature-pad.ts +1 -0
  373. package/src/slider/slider.ts +1 -0
  374. package/src/switch/switch.ts +1 -0
  375. package/src/tabs/tab.ts +2 -0
  376. package/src/tabs/tabs.ts +1 -0
  377. package/src/textarea/textarea.scss +2 -0
  378. package/src/textarea/textarea.ts +1 -0
  379. package/src/time-picker/time-picker.ts +2 -0
  380. package/src/transfer-list/transfer-list.ts +1 -0
  381. package/src/tree-chart/index.ts +13 -0
  382. package/src/tree-chart/tree-chart-layout.ts +185 -0
  383. package/src/tree-chart/tree-chart.scss +377 -0
  384. package/src/tree-chart/tree-chart.ts +1170 -0
  385. package/src/workflow/index.ts +35 -0
  386. package/src/workflow/workflow-format.ts +29 -0
  387. package/src/workflow/workflow-model.ts +583 -0
  388. package/src/workflow/workflow.scss +1164 -0
  389. package/src/workflow/workflow.ts +2674 -0
  390. package/src/workflow-timeline/index.ts +1 -0
  391. package/src/workflow-timeline/workflow-timeline.scss +128 -0
  392. package/src/workflow-timeline/workflow-timeline.ts +238 -0
  393. package/dist/BaseField-CAog9TIc.js.map +0 -1
  394. package/dist/BaseInput-CcMfg1Y2.js.map +0 -1
  395. package/dist/base-button-Do2TUy8M.js.map +0 -1
  396. package/dist/base-progress-BiLlZVHJ.js.map +0 -1
  397. package/dist/cartesian-chart-C-f1frt0.js.map +0 -1
  398. package/dist/chart-base-B-gOg2Di.js.map +0 -1
  399. package/dist/generative-view-DmtpDobn.js.map +0 -1
  400. package/dist/hyperlink-DhE9RlVS.js.map +0 -1
  401. package/dist/src/flow/flow.d.ts +0 -178
  402. package/dist/src/flow/index.d.ts +0 -2
  403. package/dist/toggle-base-BQO5pjrU.js.map +0 -1
  404. package/src/button/button-group/readme.md +0 -23
  405. package/src/flow/flow.scss +0 -215
  406. package/src/flow/flow.ts +0 -958
  407. package/src/flow/index.ts +0 -10
  408. /package/dist/test/{flow.test.d.ts → dependency-map.test.d.ts} +0 -0
package/dist/field.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i, a as i$1, _ as __decorate, I as IndividualComponent, b, A } from './IndividualComponent-BK7XZjE2.js';
1
+ import { i, a as i$1, _ as __decorate, I as IndividualComponent, A, b } from './IndividualComponent-BK7XZjE2.js';
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './query-CHb9Ft_d.js';
@@ -64,7 +64,7 @@ var css_248z = i`* {
64
64
  --_container-shape-start-end: var(--field-container-shape-start-end, var(--shape-corner-extra-small));
65
65
  --_container-shape-end-start: var(--field-container-shape-end-start, var(--shape-corner-extra-small));
66
66
  --_container-shape-end-end: var(--field-container-shape-end-end, var(--shape-corner-extra-small));
67
- --_container-color: var(--field-container-color);
67
+ --_container-color: var(--field-container-color, var(--color-surface-container-lowest));
68
68
  --_outline-width: var(--field-outline-width, 0.0675rem);
69
69
  --_outline-color: var(--field-outline-color, var(--color-outline));
70
70
  --_input-text-color: var(--field-label-text-color, var(--color-on-surface));
@@ -143,26 +143,6 @@ var css_248z = i`* {
143
143
  padding-inline: var(--spacing-200);
144
144
  position: relative;
145
145
  }
146
- .field .field-body .field-content .input-wrapper .outlined-label {
147
- position: absolute;
148
- top: 0;
149
- inset-inline-start: 0;
150
- align-items: center;
151
- height: 100%;
152
- width: 100%;
153
- padding-inline: var(--spacing-200);
154
- font-family: var(--typography-body-large-font-family) !important;
155
- font-size: var(--typography-body-large-font-size) !important;
156
- font-weight: var(--typography-body-large-font-weight) !important;
157
- line-height: var(--typography-body-large-line-height) !important;
158
- letter-spacing: var(--typography-body-large-letter-spacing) !important;
159
- color: var(--_input-text-color);
160
- background-color: var(--_container-color);
161
- opacity: var(--_container-opacity, 1);
162
- }
163
- .field .field-body .field-content .input-wrapper .outlined-slot-container {
164
- opacity: 0;
165
- }
166
146
  .field .field-body .field-content slot::slotted(*) {
167
147
  font-family: var(--typography-body-large-font-family) !important;
168
148
  font-size: var(--typography-body-large-font-size) !important;
@@ -247,17 +227,163 @@ var css_248z = i`* {
247
227
  --_helper-text-color: var(--color-warning);
248
228
  --_input-text-color: var(--color-warning);
249
229
  }
250
- .field.disabled .label {
230
+ .field.variant-outlined {
231
+ --_container-color: var(--field-container-color, transparent);
232
+ --_outline-width: var(--field-outline-width, 0.0625rem);
233
+ --_label-text-color: var(--field-label-text-color, var(--color-on-surface-variant));
234
+ --_label-motion: var(--duration-short3, 150ms) var(--easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
235
+ --_notch-start: max(
236
+ var(--spacing-150),
237
+ var(--_container-shape-start-start),
238
+ var(--_container-shape-end-start)
239
+ );
240
+ --_notch-padding: var(--spacing-050);
241
+ }
242
+ .field.variant-outlined.has-label {
243
+ padding-block-start: calc(var(--typography-body-small-line-height) / 2);
244
+ }
245
+ .field.variant-outlined .field-body .outline {
246
+ display: flex;
247
+ border: none;
248
+ border-radius: 0;
249
+ }
250
+ .field.variant-outlined .field-body .outline-start,
251
+ .field.variant-outlined .field-body .outline-notch,
252
+ .field.variant-outlined .field-body .outline-end {
253
+ position: relative;
254
+ border: var(--_outline-width) solid var(--_outline-color);
255
+ }
256
+ .field.variant-outlined .field-body .outline-start {
257
+ flex: none;
258
+ width: var(--_notch-start);
259
+ border-inline-end: none;
260
+ border-start-start-radius: var(--_container-shape-start-start);
261
+ border-end-start-radius: var(--_container-shape-end-start);
262
+ }
263
+ .field.variant-outlined .field-body .outline-notch {
264
+ flex: none;
265
+ display: flex;
266
+ max-width: calc(100% - var(--_notch-start) - var(--spacing-200));
267
+ border-block-start: none;
268
+ border-inline: none;
269
+ }
270
+ .field.variant-outlined .field-body .outline-notch::before {
271
+ content: "";
272
+ position: absolute;
273
+ inset-block-start: 0;
274
+ inset-inline: 0;
275
+ border-block-start: var(--_outline-width) solid var(--_outline-color);
276
+ transition: transform var(--_label-motion);
277
+ }
278
+ .field.variant-outlined .field-body .outline-notch-label {
279
+ visibility: hidden;
280
+ padding-inline: var(--_notch-padding);
281
+ overflow: hidden;
282
+ white-space: nowrap;
283
+ text-overflow: ellipsis;
284
+ font-family: var(--typography-body-small-font-family);
285
+ font-size: var(--typography-body-small-font-size);
286
+ font-weight: var(--typography-body-small-font-weight);
287
+ line-height: var(--typography-body-small-line-height);
288
+ letter-spacing: var(--typography-body-small-letter-spacing);
289
+ }
290
+ .field.variant-outlined .field-body .outline-end {
291
+ flex: 1;
292
+ border-inline-start: none;
293
+ border-start-end-radius: var(--_container-shape-start-end);
294
+ border-end-end-radius: var(--_container-shape-end-end);
295
+ }
296
+ .field.variant-outlined .field-body .outlined-label {
297
+ position: absolute;
298
+ z-index: 3;
299
+ inset-block-start: var(--field-label-rest-top, 50%);
300
+ inset-inline-start: calc(var(--_input-start, 0px) + var(--spacing-200));
301
+ max-width: calc(100% - var(--_input-start, 0px) - var(--_input-end, 0px) - 2 * var(--spacing-200));
302
+ transform: translateY(-50%);
303
+ pointer-events: none;
304
+ overflow: hidden;
305
+ white-space: nowrap;
306
+ text-overflow: ellipsis;
307
+ color: var(--_label-text-color);
308
+ font-family: var(--typography-body-large-font-family);
309
+ font-size: var(--typography-body-large-font-size);
310
+ font-weight: var(--typography-body-large-font-weight);
311
+ line-height: var(--typography-body-large-line-height);
312
+ letter-spacing: var(--typography-body-large-letter-spacing);
313
+ }
314
+ .field.variant-outlined .field-body .outlined-label .required {
315
+ color: var(--color-error);
316
+ padding-inline-start: var(--spacing-025);
317
+ }
318
+ .field.variant-outlined .field-body[data-label-ready] .outlined-label {
319
+ transition: inset-block-start var(--_label-motion), inset-inline-start var(--_label-motion), max-width var(--_label-motion), font-size var(--_label-motion), line-height var(--_label-motion), letter-spacing var(--_label-motion);
320
+ }
321
+ .field.variant-outlined .field-body .input-wrapper {
322
+ transition: opacity var(--_label-motion);
323
+ }
324
+ .field.variant-outlined.has-label:not(.label-floating) .field-body .input-wrapper {
325
+ opacity: 0;
326
+ }
327
+ .field.variant-outlined.has-label.label-floating .field-body .outline-notch::before {
328
+ transform: scaleX(0);
329
+ }
330
+ .field.variant-outlined.has-label.label-floating .field-body .outlined-label {
331
+ inset-block-start: 0;
332
+ inset-inline-start: calc(var(--_notch-start) + var(--_notch-padding));
333
+ max-width: calc(100% - var(--_notch-start) - 2 * var(--_notch-padding) - var(--spacing-200));
334
+ font-family: var(--typography-body-small-font-family);
335
+ font-size: var(--typography-body-small-font-size);
336
+ font-weight: var(--typography-body-small-font-weight);
337
+ line-height: var(--typography-body-small-line-height);
338
+ letter-spacing: var(--typography-body-small-letter-spacing);
339
+ }
340
+ .field.variant-outlined:not(.disabled, .readonly, .focused) .field-body:hover {
341
+ --_outline-color: var(--color-on-surface);
342
+ --_label-text-color: var(--color-on-surface);
343
+ }
344
+ .field.variant-outlined.focused {
345
+ --_outline-width: 0.125rem;
346
+ --_label-text-color: var(--color-primary);
347
+ }
348
+ .field.variant-outlined.has-error {
349
+ --_label-text-color: var(--color-error);
350
+ --_input-text-color: var(--color-on-surface);
351
+ }
352
+ .field.variant-outlined.has-error:not(.disabled, .readonly, .focused) .field-body:hover {
353
+ --_outline-color: var(--color-on-error-container);
354
+ --_label-text-color: var(--color-on-error-container);
355
+ }
356
+ .field.variant-outlined.has-warning {
357
+ --_label-text-color: var(--color-warning);
358
+ --_input-text-color: var(--color-on-surface);
359
+ }
360
+ .field.variant-outlined.has-warning:not(.disabled, .readonly, .focused, .has-error) .field-body:hover {
361
+ --_outline-color: var(--color-warning);
362
+ --_label-text-color: var(--color-warning);
363
+ }
364
+ .field.disabled .label,
365
+ .field.disabled .outlined-label {
251
366
  opacity: 0.38;
252
367
  }
253
368
  .field.disabled {
254
- --_input-text-color: var(--color-on-surface-variant);
255
- --_outline-opacity: 0.38;
369
+ --_label-text-color: var(--color-on-surface);
370
+ --_input-text-color: color-mix(in srgb, var(--color-on-surface) 38%, transparent);
371
+ --_helper-text-color: var(--color-on-surface);
256
372
  --_helper-text-opacity: 0.38;
373
+ --_outline-color: var(--color-on-surface);
374
+ --_outline-opacity: 0.12;
257
375
  --_container-color: var(--color-on-surface);
258
- --_container-opacity: 0.1;
376
+ --_container-opacity: 0.04;
259
377
  cursor: not-allowed;
260
378
  }
379
+ .field.disabled.variant-filled {
380
+ --_outline-opacity: 0.38;
381
+ }
382
+ .field.disabled.variant-outlined {
383
+ --_container-color: transparent;
384
+ --_label-text-color: var(--color-on-surface);
385
+ --_input-text-color: color-mix(in srgb, var(--color-on-surface) 38%, transparent);
386
+ }
261
387
  .field.readonly:not(.disabled) {
262
388
  cursor: initial;
263
389
  --_container-color: color-mix(in srgb, var(--color-on-surface) 4%, transparent);
@@ -294,6 +420,19 @@ var css_248z = i`* {
294
420
  * box with <code>field-start</code> and <code>field-end</code> slots, and a footer with helper,
295
421
  * error or warning text and a character count. Wrap a custom control in it to match the
296
422
  * built-in fields.</p>
423
+ * <p>The <code>default</code> variant fills its box with <code>surface-container-lowest</code>, so it
424
+ * stands out on cards and dialogs as well as on the page. <code>outlined</code> has no fill (the
425
+ * outline alone marks it) and <code>filled</code> uses <code>surface-container-highest</code>, as in
426
+ * Material 3. Disabled follows M3: the text at 38%, the outline at 12% and a 4% fill. Read-only
427
+ * keeps the label and value at full contrast in a faint box, so it reads as information.</p>
428
+ * <p>The <code>outlined</code> variant is the M3 outlined text field: its label rests inside the
429
+ * empty field and, on focus or with a value, floats into a notch in the outline's top edge. The
430
+ * outline is drawn in parts (start, notch, end), so the notch needs no background and the field
431
+ * works on any surface. The outline is 1px, 2px while focused.</p>
432
+ *
433
+ * @cssprop --field-container-color - The box's fill. Defaults to `surface-container-lowest` (default variant), `surface-container-highest` (filled) or none (outlined).
434
+ * @cssprop --field-outline-width - The outline's resting width. Defaults to 1px on the outlined variant.
435
+ * @cssprop --field-label-rest-top - Where the outlined label's resting line is centred, from the top of the box. Defaults to the middle; multi-line fields set it to their first line.
297
436
  *
298
437
  * @example
299
438
  * ```html
@@ -344,7 +483,18 @@ let Field = class Field extends i$1 {
344
483
  /** True when the `field-end` slot contains at least one node. */
345
484
  this.slotEndHasContent = false;
346
485
  }
486
+ connectedCallback() {
487
+ super.connectedCallback();
488
+ if (this.hasUpdated)
489
+ this.__observeInputBox();
490
+ }
491
+ disconnectedCallback() {
492
+ super.disconnectedCallback();
493
+ this.__resizeObserver?.disconnect();
494
+ this.__resizeObserver = undefined;
495
+ }
347
496
  firstUpdated() {
497
+ this.__observeInputBox();
348
498
  observerSlotChangesWithCallback(this.renderRoot.querySelector('.slot-start-wrapper slot'), hasContent => {
349
499
  this.slotStartHasContent = hasContent;
350
500
  this.requestUpdate();
@@ -358,25 +508,83 @@ let Field = class Field extends i$1 {
358
508
  // @ts-ignore
359
509
  this.host?.focus?.();
360
510
  }
361
- __renderInputSlot() {
362
- if (this.variant === 'outlined') {
363
- if (this.populated || this.focused)
364
- return b `<slot></slot>`;
365
- return b `
366
- <label class="outlined-label">${this.label}</label>
367
- <div class="outlined-slot-container">
368
- <slot></slot>
369
- </div>
370
- `;
511
+ /**
512
+ * Starts watching the field body and the control box. The outlined label rests over the
513
+ * control's text and floats into the outline's notch; the text's start moves with leading
514
+ * content such as an icon, so its inset is measured and handed to the styles.
515
+ */
516
+ __observeInputBox() {
517
+ if (typeof ResizeObserver === 'undefined' || this.__resizeObserver)
518
+ return;
519
+ const body = this.fieldBodyElement;
520
+ const box = this.__inputWrapper;
521
+ if (!body || !box)
522
+ return;
523
+ this.__resizeObserver = new ResizeObserver(() => this.__measureInputBox());
524
+ this.__resizeObserver.observe(body);
525
+ this.__resizeObserver.observe(box);
526
+ }
527
+ /** Hands the control box's inline insets to the styles as `--_input-start` and `--_input-end`. */
528
+ __measureInputBox() {
529
+ const body = this.fieldBodyElement;
530
+ const box = this.__inputWrapper;
531
+ if (!body || !box)
532
+ return;
533
+ const bodyRect = body.getBoundingClientRect();
534
+ const boxRect = box.getBoundingClientRect();
535
+ const rtl = getComputedStyle(body).direction === 'rtl';
536
+ const start = rtl
537
+ ? bodyRect.right - boxRect.right
538
+ : boxRect.left - bodyRect.left;
539
+ const end = rtl
540
+ ? boxRect.left - bodyRect.left
541
+ : bodyRect.right - boxRect.right;
542
+ body.style.setProperty('--_input-start', `${Math.max(0, start)}px`);
543
+ body.style.setProperty('--_input-end', `${Math.max(0, end)}px`);
544
+ // Animate the label only after it has its first position, so it doesn't slide into place.
545
+ if (!body.hasAttribute('data-label-ready')) {
546
+ requestAnimationFrame(() => body.setAttribute('data-label-ready', ''));
371
547
  }
372
- return b `<slot></slot>`;
373
548
  }
374
- __renderFieldHeader() {
375
- if (!this.label)
549
+ /** The label text and required mark, shared by the outlined label and its notch. */
550
+ __renderLabelText() {
551
+ return b `${this.label}${this.required
552
+ ? b `<span class="required">*</span>`
553
+ : A}`;
554
+ }
555
+ /**
556
+ * The outline. The outlined variant builds it from parts, as Material 3 does: a start segment,
557
+ * a notch as wide as the floating label whose top edge opens while the label floats, and an
558
+ * end segment that takes the remaining width. The label floats into the notch, so the
559
+ * outline needs no background behind the label and works on any surface.
560
+ */
561
+ __renderOutline() {
562
+ if (this.variant !== 'outlined')
563
+ return b `<div class="outline"></div>`;
564
+ return b `<div class="outline" aria-hidden="true">
565
+ <div class="outline-start"></div>
566
+ <div class="outline-notch">
567
+ ${this.label
568
+ ? b `<span class="outline-notch-label"
569
+ >${this.__renderLabelText()}</span
570
+ >`
571
+ : A}
572
+ </div>
573
+ <div class="outline-end"></div>
574
+ </div>`;
575
+ }
576
+ /** The outlined label: resting over the empty control, floating in the notch otherwise. */
577
+ __renderOutlinedLabel() {
578
+ if (this.variant !== 'outlined' || !this.label)
376
579
  return A;
377
- if (this.variant === 'outlined' && !this.populated && !this.focused) {
580
+ return b `<label class="outlined-label">
581
+ ${this.__renderLabelText()}
582
+ <wc-skeleton class="skeleton"></wc-skeleton>
583
+ </label>`;
584
+ }
585
+ __renderFieldHeader() {
586
+ if (!this.label || this.variant === 'outlined')
378
587
  return A;
379
- }
380
588
  return b `<div class="field-header">
381
589
  <label class="label">
382
590
  ${this.label}${this.required
@@ -422,15 +630,18 @@ let Field = class Field extends i$1 {
422
630
  readonly: this.readonly,
423
631
  [`variant-${this.variant}`]: true,
424
632
  populated: this.populated,
633
+ 'has-label': !!this.label,
634
+ 'label-floating': this.populated || this.focused,
425
635
  };
426
636
  return b `
427
637
  <div class=${e$1(classes)}>
428
638
  ${this.__renderFieldHeader()}
429
639
 
430
640
  <div class="field-body" @click=${this.__handleClick}>
431
- <div class="outline"></div>
641
+ ${this.__renderOutline()}
432
642
  <div class="background"></div>
433
643
  <wc-skeleton class="skeleton"></wc-skeleton>
644
+ ${this.__renderOutlinedLabel()}
434
645
 
435
646
  <div class="field-content">
436
647
  <div
@@ -442,7 +653,7 @@ let Field = class Field extends i$1 {
442
653
  <slot name="field-start"></slot>
443
654
  </div>
444
655
 
445
- <div class="input-wrapper">${this.__renderInputSlot()}</div>
656
+ <div class="input-wrapper"><slot></slot></div>
446
657
 
447
658
  <div
448
659
  class=${e$1({
@@ -522,6 +733,9 @@ __decorate([
522
733
  __decorate([
523
734
  e('.field-body')
524
735
  ], Field.prototype, "fieldBodyElement", void 0);
736
+ __decorate([
737
+ e('.input-wrapper')
738
+ ], Field.prototype, "__inputWrapper", void 0);
525
739
  Field = __decorate([
526
740
  IndividualComponent
527
741
  ], Field);
package/dist/field.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../src/field/field.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { observerSlotChangesWithCallback } from '@/__internal/utils/observe-slot-change.js';\n\nimport styles from './field.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\n/**\n * @label Field\n * @tag wc-field\n * @rawTag field\n *\n * @summary The box around a form control, with its label, required mark, helper, error or warning text and a character count.\n * @overview\n * <p>The field draws the frame of a form control: the label with a required mark, the bordered\n * box with <code>field-start</code> and <code>field-end</code> slots, and a footer with helper,\n * error or warning text and a character count. Wrap a custom control in it to match the\n * built-in fields.</p>\n *\n * @example\n * ```html\n * <wc-field label=\"Name\" required>\n * some text\n * </wc-field>\n * ```\n * @tags form\n */\n@IndividualComponent\nexport class Field extends LitElement {\n static shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n static styles = [styles];\n\n /** Label text shown above the field input. */\n @property({ type: String })\n label: string = '';\n\n /** When true, marks the field as required and shows a required indicator. */\n @property({ type: Boolean })\n required: boolean = false;\n\n /** When true, the field and its slotted input are disabled. */\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n /** When true, the field and its slotted input are read-only. */\n @property({ type: Boolean, reflect: true })\n readonly: boolean = false;\n\n /** When true, renders the field in a loading skeleton state. */\n @property({ type: Boolean })\n skeleton: boolean = false;\n\n /** Helper/hint text shown in the field footer. */\n @property({ type: String, attribute: 'helper-text' })\n helperText: string = '';\n\n /** When true, the field is in an error state and `errorText` is shown. */\n @property({ type: Boolean })\n error: boolean = false;\n\n /** Error message displayed when `error` is true. */\n @property({ type: String, attribute: 'error-text' })\n errorText: string = '';\n\n /** When true, the field is in a warning state and `warningText` is shown. */\n @property({ type: Boolean })\n warning: boolean = false;\n\n /** Warning message displayed when `warning` is true. */\n @property({ type: String, attribute: 'warning-text' })\n warningText: string = '';\n\n /** Character / word count string displayed at the trailing end of the footer. */\n @property({ type: String, attribute: 'text-count' })\n textCount: string = '';\n\n /** When true, applies focused styling (controlled externally by the slotted input). */\n @property({ type: Boolean })\n focused: boolean = false;\n\n /** When true, applies populated styling (controlled externally by the slotted input). */\n @property({ type: Boolean })\n populated: boolean = false;\n\n /** Visual variant of the field container. */\n @property({ type: String })\n variant: 'filled' | 'outlined' | 'default' = 'default';\n\n /**\n * Height of the field box: `sm` (2.5rem, the default, the same as a default button), `md`\n * (3.5rem) or `lg` (4rem). `data-density` on an ancestor shortens it further.\n */\n @property({ type: String, reflect: true })\n size: 'sm' | 'md' | 'lg' = 'sm';\n\n /** Reference to the host input element; used to forward click-on-label focus. */\n @property({ type: Object })\n host?: HTMLElement;\n\n /** True when the `field-start` slot contains at least one node. */\n @state()\n slotStartHasContent: boolean = false;\n\n /** True when the `field-end` slot contains at least one node. */\n @state()\n slotEndHasContent: boolean = false;\n\n /** The bordered field container; used to anchor popups such as a select menu. */\n @query('.field-body')\n readonly fieldBodyElement!: HTMLElement | null;\n\n firstUpdated() {\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('.slot-start-wrapper slot'),\n hasContent => {\n this.slotStartHasContent = hasContent;\n this.requestUpdate();\n },\n );\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('.slot-end-wrapper slot'),\n hasContent => {\n this.slotEndHasContent = hasContent;\n this.requestUpdate();\n },\n );\n }\n\n __handleClick() {\n // @ts-ignore\n this.host?.focus?.();\n }\n\n __renderInputSlot() {\n if (this.variant === 'outlined') {\n if (this.populated || this.focused) return html`<slot></slot>`;\n return html`\n <label class=\"outlined-label\">${this.label}</label>\n <div class=\"outlined-slot-container\">\n <slot></slot>\n </div>\n `;\n }\n return html`<slot></slot>`;\n }\n\n __renderFieldHeader() {\n if (!this.label) return nothing;\n if (this.variant === 'outlined' && !this.populated && !this.focused) {\n return nothing;\n }\n return html`<div class=\"field-header\">\n <label class=\"label\">\n ${this.label}${this.required\n ? html`<span class=\"required\">*</span>`\n : nothing}\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n </label>\n </div>`;\n }\n\n __renderFieldFooter() {\n if (\n !this.textCount &&\n !this.helperText &&\n !this.errorText &&\n !this.warningText\n )\n return nothing;\n return html`<div class=\"field-footer\">\n ${this.__renderHelperText()} ${this.__renderWordCount()}\n </div>`;\n }\n\n __renderHelperText() {\n if (this.error) return html`<div class=\"helper\">${this.errorText}</div>`;\n if (this.warning)\n return html`<div class=\"helper\">${this.warningText}</div>`;\n if (this.helperText || this.helperText === '')\n return html`<div class=\"helper\">${this.helperText}</div>`;\n return nothing;\n }\n\n __renderWordCount() {\n if (!this.textCount) return nothing;\n return html`<div class=\"text-count\">${this.textCount}</div>`;\n }\n\n render() {\n const classes = {\n field: true,\n required: this.required,\n disabled: this.disabled,\n 'show-skeleton': this.skeleton,\n 'has-error': this.error,\n 'has-warning': this.warning,\n focused: this.focused,\n readonly: this.readonly,\n [`variant-${this.variant}`]: true,\n populated: this.populated,\n };\n\n return html`\n <div class=${classMap(classes)}>\n ${this.__renderFieldHeader()}\n\n <div class=\"field-body\" @click=${this.__handleClick}>\n <div class=\"outline\"></div>\n <div class=\"background\"></div>\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n\n <div class=\"field-content\">\n <div\n class=${classMap({\n 'slot-start-wrapper': true,\n 'has-content': this.slotStartHasContent,\n })}\n >\n <slot name=\"field-start\"></slot>\n </div>\n\n <div class=\"input-wrapper\">${this.__renderInputSlot()}</div>\n\n <div\n class=${classMap({\n 'slot-end-wrapper': true,\n 'has-content': this.slotEndHasContent,\n })}\n >\n <slot name=\"field-end\"></slot>\n </div>\n </div>\n </div>\n\n ${this.__renderFieldFooter()}\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","nothing","classMap","styles","property","state","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC6B,CAAA,EAAA,KAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAOvD,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACT,CAAA,EAAA,KAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAIhC,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACP,CAAA,EAAA,KAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAInB,UAAA,CAAA;AADC,IAAAC,CAAK;AAC+B,CAAA,EAAA,KAAA,CAAA,SAAA,EAAA,qBAAA,EAAA,MAAA,CAAA;AAIrC,UAAA,CAAA;AADC,IAAAA,CAAK;AAC6B,CAAA,EAAA,KAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,MAAA,CAAA;AAI1B,UAAA,CAAA;IADRC,CAAK,CAAC,aAAa;AAC2B,CAAA,EAAA,KAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,MAAA,CAAA;AArFpC,KAAK,GAAA,UAAA,CAAA;IADjB;AACY,CAAA,EAAA,KAAK,CAsNjB;;;;"}
1
+ {"version":3,"file":"field.js","sources":["../../src/field/field.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { observerSlotChangesWithCallback } from '@/__internal/utils/observe-slot-change.js';\n\nimport styles from './field.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\n/**\n * @label Field\n * @tag wc-field\n * @rawTag field\n *\n * @summary The box around a form control, with its label, required mark, helper, error or warning text and a character count.\n * @overview\n * <p>The field draws the frame of a form control: the label with a required mark, the bordered\n * box with <code>field-start</code> and <code>field-end</code> slots, and a footer with helper,\n * error or warning text and a character count. Wrap a custom control in it to match the\n * built-in fields.</p>\n * <p>The <code>default</code> variant fills its box with <code>surface-container-lowest</code>, so it\n * stands out on cards and dialogs as well as on the page. <code>outlined</code> has no fill (the\n * outline alone marks it) and <code>filled</code> uses <code>surface-container-highest</code>, as in\n * Material 3. Disabled follows M3: the text at 38%, the outline at 12% and a 4% fill. Read-only\n * keeps the label and value at full contrast in a faint box, so it reads as information.</p>\n * <p>The <code>outlined</code> variant is the M3 outlined text field: its label rests inside the\n * empty field and, on focus or with a value, floats into a notch in the outline's top edge. The\n * outline is drawn in parts (start, notch, end), so the notch needs no background and the field\n * works on any surface. The outline is 1px, 2px while focused.</p>\n *\n * @cssprop --field-container-color - The box's fill. Defaults to `surface-container-lowest` (default variant), `surface-container-highest` (filled) or none (outlined).\n * @cssprop --field-outline-width - The outline's resting width. Defaults to 1px on the outlined variant.\n * @cssprop --field-label-rest-top - Where the outlined label's resting line is centred, from the top of the box. Defaults to the middle; multi-line fields set it to their first line.\n *\n * @example\n * ```html\n * <wc-field label=\"Name\" required>\n * some text\n * </wc-field>\n * ```\n * @tags form\n */\n@IndividualComponent\nexport class Field extends LitElement {\n static shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n static styles = [styles];\n\n /** Label text shown above the field input. */\n @property({ type: String })\n label: string = '';\n\n /** When true, marks the field as required and shows a required indicator. */\n @property({ type: Boolean })\n required: boolean = false;\n\n /** When true, the field and its slotted input are disabled. */\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n /** When true, the field and its slotted input are read-only. */\n @property({ type: Boolean, reflect: true })\n readonly: boolean = false;\n\n /** When true, renders the field in a loading skeleton state. */\n @property({ type: Boolean })\n skeleton: boolean = false;\n\n /** Helper/hint text shown in the field footer. */\n @property({ type: String, attribute: 'helper-text' })\n helperText: string = '';\n\n /** When true, the field is in an error state and `errorText` is shown. */\n @property({ type: Boolean })\n error: boolean = false;\n\n /** Error message displayed when `error` is true. */\n @property({ type: String, attribute: 'error-text' })\n errorText: string = '';\n\n /** When true, the field is in a warning state and `warningText` is shown. */\n @property({ type: Boolean })\n warning: boolean = false;\n\n /** Warning message displayed when `warning` is true. */\n @property({ type: String, attribute: 'warning-text' })\n warningText: string = '';\n\n /** Character / word count string displayed at the trailing end of the footer. */\n @property({ type: String, attribute: 'text-count' })\n textCount: string = '';\n\n /** When true, applies focused styling (controlled externally by the slotted input). */\n @property({ type: Boolean })\n focused: boolean = false;\n\n /** When true, applies populated styling (controlled externally by the slotted input). */\n @property({ type: Boolean })\n populated: boolean = false;\n\n /** Visual variant of the field container. */\n @property({ type: String })\n variant: 'filled' | 'outlined' | 'default' = 'default';\n\n /**\n * Height of the field box: `sm` (2.5rem, the default, the same as a default button), `md`\n * (3.5rem) or `lg` (4rem). `data-density` on an ancestor shortens it further.\n */\n @property({ type: String, reflect: true })\n size: 'sm' | 'md' | 'lg' = 'sm';\n\n /** Reference to the host input element; used to forward click-on-label focus. */\n @property({ type: Object })\n host?: HTMLElement;\n\n /** True when the `field-start` slot contains at least one node. */\n @state()\n slotStartHasContent: boolean = false;\n\n /** True when the `field-end` slot contains at least one node. */\n @state()\n slotEndHasContent: boolean = false;\n\n /** The bordered field container; used to anchor popups such as a select menu. */\n @query('.field-body')\n readonly fieldBodyElement!: HTMLElement | null;\n\n /** The box the control sits in, between the leading and trailing content. */\n @query('.input-wrapper')\n private readonly __inputWrapper!: HTMLElement | null;\n\n /** Watches the field and its control box, so the outlined label rests where the text starts. */\n private __resizeObserver?: ResizeObserver;\n\n connectedCallback() {\n super.connectedCallback();\n if (this.hasUpdated) this.__observeInputBox();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__resizeObserver?.disconnect();\n this.__resizeObserver = undefined;\n }\n\n firstUpdated() {\n this.__observeInputBox();\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('.slot-start-wrapper slot'),\n hasContent => {\n this.slotStartHasContent = hasContent;\n this.requestUpdate();\n },\n );\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('.slot-end-wrapper slot'),\n hasContent => {\n this.slotEndHasContent = hasContent;\n this.requestUpdate();\n },\n );\n }\n\n __handleClick() {\n // @ts-ignore\n this.host?.focus?.();\n }\n\n /**\n * Starts watching the field body and the control box. The outlined label rests over the\n * control's text and floats into the outline's notch; the text's start moves with leading\n * content such as an icon, so its inset is measured and handed to the styles.\n */\n private __observeInputBox() {\n if (typeof ResizeObserver === 'undefined' || this.__resizeObserver) return;\n const body = this.fieldBodyElement;\n const box = this.__inputWrapper;\n if (!body || !box) return;\n this.__resizeObserver = new ResizeObserver(() => this.__measureInputBox());\n this.__resizeObserver.observe(body);\n this.__resizeObserver.observe(box);\n }\n\n /** Hands the control box's inline insets to the styles as `--_input-start` and `--_input-end`. */\n private __measureInputBox() {\n const body = this.fieldBodyElement;\n const box = this.__inputWrapper;\n if (!body || !box) return;\n const bodyRect = body.getBoundingClientRect();\n const boxRect = box.getBoundingClientRect();\n const rtl = getComputedStyle(body).direction === 'rtl';\n const start = rtl\n ? bodyRect.right - boxRect.right\n : boxRect.left - bodyRect.left;\n const end = rtl\n ? boxRect.left - bodyRect.left\n : bodyRect.right - boxRect.right;\n body.style.setProperty('--_input-start', `${Math.max(0, start)}px`);\n body.style.setProperty('--_input-end', `${Math.max(0, end)}px`);\n // Animate the label only after it has its first position, so it doesn't slide into place.\n if (!body.hasAttribute('data-label-ready')) {\n requestAnimationFrame(() => body.setAttribute('data-label-ready', ''));\n }\n }\n\n /** The label text and required mark, shared by the outlined label and its notch. */\n __renderLabelText() {\n return html`${this.label}${this.required\n ? html`<span class=\"required\">*</span>`\n : nothing}`;\n }\n\n /**\n * The outline. The outlined variant builds it from parts, as Material 3 does: a start segment,\n * a notch as wide as the floating label whose top edge opens while the label floats, and an\n * end segment that takes the remaining width. The label floats into the notch, so the\n * outline needs no background behind the label and works on any surface.\n */\n __renderOutline() {\n if (this.variant !== 'outlined') return html`<div class=\"outline\"></div>`;\n return html`<div class=\"outline\" aria-hidden=\"true\">\n <div class=\"outline-start\"></div>\n <div class=\"outline-notch\">\n ${this.label\n ? html`<span class=\"outline-notch-label\"\n >${this.__renderLabelText()}</span\n >`\n : nothing}\n </div>\n <div class=\"outline-end\"></div>\n </div>`;\n }\n\n /** The outlined label: resting over the empty control, floating in the notch otherwise. */\n __renderOutlinedLabel() {\n if (this.variant !== 'outlined' || !this.label) return nothing;\n return html`<label class=\"outlined-label\">\n ${this.__renderLabelText()}\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n </label>`;\n }\n\n __renderFieldHeader() {\n if (!this.label || this.variant === 'outlined') return nothing;\n return html`<div class=\"field-header\">\n <label class=\"label\">\n ${this.label}${this.required\n ? html`<span class=\"required\">*</span>`\n : nothing}\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n </label>\n </div>`;\n }\n\n __renderFieldFooter() {\n if (\n !this.textCount &&\n !this.helperText &&\n !this.errorText &&\n !this.warningText\n )\n return nothing;\n return html`<div class=\"field-footer\">\n ${this.__renderHelperText()} ${this.__renderWordCount()}\n </div>`;\n }\n\n __renderHelperText() {\n if (this.error) return html`<div class=\"helper\">${this.errorText}</div>`;\n if (this.warning)\n return html`<div class=\"helper\">${this.warningText}</div>`;\n if (this.helperText || this.helperText === '')\n return html`<div class=\"helper\">${this.helperText}</div>`;\n return nothing;\n }\n\n __renderWordCount() {\n if (!this.textCount) return nothing;\n return html`<div class=\"text-count\">${this.textCount}</div>`;\n }\n\n render() {\n const classes = {\n field: true,\n required: this.required,\n disabled: this.disabled,\n 'show-skeleton': this.skeleton,\n 'has-error': this.error,\n 'has-warning': this.warning,\n focused: this.focused,\n readonly: this.readonly,\n [`variant-${this.variant}`]: true,\n populated: this.populated,\n 'has-label': !!this.label,\n 'label-floating': this.populated || this.focused,\n };\n\n return html`\n <div class=${classMap(classes)}>\n ${this.__renderFieldHeader()}\n\n <div class=\"field-body\" @click=${this.__handleClick}>\n ${this.__renderOutline()}\n <div class=\"background\"></div>\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n ${this.__renderOutlinedLabel()}\n\n <div class=\"field-content\">\n <div\n class=${classMap({\n 'slot-start-wrapper': true,\n 'has-content': this.slotStartHasContent,\n })}\n >\n <slot name=\"field-start\"></slot>\n </div>\n\n <div class=\"input-wrapper\"><slot></slot></div>\n\n <div\n class=${classMap({\n 'slot-end-wrapper': true,\n 'has-content': this.slotEndHasContent,\n })}\n >\n <slot name=\"field-end\"></slot>\n </div>\n </div>\n </div>\n\n ${this.__renderFieldFooter()}\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","nothing","classMap","styles","property","state","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AAEI,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQA,GAAU,CAAA;AAA9B,IAAA,WAAA,GAAA;;;QAUL,IAAA,CAAA,KAAK,GAAW,EAAE;;QAIlB,IAAA,CAAA,QAAQ,GAAY,KAAK;;QAIzB,IAAA,CAAA,QAAQ,GAAY,KAAK;;QAIzB,IAAA,CAAA,QAAQ,GAAY,KAAK;;QAIzB,IAAA,CAAA,QAAQ,GAAY,KAAK;;QAIzB,IAAA,CAAA,UAAU,GAAW,EAAE;;QAIvB,IAAA,CAAA,KAAK,GAAY,KAAK;;QAIt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,CAAA;AAzF1C,KAAK,GAAA,UAAA,CAAA;IADjB;AACY,CAAA,EAAA,KAAK,CAsSjB;;;;"}
@@ -3,12 +3,12 @@ import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './query-CHb9Ft_d.js';
5
5
  import { e as e$1 } from './class-map-NDIkZErE.js';
6
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
7
- import { g as getFormValue } from './form-associated-D3Tn33s_.js';
8
- import { B as BaseInput } from './BaseInput-CcMfg1Y2.js';
6
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
7
+ import { g as getFormValue } from './form-associated-BHbg72PG.js';
8
+ import { B as BaseInput } from './BaseInput-mWdyYv27.js';
9
9
  import './base-Cl6v8-BZ.js';
10
10
  import './directive-ZPhl09Yt.js';
11
- import './strings-DmbqMTfs.js';
11
+ import './strings-BJPuhKJk.js';
12
12
  import './locale-DEsJZCQG.js';
13
13
  import './element-internals-QME0yEz4.js';
14
14
  import './suggestion-controller-CW17adxd.js';
@@ -57,8 +57,16 @@ var css_248z = i`* {
57
57
  .file-upload {
58
58
  --_drop-zone-color: var(
59
59
  --file-upload-drop-zone-color,
60
- var(--color-surface-container-low)
60
+ var(--color-surface-container-lowest)
61
61
  );
62
+ --_file-item-color: var(
63
+ --file-upload-file-item-color,
64
+ var(--color-surface-container-lowest)
65
+ );
66
+ --_file-item-border-color: var(--color-outline-variant, var(--color-outline));
67
+ --_content-color: var(--color-on-surface);
68
+ --_muted-color: var(--color-on-surface-variant);
69
+ --_accent-color: var(--color-primary);
62
70
  --_drop-zone-border-color: var(
63
71
  --file-upload-drop-zone-border-color,
64
72
  var(--color-outline)
@@ -78,6 +86,18 @@ var css_248z = i`* {
78
86
  --_helper-text-color: var(--color-error);
79
87
  --_drop-zone-border-color: var(--color-error);
80
88
  }
89
+ .file-upload.disabled {
90
+ --_drop-zone-color: color-mix(in srgb, var(--color-on-surface) 4%, transparent);
91
+ --_drop-zone-border-color: color-mix(in srgb, var(--color-on-surface) 12%, transparent);
92
+ --_file-item-color: color-mix(in srgb, var(--color-on-surface) 4%, transparent);
93
+ --_file-item-border-color: color-mix(in srgb, var(--color-on-surface) 12%, transparent);
94
+ --_content-color: color-mix(in srgb, var(--color-on-surface) 38%, transparent);
95
+ --_muted-color: var(--_content-color);
96
+ --_accent-color: var(--_content-color);
97
+ }
98
+ .file-upload.readonly:not(.disabled) {
99
+ --_file-item-color: color-mix(in srgb, var(--color-on-surface) 4%, transparent);
100
+ }
81
101
 
82
102
  .label {
83
103
  font-family: var(--typography-body-small-font-family) !important;
@@ -103,7 +123,7 @@ var css_248z = i`* {
103
123
  border: 0.0625rem dashed var(--_drop-zone-border-color);
104
124
  border-radius: var(--_drop-zone-shape);
105
125
  background-color: var(--_drop-zone-color);
106
- color: var(--color-on-surface);
126
+ color: var(--_content-color);
107
127
  text-align: center;
108
128
  cursor: pointer;
109
129
  outline: none;
@@ -116,10 +136,10 @@ var css_248z = i`* {
116
136
  }
117
137
  .drop-zone .drop-icon {
118
138
  --icon-size: 2rem;
119
- --icon-color: var(--color-on-surface-variant);
139
+ --icon-color: var(--_muted-color);
120
140
  }
121
141
  .drop-zone .browse {
122
- color: var(--color-primary);
142
+ color: var(--_accent-color);
123
143
  text-decoration: underline;
124
144
  }
125
145
  .drop-zone:hover {
@@ -137,10 +157,9 @@ var css_248z = i`* {
137
157
 
138
158
  .disabled .drop-zone {
139
159
  cursor: not-allowed;
140
- opacity: 0.38;
141
160
  }
142
161
  .disabled .drop-zone:hover {
143
- --_drop-zone-border-color: var(--color-outline);
162
+ --_drop-zone-border-color: color-mix(in srgb, var(--color-on-surface) 12%, transparent);
144
163
  }
145
164
 
146
165
  .disabled .label,
@@ -179,13 +198,14 @@ var css_248z = i`* {
179
198
  align-items: center;
180
199
  gap: var(--spacing-150);
181
200
  padding: var(--spacing-100) var(--spacing-100) var(--spacing-100) var(--spacing-200);
182
- border: 0.0625rem solid var(--color-outline-variant, var(--color-outline));
201
+ border: 0.0625rem solid var(--_file-item-border-color);
183
202
  border-radius: var(--shape-corner-small);
184
- color: var(--color-on-surface);
203
+ background-color: var(--_file-item-color);
204
+ color: var(--_content-color);
185
205
  }
186
206
  .file-item .file-icon {
187
207
  --icon-size: 1.5rem;
188
- --icon-color: var(--color-on-surface-variant);
208
+ --icon-color: var(--_muted-color);
189
209
  flex: none;
190
210
  }
191
211
  .file-item.error .file-icon {
@@ -229,7 +249,7 @@ var css_248z = i`* {
229
249
  line-height: var(--typography-body-small-line-height) !important;
230
250
  letter-spacing: var(--typography-body-small-letter-spacing) !important;
231
251
  flex: none;
232
- color: var(--color-on-surface-variant);
252
+ color: var(--_muted-color);
233
253
  }
234
254
 
235
255
  .file-error {
@@ -341,7 +361,8 @@ let fileUploadCount = 0;
341
361
  * @fires {CustomEvent<{value: File[]}>} change - Dispatched when files are added or removed; `value` is the accepted files.
342
362
  * @fires {CustomEvent<{file: File}>} remove - Dispatched when the person removes a file, before `change`.
343
363
  *
344
- * @cssprop --file-upload-drop-zone-color - Background of the drop zone.
364
+ * @cssprop --file-upload-drop-zone-color - Background of the drop zone. Defaults to `surface-container-lowest`, the fill of a default field.
365
+ * @cssprop --file-upload-file-item-color - Background of each file row. Defaults to `surface-container-lowest`.
345
366
  * @cssprop --file-upload-drop-zone-border-color - Dashed border of the drop zone.
346
367
  * @cssprop --file-upload-drop-zone-shape - Corner radius of the drop zone.
347
368
  * @cssprop --file-upload-drop-zone-min-block-size - Minimum height of the drop zone.
@@ -382,6 +403,7 @@ let FileUpload = class FileUpload extends BaseInput {
382
403
  this.helperText = '';
383
404
  /** Shows the component in its error state with `error-text`. */
384
405
  this.error = false;
406
+ /** Error message shown below the component while `error` is set; replaces the help text. */
385
407
  this.errorText = '';
386
408
  // ── State ────────────────────────────────────────────────────────────────
387
409
  /** True while files are dragged over the drop zone. */