@vonage/vivid 4.16.2 → 4.18.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 (447) hide show
  1. package/custom-elements.json +8857 -5894
  2. package/date-time-picker/index.cjs +5 -0
  3. package/date-time-picker/index.js +3 -0
  4. package/dial-pad/index.cjs +1 -1
  5. package/dial-pad/index.js +1 -1
  6. package/dialog/index.cjs +1 -1
  7. package/dialog/index.js +1 -1
  8. package/divider/index.cjs +1 -1
  9. package/divider/index.js +1 -1
  10. package/elevation/index.cjs +1 -1
  11. package/elevation/index.js +1 -1
  12. package/empty-state/index.cjs +1 -1
  13. package/empty-state/index.js +1 -1
  14. package/fab/index.cjs +1 -1
  15. package/fab/index.js +1 -1
  16. package/file-picker/index.cjs +1 -1
  17. package/file-picker/index.js +1 -1
  18. package/header/index.cjs +1 -1
  19. package/header/index.js +1 -1
  20. package/icon/index.cjs +1 -1
  21. package/icon/index.js +1 -1
  22. package/index.cjs +198 -87
  23. package/index.js +66 -60
  24. package/layout/index.cjs +1 -1
  25. package/layout/index.js +1 -1
  26. package/lib/accordion/definition.d.ts +2 -0
  27. package/lib/accordion-item/definition.d.ts +2 -0
  28. package/lib/action-group/action-group.d.ts +449 -3
  29. package/lib/action-group/definition.d.ts +2 -0
  30. package/lib/alert/definition.d.ts +2 -0
  31. package/lib/audio-player/definition.d.ts +2 -0
  32. package/lib/avatar/definition.d.ts +2 -0
  33. package/lib/badge/definition.d.ts +2 -0
  34. package/lib/banner/banner.d.ts +449 -3
  35. package/lib/banner/definition.d.ts +2 -0
  36. package/lib/breadcrumb/definition.d.ts +2 -0
  37. package/lib/breadcrumb-item/breadcrumb-item.d.ts +449 -1
  38. package/lib/breadcrumb-item/definition.d.ts +2 -0
  39. package/lib/button/definition.d.ts +2 -0
  40. package/lib/calendar/calendar.d.ts +2 -0
  41. package/lib/calendar/definition.d.ts +2 -0
  42. package/lib/calendar-event/definition.d.ts +2 -0
  43. package/lib/card/definition.d.ts +2 -0
  44. package/lib/checkbox/checkbox.d.ts +449 -4
  45. package/lib/checkbox/definition.d.ts +2 -0
  46. package/lib/combobox/definition.d.ts +2 -0
  47. package/lib/components.d.ts +2 -0
  48. package/lib/data-grid/definition.d.ts +4 -0
  49. package/lib/date-picker/date-picker.d.ts +2182 -4
  50. package/lib/date-picker/date-picker.template.d.ts +2 -0
  51. package/lib/date-picker/definition.d.ts +2 -0
  52. package/lib/date-range-picker/date-range-picker.d.ts +1110 -4
  53. package/lib/date-range-picker/date-range-picker.template.d.ts +2 -0
  54. package/lib/date-range-picker/definition.d.ts +2 -0
  55. package/lib/date-time-picker/date-time-picker.d.ts +2175 -0
  56. package/lib/date-time-picker/date-time-picker.template.d.ts +2 -0
  57. package/lib/date-time-picker/definition.d.ts +1 -0
  58. package/lib/date-time-picker/locale.d.ts +9 -0
  59. package/lib/dial-pad/definition.d.ts +2 -0
  60. package/lib/dialog/definition.d.ts +2 -0
  61. package/lib/dialog/dialog.d.ts +449 -2
  62. package/lib/divider/definition.d.ts +2 -0
  63. package/lib/divider/divider.d.ts +448 -1
  64. package/lib/empty-state/definition.d.ts +2 -0
  65. package/lib/enums.d.ts +6 -0
  66. package/lib/fab/definition.d.ts +2 -0
  67. package/lib/file-picker/definition.d.ts +2 -0
  68. package/lib/header/definition.d.ts +2 -0
  69. package/lib/icon/definition.d.ts +2 -0
  70. package/lib/layout/definition.d.ts +2 -0
  71. package/lib/menu/definition.d.ts +2 -0
  72. package/lib/menu/menu.d.ts +900 -5
  73. package/lib/menu-item/definition.d.ts +2 -0
  74. package/lib/nav/definition.d.ts +2 -0
  75. package/lib/nav-disclosure/definition.d.ts +2 -0
  76. package/lib/nav-disclosure/nav-disclosure.d.ts +449 -2
  77. package/lib/nav-item/definition.d.ts +2 -0
  78. package/lib/note/definition.d.ts +2 -0
  79. package/lib/number-field/definition.d.ts +2 -0
  80. package/lib/number-field/number-field.d.ts +450 -3
  81. package/lib/option/definition.d.ts +2 -0
  82. package/lib/option/option.d.ts +1 -11
  83. package/lib/pagination/definition.d.ts +2 -0
  84. package/lib/popup/definition.d.ts +0 -1
  85. package/lib/popup/popup.d.ts +25 -0
  86. package/lib/progress/definition.d.ts +2 -0
  87. package/lib/progress/progress.d.ts +449 -2
  88. package/lib/progress-ring/definition.d.ts +2 -0
  89. package/lib/progress-ring/progress-ring.d.ts +449 -2
  90. package/lib/radio/definition.d.ts +2 -0
  91. package/lib/radio-group/definition.d.ts +2 -0
  92. package/lib/range-slider/definition.d.ts +2 -0
  93. package/lib/rich-text-editor/definition.d.ts +2 -0
  94. package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +2 -0
  95. package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +8 -0
  96. package/lib/rich-text-editor/rich-text-editor.d.ts +16 -0
  97. package/lib/rich-text-editor/rich-text-editor.template.d.ts +4 -0
  98. package/lib/searchable-select/definition.d.ts +2 -0
  99. package/lib/select/definition.d.ts +2 -0
  100. package/lib/select/select.d.ts +1 -5
  101. package/lib/selectable-box/definition.d.ts +2 -0
  102. package/lib/selectable-box/selectable-box.d.ts +449 -2
  103. package/lib/side-drawer/definition.d.ts +2 -0
  104. package/lib/slider/definition.d.ts +2 -0
  105. package/lib/slider/slider.d.ts +449 -3
  106. package/lib/split-button/definition.d.ts +2 -0
  107. package/lib/split-button/split-button.d.ts +449 -3
  108. package/lib/switch/definition.d.ts +2 -0
  109. package/lib/switch/switch.d.ts +449 -2
  110. package/lib/tab/definition.d.ts +2 -0
  111. package/lib/tab-panel/definition.d.ts +2 -0
  112. package/lib/tabs/definition.d.ts +2 -0
  113. package/lib/tag/definition.d.ts +2 -0
  114. package/lib/tag-group/definition.d.ts +2 -0
  115. package/lib/tag-group/tag-group.d.ts +449 -2
  116. package/lib/text-anchor/text-anchor.d.ts +449 -1
  117. package/lib/text-area/definition.d.ts +2 -0
  118. package/lib/text-area/text-area.d.ts +450 -3
  119. package/lib/text-field/definition.d.ts +2 -0
  120. package/lib/text-field/text-field.d.ts +450 -7
  121. package/lib/time-picker/definition.d.ts +2 -0
  122. package/lib/time-picker/locale.d.ts +0 -2
  123. package/lib/time-picker/time-picker.d.ts +1053 -9
  124. package/lib/time-picker/time-picker.template.d.ts +2 -2
  125. package/lib/toggletip/definition.d.ts +2 -0
  126. package/lib/toggletip/toggletip.d.ts +454 -4
  127. package/lib/tooltip/definition.d.ts +2 -0
  128. package/lib/tooltip/tooltip.d.ts +454 -4
  129. package/lib/tree-item/definition.d.ts +2 -0
  130. package/lib/tree-view/definition.d.ts +2 -0
  131. package/lib/video-player/definition.d.ts +2 -0
  132. package/locales/de-DE.cjs +29 -5
  133. package/locales/de-DE.js +29 -5
  134. package/locales/en-GB.cjs +29 -5
  135. package/locales/en-GB.js +29 -5
  136. package/locales/en-US.cjs +29 -5
  137. package/locales/en-US.js +29 -5
  138. package/locales/ja-JP.cjs +29 -5
  139. package/locales/ja-JP.js +29 -5
  140. package/locales/zh-CN.cjs +29 -5
  141. package/locales/zh-CN.js +29 -5
  142. package/menu/index.cjs +1 -1
  143. package/menu/index.js +1 -1
  144. package/menu-item/index.cjs +1 -1
  145. package/menu-item/index.js +1 -1
  146. package/nav/index.cjs +1 -1
  147. package/nav/index.js +1 -1
  148. package/nav-disclosure/index.cjs +1 -1
  149. package/nav-disclosure/index.js +1 -1
  150. package/nav-item/index.cjs +1 -1
  151. package/nav-item/index.js +1 -1
  152. package/note/index.cjs +1 -1
  153. package/note/index.js +1 -1
  154. package/number-field/index.cjs +1 -1
  155. package/number-field/index.js +1 -1
  156. package/option/index.cjs +1 -1
  157. package/option/index.js +1 -1
  158. package/package.json +7 -2
  159. package/pagination/index.cjs +1 -1
  160. package/pagination/index.js +1 -1
  161. package/popup/index.cjs +1 -1
  162. package/popup/index.js +1 -1
  163. package/progress/index.cjs +1 -1
  164. package/progress/index.js +1 -1
  165. package/progress-ring/index.cjs +1 -1
  166. package/progress-ring/index.js +1 -1
  167. package/radio/index.cjs +1 -1
  168. package/radio/index.js +1 -1
  169. package/radio-group/index.cjs +1 -1
  170. package/radio-group/index.js +1 -1
  171. package/range-slider/index.cjs +1 -1
  172. package/range-slider/index.js +1 -1
  173. package/rich-text-editor/index.cjs +5 -0
  174. package/rich-text-editor/index.js +3 -0
  175. package/searchable-select/index.cjs +1 -1
  176. package/searchable-select/index.js +1 -1
  177. package/select/index.cjs +1 -1
  178. package/select/index.js +1 -1
  179. package/selectable-box/index.cjs +1 -1
  180. package/selectable-box/index.js +1 -1
  181. package/shared/Reflector.cjs +71 -0
  182. package/shared/Reflector.js +69 -0
  183. package/shared/affix.cjs +2 -4
  184. package/shared/affix.js +3 -5
  185. package/shared/anchor.cjs +0 -10
  186. package/shared/anchor.js +0 -10
  187. package/shared/anchored.cjs +12 -9
  188. package/shared/anchored.js +13 -10
  189. package/shared/aria/delegates-aria.d.ts +454 -0
  190. package/shared/base-progress.js +1 -1
  191. package/shared/breadcrumb-item.cjs +2 -1
  192. package/shared/breadcrumb-item.js +2 -1
  193. package/shared/button.cjs +2 -13
  194. package/shared/button.js +2 -13
  195. package/shared/{presentationDate.cjs → calendar-picker.template.cjs} +681 -853
  196. package/shared/{presentationDate.js → calendar-picker.template.js} +673 -848
  197. package/shared/datetime/dateTimeStr.d.ts +6 -0
  198. package/shared/datetime/presentationDate.d.ts +4 -0
  199. package/shared/{date-picker/calendar → datetime}/presentationDateRange.d.ts +3 -3
  200. package/shared/datetime/presentationDateTime.d.ts +4 -0
  201. package/{lib/time-picker/time → shared/datetime}/time.d.ts +1 -0
  202. package/shared/definition.cjs +1 -1
  203. package/shared/definition.js +2 -2
  204. package/shared/definition10.cjs +1 -0
  205. package/shared/definition10.js +2 -2
  206. package/shared/definition11.cjs +9 -12
  207. package/shared/definition11.js +10 -13
  208. package/shared/definition12.cjs +1 -1
  209. package/shared/definition12.js +2 -2
  210. package/shared/definition13.cjs +15 -2
  211. package/shared/definition13.js +16 -4
  212. package/shared/definition14.cjs +4 -3
  213. package/shared/definition14.js +5 -5
  214. package/shared/definition15.cjs +4 -11
  215. package/shared/definition15.js +5 -12
  216. package/shared/definition16.cjs +44 -48
  217. package/shared/definition16.js +32 -36
  218. package/shared/definition17.cjs +4 -1
  219. package/shared/definition17.js +3 -3
  220. package/shared/definition18.cjs +59 -94
  221. package/shared/definition18.js +58 -93
  222. package/shared/definition19.cjs +79 -43
  223. package/shared/definition19.js +60 -24
  224. package/shared/definition2.cjs +1 -0
  225. package/shared/definition2.js +2 -2
  226. package/shared/definition20.cjs +253 -219
  227. package/shared/definition20.js +254 -220
  228. package/shared/definition21.cjs +201 -286
  229. package/shared/definition21.js +199 -285
  230. package/shared/definition22.cjs +302 -31
  231. package/shared/definition22.js +301 -30
  232. package/shared/definition23.cjs +37 -57
  233. package/shared/definition23.js +36 -57
  234. package/shared/definition24.cjs +50 -69
  235. package/shared/definition24.js +49 -69
  236. package/shared/definition25.cjs +75 -2475
  237. package/shared/definition25.js +74 -2475
  238. package/shared/definition26.cjs +2480 -49
  239. package/shared/definition26.js +2480 -49
  240. package/shared/definition27.cjs +53 -271
  241. package/shared/definition27.js +52 -269
  242. package/shared/definition28.cjs +271 -47
  243. package/shared/definition28.js +269 -47
  244. package/shared/definition29.cjs +37 -772
  245. package/shared/definition29.js +36 -767
  246. package/shared/definition3.cjs +3 -9
  247. package/shared/definition3.js +4 -11
  248. package/shared/definition30.cjs +739 -56
  249. package/shared/definition30.js +733 -56
  250. package/shared/definition31.cjs +93 -21
  251. package/shared/definition31.js +92 -21
  252. package/shared/definition32.cjs +28 -9
  253. package/shared/definition32.js +27 -9
  254. package/shared/definition33.cjs +10 -51
  255. package/shared/definition33.js +9 -51
  256. package/shared/definition34.cjs +31 -412
  257. package/shared/definition34.js +31 -413
  258. package/shared/definition35.cjs +423 -53
  259. package/shared/definition35.js +424 -54
  260. package/shared/definition36.cjs +53 -215
  261. package/shared/definition36.js +53 -215
  262. package/shared/definition37.cjs +202 -72
  263. package/shared/definition37.js +201 -71
  264. package/shared/definition38.cjs +54 -48
  265. package/shared/definition38.js +53 -48
  266. package/shared/definition39.cjs +57 -262
  267. package/shared/definition39.js +56 -262
  268. package/shared/definition4.cjs +4 -3
  269. package/shared/definition4.js +5 -5
  270. package/shared/definition40.cjs +220 -148
  271. package/shared/definition40.js +220 -148
  272. package/shared/definition41.cjs +144 -568
  273. package/shared/definition41.js +144 -569
  274. package/shared/definition42.cjs +476 -967
  275. package/shared/definition42.js +477 -969
  276. package/shared/definition43.cjs +13508 -851
  277. package/shared/definition43.js +13508 -851
  278. package/shared/definition44.cjs +1111 -103
  279. package/shared/definition44.js +1112 -103
  280. package/shared/definition45.cjs +849 -80
  281. package/shared/definition45.js +849 -80
  282. package/shared/definition46.cjs +108 -464
  283. package/shared/definition46.js +107 -463
  284. package/shared/definition47.cjs +96 -118
  285. package/shared/definition47.js +95 -118
  286. package/shared/definition48.cjs +430 -82
  287. package/shared/definition48.js +430 -83
  288. package/shared/definition49.cjs +135 -15
  289. package/shared/definition49.js +134 -15
  290. package/shared/definition5.cjs +5 -4
  291. package/shared/definition5.js +6 -6
  292. package/shared/definition50.cjs +109 -85
  293. package/shared/definition50.js +108 -85
  294. package/shared/definition51.cjs +14 -519
  295. package/shared/definition51.js +13 -519
  296. package/shared/definition52.cjs +96 -23
  297. package/shared/definition52.js +95 -23
  298. package/shared/definition53.cjs +480 -99
  299. package/shared/definition53.js +479 -99
  300. package/shared/definition54.cjs +24 -296
  301. package/shared/definition54.js +23 -296
  302. package/shared/definition55.cjs +126 -69
  303. package/shared/definition55.js +125 -69
  304. package/shared/definition56.cjs +186 -775
  305. package/shared/definition56.js +187 -776
  306. package/shared/definition57.cjs +511 -107
  307. package/shared/definition57.js +511 -107
  308. package/shared/definition58.cjs +27 -128
  309. package/shared/definition58.js +27 -128
  310. package/shared/definition59.cjs +106 -162
  311. package/shared/definition59.js +105 -160
  312. package/shared/definition6.cjs +3 -2
  313. package/shared/definition6.js +4 -4
  314. package/shared/definition60.cjs +81 -252
  315. package/shared/definition60.js +80 -252
  316. package/shared/definition61.cjs +156 -70156
  317. package/shared/definition61.js +154 -70156
  318. package/shared/definition62.cjs +271 -29
  319. package/shared/definition62.js +270 -28
  320. package/shared/definition63.cjs +69236 -2018
  321. package/shared/definition63.js +69235 -2016
  322. package/shared/definition64.cjs +55 -0
  323. package/shared/definition64.js +51 -0
  324. package/shared/definition65.cjs +2195 -0
  325. package/shared/definition65.js +2190 -0
  326. package/shared/definition7.cjs +3 -2
  327. package/shared/definition7.js +4 -4
  328. package/shared/definition8.cjs +5 -10
  329. package/shared/definition8.js +6 -12
  330. package/shared/definition9.cjs +2 -2
  331. package/shared/definition9.js +3 -3
  332. package/shared/delegates-aria.cjs +69 -0
  333. package/shared/delegates-aria.js +67 -0
  334. package/shared/enums.cjs +8 -0
  335. package/shared/enums.js +8 -1
  336. package/shared/form-elements.cjs +8 -8
  337. package/shared/form-elements.js +9 -9
  338. package/shared/foundation/anchor/anchor.d.ts +0 -8
  339. package/shared/foundation/button/button.d.ts +449 -7
  340. package/shared/foundation/listbox/listbox.d.ts +0 -9
  341. package/shared/foundation/vivid-element/vivid-element.d.ts +1 -0
  342. package/shared/listbox.cjs +4 -30
  343. package/shared/listbox.js +4 -30
  344. package/shared/localization/Locale.d.ts +6 -2
  345. package/shared/option.cjs +1 -38
  346. package/shared/option.js +1 -38
  347. package/shared/patterns/anchored.d.ts +891 -10
  348. package/shared/patterns/trapped-focus.d.ts +2 -0
  349. package/shared/picker-field/locale.d.ts +4 -0
  350. package/shared/picker-field/mixins/calendar-picker.d.ts +558 -0
  351. package/shared/{date-picker/locale.d.ts → picker-field/mixins/calendar-picker.locale.d.ts} +1 -3
  352. package/shared/picker-field/mixins/calendar-picker.template.d.ts +555 -0
  353. package/shared/picker-field/mixins/calendar-segments/calendarGrid.d.ts +17 -0
  354. package/shared/{date-picker/calendar → picker-field/mixins/calendar-segments}/monthPickerGrid.d.ts +3 -3
  355. package/shared/picker-field/mixins/inline-time-picker/columns.d.ts +13 -0
  356. package/shared/picker-field/mixins/inline-time-picker/definition.d.ts +1 -0
  357. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +15 -0
  358. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.template.d.ts +5 -0
  359. package/{lib/time-picker/time/picker.d.ts → shared/picker-field/mixins/inline-time-picker/picker-option.d.ts} +1 -1
  360. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +1110 -0
  361. package/shared/picker-field/mixins/single-date-picker.d.ts +1626 -0
  362. package/shared/picker-field/mixins/single-value-picker.d.ts +518 -0
  363. package/shared/picker-field/mixins/time-selection-picker.d.ts +1053 -0
  364. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +1050 -0
  365. package/shared/picker-field/picker-field.d.ts +11 -0
  366. package/shared/picker-field/picker-field.form-associated.d.ts +11 -0
  367. package/shared/picker-field/picker-field.template.d.ts +7 -0
  368. package/shared/picker-field.template.cjs +315 -0
  369. package/shared/picker-field.template.js +310 -0
  370. package/shared/single-date-picker.cjs +46 -0
  371. package/shared/single-date-picker.js +44 -0
  372. package/shared/single-value-picker.cjs +77 -0
  373. package/shared/single-value-picker.js +75 -0
  374. package/shared/slider.template.cjs +6 -6
  375. package/shared/slider.template.js +6 -6
  376. package/shared/text-anchor.cjs +2 -1
  377. package/shared/text-anchor.js +2 -1
  378. package/shared/text-anchor.template.cjs +5 -7
  379. package/shared/text-anchor.template.js +5 -7
  380. package/shared/time-selection-picker.template.cjs +776 -0
  381. package/shared/time-selection-picker.template.js +767 -0
  382. package/shared/utils/mixins.d.ts +3 -0
  383. package/shared/vivid-element.cjs +3 -0
  384. package/shared/vivid-element.js +4 -1
  385. package/side-drawer/index.cjs +1 -1
  386. package/side-drawer/index.js +1 -1
  387. package/slider/index.cjs +1 -1
  388. package/slider/index.js +1 -1
  389. package/split-button/index.cjs +1 -1
  390. package/split-button/index.js +1 -1
  391. package/styles/core/all.css +1 -1
  392. package/styles/core/theme.css +1 -1
  393. package/styles/core/typography.css +1 -1
  394. package/styles/tokens/theme-dark.css +4 -4
  395. package/styles/tokens/theme-light.css +4 -4
  396. package/styles/tokens/vivid-2-compat.css +1 -1
  397. package/switch/index.cjs +1 -1
  398. package/switch/index.js +1 -1
  399. package/tab/index.cjs +1 -1
  400. package/tab/index.js +1 -1
  401. package/tab-panel/index.cjs +1 -1
  402. package/tab-panel/index.js +1 -1
  403. package/tabs/index.cjs +1 -1
  404. package/tabs/index.js +1 -1
  405. package/tag/index.cjs +1 -1
  406. package/tag/index.js +1 -1
  407. package/tag-group/index.cjs +1 -1
  408. package/tag-group/index.js +1 -1
  409. package/text-anchor/index.cjs +1 -1
  410. package/text-anchor/index.js +2 -2
  411. package/text-area/index.cjs +1 -1
  412. package/text-area/index.js +1 -1
  413. package/text-field/index.cjs +1 -1
  414. package/text-field/index.js +1 -1
  415. package/time-picker/index.cjs +1 -1
  416. package/time-picker/index.js +1 -1
  417. package/toggletip/index.cjs +1 -1
  418. package/toggletip/index.js +1 -1
  419. package/tooltip/index.cjs +1 -1
  420. package/tooltip/index.js +1 -1
  421. package/tree-item/index.cjs +1 -1
  422. package/tree-item/index.js +1 -1
  423. package/tree-view/index.cjs +1 -1
  424. package/tree-view/index.js +1 -1
  425. package/video-player/index.cjs +1 -1
  426. package/video-player/index.js +1 -1
  427. package/vivid.api.json +21748 -1
  428. package/lib/time-picker/time-picker.form-associated.d.ts +0 -11
  429. package/shared/aria-global.cjs +0 -93
  430. package/shared/aria-global.js +0 -91
  431. package/shared/date-picker/calendar/calendarGrid.d.ts +0 -17
  432. package/shared/date-picker/calendar/presentationDate.d.ts +0 -4
  433. package/shared/date-picker/date-picker-base.d.ts +0 -21
  434. package/shared/date-picker/date-picker-base.form-associated.d.ts +0 -11
  435. package/shared/date-picker/date-picker-base.template.d.ts +0 -3
  436. package/shared/foundation/patterns/aria-global.d.ts +0 -21
  437. package/shared/foundation/patterns/index.d.ts +0 -1
  438. package/shared/text-field2.cjs +0 -575
  439. package/shared/text-field2.js +0 -572
  440. package/shared/trapped-focus.cjs +0 -29
  441. package/shared/trapped-focus.js +0 -27
  442. /package/shared/{date-picker/calendar → datetime}/dateRange.d.ts +0 -0
  443. /package/shared/{date-picker/calendar → datetime}/dateStr.d.ts +0 -0
  444. /package/shared/{date-picker/calendar → datetime}/month.d.ts +0 -0
  445. /package/{lib/time-picker/time → shared/datetime}/presentationTime.d.ts +0 -0
  446. /package/shared/{date-picker/calendar → datetime}/year.d.ts +0 -0
  447. /package/shared/{date-picker/calendar → picker-field/mixins/calendar-segments}/segment.d.ts +0 -0
