@vonage/vivid 3.26.0 → 3.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/README.md +4 -1
  2. package/accordion/index.js +0 -2
  3. package/accordion-item/index.js +0 -2
  4. package/alert/index.js +0 -2
  5. package/avatar/index.js +0 -2
  6. package/badge/index.js +0 -2
  7. package/banner/index.js +0 -2
  8. package/breadcrumb-item/index.js +0 -2
  9. package/button/index.js +0 -2
  10. package/calendar/index.js +0 -1
  11. package/calendar-event/index.js +0 -2
  12. package/card/index.js +0 -2
  13. package/checkbox/index.js +0 -2
  14. package/combobox/index.js +0 -3
  15. package/custom-elements.json +440 -51
  16. package/data-grid/index.js +1 -5
  17. package/dialog/index.js +0 -2
  18. package/empty-state/index.js +0 -2
  19. package/fab/index.js +0 -2
  20. package/file-picker/index.js +24 -0
  21. package/header/index.js +1 -1
  22. package/icon/index.js +0 -2
  23. package/index.d.ts +3 -3
  24. package/index.js +31 -35
  25. package/layout/index.js +1 -1
  26. package/lib/accordion/accordion.d.ts +5 -5
  27. package/lib/accordion/accordion.template.d.ts +3 -3
  28. package/lib/accordion/definition.d.ts +2 -2
  29. package/lib/accordion/index.d.ts +1 -1
  30. package/lib/accordion-item/accordion-item.d.ts +12 -12
  31. package/lib/accordion-item/accordion-item.template.d.ts +4 -4
  32. package/lib/accordion-item/definition.d.ts +1 -1
  33. package/lib/accordion-item/index.d.ts +1 -1
  34. package/lib/action-group/action-group.d.ts +11 -11
  35. package/lib/action-group/action-group.template.d.ts +4 -4
  36. package/lib/action-group/definition.d.ts +2 -2
  37. package/lib/action-group/index.d.ts +1 -1
  38. package/lib/alert/alert.d.ts +22 -22
  39. package/lib/alert/alert.template.d.ts +4 -4
  40. package/lib/alert/definition.d.ts +2 -2
  41. package/lib/alert/index.d.ts +1 -1
  42. package/lib/avatar/avatar.d.ts +14 -14
  43. package/lib/avatar/avatar.template.d.ts +4 -4
  44. package/lib/avatar/definition.d.ts +2 -2
  45. package/lib/avatar/index.d.ts +1 -1
  46. package/lib/badge/badge.d.ts +14 -14
  47. package/lib/badge/badge.template.d.ts +4 -4
  48. package/lib/badge/definition.d.ts +4 -4
  49. package/lib/badge/index.d.ts +1 -1
  50. package/lib/banner/banner.d.ts +20 -20
  51. package/lib/banner/banner.template.d.ts +4 -4
  52. package/lib/banner/definition.d.ts +2 -2
  53. package/lib/banner/index.d.ts +1 -1
  54. package/lib/breadcrumb/breadcrumb.d.ts +3 -3
  55. package/lib/breadcrumb/breadcrumb.template.d.ts +4 -4
  56. package/lib/breadcrumb/definition.d.ts +1 -1
  57. package/lib/breadcrumb/index.d.ts +1 -1
  58. package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -5
  59. package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +4 -4
  60. package/lib/breadcrumb-item/definition.d.ts +1 -1
  61. package/lib/breadcrumb-item/index.d.ts +1 -1
  62. package/lib/button/button.d.ts +18 -18
  63. package/lib/button/button.template.d.ts +4 -4
  64. package/lib/button/definition.d.ts +2 -2
  65. package/lib/button/index.d.ts +1 -1
  66. package/lib/calendar/calendar.d.ts +13 -13
  67. package/lib/calendar/calendar.template.d.ts +4 -4
  68. package/lib/calendar/definition.d.ts +1 -1
  69. package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -2
  70. package/lib/calendar/helpers/calendar.event-context.d.ts +6 -6
  71. package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -9
  72. package/lib/calendar/index.d.ts +1 -1
  73. package/lib/calendar-event/calendar-event.d.ts +13 -13
  74. package/lib/calendar-event/calendar-event.template.d.ts +4 -4
  75. package/lib/calendar-event/definition.d.ts +2 -2
  76. package/lib/calendar-event/index.d.ts +1 -1
  77. package/lib/card/card.d.ts +10 -10
  78. package/lib/card/card.template.d.ts +4 -4
  79. package/lib/card/definition.d.ts +1 -1
  80. package/lib/card/index.d.ts +1 -1
  81. package/lib/checkbox/checkbox.d.ts +10 -11
  82. package/lib/checkbox/checkbox.template.d.ts +4 -4
  83. package/lib/checkbox/definition.d.ts +1 -1
  84. package/lib/checkbox/index.d.ts +1 -1
  85. package/lib/combobox/combobox.d.ts +12 -13
  86. package/lib/combobox/combobox.template.d.ts +4 -4
  87. package/lib/combobox/definition.d.ts +3 -4
  88. package/lib/combobox/index.d.ts +1 -1
  89. package/lib/components.d.ts +52 -52
  90. package/lib/data-grid/data-grid-cell.d.ts +22 -22
  91. package/lib/data-grid/data-grid-cell.template.d.ts +4 -4
  92. package/lib/data-grid/data-grid-row.d.ts +4 -4
  93. package/lib/data-grid/data-grid-row.template.d.ts +3 -3
  94. package/lib/data-grid/data-grid.d.ts +20 -20
  95. package/lib/data-grid/data-grid.options.d.ts +38 -38
  96. package/lib/data-grid/data-grid.template.d.ts +3 -3
  97. package/lib/data-grid/definition.d.ts +6 -6
  98. package/lib/data-grid/index.d.ts +1 -1
  99. package/lib/dialog/definition.d.ts +2 -2
  100. package/lib/dialog/dialog.d.ts +26 -26
  101. package/lib/dialog/dialog.template.d.ts +4 -4
  102. package/lib/dialog/index.d.ts +1 -1
  103. package/lib/divider/definition.d.ts +1 -1
  104. package/lib/divider/divider.d.ts +3 -3
  105. package/lib/divider/divider.template.d.ts +4 -4
  106. package/lib/divider/index.d.ts +1 -1
  107. package/lib/elevation/definition.d.ts +1 -1
  108. package/lib/elevation/elevation.d.ts +5 -5
  109. package/lib/elevation/elevation.template.d.ts +4 -4
  110. package/lib/elevation/index.d.ts +1 -1
  111. package/lib/empty-state/definition.d.ts +3 -3
  112. package/lib/empty-state/empty-state.d.ts +5 -5
  113. package/lib/empty-state/empty-state.template.d.ts +4 -4
  114. package/lib/empty-state/index.d.ts +1 -1
  115. package/lib/enums.d.ts +60 -60
  116. package/lib/fab/definition.d.ts +4 -4
  117. package/lib/fab/fab.d.ts +12 -12
  118. package/lib/fab/fab.template.d.ts +4 -4
  119. package/lib/fab/index.d.ts +1 -1
  120. package/lib/file-picker/definition.d.ts +3 -0
  121. package/lib/file-picker/file-picker.d.ts +22 -0
  122. package/lib/file-picker/file-picker.template.d.ts +4 -0
  123. package/lib/file-picker/index.d.ts +1 -0
  124. package/lib/focus/definition.d.ts +3 -3
  125. package/lib/focus/focus.d.ts +3 -3
  126. package/lib/focus/focus.template.d.ts +4 -4
  127. package/lib/focus/index.d.ts +1 -1
  128. package/lib/header/definition.d.ts +3 -3
  129. package/lib/header/header.d.ts +5 -5
  130. package/lib/header/header.template.d.ts +4 -4
  131. package/lib/header/index.d.ts +1 -1
  132. package/lib/icon/definition.d.ts +4 -4
  133. package/lib/icon/icon.d.ts +12 -12
  134. package/lib/icon/icon.placeholder.d.ts +1 -1
  135. package/lib/icon/icon.template.d.ts +4 -4
  136. package/lib/icon/index.d.ts +1 -1
  137. package/lib/layout/definition.d.ts +4 -4
  138. package/lib/layout/index.d.ts +1 -1
  139. package/lib/layout/layout.d.ts +17 -17
  140. package/lib/layout/layout.template.d.ts +4 -4
  141. package/lib/listbox/definition.d.ts +4 -4
  142. package/lib/listbox/index.d.ts +1 -1
  143. package/lib/listbox/listbox.d.ts +6 -6
  144. package/lib/listbox/listbox.template.d.ts +4 -4
  145. package/lib/menu/definition.d.ts +12 -12
  146. package/lib/menu/index.d.ts +1 -1
  147. package/lib/menu/menu.d.ts +16 -14
  148. package/lib/menu/menu.template.d.ts +3 -3
  149. package/lib/menu-item/definition.d.ts +3 -3
  150. package/lib/menu-item/index.d.ts +1 -1
  151. package/lib/menu-item/menu-item.d.ts +14 -14
  152. package/lib/menu-item/menu-item.template.d.ts +4 -4
  153. package/lib/nav/definition.d.ts +3 -3
  154. package/lib/nav/index.d.ts +1 -1
  155. package/lib/nav/nav.d.ts +3 -3
  156. package/lib/nav/nav.template.d.ts +4 -4
  157. package/lib/nav-disclosure/definition.d.ts +3 -3
  158. package/lib/nav-disclosure/index.d.ts +1 -1
  159. package/lib/nav-disclosure/nav-disclosure.d.ts +10 -10
  160. package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -4
  161. package/lib/nav-item/definition.d.ts +3 -3
  162. package/lib/nav-item/index.d.ts +1 -1
  163. package/lib/nav-item/nav-item.d.ts +7 -7
  164. package/lib/nav-item/nav-item.template.d.ts +4 -4
  165. package/lib/note/definition.d.ts +4 -4
  166. package/lib/note/index.d.ts +1 -1
  167. package/lib/note/note.d.ts +10 -10
  168. package/lib/note/note.template.d.ts +4 -4
  169. package/lib/number-field/definition.d.ts +5 -5
  170. package/lib/number-field/index.d.ts +1 -1
  171. package/lib/number-field/number-field.d.ts +13 -13
  172. package/lib/number-field/number-field.template.d.ts +4 -4
  173. package/lib/option/definition.d.ts +3 -3
  174. package/lib/option/index.d.ts +1 -1
  175. package/lib/option/option.d.ts +12 -12
  176. package/lib/option/option.template.d.ts +4 -4
  177. package/lib/pagination/definition.d.ts +3 -3
  178. package/lib/pagination/index.d.ts +1 -1
  179. package/lib/pagination/pagination.d.ts +18 -18
  180. package/lib/pagination/pagination.template.d.ts +4 -4
  181. package/lib/popup/definition.d.ts +5 -5
  182. package/lib/popup/index.d.ts +1 -1
  183. package/lib/popup/popup.d.ts +21 -21
  184. package/lib/popup/popup.template.d.ts +4 -4
  185. package/lib/progress/definition.d.ts +4 -4
  186. package/lib/progress/index.d.ts +1 -1
  187. package/lib/progress/progress.d.ts +9 -9
  188. package/lib/progress/progress.template.d.ts +5 -5
  189. package/lib/progress-ring/definition.d.ts +4 -4
  190. package/lib/progress-ring/index.d.ts +1 -1
  191. package/lib/progress-ring/progress-ring.d.ts +7 -7
  192. package/lib/progress-ring/progress-ring.template.d.ts +4 -4
  193. package/lib/radio/definition.d.ts +3 -3
  194. package/lib/radio/index.d.ts +1 -1
  195. package/lib/radio/radio.d.ts +7 -7
  196. package/lib/radio/radio.template.d.ts +4 -4
  197. package/lib/radio-group/definition.d.ts +11 -11
  198. package/lib/radio-group/index.d.ts +1 -1
  199. package/lib/radio-group/radio-group.d.ts +4 -4
  200. package/lib/radio-group/radio-group.template.d.ts +4 -4
  201. package/lib/select/definition.d.ts +4 -4
  202. package/lib/select/index.d.ts +1 -1
  203. package/lib/select/select.d.ts +17 -18
  204. package/lib/select/select.template.d.ts +4 -4
  205. package/lib/side-drawer/definition.d.ts +3 -3
  206. package/lib/side-drawer/index.d.ts +1 -1
  207. package/lib/side-drawer/side-drawer.d.ts +9 -9
  208. package/lib/side-drawer/side-drawer.template.d.ts +4 -4
  209. package/lib/slider/definition.d.ts +3 -3
  210. package/lib/slider/index.d.ts +1 -1
  211. package/lib/slider/slider.d.ts +4 -4
  212. package/lib/slider/slider.template.d.ts +4 -4
  213. package/lib/switch/definition.d.ts +4 -4
  214. package/lib/switch/index.d.ts +1 -1
  215. package/lib/switch/switch.d.ts +7 -7
  216. package/lib/switch/switch.template.d.ts +4 -4
  217. package/lib/tab/definition.d.ts +4 -4
  218. package/lib/tab/index.d.ts +1 -1
  219. package/lib/tab/tab.d.ts +14 -14
  220. package/lib/tab/tab.template.d.ts +3 -3
  221. package/lib/tab-panel/definition.d.ts +3 -3
  222. package/lib/tab-panel/index.d.ts +1 -1
  223. package/lib/tab-panel/tab-panel.d.ts +3 -3
  224. package/lib/tab-panel/tab-panel.template.d.ts +2 -2
  225. package/lib/tabs/definition.d.ts +3 -3
  226. package/lib/tabs/index.d.ts +1 -1
  227. package/lib/tabs/tabs.d.ts +15 -15
  228. package/lib/tabs/tabs.template.d.ts +2 -2
  229. package/lib/tag/definition.d.ts +4 -4
  230. package/lib/tag/index.d.ts +1 -1
  231. package/lib/tag/tag.d.ts +22 -22
  232. package/lib/tag/tag.template.d.ts +4 -4
  233. package/lib/tag-group/definition.d.ts +3 -3
  234. package/lib/tag-group/index.d.ts +1 -1
  235. package/lib/tag-group/tag-group.d.ts +3 -3
  236. package/lib/tag-group/tag-group.template.d.ts +4 -4
  237. package/lib/text-anchor/definition.d.ts +3 -3
  238. package/lib/text-anchor/index.d.ts +1 -1
  239. package/lib/text-anchor/text-anchor.d.ts +7 -7
  240. package/lib/text-anchor/text-anchor.template.d.ts +4 -4
  241. package/lib/text-area/definition.d.ts +4 -4
  242. package/lib/text-area/index.d.ts +1 -1
  243. package/lib/text-area/text-area.d.ts +8 -9
  244. package/lib/text-area/text-area.template.d.ts +4 -4
  245. package/lib/text-field/definition.d.ts +4 -4
  246. package/lib/text-field/index.d.ts +1 -1
  247. package/lib/text-field/text-field.d.ts +13 -14
  248. package/lib/text-field/text-field.template.d.ts +4 -4
  249. package/lib/toggletip/definition.d.ts +3 -3
  250. package/lib/toggletip/index.d.ts +1 -1
  251. package/lib/toggletip/toggletip.d.ts +15 -15
  252. package/lib/toggletip/toggletip.template.d.ts +4 -4
  253. package/lib/tooltip/definition.d.ts +3 -3
  254. package/lib/tooltip/index.d.ts +1 -1
  255. package/lib/tooltip/tooltip.d.ts +14 -14
  256. package/lib/tooltip/tooltip.template.d.ts +4 -4
  257. package/lib/tree-item/definition.d.ts +3 -3
  258. package/lib/tree-item/index.d.ts +1 -1
  259. package/lib/tree-item/tree-item.d.ts +7 -7
  260. package/lib/tree-item/tree-item.template.d.ts +4 -4
  261. package/lib/tree-view/definition.d.ts +3 -3
  262. package/lib/tree-view/index.d.ts +1 -1
  263. package/lib/tree-view/tree-view.d.ts +3 -3
  264. package/lib/tree-view/tree-view.template.d.ts +2 -2
  265. package/listbox/index.js +17 -21
  266. package/menu/index.js +2 -5
  267. package/menu-item/index.js +1 -4
  268. package/nav/index.js +1 -1
  269. package/nav-disclosure/index.js +1 -3
  270. package/nav-item/index.js +1 -3
  271. package/note/index.js +1 -3
  272. package/number-field/index.js +1 -4
  273. package/option/index.js +0 -2
  274. package/package.json +10 -8
  275. package/pagination/index.js +2 -6
  276. package/popup/index.js +0 -3
  277. package/progress/index.js +1 -1
  278. package/radio/index.js +1 -1
  279. package/radio-group/index.js +3 -3
  280. package/select/index.js +1 -4
  281. package/shared/affix.js +2 -5
  282. package/shared/anchor.js +2 -1
  283. package/shared/apply-mixins.js +1 -1
  284. package/shared/definition.js +7 -9
  285. package/shared/definition10.js +13 -17
  286. package/shared/definition11.js +6 -9
  287. package/shared/definition12.js +16 -18
  288. package/shared/definition13.js +6 -8
  289. package/shared/definition14.js +7 -12
  290. package/shared/definition15.js +43 -52
  291. package/shared/definition16.js +8 -71
  292. package/shared/definition17.js +36 -45
  293. package/shared/definition18.js +19 -24
  294. package/shared/definition19.js +45 -49
  295. package/shared/definition2.js +24 -28
  296. package/shared/definition20.js +390 -281
  297. package/shared/definition21.js +12 -16
  298. package/shared/definition22.js +82 -168
  299. package/shared/definition23.js +35 -41
  300. package/shared/definition24.js +6 -8
  301. package/shared/definition25.js +10 -14
  302. package/shared/definition26.js +40 -42
  303. package/shared/definition27.js +2285 -48
  304. package/shared/definition28.js +46 -38
  305. package/shared/definition29.js +38 -370
  306. package/shared/definition3.js +5 -9
  307. package/shared/definition30.js +348 -302
  308. package/shared/definition31.js +365 -14
  309. package/shared/definition32.js +12 -71
  310. package/shared/definition33.js +63 -26
  311. package/shared/definition34.js +24 -40
  312. package/shared/definition35.js +32 -436
  313. package/shared/definition36.js +428 -217
  314. package/shared/definition37.js +175 -77
  315. package/shared/definition38.js +50 -34
  316. package/shared/definition39.js +36 -430
  317. package/shared/definition4.js +3 -5
  318. package/shared/definition40.js +358 -589
  319. package/shared/definition41.js +644 -75
  320. package/shared/definition42.js +70 -587
  321. package/shared/definition43.js +503 -84
  322. package/shared/definition44.js +124 -52
  323. package/shared/definition45.js +57 -19
  324. package/shared/definition46.js +17 -487
  325. package/shared/definition47.js +477 -102
  326. package/shared/definition48.js +109 -19
  327. package/shared/definition49.js +17 -276
  328. package/shared/definition5.js +7 -8
  329. package/shared/definition50.js +253 -101
  330. package/shared/definition51.js +114 -629
  331. package/shared/definition52.js +92 -85
  332. package/shared/definition53.js +112 -70
  333. package/shared/definition54.js +65 -294
  334. package/shared/definition55.js +303 -0
  335. package/shared/definition6.js +17 -23
  336. package/shared/definition7.js +44 -47
  337. package/shared/definition8.js +3 -5
  338. package/shared/definition9.js +13 -17
  339. package/shared/design-system/index.d.ts +3 -3
  340. package/shared/focus2.js +1 -3
  341. package/shared/form-associated.js +1 -1
  342. package/shared/form-elements.js +16 -20
  343. package/shared/icon.js +2 -1171
  344. package/shared/index.js +41 -1549
  345. package/shared/listbox.js +1 -1
  346. package/shared/patterns/affix.d.ts +9 -9
  347. package/shared/patterns/focus.d.ts +3 -3
  348. package/shared/patterns/form-elements/form-elements.d.ts +57 -57
  349. package/shared/patterns/form-elements/index.d.ts +1 -1
  350. package/shared/patterns/index.d.ts +3 -3
  351. package/shared/repeat.js +1 -1
  352. package/shared/text-anchor.template.js +38 -40
  353. package/shared/text-field.js +1 -1
  354. package/shared/text-field2.js +1 -1
  355. package/shared/when.js +19 -5
  356. package/side-drawer/index.js +1 -1
  357. package/slider/index.js +1 -4
  358. package/styles/core/all.css +1 -1
  359. package/styles/core/theme.css +1 -1
  360. package/styles/core/typography.css +1 -1
  361. package/styles/tokens/theme-dark.css +17 -17
  362. package/styles/tokens/theme-light.css +17 -17
  363. package/switch/index.js +1 -3
  364. package/tab/index.js +1 -3
  365. package/tab-panel/index.js +1 -1
  366. package/tabs/index.js +3 -5
  367. package/tag/index.js +1 -3
  368. package/tag-group/index.js +1 -1
  369. package/text-anchor/index.js +0 -2
  370. package/text-area/index.js +1 -3
  371. package/text-field/index.js +1 -3
  372. package/toggletip/index.js +1 -5
  373. package/tooltip/index.js +1 -4
  374. package/tree-item/index.js +2 -4
  375. package/tree-view/index.js +1 -1
  376. package/vivid.api.json +210 -848
  377. package/shared/es.object.assign.js +0 -68
  378. package/shared/es.regexp.to-string.js +0 -61
  379. package/shared/es.string.includes.js +0 -83
  380. package/shared/string-trim.js +0 -40
  381. package/shared/to-string.js +0 -51
