@orangelogic/design-system 2.0.0-29DUO2-beta-3 → 2.0.0-29IORR-beta-2

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 (307) hide show
  1. package/library/chunks/{AxisLabelRadial.CgPb7ghO.js → AxisLabelRadial.Bs1P_q_F.js} +1 -1
  2. package/library/chunks/{BaseColumnSeries.B6rG-Ylz.js → BaseColumnSeries.C7jwOxIJ.js} +1 -1
  3. package/library/chunks/{CandlestickSeries.C-YfO-57.js → CandlestickSeries.CkXGtRWE.js} +2 -2
  4. package/library/chunks/{Circle.DhoXSsjo.js → Circle.DBa5Ok8V.js} +1 -1
  5. package/library/chunks/{ColumnSeries.CZi2LBZ2.js → ColumnSeries.DGazbfza.js} +2 -2
  6. package/library/chunks/{EditableAxisLabel.CykTMTsG.js → EditableAxisLabel.wN0t_G2B.js} +2 -2
  7. package/library/chunks/{EditableLabel.BlQ7B4D0.js → EditableLabel.BWeq6fgX.js} +1 -1
  8. package/library/chunks/{Gradient.BQ0JzFEe.js → Gradient.CdcsPIru.js} +1 -1
  9. package/library/chunks/{LinearGradient.DuVS2EHe.js → LinearGradient.B1z9AGUt.js} +2 -2
  10. package/library/chunks/{Picture.DRO0jnR6.js → Picture.YSPC0l0Q.js} +1 -1
  11. package/library/chunks/{Polygon.DEO3f_qs.js → Polygon.BwMvXN2H.js} +1 -1
  12. package/library/chunks/{ProgressPie.Bryx2w1J.js → ProgressPie.DlCwXN17.js} +5 -5
  13. package/library/chunks/{RadialLabel.TyXECvYG.js → RadialLabel.DyVOf2K8.js} +1 -1
  14. package/library/chunks/{Scrollbar.DK48nKk4.js → Scrollbar.BdZVb_Z-.js} +1 -1
  15. package/library/chunks/{Slice.DbXRplXx.js → Slice.DiEswWa6.js} +1 -1
  16. package/library/chunks/{Slider.B27osQYu.js → Slider.C20No2z5.js} +1 -1
  17. package/library/chunks/{SpriteResizer.C4wFzD_x.js → SpriteResizer.DFnmcy0h.js} +1 -1
  18. package/library/chunks/{Triangle.BEmFiHyd.js → Triangle.BaOef7HV.js} +1 -1
  19. package/library/chunks/{ZoomTools.CBqjLDqb.js → ZoomTools.D5JPehoL.js} +1 -1
  20. package/library/chunks/{_baseUniq.Df-fLIBx.js → _baseUniq.BUihBa8c.js} +56 -53
  21. package/library/chunks/{am-chart.B_OdX4Q-.js → am-chart.H2jnOzFc.js} +254 -262
  22. package/library/chunks/{animation.DfUHRQry.js → animation.7ifl4x2S.js} +4 -8
  23. package/library/chunks/array.DCtvHiLS.js +81 -0
  24. package/library/chunks/asset.D7E0-cUV.js +460 -0
  25. package/library/chunks/{button.KnE3mcyM.js → button.CauAHfdl.js} +10 -45
  26. package/library/chunks/button.styles.CKqn956w.js +5 -0
  27. package/library/chunks/{capitalize.WSkCXkNE.js → capitalize.CNStXZBq.js} +1 -1
  28. package/library/chunks/{color-swatch-group.p3Sdqlat.js → color-swatch-group.D5BP2W3P.js} +50 -220
  29. package/library/chunks/{color-swatch.C0oPHfOu.js → color-swatch.2HS4bc3N.js} +20 -204
  30. package/library/chunks/{colorPicker.CJwbdhtn.js → colorPicker.06n6P3aK.js} +5 -5
  31. package/library/chunks/component.styles.CRO4Odto.js +5 -0
  32. package/library/chunks/confirm-popover.DmGAMS8X.js +121 -0
  33. package/library/chunks/{cropper.tSDgXKqJ.js → cropper.ZU2Dy-MM.js} +8182 -8540
  34. package/library/chunks/{dialog.DpZBbTCn.js → dialog.2UW1LNm1.js} +117 -314
  35. package/library/chunks/{dom.BQVKDNd8.js → dom.BslZF2Y_.js} +1 -1
  36. package/library/chunks/dot-pagination.DsAfSNzr.js +204 -0
  37. package/library/chunks/{endpoints.B7lcoc1N.js → endpoints.Fpyb8xvv.js} +214 -203
  38. package/library/chunks/{exporting.DCqJtW6l.js → exporting.Chnl3UWi.js} +2 -2
  39. package/library/chunks/file-on-demand.Dig_iVvx.js +1956 -0
  40. package/library/chunks/{flow.Ch1rU01m.js → flow.D2CqFQa7.js} +5 -5
  41. package/library/chunks/folder-select.BT1drT8C.js +775 -0
  42. package/library/chunks/form-control.styles.CaGWmeAS.js +5 -0
  43. package/library/chunks/{form.DgwYWi0O.js → form.CFc09rKh.js} +1 -1
  44. package/library/chunks/{gantt.rWdF_jmG.js → gantt.DSHD2gjO.js} +8 -8
  45. package/library/chunks/header.BePZwMCQ.js +170 -0
  46. package/library/chunks/{hierarchy.HoRJAu6S.js → hierarchy.DwVsMmsP.js} +5 -5
  47. package/library/chunks/{hub-connection.CfARlehM.js → hub-connection.Ot2odiCz.js} +1 -1
  48. package/library/chunks/{i18n.C0iakJkV.js → i18n.BFqTRDCA.js} +19 -12
  49. package/library/chunks/icon-button.rKe0N4VB.js +149 -0
  50. package/library/chunks/iframe.DznmlYpV.js +73 -0
  51. package/library/chunks/{image.C9avagDq.js → image.CEtCGsNL.js} +275 -488
  52. package/library/chunks/{index.D2JPKXqq.js → index.C9khsiad.js} +17 -17
  53. package/library/chunks/isObjectLike.z36Fu426.js +34 -0
  54. package/library/chunks/{isSymbol.huJ_Cvxt.js → isSymbol.L0C2ND_U.js} +1 -1
  55. package/library/chunks/{json.DHNMAC-m.js → json.zyETMOw-.js} +3 -3
  56. package/library/chunks/{list-editor.B2mFE9f7.js → list-editor.CJ96S1Np.js} +58 -372
  57. package/library/chunks/{map.BHmZ4Crx.js → map.CqM2O6LB.js} +2 -2
  58. package/library/chunks/option.COnEtd3X.js +123 -0
  59. package/library/chunks/{overlayscrollbars.XhGWx9Zk.js → overlayscrollbars.BMav4RQ4.js} +252 -958
  60. package/library/chunks/pagination.DaD9Yul6.js +334 -0
  61. package/library/chunks/{percent.CM9cr1H3.js → percent.DuQwbCCg.js} +3 -3
  62. package/library/chunks/{radar.CQUnnhGk.js → radar.FpYl3UH5.js} +4 -4
  63. package/library/chunks/{responsive.CrX-HUow.js → responsive.BndCeSg0.js} +1 -1
  64. package/library/chunks/{sliceGrouper.iv1p8MAK.js → sliceGrouper.BsE7fGMt.js} +1 -1
  65. package/library/chunks/{stock.CU0y6a5P.js → stock.BR-ag4Pt.js} +9 -9
  66. package/library/chunks/string.BigZhczf.js +185 -0
  67. package/library/chunks/{tab-group.05PY0smt.js → tab-group.0Po0eoxR.js} +33 -584
  68. package/library/chunks/{table.DNTm_GMS.js → table.WNd284in.js} +3535 -4852
  69. package/library/chunks/{timeline.yzdwtGKM.js → timeline.DkzkmgEM.js} +5 -5
  70. package/library/chunks/{toString.CRT5zqEU.js → toString.CL_lYXbK.js} +3 -3
  71. package/library/chunks/toast.B2cJgW5u.js +71 -0
  72. package/library/chunks/transformation.CzBptarI.js +140 -0
  73. package/library/chunks/{tree.CeMLCbs-.js → tree.QCQd_cuc.js} +32 -400
  74. package/library/chunks/typography.DJC_UXgs.js +52 -0
  75. package/library/chunks/url.Cj9cIQXJ.js +27 -0
  76. package/library/chunks/{venn.BOEi13la.js → venn.D739bOV3.js} +1 -1
  77. package/library/chunks/watch.BCJD77bD.js +547 -0
  78. package/library/chunks/{wc.V-lq02JF.js → wc.DzW311D-.js} +1 -1
  79. package/library/chunks/{xy.Df1hy9ac.js → xy.DCRDfTsa.js} +10 -10
  80. package/library/components/alert.js +11 -179
  81. package/library/components/am-chart.js +3 -3
  82. package/library/components/animated-image.js +13 -101
  83. package/library/components/animation.js +3 -3
  84. package/library/components/array-line-clamp.js +8 -89
  85. package/library/components/asset-link-format.js +718 -1380
  86. package/library/components/atoms.js +18 -18
  87. package/library/components/avatar.js +6 -95
  88. package/library/components/badge.js +11 -139
  89. package/library/components/bicolor-picker.js +4 -23
  90. package/library/components/border-input-group.js +5 -26
  91. package/library/components/breadcrumb-item.js +25 -156
  92. package/library/components/breadcrumb.js +4 -22
  93. package/library/components/button-group.js +3 -28
  94. package/library/components/button.js +6 -6
  95. package/library/components/card.js +4 -126
  96. package/library/components/checkbox.js +13 -254
  97. package/library/components/color-picker.js +57 -728
  98. package/library/components/color-swatch-group.js +9 -9
  99. package/library/components/color-swatch.js +5 -5
  100. package/library/components/confirm-popover.js +6 -6
  101. package/library/components/copy-button.js +11 -256
  102. package/library/components/corner-position-input-group.js +5 -58
  103. package/library/components/cropper.js +2 -2
  104. package/library/components/details.js +6 -152
  105. package/library/components/dialog.js +6 -6
  106. package/library/components/divider.js +6 -68
  107. package/library/components/dot-pagination.js +4 -4
  108. package/library/components/dot-status.js +25 -95
  109. package/library/components/drawer.js +11 -242
  110. package/library/components/dropdown.js +49 -151
  111. package/library/components/dynamic-select.js +10 -75
  112. package/library/components/e-chart.js +8 -51
  113. package/library/components/element-clamp.js +7 -80
  114. package/library/components/file-on-demand.js +13 -13
  115. package/library/components/folder-select.js +9 -7
  116. package/library/components/format-bytes.js +1 -1
  117. package/library/components/format-date.js +3 -7
  118. package/library/components/format-number.js +1 -1
  119. package/library/components/format-time.js +4 -14
  120. package/library/components/grid-item.js +5 -172
  121. package/library/components/grid.js +5 -41
  122. package/library/components/header.js +4 -4
  123. package/library/components/hub-connection.js +2 -2
  124. package/library/components/icon-button.js +14 -679
  125. package/library/components/icon.js +9 -2449
  126. package/library/components/iframe.js +4 -4
  127. package/library/components/image-comparer.js +9 -129
  128. package/library/components/image.js +4 -4
  129. package/library/components/include.js +3 -7
  130. package/library/components/input-group.js +4 -29
  131. package/library/components/input.js +358 -966
  132. package/library/components/line-clamp.js +7 -83
  133. package/library/components/list-editor.js +9 -9
  134. package/library/components/markdown.js +2 -4
  135. package/library/components/masonry.js +24 -223
  136. package/library/components/menu-item.js +155 -445
  137. package/library/components/menu-label.js +3 -20
  138. package/library/components/menu-section.js +3 -17
  139. package/library/components/menu.js +5 -113
  140. package/library/components/molecules.js +5 -5
  141. package/library/components/mutation-observer.js +3 -7
  142. package/library/components/option.js +4 -4
  143. package/library/components/organisms.js +2 -2
  144. package/library/components/padding-input-group.js +5 -16
  145. package/library/components/pagination.js +10 -8
  146. package/library/components/popup.js +385 -682
  147. package/library/components/position-picker.js +4 -94
  148. package/library/components/progress-bar.js +19 -136
  149. package/library/components/progress-ring.js +4 -95
  150. package/library/components/qr-code.js +5 -17
  151. package/library/components/radio-button.js +5 -25
  152. package/library/components/radio-card.js +8 -176
  153. package/library/components/radio-group.js +22 -153
  154. package/library/components/radio.js +14 -171
  155. package/library/components/range.js +123 -660
  156. package/library/components/rating.js +58 -238
  157. package/library/components/relative-time.js +3 -13
  158. package/library/components/resize-observer.js +4 -8
  159. package/library/components/select.js +305 -1012
  160. package/library/components/shadow-input-group.js +5 -24
  161. package/library/components/share-option-list.js +21 -313
  162. package/library/components/sidebar.js +15 -221
  163. package/library/components/size-input-group.js +12 -77
  164. package/library/components/skeleton.js +7 -80
  165. package/library/components/space.js +6 -143
  166. package/library/components/spinner.js +7 -76
  167. package/library/components/split-panel.js +18 -125
  168. package/library/components/step.js +21 -272
  169. package/library/components/stepper-wizard.js +9 -43
  170. package/library/components/stepper.js +17 -34
  171. package/library/components/switch.js +13 -276
  172. package/library/components/tab-group.js +7 -7
  173. package/library/components/tab-panel.js +5 -32
  174. package/library/components/tab.js +11 -257
  175. package/library/components/table.js +8 -8
  176. package/library/components/tag.js +15 -166
  177. package/library/components/textarea.js +183 -504
  178. package/library/components/timecode.js +6 -25
  179. package/library/components/tooltip.js +10 -94
  180. package/library/components/tree-item.js +4 -4
  181. package/library/components/tree.js +4 -4
  182. package/library/components/typeface.js +24 -123
  183. package/library/components/types.js +37225 -47339
  184. package/library/components/typography.js +2 -2
  185. package/library/components/video.js +3875 -6263
  186. package/library/components/visually-hidden.js +3 -15
  187. package/library/package.json +4 -1
  188. package/library/packages/atoms/src/components/dialog/dialog.d.ts +10 -0
  189. package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +2 -1
  190. package/library/packages/atoms/src/components/image/image.d.ts +15 -1
  191. package/library/packages/atoms/src/components/input/auto-grow-controller.d.ts +23 -0
  192. package/library/packages/atoms/src/components/input/input.d.ts +10 -2
  193. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +4 -0
  194. package/library/packages/atoms/src/components/pagination/pagination.d.ts +32 -2
  195. package/library/packages/atoms/src/components/popup/overlay/Overlay.d.ts +10 -0
  196. package/library/packages/atoms/src/components/popup/popup.d.ts +1 -1
  197. package/library/packages/atoms/src/components/select/select.d.ts +11 -0
  198. package/library/packages/atoms/src/components/table/table.d.ts +49 -8
  199. package/library/packages/atoms/src/components/table/tabulator-tables/core/Tabulator.d.ts +1 -0
  200. package/library/packages/atoms/src/components/table/tabulator-tables/core/TabulatorFull.d.ts +1 -0
  201. package/library/packages/atoms/src/components/table/tabulator-tables/core/tools/DataLoader.d.ts +3 -1
  202. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Ajax/Ajax.d.ts +1 -1
  203. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/Edit.d.ts +1 -0
  204. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/List.d.ts +40 -1
  205. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/Filter.d.ts +10 -3
  206. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Filter/formatter-display-resolvers.d.ts +93 -0
  207. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/Group.d.ts +8 -0
  208. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupComponent.d.ts +3 -1
  209. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupLoadMore.d.ts +7 -0
  210. package/library/packages/atoms/src/components/table/tabulator-tables/modules/GroupRows/GroupRows.d.ts +2 -0
  211. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Page/Page.d.ts +2 -2
  212. package/library/packages/atoms/src/components/textarea/textarea.d.ts +19 -4
  213. package/library/packages/atoms/src/components/video/video.d.ts +3 -1
  214. package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
  215. package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
  216. package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
  217. package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
  218. package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
  219. package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
  220. package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
  221. package/library/packages/events/src/cx-unauthorized.d.ts +10 -0
  222. package/library/packages/events/src/cx-video-format-picker-delete.d.ts +6 -0
  223. package/library/packages/events/src/cx-video-format-picker-select.d.ts +8 -0
  224. package/library/packages/events/src/events.d.ts +11 -1
  225. package/library/packages/molecules/src/cropper/cropper.d.ts +2 -0
  226. package/library/packages/molecules/src/cropper/react/Cropper.d.ts +2 -0
  227. package/library/packages/molecules/src/estimated-reading-time/estimated-reading-time.d.ts +3 -2
  228. package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +26 -0
  229. package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +46 -0
  230. package/library/packages/molecules/src/folder-select/folder-select.d.ts +25 -0
  231. package/library/packages/molecules/src/index.d.ts +1 -0
  232. package/library/packages/molecules/src/storybook/storybook.d.ts +60 -23
  233. package/library/packages/molecules/src/timeline/timeline.d.ts +14 -0
  234. package/library/packages/molecules/src/video-format-picker/video-format-picker.d.ts +55 -0
  235. package/library/packages/molecules/src/video-format-picker/video-format-picker.styles.d.ts +2 -0
  236. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -1
  237. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
  238. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +95 -0
  239. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
  240. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +57 -26
  241. package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
  242. package/library/packages/organisms/src/carousel/carousel.d.ts +5 -1
  243. package/library/packages/organisms/src/comment/comment.d.ts +1 -0
  244. package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +7 -0
  245. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +11 -0
  246. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +10 -0
  247. package/library/packages/organisms/src/content-builder/components/folder-picker/folder-picker.d.ts +6 -0
  248. package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +6 -2
  249. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +6 -2
  250. package/library/packages/organisms/src/content-builder/configs/image.d.ts +7 -4
  251. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +5 -2
  252. package/library/packages/organisms/src/content-builder/configs/video.d.ts +11 -2
  253. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +45 -4
  254. package/library/packages/organisms/src/content-builder/content-builder.d.ts +13 -0
  255. package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +45 -1
  256. package/library/packages/organisms/src/content-builder/styleController.d.ts +20 -2
  257. package/library/packages/organisms/src/index.d.ts +2 -0
  258. package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
  259. package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
  260. package/library/packages/services/src/api/asset/asset.d.ts +3 -2
  261. package/library/packages/services/src/api/asset/asset.types.d.ts +84 -0
  262. package/library/packages/services/src/api/asset/asset.utils.d.ts +9 -0
  263. package/library/packages/services/src/api/endpoints.d.ts +1 -1
  264. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  265. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +17 -5
  266. package/library/packages/types/src/asset-click-action.d.ts +3 -1
  267. package/library/packages/types/src/bento-grid.d.ts +37 -0
  268. package/library/packages/types/src/content-builder.d.ts +27 -1
  269. package/library/packages/types/src/gallery.d.ts +0 -6
  270. package/library/packages/types/src/icon-button.d.ts +7 -0
  271. package/library/packages/types/src/menu-item.d.ts +33 -0
  272. package/library/packages/types/src/storybook.d.ts +19 -0
  273. package/library/packages/types/src/table.d.ts +37 -1
  274. package/library/packages/types/src/textarea.d.ts +4 -0
  275. package/library/packages/types/src/video-format-picker.d.ts +11 -0
  276. package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
  277. package/library/packages/utils/src/custom-element/i18n.d.ts +10 -3
  278. package/library/packages/utils/src/index.d.ts +1 -0
  279. package/library/packages/utils/src/string/string.d.ts +33 -0
  280. package/library/packages/utils/src/transformation/index.d.ts +1 -0
  281. package/library/packages/utils/src/url/url.d.ts +9 -0
  282. package/library/react-web-component.d.ts +293 -29
  283. package/library/utils.js +483 -178
  284. package/package.json +4 -1
  285. package/library/chunks/_baseRest.ClTMQtN1.js +0 -67
  286. package/library/chunks/asset.CG_yXtWK.js +0 -288
  287. package/library/chunks/button.styles.Dl5IQLHU.js +0 -718
  288. package/library/chunks/component.styles.DMSLciL5.js +0 -71
  289. package/library/chunks/confirm-popover.zmOFI4e-.js +0 -288
  290. package/library/chunks/content-builder.D_phDrlo.js +0 -127
  291. package/library/chunks/dot-pagination.COBkyhoJ.js +0 -325
  292. package/library/chunks/file-on-demand.CbE-qsiP.js +0 -3740
  293. package/library/chunks/folder-select.Bl_WkhVE.js +0 -844
  294. package/library/chunks/form-control.styles.CUGhvlfT.js +0 -67
  295. package/library/chunks/header.BduX6KJP.js +0 -777
  296. package/library/chunks/identity.ByMq8VxU.js +0 -6
  297. package/library/chunks/iframe.BPKV2K7z.js +0 -160
  298. package/library/chunks/index.B3wJT3XS.js +0 -373
  299. package/library/chunks/isObjectLike.D3cpZO39.js +0 -81
  300. package/library/chunks/option.DnpkE8Xi.js +0 -296
  301. package/library/chunks/pagination.C30LoTya.js +0 -341
  302. package/library/chunks/string.B_rEG27K.js +0 -160
  303. package/library/chunks/toast.BXNbwZV8.js +0 -25
  304. package/library/chunks/typography.oDzoLbZS.js +0 -149
  305. package/library/chunks/url.LjsR2sB5.js +0 -15
  306. package/library/chunks/watch.q1sEjPWL.js +0 -501
  307. /package/library/packages/{organisms/src/asset-link-format/asset-link-format.utils.d.ts → utils/src/transformation/transformation.d.ts} +0 -0