@@ -1,223 +1,27 @@
1
1
  'use strict';
2
2
 
3
- const definition$2 = require('./definition55.cjs');
4
- const definition = require('./definition63.cjs');
5
- const definition$1 = require('./definition11.cjs');
3
+ const definition = require('./definition28.cjs');
6
4
  const vividElement = require('./vivid-element.cjs');
5
+ const Reflector = require('./Reflector.cjs');
7
6
  const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
8
- const index = require('./index.cjs');
9
- const scrollIntoView = require('./scrollIntoView.cjs');
7
+ const delegatesAria = require('./delegates-aria.cjs');
10
8
  const formAssociated = require('./form-associated.cjs');
11
9
  const formElements = require('./form-elements.cjs');
12
- const trappedFocus = require('./trapped-focus.cjs');
13
- const localized = require('./localized.cjs');
14
- const textField = require('./text-field2.cjs');
15
- const ref = require('./ref.cjs');
16
- const slotted = require('./slotted.cjs');
17
- const when = require('./when.cjs');
18
- const repeat = require('./repeat.cjs');
19
10
  const classNames = require('./class-names.cjs');
11
+ const when = require('./when.cjs');
12
+ const ref = require('./ref.cjs');
20
13
 
21
- const styles = ":host{display:inline-block}.base,.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;border-top:1px solid var(--vvd-color-neutral-200);gap:8px}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:188px;gap:4px}.time-pickers .picker{position:relative;display:flex;overflow:hidden;flex-direction:column;padding:0;border-radius:4px;margin:0;gap:4px;inline-size:50px;list-style:none}.time-pickers .picker:hover{overflow-y:auto}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:156px;content:\"\"}.time-pickers .picker:focus-visible{--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}.time-pickers .item{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .item{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.time-pickers .item:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .item:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .item:where(.selected):where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.time-pickers .item{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}";
14
+ const styles = ":host{display:inline-block}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-fierce)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.readonly):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.error):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base:where(.success):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base.connotation-success{--_connotation-color-primary: var(--vvd-text-area-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-text-area-success-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-success-primary-increment, var(--vvd-color-success-600));--_connotation-color-intermediate: var(--vvd-text-area-success-intermediate, var(--vvd-color-success-500));--_connotation-color-firm: var(--vvd-text-area-success-firm, var(--vvd-color-success-600));--_connotation-color-fierce: var(--vvd-text-area-success-fierce, var(--vvd-color-success-700));--_connotation-color-faint: var(--vvd-text-area-success-faint, var(--vvd-color-success-50));--_connotation-color-soft: var(--vvd-text-area-success-soft, var(--vvd-color-success-100))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-text-area-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-text-area-alert-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-alert-primary-increment, var(--vvd-color-alert-600));--_connotation-color-intermediate: var(--vvd-text-area-alert-intermediate, var(--vvd-color-alert-500));--_connotation-color-firm: var(--vvd-text-area-alert-firm, var(--vvd-color-alert-600));--_connotation-color-fierce: var(--vvd-text-area-alert-fierce, var(--vvd-color-alert-700));--_connotation-color-faint: var(--vvd-text-area-alert-faint, var(--vvd-color-alert-50));--_connotation-color-soft: var(--vvd-text-area-alert-soft, var(--vvd-color-alert-100))}.base:not(.connotation-success,.connotation-alert){--_connotation-color-primary: var(--vvd-text-area-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-area-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-area-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-area-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-area-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-area-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-area-accent-soft, var(--vvd-color-neutral-100))}.base{display:inline-grid;grid-template-columns:1fr max-content;inline-size:100%;row-gap:4px}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){--_low-ink-color: var(--vvd-color-neutral-600)}.base.disabled{--_low-ink-color: var(--_appearance-color-text);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);contain:inline-size;font:var(--vvd-typography-base);grid-column:1/2;grid-row:1;line-height:20px}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base);grid-column:2/-1}.control{--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.control{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.control ::-webkit-scrollbar{width:4px}.control ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.control ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-thumb-color)}.control{box-sizing:border-box;padding:8px 16px;border:0 none;border-radius:8px;appearance:none;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);grid-column:1/-1;min-block-size:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2)));resize:none;transition:box-shadow .2s,background-color .2s,color .2s}@supports selector(::-webkit-resizer){.control::-webkit-resizer{background-image:linear-gradient(315deg,transparent 0,transparent 2px,var(--vvd-color-canvas-text) 2px,var(--vvd-color-canvas-text) 3px,transparent 3px,transparent 5px,var(--vvd-color-canvas-text) 5px,var(--vvd-color-canvas-text) 6px,transparent 6px,transparent 8px,transparent 100%);background-repeat:no-repeat;background-size:10px 10px;block-size:10px;inline-size:10px}}.control:disabled{opacity:1;pointer-events:none;-webkit-text-fill-color:var(--_appearance-color-text)}.control::placeholder,.control:disabled::placeholder{opacity:1;pointer-events:none;-webkit-text-fill-color:var(--_low-ink-color)}.control:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}:host([resize=both]) .control{resize:both}:host([resize=horizontal]) .control{resize:horizontal}:host([resize=vertical]) .control{resize:vertical}";
22
15
 