@@ -1,639 +1,124 @@
1
- import { l as fails$5, g as global$3, K as functionCall, k as functionUncurryThis, a9 as shared$1, aa as objectCreate, L as internalState, G as _export, w as wellKnownSymbol$2, H as defineBuiltIn$1, ab as createNonEnumerableProperty$1, U as requireObjectCoercible$2, ac as toIntegerOrInfinity$2, a2 as toObject$1, q as anObject$2, m as isCallable$2, c as classofRaw, s as isNullOrUndefined$1, ad as toLength$1, P as getMethod$1, F as FoundationElement, W as __classPrivateFieldSet, V as __classPrivateFieldGet, Y as DOM, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
2
- import { P as Popup, p as popupRegistries } from './definition20.js';
3
- import { r as regexpFlags$1 } from './es.regexp.to-string.js';
4
- import { t as toString$3 } from './to-string.js';
5
- import { f as functionUncurryThisClause, a as functionApply } from './icon.js';
1
+ import { _ as __decorate, a as attr, b as __metadata, o as observable, h as html, r as registerFactory } from './index.js';
2
+ import { f as focusRegistries } from './definition4.js';
3
+ import { i as iconRegistries } from './definition3.js';
4
+ import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
5
+ import './focus.js';
6
+ import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount, g as getFeedbackTemplate } from './form-elements.js';
7
+ import { T as TextField$1 } from './text-field2.js';
8
+ import { a as applyMixins } from './apply-mixins.js';
9
+ import { c as css_248z } from './text-field.js';
10
+ import { f as focusTemplateFactory } from './focus2.js';
6
11
  import { w as when } from './when.js';
