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