23
- class _TimePicker extends vividElement.VividElement {
16
+ class _TextArea extends vividElement.VividElement {
24
17
  }
25
- class FormAssociatedTimePicker extends formAssociated.FormAssociated(_TimePicker) {
18
+ class FormAssociatedTextArea extends formAssociated.FormAssociated(_TextArea) {
26
19
  constructor() {
27
20
  super(...arguments);
28
- this.proxy = document.createElement("input");
21
+ this.proxy = document.createElement("textarea");
29
22
  }
30
23
  }
31
24
 
32
- const isValidTimeStr = (timeStr) => {
33
- const parts = timeStr.split(":");
34
- if (parts.length !== 3) {
35
- return false;
36
- }
37
- const [hours, minutes, seconds] = parts;
38
- if (hours.length !== 2 || minutes.length !== 2 || seconds.length !== 2) {
39
- return false;
40
- }
41
- const hoursNum = parseInt(hours, 10);
42
- const minutesNum = parseInt(minutes, 10);
43
- const secondsNum = parseInt(seconds, 10);
44
- if (isNaN(hoursNum) || isNaN(minutesNum) || isNaN(secondsNum)) {
45
- return false;
46
- }
47
- if (hoursNum < 0 || hoursNum > 23) {
48
- return false;
49
- }
50
- if (minutesNum < 0 || minutesNum > 59) {
51
- return false;
52
- }
53
- if (secondsNum < 0 || secondsNum > 59) {
54
- return false;
55
- }
56
- return true;
57
- };
58
- const parseTimePart = (partStr) => Number.parseInt(partStr, 10);
59
- const formatTimePart = (part) => part.toString().padStart(2, "0");
60
- const parseTimeStr = (timeStr) => {
61
- const [hoursStr, minutesStr, secondsStr] = timeStr.split(":");
62
- const hours = parseTimePart(hoursStr);
63
- const minutes = parseTimePart(minutesStr);
64
- const seconds = parseTimePart(secondsStr);
65
- return {
66
- hourStr: hoursStr,
67
- hours,
68
- minuteStr: minutesStr,
69
- minutes,
70
- secondStr: secondsStr,
71
- seconds,
72
- meridiem: hours < 12 ? "AM" : "PM"
73
- };
74
- };
75
- const hoursAs12hClock = (hour) => hour % 12 || 12;
76
-
77
- const formatPresentationTime = (timeStr, includeSeconds, use12HourClock) => {
78
- const time = parseTimeStr(timeStr);
79
- const hoursStr = formatTimePart(
80
- use12HourClock ? hoursAs12hClock(time.hours) : time.hours
81
- );
82
- let result = `${hoursStr}:${time.minuteStr}`;
83
- if (includeSeconds) {
84
- result += `:${time.secondStr}`;
85
- }
86
- if (use12HourClock) {
87
- result += ` ${time.meridiem}`;
88
- }
89
- return result;
90
- };
91
- const isDigit = (char) => char >= "0" && char <= "9";
92
- const parsePresentationTime = (input, use12HourClock) => {
93
- const cleanedInput = input.toLowerCase();
94
- const numerals = [];
95
- let meridiem;
96
- for (let i = 0; i < cleanedInput.length; i++) {
97
- const char = cleanedInput[i];
98
- if (char === "a" && cleanedInput[i + 1] === "m") {
99
- i++;
100
- meridiem = "AM";
101
- }
102
- if (char === "p" && cleanedInput[i + 1] === "m") {
103
- i++;
104
- meridiem = "PM";
105
- }
106
- if (isDigit(char)) {
107
- let numeral = char;
108
- while (isDigit(cleanedInput[i + 1])) {
109
- i++;
110
- numeral += cleanedInput[i];
111
- }
112
- numerals.push(Number.parseInt(numeral, 10));
113
- }
114
- }
115
- if (numerals.length === 0 || numerals.length > 3) {
116
- throw new Error("Invalid time format");
117
- }
118
- if (meridiem && (numerals[0] < 1 || numerals[0] > 12)) {
119
- throw new Error("Invalid time format");
120
- }
121
- if (meridiem || use12HourClock) {
122
- if (numerals[0] === 12) {
123
- numerals[0] = 0;
124
- }
125
- }
126
- if (meridiem === "PM") {
127
- numerals[0] = numerals[0] + 12;
128
- }
129
- const [hours, minutes = 0, seconds = 0] = numerals;
130
- if (hours > 23 || minutes > 59 || seconds > 59) {
131
- throw new Error("Invalid value");
132
- }
133
- return [hours, minutes, seconds].map(formatTimePart).join(":");
134
- };
135
-
136
- const fallsIntoMeridiem = (meridiem, hour) => meridiem === "AM" && hour < 12 || meridiem === "PM" && hour >= 12;
137
- const getHoursOptions = (min, max, forMeridiem) => {
138
- const result = [];
139
- const minHour = min ? parseTimeStr(min).hours : 0;
140
- const maxHour = max ? parseTimeStr(max).hours : 23;
141
- for (let i = minHour; i <= maxHour; i++) {
142
- if (forMeridiem && !fallsIntoMeridiem(forMeridiem, i)) {
143
- continue;
144
- }
145
- result.push({
146
- value: formatTimePart(i),
147
- label: formatTimePart(forMeridiem ? hoursAs12hClock(i) : i)
148
- });
149
- }
150
- return result;
151
- };
152
- const getMinutesOptions = (step, value, min, max) => {
153
- const result = [];
154
- let minMinute = 0;
155
- let maxMinute = 59;
156
- if (min) {
157
- const { hourStr: minHourStr, minutes: minMinutes } = parseTimeStr(min);
158
- if (value && parseTimeStr(value).hourStr === minHourStr) {
159
- minMinute = minMinutes;
160
- }
161
- }
162
- if (max) {
163
- const { hourStr: maxHourStr, minutes: maxMinutes } = parseTimeStr(max);
164
- if (value && parseTimeStr(value).hourStr === maxHourStr) {
165
- maxMinute = maxMinutes;
166
- }
167
- }
168
- for (let i = minMinute; i <= maxMinute; i += Math.max(1, step ?? 1)) {
169
- const minutes = formatTimePart(i);
170
- result.push({
171
- value: minutes,
172
- label: minutes
173
- });
174
- }
175
- return result;
176
- };
177
- const getSecondsOptions = (step, value, min, max) => {
178
- const result = [];
179
- let minSecond = 0;
180
- let maxSecond = 59;
181
- if (min) {
182
- const minTime = parseTimeStr(min);
183
- if (value && (parseTimeStr(value).hourStr === minTime.hourStr && parseTimeStr(value).minuteStr) === minTime.minuteStr) {
184
- minSecond = minTime.seconds;
185
- }
186
- }
187
- if (max) {
188
- const maxTime = parseTimeStr(max);
189
- if (value && (parseTimeStr(value).hourStr === maxTime.hourStr && parseTimeStr(value).minuteStr) === maxTime.minuteStr) {
190
- maxSecond = maxTime.seconds;
191
- }
192
- }
193
- for (let i = minSecond; i <= maxSecond; i += Math.max(1, step)) {
194
- const seconds = formatTimePart(i);
195
- result.push({
196
- value: seconds,
197
- label: seconds
198
- });
199
- }
200
- return result;
201
- };
202
- const getMeridiesOptions = (min, max) => {
203
- const result = [];
204
- const hideAM = min ? parseTimeStr(min).meridiem === "PM" : false;
205
- if (!hideAM) {
206
- result.push({
207
- value: "AM",
208
- label: "AM"
209
- });
210
- }
211
- const hidePM = max ? parseTimeStr(max).meridiem === "AM" : false;
212
- if (!hidePM) {
213
- result.push({
214
- value: "PM",
215
- label: "PM"
216
- });
217
- }
218
- return result;
219
- };
220
-
221
25
  var __defProp = Object.defineProperty;
222
26
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
223
27
  var __typeError = (msg) => {
@@ -235,641 +39,248 @@ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot
235
39
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
236
40
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
237
41
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
238
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
239
- var _clockChangeHandler, _clockChangeObserver, _getFocusableEls, _TimePicker_instances, updateValueDueToUserInteraction_fn, _onFocusIn, _onFocusOut, _dismissOnClickOutside, openPopupIfPossible_fn, scrollToItem_fn;
240
- const ValidTimeFilter = {
241
- fromView: (value) => {
242
- if (value && isValidTimeStr(value)) {
243
- return value;
244
- }
245
- return "";
246
- },
247
- toView(value) {
248
- return value;
249
- }
250
- };
251
- let TimePicker = class extends FormAssociatedTimePicker {
42
+ var _reflectToTextArea;
43
+ const TextAreaResize = {
44
+ /**
45
+ * No resize.
46
+ */
47
+ none: "none"};
48
+ exports.TextArea = class TextArea extends delegatesAria.DelegatesAria(FormAssociatedTextArea) {
252
49
  constructor() {
253
- super();
254
- __privateAdd(this, _TimePicker_instances);
255
- this.readOnly = false;
256
- this.minutesStep = null;
257
- this.secondsStep = null;
258
- // Reformat the presentation value when the clock changes
259
- __privateAdd(this, _clockChangeHandler, {
260
- handleChange: () => {
261
- if (this.value) {
262
- this._presentationValue = formatPresentationTime(
263
- this.value,
264
- this._displaySeconds,
265
- this._use12hClock
266
- );
267
- }
268
- }
269
- });
270
- __privateAdd(this, _clockChangeObserver);
271
- __privateAdd(this, _getFocusableEls, () => this.shadowRoot.querySelectorAll(`
272
- .dialog [tabindex="0"],
273
- .dialog .vwc-button:not(:disabled)
274
- `));
275
- __privateAdd(this, _onFocusIn, () => {
276
- this.$emit("focus", void 0, { bubbles: false });
277
- });
278
- __privateAdd(this, _onFocusOut, () => {
279
- this.$emit("blur", void 0, { bubbles: false });
280
- });
281
- this._popupOpen = false;
282
- __privateAdd(this, _dismissOnClickOutside, (event) => {
283
- if (!this._popupOpen) {
284
- return;
285
- }
286
- const path = event.composedPath();
287
- const elementsToIgnoreClicksOn = [this._dialogEl, this._clockButtonEl];
288
- if (!elementsToIgnoreClicksOn.some((element) => path.includes(element))) {
289
- this._closePopup(false);
290
- }
291
- });
292
- this._presentationValue = "";
293
- this.value = "";
294
- this.min = "";
295
- this.max = "";
296
- this.proxy.type = "time";
297
- this.proxy.step = "1";
50
+ super(...arguments);
51
+ // eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
52
+ this.resize = TextAreaResize.none;
53
+ this.cols = 20;
54
+ /**
55
+ * @internal
56
+ */
57
+ this.handleTextInput = () => {
58
+ this.value = this.control.value;
59
+ };
60
+ __privateAdd(this, _reflectToTextArea);
298
61
  }
299
62
  /**
300
63
  * @internal
301
64
  */
302
65
  readOnlyChanged() {
303
- if (this.proxy instanceof HTMLInputElement) {
66
+ if (this.proxy instanceof HTMLTextAreaElement) {
304
67
  this.proxy.readOnly = this.readOnly;
305
- this.validate();
306
- }
307
- }
308
- /**
309
- * @internal
310
- */
311
- minChanged(_, newMin) {
312
- if (this.proxy instanceof HTMLInputElement) {
313
- this.proxy.min = newMin;
314
- this.validate();
315
- }
316
- }
317
- /**
318
- * @internal
319
- */
320
- maxChanged(_, newMax) {
321
- if (this.proxy instanceof HTMLInputElement) {
322
- this.proxy.max = newMax;
323
- this.validate();
324
- }
325
- }
326
- // --- Core ---
327
- /**
328
- * @internal
329
- */
330
- get _displaySeconds() {
331
- return this.secondsStep !== null;
332
- }
333
- get _use12hClock() {
334
- return this.clock ? this.clock === "12h" : this.locale.timePicker.defaultTo12HourClock;
335
- }
336
- /**
337
- * @internal
338
- */
339
- valueChanged(previous, next) {
340
- super.valueChanged(previous, next);
341
- if (this.value) {
342
- if (!isValidTimeStr(this.value)) {
343
- this.value = "";
344
- return;
345
- }
346
- this._presentationValue = formatPresentationTime(
347
- this.value,
348
- this._displaySeconds,
349
- this._use12hClock
350
- );
351
- } else {
352
- this._presentationValue = "";
353
- }
354
- }
355
- connectedCallback() {
356
- super.connectedCallback();
357
- document.addEventListener("click", __privateGet(this, _dismissOnClickOutside));
358
- this.addEventListener("focusin", __privateGet(this, _onFocusIn));
359
- this.addEventListener("focusout", __privateGet(this, _onFocusOut));
360
- __privateSet(this, _clockChangeObserver, vividElement.Observable.binding(
361
- () => this._use12hClock,
362
- __privateGet(this, _clockChangeHandler)
363
- ));
364
- __privateGet(this, _clockChangeObserver).observe(this, vividElement.defaultExecutionContext);
365
- }
366
- disconnectedCallback() {
367
- super.disconnectedCallback();
368
- document.removeEventListener("click", __privateGet(this, _dismissOnClickOutside));
369
- this.removeEventListener("focusin", __privateGet(this, _onFocusIn));
370
- this.removeEventListener("focusout", __privateGet(this, _onFocusOut));
371
- __privateGet(this, _clockChangeObserver).disconnect();
372
- }
373
- /**
374
- * @internal
375
- */
376
- _closePopup(restoreFocusToTextField = true) {
377
- this._popupOpen = false;
378
- if (restoreFocusToTextField) {
379
- this._textFieldEl.focus();
380
- }
381
- }
382
- /**
383
- * On keydown anywhere in the time picker.
384
- * @internal
385
- */
386
- _onBaseKeyDown(event) {
387
- if (index.handleEscapeKeyAndStopPropogation(event)) {
388
- this._closePopup();
389
- return false;
390
- }
391
- if (this._trappedFocus(event, __privateGet(this, _getFocusableEls))) {
392
- return false;
393
- }
394
- return true;
395
- }
396
- /**
397
- * @internal
398
- */
399
- _presentationValueChanged() {
400
- this.dirtyValue = true;
401
- this.validate();
402
- }
403
- /**
404
- * @internal
405
- */
406
- get _textFieldPlaceholder() {
407
- let format = "hh:mm";
408
- if (this._displaySeconds) {
409
- format += ":ss";
410
- }
411
- if (this._use12hClock) {
412
- format += " aa";
413
68
  }
414
- return format;
415
69
  }
416
70
  /**
417
71
  * @internal
418
72
  */
419
- _onTextFieldInput(event) {
420
- const textField = event.currentTarget;
421
- this._presentationValue = textField.value;
422
- }
423
- /**
424
- * @internal
425
- */
426
- _onTextFieldChange() {
427
- if (this._presentationValue === "") {
428
- __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, "");
429
- return;
430
- }
431
- try {
432
- __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, parsePresentationTime(this._presentationValue, this._use12hClock));
433
- } catch (_) {
434
- return;
73
+ autofocusChanged() {
74
+ if (this.proxy instanceof HTMLTextAreaElement) {
75
+ this.proxy.autofocus = this.autofocus;
435
76
  }
436
77
  }
437
- // --- Clock button ---
438
78
  /**
439
79
  * @internal
440
80
  */
441
- get _clockButtonLabel() {
442
- if (this.value) {
443
- return this.locale.timePicker.changeTimeLabel(
444
- formatPresentationTime(
445
- this.value,
446
- this._displaySeconds,
447
- this._use12hClock
448
- )
449
- );
81
+ listChanged() {
82
+ if (this.proxy instanceof HTMLTextAreaElement) {
83
+ this.proxy.setAttribute("list", this.list);
450
84
  }
451
- return this.locale.timePicker.chooseTimeLabel;
452
85
  }
453
86
  /**
454
87
  * @internal
455
88
  */
456
- _onClockButtonClick() {
457
- if (this._popupOpen) {
458
- this._closePopup();
459
- } else {
460
- __privateMethod(this, _TimePicker_instances, openPopupIfPossible_fn).call(this);
461
- vividElement.DOM.processUpdates();
462
- if (this._selectedHour) {
463
- __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "hours", this._selectedHour, "start");
464
- }
465
- if (this._selectedMinute) {
466
- __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "minutes", this._selectedMinute, "start");
467
- }
468
- if (this._displaySeconds && this._selectedSecond) {
469
- __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "seconds", this._selectedSecond, "start");
470
- }
471
- if (this._use12hClock && this._selectedMeridiem) {
472
- __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, "meridies", this._selectedMeridiem, "start");
473
- }
474
- __privateGet(this, _getFocusableEls).call(this)[0].focus();
89
+ maxlengthChanged() {
90
+ if (this.proxy instanceof HTMLTextAreaElement) {
91
+ this.proxy.maxLength = this.maxlength;
475
92
  }
476
93
  }
477
- // --- Pickers ---
478
- /**
479
- * @internal
480
- */
481
- get _hours() {
482
- return getHoursOptions(
483
- this.min,
484
- this.max,
485
- this._use12hClock ? this._selectedMeridiem ?? this._meridies[0].value : void 0
486
- );
487
- }
488
94
  /**
489
95
  * @internal
490
96
  */
491
- get _selectedHour() {
492
- return this.value ? parseTimeStr(this.value).hourStr : void 0;
493
- }
494
- /**
495
- * @internal
496
- */
497
- set _selectedHour(value) {
498
- if (this.value) {
499
- const { minuteStr, secondStr } = parseTimeStr(this.value);
500
- this.value = `${value}:${minuteStr}:${secondStr}`;
501
- } else {
502
- this.value = `${value}:00:00`;
97
+ minlengthChanged() {
98
+ if (this.proxy instanceof HTMLTextAreaElement) {
99
+ this.proxy.minLength = this.minlength;
503
100
  }
504
101
  }
505
102
  /**
506
103
  * @internal
507
104
  */
508
- get _minutes() {
509
- return getMinutesOptions(this.minutesStep, this.value, this.min, this.max);
510
- }
511
- /**
512
- * @internal
513
- */
514
- get _selectedMinute() {
515
- return this.value ? parseTimeStr(this.value).minuteStr : void 0;
516
- }
517
- /**
518
- * @internal
519
- */
520
- set _selectedMinute(value) {
521
- if (this.value) {
522
- const { hourStr, secondStr } = parseTimeStr(this.value);
523
- this.value = `${hourStr}:${value}:${secondStr}`;
524
- } else {
525
- this.value = `00:${value}:00`;
105
+ spellcheckChanged() {
106
+ if (this.proxy instanceof HTMLTextAreaElement) {
107
+ this.proxy.spellcheck = this.spellcheck;
526
108
  }
527
109
  }
528
110
  /**
529
- * @internal
111
+ * Selects all the text in the text area
112
+ *
113
+ * @public
530
114
  */
531
- get _seconds() {
532
- return getSecondsOptions(this.secondsStep, this.value, this.min, this.max);
115
+ select() {
116
+ this.control.select();
533
117
  }
534
118
  /**
119
+ * Change event handler for inner control.
120
+ * @remarks
121
+ * "Change" events are not `composable` so they will not
122
+ * permeate the shadow DOM boundary. This fn effectively proxies
123
+ * the change event, emitting a `change` event whenever the internal
124
+ * control emits a `change` event
535
125
  * @internal
536
126
  */
537
- get _selectedSecond() {
538
- return this.value ? parseTimeStr(this.value).secondStr : void 0;
127
+ handleChange() {
128
+ this.$emit("change");
539
129
  }
540
- /**
541
- * @internal
542
- */
543
- set _selectedSecond(value) {
544
- if (this.value) {
545
- const { hourStr, minuteStr } = parseTimeStr(this.value);
546
- this.value = `${hourStr}:${minuteStr}:${value}`;
547
- } else {
548
- this.value = `00:00:${value}`;
549
- }
550
- }
551
- /**
552
- * @internal
553
- */
554
- get _meridies() {
555
- return getMeridiesOptions(this.min, this.max);
556
- }
557
- /**
558
- * @internal
559
- */
560
- get _selectedMeridiem() {
561
- return this.value ? parseTimeStr(this.value).meridiem : void 0;
562
- }
563
- /**
564
- * @internal
565
- */
566
- set _selectedMeridiem(value) {
567
- if (this.value) {
568
- const { hours, minuteStr, secondStr } = parseTimeStr(this.value);
569
- let adjustedHours = hours;
570
- if (value === "AM" && hours >= 12) {
571
- adjustedHours -= 12;
572
- } else if (value === "PM" && hours < 12) {
573
- adjustedHours += 12;
574
- }
575
- this.value = `${formatTimePart(adjustedHours)}:${minuteStr}:${secondStr}`;
576
- } else {
577
- if (value === "AM") {
578
- this.value = "00:00:00";
579
- } else {
580
- this.value = "12:00:00";
581
- }
582
- }
583
- }
584
- /**
585
- * @internal
586
- */
587
- _onPickerKeyDown(picker, options, selectedValue, setSelectedValue, event) {
588
- const offset = {
589
- ArrowUp: -1,
590
- ArrowDown: 1
591
- }[event.key];
592
- if (offset) {
593
- event.preventDefault();
594
- const index = options.findIndex((h) => h.value === selectedValue);
595
- const newRawIndex = index === -1 ? 0 : index + offset;
596
- const newIndex = (newRawIndex + options.length) % options.length;
597
- const newValue = options[newIndex].value;
598
- setSelectedValue(newValue);
599
- __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, picker, newValue, "nearest");
600
- __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, this.value);
601
- }
602
- return true;
603
- }
604
- /**
605
- * @internal
606
- */
607
- _onPickerItemClick(picker, setSelectedValue, value) {
608
- setSelectedValue(value);
609
- __privateMethod(this, _TimePicker_instances, scrollToItem_fn).call(this, picker, value, "start");
610
- __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, this.value);
611
- const nextPickerEl = this.shadowRoot.querySelector(
612
- `#${picker} + .picker`
613
- );
614
- if (nextPickerEl) {
615
- nextPickerEl.focus();
616
- } else {
617
- this._closePopup();
618
- }
619
- }
620
- // --- Dialog footer ---
621
- /**
622
- * @internal
623
- */
624
- _onOkClick() {
625
- this._closePopup();
626
- }
627
- /**
628
- * @internal
629
- */
630
- _onClearClick() {
631
- __privateMethod(this, _TimePicker_instances, updateValueDueToUserInteraction_fn).call(this, "");
632
- this._closePopup();
633
- }
634
- // --- Validation ---
635
- /**
636
- * @internal
637
- */
130
+ /** {@inheritDoc (FormAssociated:interface).validate} */
638
131
  validate() {
639
- if (this.proxy) {
640
- this.proxy.setCustomValidity(this._getCustomValidationError() ?? "");
641
- }
642
- super.validate(this._textFieldEl?.querySelector("input") ?? void 0);
643
- }
644
- /**
645
- * @internal
646
- */
647
- _getCustomValidationError() {
648
- if (this._isPresentationValueInvalid()) {
649
- return this.locale.timePicker.invalidTimeError;
650
- }
651
- return null;
652
- }
653
- /**
654
- * @internal
655
- */
656
- _isPresentationValueInvalid() {
657
- if (this._presentationValue === "") {
658
- return false;
659
- }
660
- try {
661
- parsePresentationTime(this._presentationValue, this._use12hClock);
662
- return false;
663
- } catch (_) {
664
- return true;
665
- }
132
+ super.validate(this.control);
666
133
  }
667
- };
668
- _clockChangeHandler = new WeakMap();
669
- _clockChangeObserver = new WeakMap();
670
- _getFocusableEls = new WeakMap();
671
- _TimePicker_instances = new WeakSet();
672
- updateValueDueToUserInteraction_fn = function(newValue) {
673
- this.value = newValue;
674
- this.$emit("change");
675
- this.$emit("input");
676
- };
677
- _onFocusIn = new WeakMap();
678
- _onFocusOut = new WeakMap();
679
- _dismissOnClickOutside = new WeakMap();
680
- openPopupIfPossible_fn = function() {
681
- if (!this.readOnly) {
682
- this._popupOpen = true;
134
+ connectedCallback() {
135
+ super.connectedCallback();
136
+ __privateSet(this, _reflectToTextArea, new Reflector.Reflector(this, this.control));
137
+ __privateGet(this, _reflectToTextArea).property("value", "value", true);
683
138
  }
684
- };
685
- scrollToItem_fn = function(picker, selectedValue, position) {
686
- const element = this.shadowRoot.querySelector(
687
- `#${picker}-${selectedValue}`
688
- );
689
- if (!element) {
690
- return;
139
+ disconnectedCallback() {
140
+ super.disconnectedCallback();
141
+ __privateGet(this, _reflectToTextArea).destroy();
691
142
  }
692
- scrollIntoView.scrollIntoView(element, element.parentElement, position);
693
143
  };
144
+ _reflectToTextArea = new WeakMap();
145
+ // @ts-expect-error Type is incorrectly non-optional
146
+ __decorateClass([
147
+ vividElement.attr({ mode: "boolean" })
148
+ ], exports.TextArea.prototype, "readOnly", 2);
694
149
  __decorateClass([
695
- vividElement.attr({ attribute: "readonly", mode: "boolean" })
696
- ], TimePicker.prototype, "readOnly", 2);
150
+ vividElement.attr
151
+ ], exports.TextArea.prototype, "resize", 2);
152
+ // @ts-expect-error Type is incorrectly non-optional
697
153
  __decorateClass([
698
- vividElement.attr({ attribute: "minutes-step", converter: vividElement.nullableNumberConverter })
699
- ], TimePicker.prototype, "minutesStep", 2);
154
+ vividElement.attr({ mode: "boolean" })
155
+ ], exports.TextArea.prototype, "autofocus", 2);
156
+ // @ts-expect-error Type is incorrectly non-optional
700
157
  __decorateClass([
701
- vividElement.attr({ attribute: "seconds-step", converter: vividElement.nullableNumberConverter })
702
- ], TimePicker.prototype, "secondsStep", 2);
158
+ vividElement.attr({ attribute: "form" })
159
+ ], exports.TextArea.prototype, "formId", 2);
160
+ // @ts-expect-error Type is incorrectly non-optional
703
161
  __decorateClass([
704
162
  vividElement.attr
705
- ], TimePicker.prototype, "clock", 2);
163
+ ], exports.TextArea.prototype, "list", 2);
164
+ // @ts-expect-error Type is incorrectly non-optional
706
165
  __decorateClass([
707
- vividElement.attr({ converter: ValidTimeFilter })
708
- ], TimePicker.prototype, "min", 2);
166
+ vividElement.attr({ converter: vividElement.nullableNumberConverter })
167
+ ], exports.TextArea.prototype, "maxlength", 2);
168
+ // @ts-expect-error Type is incorrectly non-optional
709
169
  __decorateClass([
710
- vividElement.attr({ converter: ValidTimeFilter })
711
- ], TimePicker.prototype, "max", 2);
170
+ vividElement.attr({ converter: vividElement.nullableNumberConverter })
171
+ ], exports.TextArea.prototype, "minlength", 2);
172
+ // @ts-expect-error Type is incorrectly non-optional
712
173
  __decorateClass([
713
- vividElement.volatile
714
- ], TimePicker.prototype, "_use12hClock", 1);
174
+ vividElement.attr
175
+ ], exports.TextArea.prototype, "name", 2);
176
+ // @ts-expect-error Type is incorrectly non-optional
715
177
  __decorateClass([
716
- vividElement.observable
717
- ], TimePicker.prototype, "_popupOpen", 2);
178
+ vividElement.attr
179
+ ], exports.TextArea.prototype, "placeholder", 2);
180
+ __decorateClass([
181
+ vividElement.attr({ converter: vividElement.nullableNumberConverter, mode: "fromView" })
182
+ ], exports.TextArea.prototype, "cols", 2);
183
+ // @ts-expect-error Type is incorrectly non-optional
184
+ __decorateClass([
185
+ vividElement.attr({ converter: vividElement.nullableNumberConverter, mode: "fromView" })
186
+ ], exports.TextArea.prototype, "rows", 2);
187
+ // @ts-expect-error Type is incorrectly non-optional
188
+ __decorateClass([
189
+ vividElement.attr({ mode: "boolean" })
190
+ ], exports.TextArea.prototype, "spellcheck", 2);
718
191
  __decorateClass([
719
192
  vividElement.observable
720
- ], TimePicker.prototype, "_presentationValue", 2);
721
- TimePicker = __decorateClass([
193
+ ], exports.TextArea.prototype, "defaultSlottedNodes", 2);
194
+ __decorateClass([
195
+ vividElement.attr
196
+ ], exports.TextArea.prototype, "wrap", 2);
197
+ exports.TextArea = __decorateClass([
722
198
  formElements.errorText,
723
199
  formElements.formElements
724
- ], TimePicker);
200
+ ], exports.TextArea);
725
201
  applyMixinsWithObservables.applyMixinsWithObservables(
726
- TimePicker,
727
- localized.Localized,
202
+ exports.TextArea,
203
+ formElements.FormElementCharCount,
728
204
  formElements.FormElementHelperText,
729
- trappedFocus.TrappedFocus
205
+ formElements.FormElementSuccessText
730
206
  );