12
+ import { r as ref } from './ref.js';
13
+ import { s as slotted } from './slotted.js';
7
14
  import { c as classNames } from './class-names.js';
8
15
 
9
- var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 25 Jul 2023 07:38:24 GMT\n */\n.control {\n display: inline-block;\n}\n\n.content-wrapper {\n width: var(--toggletip-inline-size, auto);\n padding: 16px;\n}\n\n.headline {\n font: var(--vvd-typography-base-bold);\n}\n\n.action-items {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n}\n\n::slotted([slot=action-items]) {\n margin-block-start: 16px;\n}";
10
-
11
- var fails$4 = fails$5;
12
- var global$2 = global$3;
13
-
14
- // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
15
- var $RegExp$2 = global$2.RegExp;
16
-
17
- var UNSUPPORTED_Y$1 = fails$4(function () {
18
- var re = $RegExp$2('a', 'y');
19
- re.lastIndex = 2;
20
- return re.exec('abcd') != null;
21
- });
22
-
23
- // UC Browser bug
24
- // https://github.com/zloirock/core-js/issues/1008
25
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
26
- return !$RegExp$2('a', 'y').sticky;
27
- });
28
-
29
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
30
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
31
- var re = $RegExp$2('^r', 'gy');
32
- re.lastIndex = 2;
33
- return re.exec('str') != null;
34
- });
35
-
36
- var regexpStickyHelpers = {
37
- BROKEN_CARET: BROKEN_CARET,
38
- MISSED_STICKY: MISSED_STICKY,
39
- UNSUPPORTED_Y: UNSUPPORTED_Y$1
40
- };
41
-
42
- var fails$3 = fails$5;
43
- var global$1 = global$3;
44
-
45
- // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
46
- var $RegExp$1 = global$1.RegExp;
47
-
48
- var regexpUnsupportedDotAll = fails$3(function () {
49
- var re = $RegExp$1('.', 's');
50
- return !(re.dotAll && re.exec('\n') && re.flags === 's');
51
- });
52
-
53
- var fails$2 = fails$5;
54
- var global = global$3;
55
-
56
- // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
57
- var $RegExp = global.RegExp;
58
-
59
- var regexpUnsupportedNcg = fails$2(function () {
60
- var re = $RegExp('(?<a>b)', 'g');
61
- return re.exec('b').groups.a !== 'b' ||
62
- 'b'.replace(re, '$<a>c') !== 'bc';
63
- });
64
-
65
- /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
66
- /* eslint-disable regexp/no-useless-quantifier -- testing */
67
- var call$2 = functionCall;
68
- var uncurryThis$4 = functionUncurryThis;
69
- var toString$2 = toString$3;
70
- var regexpFlags = regexpFlags$1;
71
- var stickyHelpers = regexpStickyHelpers;
72
- var shared = shared$1.exports;
73
- var create = objectCreate;
74
- var getInternalState = internalState.get;
75
- var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
76
- var UNSUPPORTED_NCG = regexpUnsupportedNcg;
77
-
78
- var nativeReplace = shared('native-string-replace', String.prototype.replace);
79
- var nativeExec = RegExp.prototype.exec;
80
- var patchedExec = nativeExec;
81
- var charAt$3 = uncurryThis$4(''.charAt);
82
- var indexOf = uncurryThis$4(''.indexOf);
83
- var replace$1 = uncurryThis$4(''.replace);
84
- var stringSlice$3 = uncurryThis$4(''.slice);
85
-
86
- var UPDATES_LAST_INDEX_WRONG = (function () {
87
- var re1 = /a/;
88
- var re2 = /b*/g;
89
- call$2(nativeExec, re1, 'a');
90
- call$2(nativeExec, re2, 'a');
91
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
92
- })();
93
-
94
- var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
95
-
96
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
97
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
98
-
99
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
100
-
101
- if (PATCH) {
102
- patchedExec = function exec(string) {
103
- var re = this;
104
- var state = getInternalState(re);
105
- var str = toString$2(string);
106
- var raw = state.raw;
107
- var result, reCopy, lastIndex, match, i, object, group;
108
-
109
- if (raw) {
110
- raw.lastIndex = re.lastIndex;
111
- result = call$2(patchedExec, raw, str);
112
- re.lastIndex = raw.lastIndex;
113
- return result;
114
- }
115
-
116
- var groups = state.groups;
117
- var sticky = UNSUPPORTED_Y && re.sticky;
118
- var flags = call$2(regexpFlags, re);
119
- var source = re.source;
120
- var charsAdded = 0;
121
- var strCopy = str;
122
-
123
- if (sticky) {
124
- flags = replace$1(flags, 'y', '');
125
- if (indexOf(flags, 'g') === -1) {
126
- flags += 'g';
127
- }
128
-
129
- strCopy = stringSlice$3(str, re.lastIndex);
130
- // Support anchored sticky behavior.
131
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
132
- source = '(?: ' + source + ')';
133
- strCopy = ' ' + strCopy;
134
- charsAdded++;
135
- }
136
- // ^(? + rx + ) is needed, in combination with some str slicing, to
137
- // simulate the 'y' flag.
138
- reCopy = new RegExp('^(?:' + source + ')', flags);
139
- }
140
-
141
- if (NPCG_INCLUDED) {
142
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
143
- }
144
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
145
-
146
- match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
147
-
148
- if (sticky) {
149
- if (match) {
150
- match.input = stringSlice$3(match.input, charsAdded);
151
- match[0] = stringSlice$3(match[0], charsAdded);
152
- match.index = re.lastIndex;
153
- re.lastIndex += match[0].length;
154
- } else re.lastIndex = 0;
155
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
156
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
157
- }
158
- if (NPCG_INCLUDED && match && match.length > 1) {
159
- // Fix browsers whose `exec` methods don't consistently return `undefined`
160
- // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
161
- call$2(nativeReplace, match[0], reCopy, function () {
162
- for (i = 1; i < arguments.length - 2; i++) {
163
- if (arguments[i] === undefined) match[i] = undefined;
164
- }
165
- });
166
- }
167
-
168
- if (match && groups) {
169
- match.groups = object = create(null);
170
- for (i = 0; i < groups.length; i++) {
171
- group = groups[i];
172
- object[group[0]] = match[group[1]];
173
- }
174
- }
175
-
176
- return match;
177
- };
16
+ let TextField = class TextField extends TextField$1 {};
17
+ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "appearance", void 0);
18
+ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "shape", void 0);
19
+ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "autoComplete", void 0);
20
+ __decorate([observable, __metadata("design:type", Array)], TextField.prototype, "actionItemsSlottedContent", void 0);
21
+ TextField = __decorate([errorText, formElements], TextField);
22
+ applyMixins(TextField, AffixIcon, FormElementCharCount, FormElementHelperText, FormElementSuccessText);
23
+
24
+ const getStateClasses = ({
25
+ errorValidationMessage,
26
+ disabled,
27
+ value,
28
+ readOnly,
29
+ placeholder,
30
+ appearance,
31
+ shape,
32
+ label,
33
+ successText,
34
+ actionItemsSlottedContent
35
+ }) => classNames(['error connotation-alert', Boolean(errorValidationMessage)], ['disabled', disabled], ['has-value', Boolean(value)], ['readonly', readOnly], ['placeholder', Boolean(placeholder)], [`appearance-${appearance}`, Boolean(appearance)], [`shape-${shape}`, Boolean(shape)], ['no-label', !label], ['success connotation-success', Boolean(successText)], ['action-items', !!(actionItemsSlottedContent === null || actionItemsSlottedContent === void 0 ? void 0 : actionItemsSlottedContent.length)]);
36
+ function renderLabel() {
37
+ return html`
38
+ <label for="control" class="label">
39
+ ${x => x.label}
40
+ </label>`;
178
41
  }