@@ -1,317 +1,34 @@
1
- import { n as r, C as x } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
- import { c as f } from "../chunks/component.styles.DMSLciL5.js";
3
- import { f as m } from "../chunks/form-control.styles.CUGhvlfT.js";
4
- import { c as b } from "../chunks/custom-element.L4WJXn1j.js";
5
- import { d as v } from "../chunks/default-value.COZopaet.js";
6
- import { F as g } from "../chunks/form.DgwYWi0O.js";
7
- import { H as y } from "../chunks/slot.j5oheLJC.js";
8
- import { w as u } from "../chunks/watch.q1sEjPWL.js";
9
- import { i as _, x as p } from "../chunks/lit-element.jLBm65_O.js";
10
- import { r as z } from "../chunks/state.CSDxrqLd.js";
11
- import { e as C } from "../chunks/query.BBf1UFkC.js";
12
- import { e as d } from "../chunks/class-map.BiVq-cVR.js";
1
+ import { n as a, C as m } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
+ import { c as b } from "../chunks/component.styles.CRO4Odto.js";
3
+ import { f as g } from "../chunks/form-control.styles.CaGWmeAS.js";
4
+ import { c as v } from "../chunks/custom-element.L4WJXn1j.js";
5
+ import { d as y } from "../chunks/default-value.COZopaet.js";
6
+ import { F as _ } from "../chunks/form.CFc09rKh.js";
7
+ import { H as z } from "../chunks/slot.j5oheLJC.js";
8
+ import { w as d } from "../chunks/watch.BCJD77bD.js";
9
+ import { i as C, x as p } from "../chunks/lit-element.jLBm65_O.js";
10
+ import { r as w } from "../chunks/state.CSDxrqLd.js";
11
+ import { e as f } from "../chunks/query.BBf1UFkC.js";
12
+ import { e as x } from "../chunks/class-map.BiVq-cVR.js";
13
13
  import { o as n } from "../chunks/if-defined.BRoBj_Rp.js";