731
207
 
732
- const renderPicker = (id, getLabel, getSelected, setSelected, getOptions) => {
208
+ const getClasses = ({
209
+ value,
210
+ errorValidationMessage,
211
+ disabled,
212
+ placeholder,
213
+ readOnly,
214
+ successText
215
+ }) => classNames.classNames(
216
+ "base",
217
+ ["readonly", readOnly],
218
+ ["placeholder", Boolean(placeholder)],
219
+ ["disabled", disabled],
220
+ ["error", Boolean(errorValidationMessage)],
221
+ ["has-value", Boolean(value)],
222
+ ["success", !!successText]
223
+ );
224
+ function renderLabel() {
225
+ return vividElement.html` <label for="control" class="label">
226
+ ${(x) => x.label}
227
+ </label>`;
228
+ }
229
+ function renderCharCount() {
733
230
  return vividElement.html`
734
- <ul
735
- id="${id}"
736
- class="picker"
737
- role="listbox"
738
- tabindex="0"
739
- aria-label="${getLabel}"
740
- aria-activedescendant="${(x) => getSelected(x) ? `${id}-${getSelected(x)}` : void 0}"
741
- @keydown="${(x, c) => x._onPickerKeyDown(
742
- id,
743
- getOptions(x),
744
- getSelected(x),
745
- setSelected(x),
746
- c.event
747
- )}"
231
+ <span class="char-count"
232
+ >${(x) => x.value ? x.value.length : 0} / ${(x) => x.maxlength}</span
748
233
  >
749
- ${repeat.repeat(
750
- getOptions,
751
- vividElement.html`
752
- <li
753
- id="${(x) => `${id}-${x.value}`}"
754
- class="${(x, c) => classNames.classNames("item", [
755
- "selected",
756
- getSelected(c.parent) === x.value
757
- ])}"
758
- role="option"
759
- aria-selected="${(x, c) => getSelected(c.parent) === x.value}"
760
- @click="${(x, c) => c.parent._onPickerItemClick(id, setSelected(c.parent), x.value)}"
761
- >
762
- ${(x) => x.label}
763
- </li>
764
- `
765
- )}
766
- </ul>
767
234
  `;