179
-
180
- var regexpExec$2 = patchedExec;
181
-
182
- var $ = _export;
183
- var exec = regexpExec$2;
184
-
185
- // `RegExp.prototype.exec` method
186
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
187
- $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
188
- exec: exec
189
- });
190
-
191
- // TODO: Remove from `core-js@4` since it's moved to entry points
192
-
193
- var uncurryThis$3 = functionUncurryThisClause;
194
- var defineBuiltIn = defineBuiltIn$1;
195
- var regexpExec$1 = regexpExec$2;
196
- var fails$1 = fails$5;
197
- var wellKnownSymbol$1 = wellKnownSymbol$2;
198
- var createNonEnumerableProperty = createNonEnumerableProperty$1;
199
-
200
- var SPECIES = wellKnownSymbol$1('species');
201
- var RegExpPrototype = RegExp.prototype;
202
-
203
- var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
204
- var SYMBOL = wellKnownSymbol$1(KEY);
205
-
206
- var DELEGATES_TO_SYMBOL = !fails$1(function () {
207
- // String methods call symbol-named RegEp methods
208
- var O = {};
209
- O[SYMBOL] = function () { return 7; };
210
- return ''[KEY](O) != 7;
211
- });
212
-
213
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
214
- // Symbol-named RegExp methods call .exec
215
- var execCalled = false;
216
- var re = /a/;
217
-
218
- if (KEY === 'split') {
219
- // We can't use real regex here since it causes deoptimization
220
- // and serious performance degradation in V8
221
- // https://github.com/zloirock/core-js/issues/306
222
- re = {};
223
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
224
- // a new one. We need to return the patched regex when creating the new one.
225
- re.constructor = {};
226
- re.constructor[SPECIES] = function () { return re; };
227
- re.flags = '';
228
- re[SYMBOL] = /./[SYMBOL];
229
- }
230
-
231
- re.exec = function () { execCalled = true; return null; };
232
-
233
- re[SYMBOL]('');
234
- return !execCalled;
235
- });
236
-
237
- if (
238
- !DELEGATES_TO_SYMBOL ||
239
- !DELEGATES_TO_EXEC ||
240
- FORCED
241
- ) {
242
- var uncurriedNativeRegExpMethod = uncurryThis$3(/./[SYMBOL]);
243
- var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
244
- var uncurriedNativeMethod = uncurryThis$3(nativeMethod);
245
- var $exec = regexp.exec;
246
- if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
247
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
248
- // The native String method already delegates to @@method (this
249
- // polyfilled function), leasing to infinite recursion.
250
- // We avoid it by directly calling the native @@method method.
251
- return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
252
- }
253
- return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
254
- }
255
- return { done: false };
256
- });
257
-
258
- defineBuiltIn(String.prototype, KEY, methods[0]);
259
- defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
260
- }
261
-
262
- if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
263
- };
264
-
265
- var uncurryThis$2 = functionUncurryThis;
266
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
267
- var toString$1 = toString$3;
268
- var requireObjectCoercible$1 = requireObjectCoercible$2;
269
-
270
- var charAt$2 = uncurryThis$2(''.charAt);
271
- var charCodeAt = uncurryThis$2(''.charCodeAt);
272
- var stringSlice$2 = uncurryThis$2(''.slice);
273
-
274
- var createMethod = function (CONVERT_TO_STRING) {
275
- return function ($this, pos) {
276
- var S = toString$1(requireObjectCoercible$1($this));
277
- var position = toIntegerOrInfinity$1(pos);
278
- var size = S.length;
279
- var first, second;
280
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
281
- first = charCodeAt(S, position);
282
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
283
- || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
284
- ? CONVERT_TO_STRING
285
- ? charAt$2(S, position)
286
- : first
287
- : CONVERT_TO_STRING
288
- ? stringSlice$2(S, position, position + 2)
289
- : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
290
- };
291
- };
292
-
293
- var stringMultibyte = {
294
- // `String.prototype.codePointAt` method
295
- // https://tc39.es/ecma262/#sec-string.prototype.codepointat
296
- codeAt: createMethod(false),
297
- // `String.prototype.at` method
298
- // https://github.com/mathiasbynens/String.prototype.at
299
- charAt: createMethod(true)
300
- };
301
-
302
- var charAt$1 = stringMultibyte.charAt;
303
-
304
- // `AdvanceStringIndex` abstract operation
305
- // https://tc39.es/ecma262/#sec-advancestringindex
306
- var advanceStringIndex$1 = function (S, index, unicode) {
307
- return index + (unicode ? charAt$1(S, index).length : 1);
308
- };
309
-
310
- var uncurryThis$1 = functionUncurryThis;
311
- var toObject = toObject$1;
312
-
313
- var floor = Math.floor;
314
- var charAt = uncurryThis$1(''.charAt);
315
- var replace = uncurryThis$1(''.replace);
316
- var stringSlice$1 = uncurryThis$1(''.slice);
317
- var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
318
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
319
-
320
- // `GetSubstitution` abstract operation
321
- // https://tc39.es/ecma262/#sec-getsubstitution
322
- var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
323
- var tailPos = position + matched.length;
324
- var m = captures.length;
325
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
326
- if (namedCaptures !== undefined) {
327
- namedCaptures = toObject(namedCaptures);
328
- symbols = SUBSTITUTION_SYMBOLS;
329
- }
330
- return replace(replacement, symbols, function (match, ch) {
331
- var capture;
332
- switch (charAt(ch, 0)) {
333
- case '$': return '$';
334
- case '&': return matched;
335
- case '`': return stringSlice$1(str, 0, position);
336
- case "'": return stringSlice$1(str, tailPos);
337
- case '<':
338
- capture = namedCaptures[stringSlice$1(ch, 1, -1)];
339
- break;
340
- default: // \d\d?
341
- var n = +ch;
342
- if (n === 0) return match;
343
- if (n > m) {
344
- var f = floor(n / 10);
345
- if (f === 0) return match;
346
- if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
347
- return match;
348
- }
349
- capture = captures[n - 1];
350
- }
351
- return capture === undefined ? '' : capture;
352
- });
353
- };
354
-
355
- var call$1 = functionCall;
356
- var anObject$1 = anObject$2;
357
- var isCallable$1 = isCallable$2;
358
- var classof = classofRaw;
359
- var regexpExec = regexpExec$2;
360
-
361
- var $TypeError = TypeError;
362
-
363
- // `RegExpExec` abstract operation
364
- // https://tc39.es/ecma262/#sec-regexpexec
365
- var regexpExecAbstract = function (R, S) {
366
- var exec = R.exec;
367
- if (isCallable$1(exec)) {
368
- var result = call$1(exec, R, S);
369
- if (result !== null) anObject$1(result);
370
- return result;
371
- }
372
- if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
373
- throw $TypeError('RegExp#exec called on incompatible receiver');
374
- };
375
-
376
- var apply = functionApply;
377
- var call = functionCall;
378
- var uncurryThis = functionUncurryThis;
379
- var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
380
- var fails = fails$5;
381
- var anObject = anObject$2;
382
- var isCallable = isCallable$2;
383
- var isNullOrUndefined = isNullOrUndefined$1;
384
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
385
- var toLength = toLength$1;
386
- var toString = toString$3;
387
- var requireObjectCoercible = requireObjectCoercible$2;
388
- var advanceStringIndex = advanceStringIndex$1;
389
- var getMethod = getMethod$1;
390
- var getSubstitution = getSubstitution$1;
391
- var regExpExec = regexpExecAbstract;
392
- var wellKnownSymbol = wellKnownSymbol$2;
393
-
394
- var REPLACE = wellKnownSymbol('replace');
395
- var max = Math.max;
396
- var min = Math.min;
397
- var concat = uncurryThis([].concat);
398
- var push = uncurryThis([].push);
399
- var stringIndexOf = uncurryThis(''.indexOf);
400
- var stringSlice = uncurryThis(''.slice);
401
-
402
- var maybeToString = function (it) {
403
- return it === undefined ? it : String(it);
404
- };
405
-
406
- // IE <= 11 replaces $0 with the whole match, as if it was $&
407
- // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
408
- var REPLACE_KEEPS_$0 = (function () {
409
- // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
410
- return 'a'.replace(/./, '$0') === '$0';
411
- })();
412
-
413
- // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
414
- var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
415
- if (/./[REPLACE]) {
416
- return /./[REPLACE]('a', '$0') === '';
417
- }
418
- return false;
419
- })();
420
-
421
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
422
- var re = /./;
423
- re.exec = function () {
424
- var result = [];
425
- result.groups = { a: '7' };
426
- return result;
427
- };
428
- // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
429
- return ''.replace(re, '$<a>') !== '7';
430
- });
431
-
432
- // @@replace logic
433
- fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
434
- var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
435
-
436
- return [
437
- // `String.prototype.replace` method
438
- // https://tc39.es/ecma262/#sec-string.prototype.replace
439
- function replace(searchValue, replaceValue) {
440
- var O = requireObjectCoercible(this);
441
- var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
442
- return replacer
443
- ? call(replacer, searchValue, O, replaceValue)
444
- : call(nativeReplace, toString(O), searchValue, replaceValue);
445
- },
446
- // `RegExp.prototype[@@replace]` method
447
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
448
- function (string, replaceValue) {
449
- var rx = anObject(this);
450
- var S = toString(string);
451
-
452
- if (
453
- typeof replaceValue == 'string' &&
454
- stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
455
- stringIndexOf(replaceValue, '$<') === -1
456
- ) {
457
- var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
458
- if (res.done) return res.value;
459
- }
460
-
461
- var functionalReplace = isCallable(replaceValue);
462
- if (!functionalReplace) replaceValue = toString(replaceValue);
463
-
464
- var global = rx.global;
465
- if (global) {
466
- var fullUnicode = rx.unicode;
467
- rx.lastIndex = 0;
468
- }
469
- var results = [];
470
- while (true) {
471
- var result = regExpExec(rx, S);
472
- if (result === null) break;
473
-
474
- push(results, result);
475
- if (!global) break;
476
-
477
- var matchStr = toString(result[0]);
478
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
479
- }
480
-
481
- var accumulatedResult = '';
482
- var nextSourcePosition = 0;
483
- for (var i = 0; i < results.length; i++) {
484
- result = results[i];
485
-
486
- var matched = toString(result[0]);
487
- var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
488
- var captures = [];
489
- // NOTE: This is equivalent to
490
- // captures = result.slice(1).map(maybeToString)
491
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
492
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
493
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
494
- for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
495
- var namedCaptures = result.groups;
496
- if (functionalReplace) {
497
- var replacerArgs = concat([matched], captures, position, S);
498
- if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
499
- var replacement = toString(apply(replaceValue, undefined, replacerArgs));
500
- } else {
501
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
502
- }
503
- if (position >= nextSourcePosition) {
504
- accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
505
- nextSourcePosition = position + matched.length;
506
- }
507
- }
508
- return accumulatedResult + stringSlice(S, nextSourcePosition);
509
- }
510
- ];
511
- }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
512
-
513
- var _Toggletip_instances, _Toggletip_observer, _Toggletip_anchorEl, _Toggletip_observeMissingAnchor, _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX, _Toggletip_setupAnchor, _Toggletip_cleanupAnchor, _Toggletip_openIfClosed, _Toggletip_closeOnClickOutside, _Toggletip_closeOnEscape;
514
- class Toggletip extends FoundationElement {
515
- constructor() {
516
- super(...arguments);
517
- _Toggletip_instances.add(this);
518
- _Toggletip_observer.set(this, void 0);
519
- _Toggletip_anchorEl.set(this, null);
520
- _Toggletip_observeMissingAnchor.set(this, anchorId => {
521
- __classPrivateFieldSet(this, _Toggletip_observer, new MutationObserver(() => {
522
- const anchor = document.getElementById(anchorId);
523
- if (anchor) {
524
- __classPrivateFieldSet(this, _Toggletip_anchorEl, anchor, "f");
525
- __classPrivateFieldGet(this, _Toggletip_instances, "m", _Toggletip_setupAnchor).call(this, __classPrivateFieldGet(this, _Toggletip_anchorEl, "f"));
526
- __classPrivateFieldGet(this, _Toggletip_observer, "f").disconnect();
527
- __classPrivateFieldSet(this, _Toggletip_observer, undefined, "f");
528
- }
529
- }), "f");
530
- __classPrivateFieldGet(this, _Toggletip_observer, "f").observe(document.body, {
531
- childList: true,
532
- subtree: true
533
- });
534
- });
535
- _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX.set(this, ' ; Show more information');
536
- this.alternate = false;
537
- this.placement = 'right';
538
- this.anchor = '';
539
- this.open = false;
540
- _Toggletip_openIfClosed.set(this, () => {
541
- if (!this.open) DOM.queueUpdate(() => this.open = true);
542
- });
543
- _Toggletip_closeOnClickOutside.set(this, e => {
544
- if (!this.contains(e.target)) this.open = false;
545
- });
546
- _Toggletip_closeOnEscape.set(this, e => {
547
- if (e.key === 'Escape') this.open = false;
548
- });
549
- }
550
- anchorChanged(_, newValue) {
551
- var _a;
552
- if (__classPrivateFieldGet(this, _Toggletip_anchorEl, "f")) __classPrivateFieldGet(this, _Toggletip_instances, "m", _Toggletip_cleanupAnchor).call(this, __classPrivateFieldGet(this, _Toggletip_anchorEl, "f"));
553
- (_a = __classPrivateFieldGet(this, _Toggletip_observer, "f")) === null || _a === void 0 ? void 0 : _a.disconnect();
554
- __classPrivateFieldSet(this, _Toggletip_anchorEl, newValue instanceof HTMLElement ? newValue : document.getElementById(newValue), "f");
555
- if (__classPrivateFieldGet(this, _Toggletip_anchorEl, "f")) {
556
- __classPrivateFieldGet(this, _Toggletip_instances, "m", _Toggletip_setupAnchor).call(this, __classPrivateFieldGet(this, _Toggletip_anchorEl, "f"));
557
- } else {
558
- __classPrivateFieldGet(this, _Toggletip_observeMissingAnchor, "f").call(this, newValue);
559
- }
560
- }
561
- openChanged(oldValue, newValue) {
562
- if (oldValue === undefined) return;
563
- if (newValue) {
564
- document.addEventListener('click', __classPrivateFieldGet(this, _Toggletip_closeOnClickOutside, "f"));
565
- document.addEventListener('keydown', __classPrivateFieldGet(this, _Toggletip_closeOnEscape, "f"));
566
- this.setAttribute('role', 'status');
567
- } else {
568
- document.removeEventListener('click', __classPrivateFieldGet(this, _Toggletip_closeOnClickOutside, "f"));
569
- document.removeEventListener('keydown', __classPrivateFieldGet(this, _Toggletip_closeOnEscape, "f"));
570
- this.removeAttribute('role');
571
- }
572
- if (__classPrivateFieldGet(this, _Toggletip_anchorEl, "f")) {
573
- __classPrivateFieldGet(this, _Toggletip_anchorEl, "f").ariaExpanded = this.open.toString();
574
- }
575
- }
576
- disconnectedCallback() {
577
- var _a;
578
- super.disconnectedCallback();
579
- if (__classPrivateFieldGet(this, _Toggletip_anchorEl, "f")) __classPrivateFieldGet(this, _Toggletip_instances, "m", _Toggletip_cleanupAnchor).call(this, __classPrivateFieldGet(this, _Toggletip_anchorEl, "f"));
580
- (_a = __classPrivateFieldGet(this, _Toggletip_observer, "f")) === null || _a === void 0 ? void 0 : _a.disconnect();
581
- document.removeEventListener('keydown', __classPrivateFieldGet(this, _Toggletip_closeOnEscape, "f"));
582
- }
42
+ function renderCharCount() {
43
+ return html`
44
+ <span class="char-count">${x => x.value ? x.value.length : 0} / ${x => x.maxlength}</span>
45
+ `;
583
46
  }
584
- _Toggletip_observer = new WeakMap(), _Toggletip_anchorEl = new WeakMap(), _Toggletip_observeMissingAnchor = new WeakMap(), _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX = new WeakMap(), _Toggletip_openIfClosed = new WeakMap(), _Toggletip_closeOnClickOutside = new WeakMap(), _Toggletip_closeOnEscape = new WeakMap(), _Toggletip_instances = new WeakSet(), _Toggletip_setupAnchor = function _Toggletip_setupAnchor(a) {
585
- var _a;
586
- a.addEventListener('click', __classPrivateFieldGet(this, _Toggletip_openIfClosed, "f"), true);
587
- a.ariaLabel = ((_a = a.ariaLabel) !== null && _a !== void 0 ? _a : '') + __classPrivateFieldGet(this, _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX, "f");
588
- }, _Toggletip_cleanupAnchor = function _Toggletip_cleanupAnchor(a) {
589
- a.removeEventListener('click', __classPrivateFieldGet(this, _Toggletip_openIfClosed, "f"), true);
590
- if (a.ariaLabel) a.ariaLabel = a.ariaLabel.replace(__classPrivateFieldGet(this, _Toggletip_ANCHOR_ARIA_LABEL_SUFFIX, "f"), '');
591
- };
592
- __decorate([attr, __metadata("design:type", String)], Toggletip.prototype, "headline", void 0);
593
- __decorate([attr({
594
- mode: 'boolean'
595
- }), __metadata("design:type", Object)], Toggletip.prototype, "alternate", void 0);
596
- __decorate([attr({
597
- mode: 'fromView'
598
- }), __metadata("design:type", String)], Toggletip.prototype, "placement", void 0);
599
- __decorate([attr({
600
- mode: 'fromView'
601
- }), __metadata("design:type", Object)], Toggletip.prototype, "anchor", void 0);
602
- __decorate([attr({
603
- mode: 'boolean'
604
- }), __metadata("design:type", Object)], Toggletip.prototype, "open", void 0);
605
-
606
- let _2 = t => t,
607
- _t,
608
- _t2;
609
- const getClasses = _ => classNames('control');
610
- const ToggletipTemplate = context => {
611
- const popup = context.tagFor(Popup);
612
- return html(_t || (_t = _2`
613
- <${0}
614
- class="${0}"
615
- arrow
616
- :anchor="${0}"
617
- :open="${0}"
618
- ?alternate="${0}"
619
- placement="${0}"
620
- exportparts="vvd-theme-alternate"
621
- >
622
- <div class="content-wrapper">
623
- ${0}
624
- <slot></slot>
625
- <footer class="action-items"><slot name="action-items"></slot></footer>
47
+ const TextfieldTemplate = context => {
48
+ const affixIconTemplate = affixIconTemplateFactory(context);
49
+ const focusTemplate = focusTemplateFactory(context);
50
+ return html`
51
+ <div class="base ${getStateClasses}">
52
+ ${when(x => x.charCount && x.maxlength, renderCharCount())}
53
+ ${when(x => x.label, renderLabel())}
54
+ <div class="fieldset">
55
+ ${x => affixIconTemplate(x.icon)}
56
+ <div class="wrapper">
57
+ <input class="control"
58
+ id="control"
59
+ @input="${x => x.handleTextInput()}"
60
+ @change="${x => x.handleChange()}"
61
+ ?autofocus="${x => x.autofocus}"
62
+ ?disabled="${x => x.disabled}"
63
+ list="${x => x.list}"
64
+ maxlength="${x => x.maxlength}"
65
+ minlength="${x => x.minlength}"
66
+ pattern="${x => x.pattern}"
67
+ placeholder="${x => x.placeholder}"
68
+ ?readonly="${x => x.readOnly}"
69
+ ?required="${x => x.required}"
70
+ size="${x => x.size}"
71
+ autocomplete="${x => x.autoComplete}"
72
+ name="${x => x.name}"
73
+ ?spellcheck="${x => x.spellcheck}"
74
+ :value="${x => x.value}"
75
+ type="${x => x.type}"
76
+ aria-atomic="${x => x.ariaAtomic}"
77
+ aria-busy="${x => x.ariaBusy}"
78
+ aria-controls="${x => x.ariaControls}"
79
+ aria-current="${x => x.ariaCurrent}"
80
+ aria-describedby="${x => x.ariaDescribedby}"
81
+ aria-details="${x => x.ariaDetails}"
82
+ aria-disabled="${x => x.ariaDisabled}"
83
+ aria-errormessage="${x => x.ariaErrormessage}"
84
+ aria-flowto="${x => x.ariaFlowto}"
85
+ aria-haspopup="${x => x.ariaHaspopup}"
86
+ aria-hidden="${x => x.ariaHidden}"
87
+ aria-invalid="${x => x.ariaInvalid}"
88
+ aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
89
+ aria-label="${x => x.ariaLabel}"
90
+ aria-labelledby="${x => x.ariaLabelledby}"
91
+ aria-live="${x => x.ariaLive}"
92
+ aria-owns="${x => x.ariaOwns}"
93
+ aria-relevant="${x => x.ariaRelevant}"
94
+ aria-roledescription="${x => x.ariaRoledescription}"
95
+ ${ref('control')}
96
+ />
97
+ ${() => focusTemplate}
98
+ </div>
99
+ <div class="action-items-wrapper">
100
+ <slot name="action-items" ${slotted('actionItemsSlottedContent')}></slot>
626
101
  </div>
627
- </${0}>
628
- `), popup, getClasses, x => x.anchor, x => x.open, x => !x.alternate, x => x.placement, when(x => x.headline, html(_t2 || (_t2 = _2`<header class="headline">${0}</header>`), x => x.headline)), popup);
102
+
103
+ </div>
104
+ ${when(x => {
105
+ var _a;
106
+ return !x.successText && !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
107
+ }, getFeedbackTemplate('helper', context))}
108
+ ${when(x => !x.successText && x.errorValidationMessage, getFeedbackTemplate('error', context))}
109
+ ${when(x => x.successText, getFeedbackTemplate('success', context))}
110
+ </div>`;
629
111
  };
630
112
 
631
- const toggletipDefinition = Toggletip.compose({
632
- baseName: 'toggletip',
633
- template: ToggletipTemplate,
634
- styles: css_248z
113
+ const textFieldDefinition = TextField.compose({
114
+ baseName: 'text-field',
115
+ template: TextfieldTemplate,
116
+ styles: css_248z,
117
+ shadowOptions: {
118
+ delegatesFocus: true
119
+ }
635
120
  });
636
- const toggletipRegistries = [toggletipDefinition(), ...popupRegistries];
637
- const registerToggletip = registerFactory(toggletipRegistries);
121
+ const textFieldRegistries = [textFieldDefinition(), ...iconRegistries, ...focusRegistries];
122
+ const registerTextField = registerFactory(textFieldRegistries);
638
123
 
639
- export { toggletipRegistries as a, registerToggletip as r, toggletipDefinition as t };
124
+ export { textFieldRegistries as a, registerTextField as r, textFieldDefinition as t };