14
- import { l as w } from "../chunks/live.SCz6M8Gs.js";
15
- import { n as k } from "../chunks/when.Dr1es41R.js";
16
- const $ = _`
17
- :host {
18
- display: block;
19
- }
20
-
21
- :host([data-user-invalid])::part(base) {
22
- border-color: var(--cx-input-invalid-border-color);
23
- }
24
-
25
- :host([data-user-invalid]:focus-within)::part(base) {
26
- border-color: var(--cx-input-invalid-border-color);
27
- box-shadow: var(--cx-input-invalid-shadow);
28
- }
29
-
30
- .textarea {
31
- display: flex;
32
- align-items: center;
33
- position: relative;
34
- width: 100%;
35
- font-family: var(--cx-input-font-family);
36
- font-weight: var(--cx-input-font-weight);
37
- line-height: var(--cx-line-height-large);
38
- letter-spacing: var(--cx-input-letter-spacing);
39
- vertical-align: middle;
40
- transition:
41
- var(--cx-transition-fast) color,
42
- var(--cx-transition-fast) border,
43
- var(--cx-transition-fast) box-shadow,
44
- var(--cx-transition-fast) background-color;
45
- cursor: text;
46
- }
47
-
48
- /* Standard textareas */
49
- .textarea--standard {
50
- background-color: var(--cx-input-background-color);
51
- border: solid var(--cx-input-border-width) var(--cx-input-border-color);
52
- }
53
-
54
- .textarea--standard:hover:not(.textarea--disabled) {
55
- background-color: var(--cx-input-background-color-hover);
56
- border-color: var(--cx-input-border-color-hover);
57
- }
58
- .textarea--standard:hover:not(.textarea--disabled) .textarea__control {
59
- color: var(--cx-input-color-hover);
60
- }
61
-
62
- .textarea--standard.textarea--focused:not(.textarea--disabled) {
63
- background-color: var(--cx-input-background-color-focus);
64
- border-color: var(--cx-input-border-color-focus);
65
- color: var(--cx-input-color-focus);
66
- }
67
-
68
- .textarea--standard.textarea--focused:not(.textarea--disabled)
69
- .textarea__control {
70
- color: var(--cx-input-color-focus);
71
- }
72
-
73
- .textarea--standard.textarea--disabled {
74
- background-color: var(--cx-input-background-color-disabled);
75
- border-color: var(--cx-input-border-color-disabled);
76
- opacity: 0.5;
77
- cursor: default;
78
- }
79
-
80
- .textarea--standard.textarea--disabled .textarea__control {
81
- color: var(--cx-input-color-disabled);
82
- }
83
-
84
- .textarea--standard.textarea--disabled .textarea__control::placeholder {
85
- color: var(--cx-input-placeholder-color-disabled);
86
- }
87
-
88
- /* Filled textareas */
89
- .textarea--filled {
90
- border: none;
91
- background-color: var(--cx-input-filled-background-color);
92
- color: var(--cx-input-color);
93
- }
94
-
95
- .textarea--filled:hover:not(.textarea--disabled) {
96
- background-color: var(--cx-input-filled-background-color-hover);
97
- }
98
-
99
- .textarea--filled.textarea--focused:not(.textarea--disabled) {
100
- background-color: var(--cx-input-filled-background-color-focus);
101
- outline: var(--cx-focus-ring);
102
- outline-offset: var(--cx-focus-ring-offset);
103
- }
104
-
105
- .textarea--filled.textarea--disabled {
106
- background-color: var(--cx-input-filled-background-color-disabled);
107
- opacity: 0.5;
108
- cursor: default;
109
- }
110
-
111
- .textarea__control {
112
- flex: 1 1 auto;
113
- font: inherit;
114
- line-height: 1.4;
115
- color: var(--cx-input-color);
116
- border: none;
117
- background: none;
118
- box-shadow: none;
119
- cursor: inherit;
120
- -webkit-appearance: none;
121
- line-height: var(--cx-line-height-medium);
122
- padding-top: var(--cx-spacing-x-small);
123
- padding-bottom: var(--cx-spacing-x-small);
124
- padding-left: 0;
125
- padding-right: 0;
126
- }
127
-
128
- .textarea__control::-webkit-search-decoration,
129
- .textarea__control::-webkit-search-cancel-button,
130
- .textarea__control::-webkit-search-results-button,
131
- .textarea__control::-webkit-search-results-decoration {
132
- -webkit-appearance: none;
133
- }
134
-
135
- .textarea__control::placeholder {
136
- color: var(--cx-input-placeholder-color);
137
- user-select: none;
138
- -webkit-user-select: none;
139
- }
140
-
141
- .textarea__control:focus {
142
- outline: none;
143
- }
144
-
145
- /*
146
- * Size modifiers
147
- */
148
-
149
- .textarea--small {
150
- border-radius: var(--cx-input-border-radius-small);
151
- font-size: var(--cx-input-font-size-small);
152
- }
153
-
154
- .textarea--small .textarea-container {
155
- padding-left: var(--cx-input-spacing-small);
156
- padding-right: var(--cx-input-spacing-small);
157
- }
158
-
159
- .textarea--medium {
160
- border-radius: var(--cx-input-border-radius-medium);
161
- font-size: var(--cx-input-font-size-small);
162
- }
163
-
164
- .textarea--medium .textarea-container {
165
- padding-left: var(--cx-input-spacing-medium);
166
- padding-right: var(--cx-input-spacing-medium);
167
- }
168
-
169
- .textarea--large {
170
- border-radius: var(--cx-input-border-radius-large);
171
- font-size: var(--cx-input-font-size-small);
172
- }
173
-
174
- .textarea--large .textarea-container {
175
- padding-left: var(--cx-input-spacing-large);
176
- padding-right: var(--cx-input-spacing-large);
177
- }
178
-
179
- /*
180
- * Resize types
181
- */
182
-
183
- .textarea--resize-none .textarea__control {
184
- resize: none;
185
- }
186
-
187
- .textarea--resize-vertical .textarea__control {
188
- resize: vertical;
189
- }
190
-
191
- .textarea--resize-auto .textarea__control {
192
- height: auto;
193
- resize: none;
194
- overflow-y: hidden;
195
- }
196
-
197
- /*
198
- * Adapt label to be inside textarea
199
- */
200
-
201
- .textarea-container {
202
- position: relative;
203
- display: inline-flex;
204
- flex-direction: column;
205
- width: 100%;
206
- height: 100%;
207
- }
208
-
209
- /* set label's position to absolute */
210
- .form-control__label {
211
- position: relative;
212
- -webkit-transition: transform 0.2s ease-in-out;
213
- -moz-transition: transform 0.2s ease-in-out;
214
- transition: transform 0.2s ease-in-out;
215
- pointer-events: none;
216
- width: fit-content;
217
- line-height: 1; /* use line-height: 1 for easier transform calculation */
218
- }
219
-
220
- .form-control--has-label .textarea--small .form-control__label {
221
- font-size: var(--cx-input-label-font-size-small);
222
- margin: 0;
223
- }
224
-
225
- .form-control--has-label .textarea--medium .form-control__label {
226
- font-size: var(--cx-input-label-font-size-medium);
227
- margin: 0;
228
- }
229
-
230
- .form-control--has-label .textarea--large .form-control__label {
231
- font-size: var(--cx-input-label-font-size-large);
232
- margin: 0;
233
- }
234
-
235
- .textarea__character-count {
236
- display: flex;
237
- align-items: center;
238
- justify-content: flex-end;
239
- color: var(--cx-input-suffix-color, var(--cx-input-color));
240
- font-size: var(--cx-input-font-size);
241
- font-weight: var(--cx-input-font-weight);
242
- letter-spacing: var(--cx-input-letter-spacing);
243
- line-height: var(--cx-input-line-height);
244
- padding-inline-end: var(--cx-spacing-x-small);
245
- padding-top: var(--cx-spacing-2x-small);
246
- white-space: nowrap;
247
- }
248
-
249
- /* when empty with no placeholder (initial state), transform label to vertical center
250
- = (input height - label height) / 2
251
- */
252
- .textarea--small .form-control__label {
253
- transform: translateY(
254
- calc(
255
- (
256
- var(--cx-input-height-small) +
257
- 1.25rem - var(--cx-input-label-font-size-small)
258
- ) /
259
- 2
260
- )
261
- );
262
- }
263
-
264
- .textarea--medium .form-control__label {
265
- transform: translateY(
266
- calc(
267
- (
268
- var(--cx-input-height-medium) +
269
- 1rem - var(--cx-input-label-font-size-medium)
270
- ) /
271
- 2
272
- )
273
- );
274
- }
275
-
276
- .textarea--large .form-control__label {
277
- transform: translateY(
278
- calc(
279
- (
280
- var(--cx-input-height-large) +
281
- 1rem - var(--cx-input-label-font-size-large)
282
- ) /
283
- 2
284
- )
285
- );
286
- }
287
-
288
- /* When focused or not empty, transform label to top
289
- Instead of 0, use var(--cx-spacing-2x-small) to have a distance from top
290
- */
291
- .form-control--has-label .textarea--focused .form-control__label,
292
- .form-control--has-label .textarea--placeholder-visible .form-control__label,
293
- .form-control--has-label
294
- .textarea:not(.textarea--empty)
295
- .form-control__label {
296
- transform: translateY(
297
- calc(var(--cx-spacing-2x-small) + var(--cx-spacing-3x-small))
298
- ); /* distance from top */
299
- }
300
- `;
301
- var F = Object.defineProperty, T = Object.getOwnPropertyDescriptor, e = (a, i, l, s) => {
302
- for (var o = s > 1 ? void 0 : s ? T(i, l) : i, c = a.length - 1, h; c >= 0; c--)
303
- (h = a[c]) && (o = (s ? h(i, l, o) : h(o)) || o);
304
- return s && o && F(i, l, o), o;
14
+ import { l as k } from "../chunks/live.SCz6M8Gs.js";
15
+ import { n as $ } from "../chunks/when.Dr1es41R.js";
16
+ var c = /* @__PURE__ */ ((t) => (t.Max = "max", t))(c || {});
17
+ const H = C`:host{display:block}:host([data-user-invalid])::part(base){border-color:var(--cx-input-invalid-border-color)}:host([data-user-invalid]:focus-within)::part(base){border-color:var(--cx-input-invalid-border-color);box-shadow:var(--cx-input-invalid-shadow)}.textarea{--textarea-background-color:var(--cx-input-background-color);width:100%;font-family:var(--cx-input-font-family);font-weight:var(--cx-input-font-weight);line-height:var(--cx-line-height-large);letter-spacing:var(--cx-input-letter-spacing);vertical-align:middle;transition:var(--cx-transition-fast) color, var(--cx-transition-fast) border, var(--cx-transition-fast) box-shadow, var(--cx-transition-fast) background-color;cursor:text;align-items:center;display:flex;position:relative}.textarea--standard{background-color:var(--textarea-background-color);border:solid var(--cx-input-border-width) var(--cx-input-border-color)}.textarea--standard:hover:not(.textarea--disabled){--textarea-background-color:var(--cx-input-background-color-hover);border-color:var(--cx-input-border-color-hover)}.textarea--standard:hover:not(.textarea--disabled) .textarea__control{color:var(--cx-input-color-hover)}.textarea--standard.textarea--focused:not(.textarea--disabled){--textarea-background-color:var(--cx-input-background-color-focus);border-color:var(--cx-input-border-color-focus);color:var(--cx-input-color-focus)}.textarea--standard.textarea--focused:not(.textarea--disabled) .textarea__control{color:var(--cx-input-color-focus)}.textarea--standard.textarea--disabled{--textarea-background-color:var(--cx-input-background-color-disabled);border-color:var(--cx-input-border-color-disabled);opacity:.5;cursor:default}.textarea--standard.textarea--disabled .textarea__control{color:var(--cx-input-color-disabled)}.textarea--standard.textarea--disabled .textarea__control::placeholder{color:var(--cx-input-placeholder-color-disabled)}.textarea--filled{--textarea-background-color:var(--cx-input-filled-background-color);background-color:var(--textarea-background-color);color:var(--cx-input-color);border:none}.textarea--filled:hover:not(.textarea--disabled){--textarea-background-color:var(--cx-input-filled-background-color-hover)}.textarea--filled.textarea--focused:not(.textarea--disabled){--textarea-background-color:var(--cx-input-filled-background-color-focus);outline:var(--cx-focus-ring);outline-offset:var(--cx-focus-ring-offset)}.textarea--filled.textarea--disabled{--textarea-background-color:var(--cx-input-filled-background-color-disabled);opacity:.5;cursor:default}.textarea__control{font:inherit;color:var(--cx-input-color);box-shadow:none;cursor:inherit;-webkit-appearance:none;line-height:1.4;line-height:var(--cx-line-height-medium);padding-top:var(--cx-spacing-x-small);padding-bottom:var(--cx-spacing-x-small);background:0 0;border:none;flex:auto;padding-left:0;padding-right:0}.textarea__control::-webkit-search-decoration,.textarea__control::-webkit-search-cancel-button,.textarea__control::-webkit-search-results-button,.textarea__control::-webkit-search-results-decoration{-webkit-appearance:none}.textarea__control::placeholder{color:var(--cx-input-placeholder-color);-webkit-user-select:none;user-select:none}.textarea__control:focus{outline:none}.textarea--small{border-radius:var(--cx-input-border-radius-small);font-size:var(--cx-input-font-size-small)}.textarea--small .textarea-container{padding-left:var(--cx-input-spacing-small);padding-right:var(--cx-input-spacing-small)}.textarea--medium{border-radius:var(--cx-input-border-radius-medium);font-size:var(--cx-input-font-size-small)}.textarea--medium .textarea-container{padding-left:var(--cx-input-spacing-medium);padding-right:var(--cx-input-spacing-medium)}.textarea--large{border-radius:var(--cx-input-border-radius-large);font-size:var(--cx-input-font-size-small)}.textarea--large .textarea-container{padding-left:var(--cx-input-spacing-large);padding-right:var(--cx-input-spacing-large)}.textarea--resize-none .textarea__control{resize:none}.textarea--resize-vertical .textarea__control{resize:vertical}.textarea--resize-auto .textarea__control{resize:none;height:auto;overflow-y:hidden}.textarea-container{flex-direction:column;width:100%;height:100%;display:inline-flex;position:relative}.form-control__label{pointer-events:none;background-color:var(--textarea-background-color);width:fit-content;line-height:1;-webkit-transition:transform .2s ease-in-out;-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;position:relative}.form-control--has-label .textarea--small .form-control__label{font-size:var(--cx-input-label-font-size-small);margin:0}.form-control--has-label .textarea--medium .form-control__label{font-size:var(--cx-input-label-font-size-medium);margin:0}.form-control--has-label .textarea--large .form-control__label{font-size:var(--cx-input-label-font-size-large);margin:0}.textarea__character-count{color:var(--cx-input-suffix-color,var(--cx-input-color));font-size:var(--cx-input-font-size);font-weight:var(--cx-input-font-weight);letter-spacing:var(--cx-input-letter-spacing);line-height:var(--cx-input-line-height);padding-inline-end:var(--cx-spacing-x-small);padding-top:var(--cx-spacing-2x-small);white-space:nowrap;justify-content:flex-end;align-items:center;display:flex}.textarea--small .form-control__label{transform:translateY(calc(( var(--cx-input-height-small) + 1.25rem - var(--cx-input-label-font-size-small) ) / 2))}.textarea--medium .form-control__label{transform:translateY(calc(( var(--cx-input-height-medium) + 1rem - var(--cx-input-label-font-size-medium) ) / 2))}.textarea--large .form-control__label{transform:translateY(calc(( var(--cx-input-height-large) + 1rem - var(--cx-input-label-font-size-large) ) / 2))}.form-control--has-label .textarea--focused .form-control__label,.form-control--has-label .textarea--placeholder-visible .form-control__label,.form-control--has-label .textarea:not(.textarea--empty) .form-control__label{transform:translateY(calc(var(--cx-spacing-2x-small) + var(--cx-spacing-3x-small)))}`;
18
+ var F = Object.defineProperty, T = Object.getOwnPropertyDescriptor, r = (t, o, i, l) => {
19
+ for (var s = l > 1 ? void 0 : l ? T(o, i) : o, h = t.length - 1, u; h >= 0; h--)
20
+ (u = t[h]) && (s = (l ? u(o, i, s) : u(s)) || s);
21
+ return l && s && F(o, i, s), s;
305
22
  };
306
- let t = class extends x {
23
+ let e = class extends m {
307
24
  constructor() {
308
- super(...arguments), this.formControlController = new g(this, {
25
+ super(...arguments), this.formControlController = new _(this, {
309
26
  assumeInteractionOn: ["cx-input"]
310
- }), this.hasSlotController = new y(
27
+ }), this.hasSlotController = new z(
311
28
  this,
312
29
  "help-text",
313
30
  "label"
314
- ), this.hasFocus = !1, this.title = "", this.name = "", this.value = "", this.size = "medium", this.filled = !1, this.label = "", this.helpText = "", this.placeholder = "", this.rows = 4, this.resize = "vertical", this.disabled = !1, this.readonly = !1, this.form = void 0, this.required = !1, this.showLength = !1, this.autoFocus = !1, this.spellCheck = !0, this.defaultValue = "";
31
+ ), this.hasFocus = !1, this.title = "", this.name = "", this.value = "", this.size = "medium", this.filled = !1, this.label = "", this.helpText = "", this.placeholder = "", this.rows = 4, this.resize = "vertical", this.disabled = !1, this.readonly = !1, this.form = void 0, this.required = !1, this.showLength = !1, this.autoFocus = !1, this.spellCheck = !0, this.defaultValue = "", this._fillHeightPx = null;
315
32
  }
316
33
  /** Gets the validity state object */
317
34
  get validity() {
@@ -321,18 +38,19 @@ let t = class extends x {
321
38
  get validationMessage() {
322
39
  return this.input.validationMessage;
323
40
  }
324
- connectedCallback() {
325
- super.connectedCallback(), this.resizeObserver = new ResizeObserver(() => {
41
+ connectedUpdatedCallback() {
42
+ this.resizeObserver = new ResizeObserver(() => {
326
43
  requestAnimationFrame(() => this.setTextareaHeight());
327
- }), this.updateComplete.then(() => {
328
- this.setTextareaHeight(), this.resizeObserver.observe(this.input);
329
- });
44
+ }), this.setTextareaHeight(), this.updateResizeObserver();
330
45
  }
331
46
  runFirstUpdated() {
332
47
  this.formControlController.updateValidity();
333
48
  }
334
49
  disconnectedCallback() {
335
- super.disconnectedCallback(), this.input && this.resizeObserver?.unobserve(this.input);
50
+ super.disconnectedCallback(), this.resizeObserver?.disconnect();
51
+ }
52
+ updateResizeObserver() {
53
+ this.resizeObserver.disconnect(), this.rows === c.Max ? (this.resizeObserver.observe(this), this.resizeObserver.observe(this.formControlRoot)) : this.resizeObserver.observe(this.input);
336
54
  }
337
55
  handleBlur() {
338
56
  this.hasFocus = !1, this.emit("cx-blur");
@@ -346,24 +64,34 @@ let t = class extends x {
346
64
  handleInput() {
347
65
  this.value = this.input.value, this.emit("cx-input");
348
66
  }
349
- handleInvalid(a) {
350
- this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(a);
67
+ handleInvalid(t) {
68
+ this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(t);
351
69
  }
352
70
  setTextareaHeight() {
353
- this.resize === "auto" ? (this.input.style.height = "auto", this.input.style.height = `${this.input.scrollHeight}px`) : this.input.style.height = void 0;
71
+ if (this.rows === c.Max) {
72
+ const t = this.clientHeight;
73
+ if (t === 0)
74
+ return;
75
+ const o = Number.parseFloat(this.input.style.height);
76
+ if (this._fillHeightPx !== null && o !== this._fillHeightPx)
77
+ return;
78
+ this.input.style.height = "0px";
79
+ const i = this.formControlRoot?.offsetHeight ?? 0, l = Math.max(t - i, 0);
80
+ this.input.style.height = `${l}px`, this._fillHeightPx = l;
81
+ } else this.resize === "auto" ? (this.input.style.height = "auto", this.input.style.height = `${this.input.scrollHeight}px`) : this.input.style.height = void 0;
354
82
  }
355
83
  handleDisabledChange() {
356
84
  this.formControlController.setValidity(this.disabled);
357
85
  }
358
86
  handleRowsChange() {
359
- this.setTextareaHeight();
87
+ this.input.style.height = "", this._fillHeightPx = null, this.setTextareaHeight(), this.updateResizeObserver();
360
88
  }
361
89
  async handleValueChange() {
362
90
  await this.updateComplete, this.formControlController.updateValidity(), this.setTextareaHeight();
363
91
  }
364
92
  /** Sets focus on the textarea. */
365
- focus(a) {
366
- this.input.focus(a);
93
+ focus(t) {
94
+ this.input.focus(t);
367
95
  }
368
96
  /** Removes focus from the textarea. */
369
97
  blur() {
@@ -374,9 +102,9 @@ let t = class extends x {
374
102
  this.input.select();
375
103
  }
376
104
  /** Gets or sets the textarea's scroll position. */
377
- scrollPosition(a) {
378
- if (a) {
379
- typeof a.top == "number" && (this.input.scrollTop = a.top), typeof a.left == "number" && (this.input.scrollLeft = a.left);
105
+ scrollPosition(t) {
106
+ if (t) {
107
+ typeof t.top == "number" && (this.input.scrollTop = t.top), typeof t.left == "number" && (this.input.scrollLeft = t.left);
380
108
  return;
381
109
  }
382
110
  return {
@@ -385,21 +113,21 @@ let t = class extends x {
385
113
  };
386
114
  }
387
115
  /** Sets the start and end positions of the text selection (0-based). */
388
- setSelectionRange(a, i, l = "none") {
116
+ setSelectionRange(t, o, i = "none") {
389
117
  this.input.setSelectionRange(
390
- a,
391
- i,
392
- l
118
+ t,
119
+ o,
120
+ i
393
121
  );
394
122
  }
395
123
  /** Replaces a range of text with a new string. */
396
- setRangeText(a, i, l, s = "preserve") {
397
- const o = i ?? this.input.selectionStart, c = l ?? this.input.selectionEnd;
124
+ setRangeText(t, o, i, l = "preserve") {
125
+ const s = o ?? this.input.selectionStart, h = i ?? this.input.selectionEnd;
398
126
  this.input.setRangeText(
399
- a,
400
- o,
401
- c,
402
- s
127
+ t,
128
+ s,
129
+ h,
130
+ l
403
131
  ), this.value !== this.input.value && (this.value = this.input.value, this.setTextareaHeight());
404
132
  }
405
133
  /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
@@ -415,27 +143,19 @@ let t = class extends x {
415
143
  return this.input.reportValidity();
416
144
  }
417
145
  /** Sets a custom validation message. Pass an empty string to restore validity. */
418
- setCustomValidity(a) {
419
- this.input.setCustomValidity(a), this.formControlController.updateValidity();
146
+ setCustomValidity(t) {
147
+ this.input.setCustomValidity(t), this.formControlController.updateValidity();
420
148
  }
421
149
  render() {
422
- const a = this.hasSlotController.test("label"), i = this.hasSlotController.test("help-text"), l = this.label ? !0 : !!a, s = this.helpText ? !0 : !!i, o = this.placeholder && this.value.length === 0;
423
- return p`
424
- <div
425
- part="form-control"
426
- class=${d({
150
+ const t = this.hasSlotController.test("label"), o = this.hasSlotController.test("help-text"), i = this.label ? !0 : !!t, l = this.helpText ? !0 : !!o, s = this.placeholder && this.value.length === 0;
151
+ return p`<div part="form-control" class=${x({
427
152
  "form-control": !0,
428
- "form-control--has-help-text": s,
429
- "form-control--has-label": l,
153
+ "form-control--has-help-text": l,
154
+ "form-control--has-label": i,
430
155
  "form-control--large": this.size === "large",
431
156
  "form-control--medium": this.size === "medium",
432
157
  "form-control--small": this.size === "small"
433
- })}
434
- >
435
- <div part="form-control-input" class="form-control-input">
436
- <div
437
- part="base"
438
- class=${d({
158
+ })}><div part="form-control-input" class="form-control-input"><div part="base" class=${x({
439
159
  textarea: !0,
440
160
  "textarea--disabled": this.disabled,
441
161
  "textarea--empty": !this.value,
@@ -443,178 +163,137 @@ let t = class extends x {
443
163
  "textarea--focused": this.hasFocus,
444
164
  "textarea--large": this.size === "large",
445
165
  "textarea--medium": this.size === "medium",
446
- "textarea--placeholder-visible": o,
447
- "textarea--resize-auto": this.resize === "auto",
166
+ "textarea--placeholder-visible": s,
167
+ "textarea--resize-auto": this.resize === "auto" && this.rows !== c.Max,
448
168
  "textarea--resize-none": this.resize === "none",
449
169
  "textarea--resize-vertical": this.resize === "vertical",
450
170
  "textarea--small": this.size === "small",
451
171
  "textarea--standard": !this.filled
452
- })}
453
- >
454
- <span class="textarea-container">
455
- <label
456
- part="form-control-label"
457
- class="form-control__label"
458
- for="input"
459
- aria-hidden=${l ? "false" : "true"}
460
- >
461
- <slot name="label">${this.label}</slot>
462
- </label>
463
- <textarea
464
- part="textarea"
465
- id="input"
466
- class="textarea__control"
467
- title=${this.title}
468
- name=${n(this.name)}
469
- .value=${w(this.value)}
470
- ?disabled=${this.disabled}
471
- ?readonly=${this.readonly}
472
- ?required=${this.required}
473
- placeholder=${n(this.placeholder)}
474
- rows=${n(this.rows)}
475
- minlength=${n(this.minlength)}
476
- maxlength=${n(this.maxlength)}
477
- autocapitalize=${n(this.autoCapitalize)}
478
- autocorrect=${n(this.autoCorrect)}
479
- ?autofocus=${this.autoFocus}
480
- spellcheck=${n(this.spellCheck)}
481
- enterkeyhint=${n(this.enterKeyHint)}
482
- inputmode=${n(this.inputMode)}
483
- aria-describedby="help-text"
484
- @change=${this.handleChange}
485
- @input=${this.handleInput}
486
- @invalid=${this.handleInvalid}
487
- @focus=${this.handleFocus}
488
- @blur=${this.handleBlur}
489
- ></textarea>
490
- </span>
491
- </div>
492
- ${k(this.showLength, () => p`
493
- <div part="character-count" class="textarea__character-count">
494
- ${[
172
+ })}><span class="textarea-container"><label part="form-control-label" class="form-control__label" for="input" aria-hidden=${i ? "false" : "true"}><slot name="label">${this.label}</slot></label><textarea part="textarea" id="input" class="textarea__control" title=${this.title} name=${n(this.name)} .value=${k(this.value)} ?disabled=${this.disabled} ?readonly=${this.readonly} ?required=${this.required} placeholder=${n(this.placeholder)} rows=${n(this.rows === c.Max ? void 0 : this.rows)} minlength=${n(this.minlength)} maxlength=${n(this.maxlength)} autocapitalize=${n(this.autoCapitalize)} autocorrect=${n(this.autoCorrect)} ?autofocus=${this.autoFocus} spellcheck=${n(this.spellCheck)} enterkeyhint=${n(this.enterKeyHint)} inputmode=${n(this.inputMode)} aria-describedby="help-text" @change=${this.handleChange} @input=${this.handleInput} @invalid=${this.handleInvalid} @focus=${this.handleFocus} @blur=${this.handleBlur}></textarea></span></div>${$(this.showLength, () => p`<div part="character-count" class="textarea__character-count">${[
495
173
  this.minlength && `${this.minlength} /`,
496
174
  this.value.length,
497
175
  this.maxlength && `/ ${this.maxlength}`
498
- ].filter(Boolean).join(" ")}
499
- </div>
500
- `)}
501
- </div>
502
-
503
- <div
504
- part="form-control-help-text"
505
- id="help-text"
506
- class="form-control__help-text"
507
- aria-hidden=${s ? "false" : "true"}
508
- >
509
- <slot name="help-text">${this.helpText}</slot>
510
- </div>
511
- </div>
512
- `;
176
+ ].filter(Boolean).join(" ")}</div>`)}</div><div part="form-control-help-text" id="help-text" class="form-control__help-text" aria-hidden=${l ? "false" : "true"}><slot name="help-text">${this.helpText}</slot></div></div>`;
513
177
  }
514
178
  };
515
- t.styles = [f, m, $];
516
- e([
517
- C(".textarea__control")
518
- ], t.prototype, "input", 2);
519
- e([
520
- z()
521
- ], t.prototype, "hasFocus", 2);
522
- e([
523
- r()
524
- ], t.prototype, "title", 2);
525
- e([
526
- r()
527
- ], t.prototype, "name", 2);
528
- e([
529
- r()
530
- ], t.prototype, "value", 2);
531
- e([
532
- r({ reflect: !0 })
533
- ], t.prototype, "size", 2);
534
- e([
535
- r({ reflect: !0, type: Boolean })
536
- ], t.prototype, "filled", 2);
537
- e([
538
- r()
539
- ], t.prototype, "label", 2);
540
- e([
541
- r({ attribute: "help-text" })
542
- ], t.prototype, "helpText", 2);
543
- e([
544
- r()
545
- ], t.prototype, "placeholder", 2);
546
- e([
547
- r({ type: Number })
548
- ], t.prototype, "rows", 2);
549
- e([
550
- r()
551
- ], t.prototype, "resize", 2);
552
- e([
553
- r({ reflect: !0, type: Boolean })
554
- ], t.prototype, "disabled", 2);
555
- e([
556
- r({ reflect: !0, type: Boolean })
557
- ], t.prototype, "readonly", 2);
558
- e([
559
- r({ reflect: !1 })
560
- ], t.prototype, "form", 2);
561
- e([
562
- r({ reflect: !0, type: Boolean })
563
- ], t.prototype, "required", 2);
564
- e([
565
- r({ type: Number })
566
- ], t.prototype, "minlength", 2);
567
- e([
568
- r({ type: Number })
569
- ], t.prototype, "maxlength", 2);
570
- e([
571
- r({ attribute: "show-length", type: Boolean })
572
- ], t.prototype, "showLength", 2);
573
- e([
574
- r({ attribute: "autocapitalize", reflect: !0, type: String })
575
- ], t.prototype, "autoCapitalize", 2);
576
- e([
577
- r({ attribute: "autocorrect", reflect: !0, type: Boolean })
578
- ], t.prototype, "autoCorrect", 2);
579
- e([
580
- r()
581
- ], t.prototype, "autocomplete", 2);
582
- e([
583
- r({ attribute: "autofocus", reflect: !0, type: Boolean })
584
- ], t.prototype, "autoFocus", 2);
585
- e([
586
- r({ attribute: "enterkeyhint", reflect: !0, type: String })
587
- ], t.prototype, "enterKeyHint", 2);
588
- e([
589
- r({
179
+ e.styles = [b, g, H];
180
+ r([
181
+ f(".textarea__control")
182
+ ], e.prototype, "input", 2);
183
+ r([
184
+ f(".form-control")
185
+ ], e.prototype, "formControlRoot", 2);
186
+ r([
187
+ w()
188
+ ], e.prototype, "hasFocus", 2);
189
+ r([
190
+ a()
191
+ ], e.prototype, "title", 2);
192
+ r([
193
+ a()
194
+ ], e.prototype, "name", 2);
195
+ r([
196
+ a()
197
+ ], e.prototype, "value", 2);
198
+ r([
199
+ a({ reflect: !0 })
200
+ ], e.prototype, "size", 2);
201
+ r([
202
+ a({ reflect: !0, type: Boolean })
203
+ ], e.prototype, "filled", 2);
204
+ r([
205
+ a()
206
+ ], e.prototype, "label", 2);
207
+ r([
208
+ a({ attribute: "help-text" })
209
+ ], e.prototype, "helpText", 2);
210
+ r([
211
+ a()
212
+ ], e.prototype, "placeholder", 2);
213
+ r([
214
+ a({
215
+ converter: {
216
+ fromAttribute: (t) => {
217
+ if (t == null || t.trim() === "")
218
+ return 4;
219
+ if (t === c.Max)
220
+ return c.Max;
221
+ const o = Number(t);
222
+ return Number.isFinite(o) && o > 0 ? o : 4;
223
+ },
224
+ toAttribute: String
225
+ }
226
+ })
227
+ ], e.prototype, "rows", 2);
228
+ r([
229
+ a()
230
+ ], e.prototype, "resize", 2);
231
+ r([
232
+ a({ reflect: !0, type: Boolean })
233
+ ], e.prototype, "disabled", 2);
234
+ r([
235
+ a({ reflect: !0, type: Boolean })
236
+ ], e.prototype, "readonly", 2);
237
+ r([
238
+ a({ reflect: !1 })
239
+ ], e.prototype, "form", 2);
240
+ r([
241
+ a({ reflect: !0, type: Boolean })
242
+ ], e.prototype, "required", 2);
243
+ r([
244
+ a({ type: Number })
245
+ ], e.prototype, "minlength", 2);
246
+ r([
247
+ a({ type: Number })
248
+ ], e.prototype, "maxlength", 2);
249
+ r([
250
+ a({ attribute: "show-length", type: Boolean })
251
+ ], e.prototype, "showLength", 2);
252
+ r([
253
+ a({ attribute: "autocapitalize", reflect: !0, type: String })
254
+ ], e.prototype, "autoCapitalize", 2);
255
+ r([
256
+ a({ attribute: "autocorrect", reflect: !0, type: Boolean })
257
+ ], e.prototype, "autoCorrect", 2);
258
+ r([
259
+ a()
260
+ ], e.prototype, "autocomplete", 2);
261
+ r([
262
+ a({ attribute: "autofocus", reflect: !0, type: Boolean })
263
+ ], e.prototype, "autoFocus", 2);
264
+ r([
265
+ a({ attribute: "enterkeyhint", reflect: !0, type: String })
266
+ ], e.prototype, "enterKeyHint", 2);
267
+ r([
268
+ a({
590
269
  attribute: "spellcheck",
591
270
  converter: {
592
271
  // Allow "true|false" attribute values but keep the property boolean
593
- fromAttribute: (a) => !(!a || a === "false"),
594
- toAttribute: (a) => a ? "true" : "false"
272
+ fromAttribute: (t) => !(!t || t === "false"),
273
+ toAttribute: (t) => t ? "true" : "false"
595
274
  },
596
275
  reflect: !0,
597
276
  type: Boolean
598
277
  })
599
- ], t.prototype, "spellCheck", 2);
600
- e([
601
- r({ attribute: "inputmode", reflect: !0, type: String })
602
- ], t.prototype, "inputMode", 2);
603
- e([
604
- v()
605
- ], t.prototype, "defaultValue", 2);
606
- e([
607
- u("disabled", { waitUntilFirstUpdate: !0 })
608
- ], t.prototype, "handleDisabledChange", 1);
609
- e([
610
- u("rows", { waitUntilFirstUpdate: !0 })
611
- ], t.prototype, "handleRowsChange", 1);
612
- e([
613
- u("value", { waitUntilFirstUpdate: !0 })
614
- ], t.prototype, "handleValueChange", 1);
615
- t = e([
616
- b("cx-textarea")
617
- ], t);
278
+ ], e.prototype, "spellCheck", 2);
279
+ r([
280
+ a({ attribute: "inputmode", reflect: !0, type: String })
281
+ ], e.prototype, "inputMode", 2);
282
+ r([
283
+ y()
284
+ ], e.prototype, "defaultValue", 2);
285
+ r([
286
+ d("disabled", { waitUntilFirstUpdate: !0 })
287
+ ], e.prototype, "handleDisabledChange", 1);
288
+ r([
289
+ d("rows", { waitUntilFirstUpdate: !0 })
290
+ ], e.prototype, "handleRowsChange", 1);
291
+ r([
292
+ d("value", { waitUntilFirstUpdate: !0 })
293
+ ], e.prototype, "handleValueChange", 1);
294
+ e = r([
295
+ v("cx-textarea")
296
+ ], e);
618
297
  export {
619
- t as default
298
+ e as default
620
299
  };