768
- };
769
- const TimePickerTemplate = (context) => {
770
- const popupTag = context.tagFor(definition.Popup);
771
- const textFieldTag = context.tagFor(textField.TextField);
772
- const buttonTag = context.tagFor(definition$1.Button);
773
- return vividElement.html`<div class="base" @keydown="${(x, { event }) => x._onBaseKeyDown(event)}">
774
- <${textFieldTag} id="text-field"
775
- ${ref.ref("_textFieldEl")}
776
- class="control"
777
- label="${(x) => x.label}"
778
- helper-text="${(x) => x.helperText}"
779
- error-text="${(x) => x.errorValidationMessage}"
780
- placeholder="${(x) => x._textFieldPlaceholder}"
781
- current-value="${(x) => x._presentationValue}"
782
- ?disabled="${(x) => x.disabled}"
783
- ?readonly="${(x) => x.readOnly}"
784
- @input="${(x, c) => x._onTextFieldInput(c.event)}"
785
- @change="${(x) => x._onTextFieldChange()}"
786
- >
787
- <slot
788
- slot="${(x) => x._helperTextSlottedContent?.length ? "helper-text" : void 0}"
789
- name="helper-text"
790
- ${slotted.slotted("_helperTextSlottedContent")}
791
- ></slot>
792
- <${buttonTag}
793
- id="clock-button"
794
- ${ref.ref("_clockButtonEl")}
795
- slot="action-items"
796
- size="condensed"
797
- icon="clock-line"
798
- appearance="ghost"
799
- ?disabled="${(x) => x.disabled || x.readOnly}"
800
- aria-label="${(x) => x._clockButtonLabel}"
801
- @click="${(x) => x._onClockButtonClick()}"
802
- ></${buttonTag}>
803
- </${textFieldTag}>
804
- <${popupTag}
805
- ?open="${(x) => x._popupOpen}"
806
- :anchor="${(x) => x._textFieldEl}"
807
- placement="bottom-start"
808
- class="popup">
809
- <div class="dialog" role="dialog" ${ref.ref(
810
- "_dialogEl"
811
- )} aria-modal="true" aria-label="${(x) => x.locale.timePicker.chooseTimeLabel}">
812
- <div class="time-pickers">
813
- ${renderPicker(
814
- "hours",
815
- (x) => x.locale.timePicker.hoursLabel,
816
- (x) => x._selectedHour,
817
- (x) => (v) => x._selectedHour = v,
818
- (x) => x._hours
819
- )}
820
- ${renderPicker(
821
- "minutes",
822
- (x) => x.locale.timePicker.minutesLabel,
823
- (x) => x._selectedMinute,
824
- (x) => (v) => x._selectedMinute = v,
825
- (x) => x._minutes
826
- )}
827
- ${when.when(
828
- (x) => x._displaySeconds,
829
- renderPicker(
830
- "seconds",
831
- (x) => x.locale.timePicker.secondsLabel,
832
- (x) => x._selectedSecond,
833
- (x) => (v) => x._selectedSecond = v,
834
- (x) => x._seconds
835
- )
836
- )}
837
- ${when.when(
838
- (x) => x._use12hClock,
839
- renderPicker(
840
- "meridies",
841
- (x) => x.locale.timePicker.meridiesLabel,
842
- (x) => x._selectedMeridiem,
843
- (x) => (v) => x._selectedMeridiem = v,
844
- (x) => x._meridies
845
- )
846
- )}
847
- </div>
848
- <div class="footer">
849
- <${buttonTag}
850
- class="vwc-button"
851
- size="condensed"
852
- label="${(x) => x.locale.timePicker.clearLabel}"
853
- @click="${(x) => x._onClearClick()}"
854
- ></${buttonTag}>
855
- <${buttonTag}
856
- class="vwc-button"
857
- size="condensed"
858
- appearance="filled"
859
- label="${(x) => x.locale.timePicker.okLabel}"
860
- @click="${(x) => x._onOkClick()}"
861
- ></${buttonTag}>
862
- </div>
863
- </div>
864
- </${popupTag}>
865
- </div>`;
235
+ }
236
+ const TextAreaTemplate = (context) => {
237
+ return vividElement.html`
238
+ <div class="${getClasses}">
239
+ ${when.when((x) => x.charCount && x.maxlength, renderCharCount())}
240
+ ${when.when((x) => x.label, renderLabel())}
241
+ <textarea
242
+ class="control"
243
+ id="control"
244
+ ?autofocus="${(x) => x.autofocus}"
245
+ placeholder="${(x) => x.placeholder ? x.placeholder : null}"
246
+ name="${(x) => x.name ? x.name : null}"
247
+ list="${(x) => x.list}"
248
+ minlength="${(x) => x.minlength ? x.minlength : null}"
249
+ maxlength="${(x) => x.maxlength ? x.maxlength : null}"
250
+ rows="${(x) => x.rows ? x.rows : null}"
251
+ cols="${(x) => x.cols ? x.cols : null}"
252
+ wrap="${(x) => x.wrap ? x.wrap : null}"
253
+ ?readonly="${(x) => x.readOnly}"
254
+ ?disabled="${(x) => x.disabled}"
255
+ ?required="${(x) => x.required}"
256
+ ?spellcheck="${(x) => x.spellcheck}"
257
+ aria-atomic="${(x) => x.ariaAtomic}"
258
+ aria-busy="${(x) => x.ariaBusy}"
259
+ aria-current="${(x) => x.ariaCurrent}"
260
+ aria-disabled="${(x) => x.ariaDisabled}"
261
+ aria-haspopup="${(x) => x.ariaHasPopup}"
262
+ aria-hidden="${(x) => x.ariaHidden}"
263
+ aria-invalid="${(x) => x.ariaInvalid}"
264
+ aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
265
+ aria-label="${(x) => x.ariaLabel}"
266
+ aria-live="${(x) => x.ariaLive}"
267
+ aria-relevant="${(x) => x.ariaRelevant}"
268
+ aria-roledescription="${(x) => x.ariaRoleDescription}"
269
+ @input="${(x) => x.handleTextInput()}"
270
+ @change="${(x) => x.handleChange()}"
271
+ ${ref.ref("control")}
272
+ >
273
+ </textarea>
274
+ ${formElements.getFeedbackTemplate(context)}
275
+ </div>
276
+ `;
866
277
  };
867
278
 
868
- const timePickerDefinition = vividElement.defineVividComponent(
869
- "time-picker",
870
- TimePicker,
871
- TimePickerTemplate,
872
- [definition$2.textFieldDefinition, definition.popupDefinition, definition$1.buttonDefinition],
279
+ const textAreaDefinition = vividElement.defineVividComponent(
280
+ "text-area",
281
+ exports.TextArea,
282
+ TextAreaTemplate,
283
+ [definition.iconDefinition],
873
284
  {
874
285
  styles,
875
286
  shadowOptions: {
@@ -877,7 +288,7 @@ const timePickerDefinition = vividElement.defineVividComponent(
877
288
  }
878
289
  }
879
290
  );
880
- const registerTimePicker = vividElement.createRegisterFunction(timePickerDefinition);
291
+ const registerTextArea = vividElement.createRegisterFunction(textAreaDefinition);
881
292
 
882
- exports.registerTimePicker = registerTimePicker;
883
- exports.timePickerDefinition = timePickerDefinition;
293
+ exports.registerTextArea = registerTextArea;
294
+ exports.textAreaDefinition = textAreaDefinition;