@xplortech/apollo-core 1.0.0-beta.8 → 2.4.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 (528) hide show
  1. package/.typings/apollo-components.html-data.json +4396 -0
  2. package/README.md +57 -25
  3. package/build/style.css +4374 -3359
  4. package/dist/apollo-core/apollo-core.css +50 -24
  5. package/dist/apollo-core/apollo-core.esm.js +1 -1
  6. package/dist/apollo-core/p-0ac33b3a.entry.js +1 -0
  7. package/dist/apollo-core/p-23ef2717.entry.js +6 -0
  8. package/dist/apollo-core/p-31461db7.entry.js +1 -0
  9. package/dist/apollo-core/p-3b5f8989.entry.js +1 -0
  10. package/dist/apollo-core/p-4fab8172.entry.js +1 -0
  11. package/dist/apollo-core/p-576ce90f.entry.js +1 -0
  12. package/dist/apollo-core/p-5ec45742.entry.js +1 -0
  13. package/dist/apollo-core/p-7b7db57a.entry.js +1 -0
  14. package/dist/apollo-core/p-7f8e5cd0.entry.js +1 -0
  15. package/dist/apollo-core/p-812bb0e4.entry.js +1 -0
  16. package/dist/apollo-core/p-845eef0d.entry.js +1 -0
  17. package/dist/apollo-core/p-8c1f73ea.entry.js +1 -0
  18. package/dist/apollo-core/p-94209785.entry.js +1 -0
  19. package/dist/apollo-core/p-9853028c.entry.js +1 -0
  20. package/dist/apollo-core/p-9d65ece7.entry.js +1 -0
  21. package/dist/apollo-core/p-CH4yJ6Qx.js +1 -0
  22. package/dist/apollo-core/p-Cqlsd6nf.js +1 -0
  23. package/dist/apollo-core/p-DQuL1Twl.js +1 -0
  24. package/dist/apollo-core/p-DhZas3eX.js +2 -0
  25. package/dist/apollo-core/p-b1f4604d.entry.js +1 -0
  26. package/dist/apollo-core/p-be292555.entry.js +1 -0
  27. package/dist/cjs/apollo-core.cjs.js +15 -13
  28. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  29. package/dist/{esm/xpl-input.entry.js → cjs/index-BvmWjxWc.js} +2 -94
  30. package/dist/cjs/index-D__N_vw2.js +2160 -0
  31. package/dist/cjs/loader.cjs.js +6 -15
  32. package/dist/cjs/{v4-14140ff3.js → v4-D4KzFnn8.js} +1 -11
  33. package/dist/cjs/xpl-accordion.cjs.entry.js +73 -0
  34. package/dist/cjs/xpl-application-shell.cjs.entry.js +41 -46
  35. package/dist/cjs/xpl-avatar_41.cjs.entry.js +5521 -0
  36. package/dist/cjs/xpl-button-row.cjs.entry.js +13 -18
  37. package/dist/cjs/xpl-calendar.cjs.entry.js +66 -0
  38. package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +33 -0
  39. package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +37 -0
  40. package/dist/cjs/xpl-dynamic-table.cjs.entry.js +64 -0
  41. package/dist/cjs/xpl-grid-item.cjs.entry.js +16 -18
  42. package/dist/cjs/xpl-grid.cjs.entry.js +29 -28
  43. package/dist/cjs/xpl-large-card.cjs.entry.js +27 -0
  44. package/dist/cjs/xpl-list.cjs.entry.js +23 -30
  45. package/dist/cjs/xpl-main-nav.cjs.entry.js +18 -20
  46. package/dist/cjs/xpl-table-header-cell.cjs.entry.js +57 -0
  47. package/dist/cjs/xpl-table-header.cjs.entry.js +14 -0
  48. package/dist/cjs/xpl-toggle.cjs.entry.js +22 -30
  49. package/dist/cjs/xpl-toolbar.cjs.entry.js +28 -0
  50. package/dist/collection/collection-manifest.json +59 -32
  51. package/dist/collection/components/xpl-accordion/accordion.stories.js +76 -0
  52. package/dist/collection/components/xpl-accordion/xpl-accordion.js +236 -0
  53. package/dist/collection/components/xpl-application-shell/application-shell.stories.js +733 -0
  54. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +163 -158
  55. package/dist/collection/components/xpl-avatar/avatar.stories.js +128 -0
  56. package/dist/collection/components/xpl-avatar/xpl-avatar.js +171 -162
  57. package/dist/collection/components/xpl-backdrop/backdrop.stories.js +20 -0
  58. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +39 -37
  59. package/dist/collection/components/xpl-badge/badge.stories.js +48 -0
  60. package/dist/collection/components/xpl-badge/xpl-badge.js +52 -52
  61. package/dist/collection/components/xpl-breadcrumbs/breadcrumbs.stories.js +130 -0
  62. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +8 -12
  63. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +5 -8
  64. package/dist/collection/components/xpl-button/button.stories.js +133 -0
  65. package/dist/collection/components/xpl-button/xpl-button.js +272 -245
  66. package/dist/collection/components/xpl-button-row/button-row.stories.js +69 -0
  67. package/dist/collection/components/xpl-button-row/xpl-button-row.js +119 -116
  68. package/dist/collection/components/xpl-calendar/calendar.stories.js +59 -0
  69. package/dist/collection/components/xpl-calendar/xpl-calendar.js +224 -0
  70. package/dist/collection/components/xpl-checkbox/checkbox.stories.js +79 -0
  71. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +226 -193
  72. package/dist/collection/components/xpl-choicelist/choicelist.stories.js +134 -0
  73. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +220 -154
  74. package/dist/collection/components/xpl-content-area/content-area.stories.js +55 -0
  75. package/dist/collection/components/xpl-content-area/xpl-content-area.js +35 -33
  76. package/dist/collection/components/xpl-dashboard/dashboard.stories.js +48 -0
  77. package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +7 -0
  78. package/dist/collection/components/xpl-data-card/data-card.stories.js +111 -0
  79. package/dist/collection/components/xpl-data-card/xpl-data-card.js +316 -0
  80. package/dist/collection/components/xpl-divider/divider.stories.js +32 -0
  81. package/dist/collection/components/xpl-divider/xpl-divider.js +30 -31
  82. package/dist/collection/components/xpl-dropdown/dropdown.stories.js +383 -0
  83. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +68 -66
  84. package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +28 -29
  85. package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +148 -114
  86. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +438 -256
  87. package/dist/collection/components/xpl-dynamic-table/dynamic-table.stories.js +161 -0
  88. package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +97 -0
  89. package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +52 -0
  90. package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +81 -0
  91. package/dist/{stories → collection/components/xpl-grid}/grid.stories.js +44 -68
  92. package/dist/collection/components/xpl-grid/xpl-grid.js +27 -24
  93. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +100 -92
  94. package/dist/collection/components/xpl-header-accordion/header-accordion.stories.js +48 -0
  95. package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +200 -0
  96. package/dist/collection/components/xpl-icon/icons.stories.js +107 -0
  97. package/dist/collection/components/xpl-icon/xpl-icon.css +5 -0
  98. package/dist/collection/components/xpl-icon/xpl-icon.js +101 -0
  99. package/dist/collection/components/xpl-input/input.stories.js +531 -0
  100. package/dist/collection/components/xpl-input/xpl-input-color/color-utils.js +167 -0
  101. package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +387 -0
  102. package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +377 -0
  103. package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +276 -0
  104. package/dist/collection/components/xpl-input/xpl-input-time/time-utils.js +63 -0
  105. package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +425 -0
  106. package/dist/collection/components/xpl-input/xpl-input.js +729 -460
  107. package/dist/collection/components/xpl-large-card/large-card.stories.js +127 -0
  108. package/dist/collection/components/xpl-large-card/xpl-large-card.js +81 -0
  109. package/dist/collection/components/xpl-list/list.stories.js +148 -0
  110. package/dist/collection/components/xpl-list/xpl-list.js +51 -53
  111. package/dist/collection/components/xpl-main-nav/main-nav.stories.js +307 -0
  112. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +65 -63
  113. package/dist/collection/components/xpl-modal/modal.stories.js +87 -0
  114. package/dist/collection/components/xpl-modal/xpl-modal.js +139 -0
  115. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +63 -61
  116. package/dist/collection/components/xpl-pagination/pagination.stories.js +35 -0
  117. package/dist/collection/components/xpl-pagination/xpl-pagination.js +217 -172
  118. package/dist/collection/components/xpl-popover/popover.stories.js +164 -0
  119. package/dist/collection/components/xpl-popover/xpl-popover.js +346 -0
  120. package/dist/collection/components/xpl-progress/progress.stories.js +102 -0
  121. package/dist/collection/components/xpl-progress/xpl-progress.js +60 -0
  122. package/dist/collection/components/xpl-radio/radio.stories.js +91 -0
  123. package/dist/collection/components/xpl-radio/xpl-radio.js +188 -175
  124. package/dist/collection/components/xpl-secondary-nav/secondary-nav.stories.js +78 -0
  125. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +5 -5
  126. package/dist/collection/components/xpl-select/select.stories.js +293 -0
  127. package/dist/collection/components/xpl-select/xpl-select.js +660 -308
  128. package/dist/collection/components/xpl-skeleton/skeleton.stories.js +67 -0
  129. package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +175 -0
  130. package/dist/collection/components/xpl-slideout/slideout.stories.js +103 -0
  131. package/dist/collection/components/xpl-slideout/xpl-slideout.js +150 -0
  132. package/dist/collection/components/xpl-tab/xpl-tab.js +77 -0
  133. package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +56 -0
  134. package/dist/collection/components/xpl-table/table.stories.js +143 -0
  135. package/dist/collection/components/xpl-table/xpl-table.js +379 -214
  136. package/dist/collection/components/xpl-table-header/table-header.stories.js +122 -0
  137. package/dist/collection/components/xpl-table-header/xpl-table-header.js +7 -0
  138. package/dist/collection/components/xpl-table-header-cell/table-header-cell.stories.js +71 -0
  139. package/dist/collection/components/xpl-table-header-cell/xpl-table-header-cell.js +198 -0
  140. package/dist/collection/components/xpl-tabs/tabs.stories.js +77 -0
  141. package/dist/collection/components/xpl-tabs/xpl-tabs.js +206 -0
  142. package/dist/collection/components/xpl-tag/xpl-tag.js +27 -27
  143. package/dist/collection/components/xpl-toast/toast.stories.js +82 -0
  144. package/dist/collection/components/xpl-toast/xpl-toast.js +162 -0
  145. package/dist/collection/components/xpl-toggle/toggle.stories.js +84 -0
  146. package/dist/collection/components/xpl-toggle/xpl-toggle.js +165 -157
  147. package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +56 -0
  148. package/dist/collection/components/xpl-tooltip/tooltip-arrow.js +2 -0
  149. package/dist/collection/components/xpl-tooltip/tooltip.stories.js +85 -0
  150. package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +75 -0
  151. package/dist/collection/components/xpl-utility-bar/utility-bar.stories.js +87 -0
  152. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +89 -93
  153. package/dist/components/_commonjsHelpers.js +1 -0
  154. package/dist/components/index.d.ts +45 -0
  155. package/dist/components/index.js +1 -0
  156. package/dist/components/index2.js +1 -0
  157. package/dist/components/index3.js +1 -0
  158. package/dist/components/v4.js +1 -0
  159. package/dist/components/xpl-accordion.d.ts +11 -0
  160. package/dist/components/xpl-accordion.js +1 -0
  161. package/dist/components/xpl-application-shell.d.ts +11 -0
  162. package/dist/components/xpl-application-shell.js +1 -0
  163. package/dist/components/xpl-avatar.d.ts +11 -0
  164. package/dist/components/xpl-avatar.js +1 -0
  165. package/dist/components/xpl-avatar2.js +1 -0
  166. package/dist/components/xpl-backdrop.d.ts +11 -0
  167. package/dist/components/xpl-backdrop.js +1 -0
  168. package/dist/components/xpl-backdrop2.js +1 -0
  169. package/dist/components/xpl-badge.d.ts +11 -0
  170. package/dist/components/xpl-badge.js +1 -0
  171. package/dist/components/xpl-badge2.js +1 -0
  172. package/dist/components/xpl-breadcrumb-item.d.ts +11 -0
  173. package/dist/components/xpl-breadcrumb-item.js +1 -0
  174. package/dist/components/xpl-breadcrumbs.d.ts +11 -0
  175. package/dist/components/xpl-breadcrumbs.js +1 -0
  176. package/dist/components/xpl-button-row.d.ts +11 -0
  177. package/dist/components/xpl-button-row.js +1 -0
  178. package/dist/components/xpl-button.d.ts +11 -0
  179. package/dist/components/xpl-button.js +1 -0
  180. package/dist/components/xpl-button2.js +1 -0
  181. package/dist/components/xpl-calendar.d.ts +11 -0
  182. package/dist/components/xpl-calendar.js +1 -0
  183. package/dist/components/xpl-checkbox.d.ts +11 -0
  184. package/dist/components/xpl-checkbox.js +1 -0
  185. package/dist/components/xpl-checkbox2.js +1 -0
  186. package/dist/components/xpl-choicelist.d.ts +11 -0
  187. package/dist/components/xpl-choicelist.js +1 -0
  188. package/dist/components/xpl-content-area.d.ts +11 -0
  189. package/dist/components/xpl-content-area.js +1 -0
  190. package/dist/components/xpl-dashboard.d.ts +11 -0
  191. package/dist/components/xpl-dashboard.js +1 -0
  192. package/dist/components/xpl-data-card.d.ts +11 -0
  193. package/dist/components/xpl-data-card.js +1 -0
  194. package/dist/components/xpl-divider.d.ts +11 -0
  195. package/dist/components/xpl-divider.js +1 -0
  196. package/dist/components/xpl-divider2.js +1 -0
  197. package/dist/components/xpl-dropdown-group.d.ts +11 -0
  198. package/dist/components/xpl-dropdown-group.js +1 -0
  199. package/dist/components/xpl-dropdown-group2.js +1 -0
  200. package/dist/components/xpl-dropdown-heading.d.ts +11 -0
  201. package/dist/components/xpl-dropdown-heading.js +1 -0
  202. package/dist/components/xpl-dropdown-heading2.js +1 -0
  203. package/dist/components/xpl-dropdown-option.d.ts +11 -0
  204. package/dist/components/xpl-dropdown-option.js +1 -0
  205. package/dist/components/xpl-dropdown-option2.js +1 -0
  206. package/dist/components/xpl-dropdown.d.ts +11 -0
  207. package/dist/components/xpl-dropdown.js +1 -0
  208. package/dist/components/xpl-dropdown2.js +1 -0
  209. package/dist/components/xpl-dynamic-table-cell.d.ts +11 -0
  210. package/dist/components/xpl-dynamic-table-cell.js +1 -0
  211. package/dist/components/xpl-dynamic-table-row.d.ts +11 -0
  212. package/dist/components/xpl-dynamic-table-row.js +1 -0
  213. package/dist/components/xpl-dynamic-table.d.ts +11 -0
  214. package/dist/components/xpl-dynamic-table.js +1 -0
  215. package/dist/components/xpl-grid-item.d.ts +11 -0
  216. package/dist/components/xpl-grid-item.js +1 -0
  217. package/dist/components/xpl-grid.d.ts +11 -0
  218. package/dist/components/xpl-grid.js +1 -0
  219. package/dist/components/xpl-header-accordion.d.ts +11 -0
  220. package/dist/components/xpl-header-accordion.js +1 -0
  221. package/dist/components/xpl-icon.d.ts +11 -0
  222. package/dist/components/xpl-icon.js +1 -0
  223. package/dist/components/xpl-icon2.js +6 -0
  224. package/dist/components/xpl-input-color.d.ts +11 -0
  225. package/dist/components/xpl-input-color.js +1 -0
  226. package/dist/components/xpl-input-date.d.ts +11 -0
  227. package/dist/components/xpl-input-date.js +1 -0
  228. package/dist/components/xpl-input-date2.js +1 -0
  229. package/dist/components/xpl-input-file.d.ts +11 -0
  230. package/dist/components/xpl-input-file.js +1 -0
  231. package/dist/components/xpl-input-file2.js +1 -0
  232. package/dist/components/xpl-input-time.d.ts +11 -0
  233. package/dist/components/xpl-input-time.js +1 -0
  234. package/dist/components/xpl-input.d.ts +11 -0
  235. package/dist/components/xpl-input.js +1 -0
  236. package/dist/components/xpl-input2.js +1 -0
  237. package/dist/components/xpl-large-card.d.ts +11 -0
  238. package/dist/components/xpl-large-card.js +1 -0
  239. package/dist/components/xpl-list.d.ts +11 -0
  240. package/dist/components/xpl-list.js +1 -0
  241. package/dist/components/xpl-main-nav.d.ts +11 -0
  242. package/dist/components/xpl-main-nav.js +1 -0
  243. package/dist/components/xpl-modal.d.ts +11 -0
  244. package/dist/components/xpl-modal.js +1 -0
  245. package/dist/components/xpl-nav-item.d.ts +11 -0
  246. package/dist/components/xpl-nav-item.js +1 -0
  247. package/dist/components/xpl-pagination.d.ts +11 -0
  248. package/dist/components/xpl-pagination.js +1 -0
  249. package/dist/components/xpl-popover.d.ts +11 -0
  250. package/dist/components/xpl-popover.js +1 -0
  251. package/dist/components/xpl-popover2.js +1 -0
  252. package/dist/components/xpl-progress.d.ts +11 -0
  253. package/dist/components/xpl-progress.js +1 -0
  254. package/dist/components/xpl-radio.d.ts +11 -0
  255. package/dist/components/xpl-radio.js +1 -0
  256. package/dist/components/xpl-radio2.js +1 -0
  257. package/dist/components/xpl-secondary-nav.d.ts +11 -0
  258. package/dist/components/xpl-secondary-nav.js +1 -0
  259. package/dist/components/xpl-select.d.ts +11 -0
  260. package/dist/components/xpl-select.js +1 -0
  261. package/dist/components/xpl-select2.js +1 -0
  262. package/dist/components/xpl-skeleton.d.ts +11 -0
  263. package/dist/components/xpl-skeleton.js +1 -0
  264. package/dist/components/xpl-slideout.d.ts +11 -0
  265. package/dist/components/xpl-slideout.js +1 -0
  266. package/dist/components/xpl-tab-panel.d.ts +11 -0
  267. package/dist/components/xpl-tab-panel.js +1 -0
  268. package/dist/components/xpl-tab.d.ts +11 -0
  269. package/dist/components/xpl-tab.js +1 -0
  270. package/dist/components/xpl-table-header-cell.d.ts +11 -0
  271. package/dist/components/xpl-table-header-cell.js +1 -0
  272. package/dist/components/xpl-table-header.d.ts +11 -0
  273. package/dist/components/xpl-table-header.js +1 -0
  274. package/dist/components/xpl-table.d.ts +11 -0
  275. package/dist/components/xpl-table.js +1 -0
  276. package/dist/components/xpl-tabs.d.ts +11 -0
  277. package/dist/components/xpl-tabs.js +1 -0
  278. package/dist/components/xpl-tag.d.ts +11 -0
  279. package/dist/components/xpl-tag.js +1 -0
  280. package/dist/components/xpl-tag2.js +1 -0
  281. package/dist/components/xpl-toast.d.ts +11 -0
  282. package/dist/components/xpl-toast.js +1 -0
  283. package/dist/components/xpl-toggle.d.ts +11 -0
  284. package/dist/components/xpl-toggle.js +1 -0
  285. package/dist/components/xpl-toolbar.d.ts +11 -0
  286. package/dist/components/xpl-toolbar.js +1 -0
  287. package/dist/components/xpl-tooltip.d.ts +11 -0
  288. package/dist/components/xpl-tooltip.js +1 -0
  289. package/dist/components/xpl-tooltip2.js +1 -0
  290. package/dist/components/xpl-utility-bar.d.ts +11 -0
  291. package/dist/components/xpl-utility-bar.js +1 -0
  292. package/dist/css/typography.stories.js +144 -0
  293. package/dist/esm/apollo-core.js +15 -12
  294. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  295. package/dist/{cjs/xpl-input.cjs.entry.js → esm/index-CH4yJ6Qx.js} +1 -99
  296. package/dist/esm/index-DhZas3eX.js +2132 -0
  297. package/dist/esm/loader.js +7 -14
  298. package/dist/esm/{v4-929670b7.js → v4-Cqlsd6nf.js} +1 -11
  299. package/dist/esm/xpl-accordion.entry.js +71 -0
  300. package/dist/esm/xpl-application-shell.entry.js +41 -44
  301. package/dist/esm/xpl-avatar_41.entry.js +5479 -0
  302. package/dist/esm/xpl-button-row.entry.js +13 -16
  303. package/dist/esm/xpl-calendar.entry.js +64 -0
  304. package/dist/esm/xpl-dynamic-table-cell.entry.js +31 -0
  305. package/dist/esm/xpl-dynamic-table-row.entry.js +35 -0
  306. package/dist/esm/xpl-dynamic-table.entry.js +62 -0
  307. package/dist/esm/xpl-grid-item.entry.js +16 -16
  308. package/dist/esm/xpl-grid.entry.js +29 -26
  309. package/dist/esm/xpl-large-card.entry.js +25 -0
  310. package/dist/esm/xpl-list.entry.js +23 -28
  311. package/dist/esm/xpl-main-nav.entry.js +18 -18
  312. package/dist/esm/xpl-table-header-cell.entry.js +55 -0
  313. package/dist/esm/xpl-table-header.entry.js +12 -0
  314. package/dist/esm/xpl-toggle.entry.js +22 -28
  315. package/dist/esm/xpl-toolbar.entry.js +26 -0
  316. package/dist/types/components/xpl-accordion/accordion.stories.d.ts +37 -0
  317. package/dist/types/components/xpl-accordion/xpl-accordion.d.ts +16 -0
  318. package/dist/types/components/xpl-application-shell/application-shell.stories.d.ts +60 -0
  319. package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +12 -27
  320. package/dist/types/components/xpl-avatar/avatar.stories.d.ts +75 -0
  321. package/dist/types/components/xpl-avatar/xpl-avatar.d.ts +9 -9
  322. package/dist/types/components/xpl-backdrop/backdrop.stories.d.ts +17 -0
  323. package/dist/types/components/xpl-backdrop/xpl-backdrop.d.ts +2 -6
  324. package/dist/types/components/xpl-badge/badge.stories.d.ts +44 -0
  325. package/dist/types/components/xpl-badge/xpl-badge.d.ts +3 -3
  326. package/dist/types/components/xpl-breadcrumbs/breadcrumbs.stories.d.ts +53 -0
  327. package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.d.ts +2 -5
  328. package/dist/types/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.d.ts +1 -4
  329. package/dist/types/components/xpl-button/button.stories.d.ts +92 -0
  330. package/dist/types/components/xpl-button/xpl-button.d.ts +14 -43
  331. package/dist/types/components/xpl-button-row/button-row.stories.d.ts +45 -0
  332. package/dist/types/components/xpl-button-row/xpl-button-row.d.ts +10 -32
  333. package/dist/types/components/xpl-calendar/calendar.stories.d.ts +58 -0
  334. package/dist/types/components/xpl-calendar/xpl-calendar.d.ts +18 -0
  335. package/dist/types/components/xpl-checkbox/checkbox.stories.d.ts +65 -0
  336. package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +13 -13
  337. package/dist/types/components/xpl-choicelist/choice.d.ts +5 -4
  338. package/dist/types/components/xpl-choicelist/choicelist.stories.d.ts +40 -0
  339. package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +16 -32
  340. package/dist/types/components/xpl-content-area/content-area.stories.d.ts +13 -0
  341. package/dist/types/components/xpl-content-area/xpl-content-area.d.ts +2 -5
  342. package/dist/types/components/xpl-dashboard/dashboard.stories.d.ts +31 -0
  343. package/dist/types/components/xpl-dashboard/xpl-dashboard.d.ts +3 -0
  344. package/dist/types/components/xpl-data-card/data-card.stories.d.ts +114 -0
  345. package/dist/types/components/xpl-data-card/xpl-data-card.d.ts +21 -0
  346. package/dist/types/components/xpl-divider/divider.stories.d.ts +37 -0
  347. package/dist/types/components/xpl-divider/xpl-divider.d.ts +2 -7
  348. package/dist/types/components/xpl-dropdown/dropdown-option.d.ts +12 -0
  349. package/dist/types/components/xpl-dropdown/dropdown.stories.d.ts +25 -0
  350. package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +4 -6
  351. package/dist/types/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.d.ts +2 -3
  352. package/dist/types/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.d.ts +13 -14
  353. package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +34 -35
  354. package/dist/types/components/xpl-dynamic-table/dynamic-table.stories.d.ts +41 -0
  355. package/dist/types/components/xpl-dynamic-table/xpl-dynamic-table.d.ts +14 -0
  356. package/dist/types/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.d.ts +9 -0
  357. package/dist/types/components/xpl-dynamic-table-row/xpl-dynamic-table-row.d.ts +11 -0
  358. package/dist/types/components/xpl-grid/grid.stories.d.ts +133 -0
  359. package/dist/types/components/xpl-grid/xpl-grid.d.ts +3 -3
  360. package/dist/types/components/xpl-grid-item/xpl-grid-item.d.ts +5 -5
  361. package/dist/types/components/xpl-header-accordion/header-accordion.stories.d.ts +44 -0
  362. package/dist/types/components/xpl-header-accordion/xpl-header-accordion.d.ts +20 -0
  363. package/dist/types/components/xpl-icon/icons.stories.d.ts +54 -0
  364. package/dist/types/components/xpl-icon/xpl-icon.d.ts +8 -0
  365. package/dist/types/components/xpl-input/input.stories.d.ts +206 -0
  366. package/dist/types/components/xpl-input/xpl-input-color/color-utils.d.ts +41 -0
  367. package/dist/types/components/xpl-input/xpl-input-color/xpl-input-color.d.ts +30 -0
  368. package/dist/types/components/xpl-input/xpl-input-date/xpl-input-date.d.ts +30 -0
  369. package/dist/types/components/xpl-input/xpl-input-file/xpl-input-file.d.ts +24 -0
  370. package/dist/types/components/xpl-input/xpl-input-time/time-utils.d.ts +5 -0
  371. package/dist/types/components/xpl-input/xpl-input-time/xpl-input-time.d.ts +39 -0
  372. package/dist/types/components/xpl-input/xpl-input.d.ts +45 -85
  373. package/dist/types/components/xpl-large-card/large-card.stories.d.ts +71 -0
  374. package/dist/types/components/xpl-large-card/xpl-large-card.d.ts +8 -0
  375. package/dist/types/components/xpl-list/list.stories.d.ts +63 -0
  376. package/dist/types/components/xpl-list/listitem.d.ts +14 -14
  377. package/dist/types/components/xpl-list/xpl-list.d.ts +2 -26
  378. package/dist/types/components/xpl-main-nav/main-nav.stories.d.ts +13 -0
  379. package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +6 -13
  380. package/dist/types/components/xpl-modal/modal.stories.d.ts +99 -0
  381. package/dist/types/components/xpl-modal/xpl-modal.d.ts +15 -0
  382. package/dist/types/components/xpl-nav-item/xpl-nav-item.d.ts +4 -10
  383. package/dist/types/components/xpl-pagination/pagination.stories.d.ts +35 -0
  384. package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +19 -22
  385. package/dist/types/components/xpl-popover/popover.stories.d.ts +12 -0
  386. package/dist/types/components/xpl-popover/xpl-popover.d.ts +24 -0
  387. package/dist/types/components/xpl-progress/progress.stories.d.ts +34 -0
  388. package/dist/types/components/xpl-progress/xpl-progress.d.ts +6 -0
  389. package/dist/types/components/xpl-radio/radio.stories.d.ts +79 -0
  390. package/dist/types/components/xpl-radio/xpl-radio.d.ts +11 -11
  391. package/dist/types/components/xpl-secondary-nav/secondary-nav.stories.d.ts +5 -0
  392. package/dist/types/components/xpl-secondary-nav/xpl-secondary-nav.d.ts +1 -1
  393. package/dist/types/components/xpl-select/select.stories.d.ts +164 -0
  394. package/dist/types/components/xpl-select/xpl-select.d.ts +59 -55
  395. package/dist/types/components/xpl-skeleton/skeleton.stories.d.ts +26 -0
  396. package/dist/types/components/xpl-skeleton/xpl-skeleton.d.ts +10 -0
  397. package/dist/types/components/xpl-slideout/slideout.stories.d.ts +114 -0
  398. package/dist/types/components/xpl-slideout/xpl-slideout.d.ts +14 -0
  399. package/dist/types/components/xpl-tab/xpl-tab.d.ts +8 -0
  400. package/dist/types/components/xpl-tab-panel/xpl-tab-panel.d.ts +5 -0
  401. package/dist/types/components/xpl-table/table.stories.d.ts +84 -0
  402. package/dist/types/components/xpl-table/xpl-table.d.ts +37 -23
  403. package/dist/types/components/xpl-table-header/table-header.stories.d.ts +103 -0
  404. package/dist/types/components/xpl-table-header/xpl-table-header.d.ts +3 -0
  405. package/dist/types/components/xpl-table-header-cell/table-header-cell.stories.d.ts +55 -0
  406. package/dist/types/components/xpl-table-header-cell/xpl-table-header-cell.d.ts +14 -0
  407. package/dist/types/components/xpl-tabs/tabs.stories.d.ts +40 -0
  408. package/dist/types/components/xpl-tabs/xpl-tabs.d.ts +28 -0
  409. package/dist/types/components/xpl-tag/xpl-tag.d.ts +2 -2
  410. package/dist/types/components/xpl-toast/toast.stories.d.ts +62 -0
  411. package/dist/types/components/xpl-toast/xpl-toast.d.ts +14 -0
  412. package/dist/types/components/xpl-toggle/toggle.stories.d.ts +67 -0
  413. package/dist/types/components/xpl-toggle/xpl-toggle.d.ts +9 -21
  414. package/dist/types/components/xpl-toolbar/xpl-toolbar.d.ts +7 -0
  415. package/dist/types/components/xpl-tooltip/tooltip-arrow.d.ts +2 -0
  416. package/dist/types/components/xpl-tooltip/tooltip.stories.d.ts +39 -0
  417. package/dist/types/components/xpl-tooltip/xpl-tooltip.d.ts +6 -0
  418. package/dist/types/components/xpl-utility-bar/utility-bar.stories.d.ts +20 -0
  419. package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +7 -17
  420. package/dist/types/components.d.ts +3060 -498
  421. package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/css/typography.stories.d.ts +90 -0
  422. package/dist/types/stencil-public-runtime.d.ts +236 -34
  423. package/loader/cdn.js +1 -3
  424. package/loader/index.cjs.js +1 -3
  425. package/loader/index.d.ts +5 -2
  426. package/loader/index.es2017.js +1 -3
  427. package/loader/index.js +1 -3
  428. package/package.json +110 -61
  429. package/CHANGELOG.md +0 -106
  430. package/dist/apollo-core/p-10f00380.entry.js +0 -1
  431. package/dist/apollo-core/p-26ec64fe.entry.js +0 -1
  432. package/dist/apollo-core/p-2f90296c.js +0 -10
  433. package/dist/apollo-core/p-31acfdb4.entry.js +0 -1
  434. package/dist/apollo-core/p-4184ac44.entry.js +0 -1
  435. package/dist/apollo-core/p-4fa14839.entry.js +0 -1
  436. package/dist/apollo-core/p-55b87345.js +0 -2
  437. package/dist/apollo-core/p-63a6c98a.entry.js +0 -1
  438. package/dist/apollo-core/p-68c33b77.entry.js +0 -1
  439. package/dist/apollo-core/p-78d07caf.entry.js +0 -1
  440. package/dist/apollo-core/p-796957d3.entry.js +0 -1
  441. package/dist/apollo-core/p-88160d68.entry.js +0 -1
  442. package/dist/apollo-core/p-9ec318bb.entry.js +0 -1
  443. package/dist/apollo-core/p-a2a34e44.entry.js +0 -1
  444. package/dist/apollo-core/p-ad90fe4d.js +0 -1
  445. package/dist/apollo-core/p-beea2502.entry.js +0 -1
  446. package/dist/apollo-core/p-d499e43f.entry.js +0 -1
  447. package/dist/apollo-core/p-d8a3d94c.entry.js +0 -1
  448. package/dist/apollo-core/p-e047b446.entry.js +0 -1
  449. package/dist/cjs/index-2ab4832e.js +0 -2003
  450. package/dist/cjs/regular-872f5226.js +0 -16043
  451. package/dist/cjs/xpl-avatar_12.cjs.entry.js +0 -362
  452. package/dist/cjs/xpl-backdrop.cjs.entry.js +0 -21
  453. package/dist/cjs/xpl-choicelist.cjs.entry.js +0 -50
  454. package/dist/cjs/xpl-divider.cjs.entry.js +0 -19
  455. package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +0 -113
  456. package/dist/cjs/xpl-dropdown_2.cjs.entry.js +0 -121
  457. package/dist/cjs/xpl-pagination.cjs.entry.js +0 -79
  458. package/dist/cjs/xpl-select.cjs.entry.js +0 -610
  459. package/dist/collection/components/xpl-select/selectchoice.js +0 -1
  460. package/dist/custom-elements/index.d.ts +0 -219
  461. package/dist/custom-elements/index.js +0 -20353
  462. package/dist/esm/index-392b5b96.js +0 -1973
  463. package/dist/esm/polyfills/core-js.js +0 -11
  464. package/dist/esm/polyfills/css-shim.js +0 -1
  465. package/dist/esm/polyfills/dom.js +0 -79
  466. package/dist/esm/polyfills/es5-html-element.js +0 -1
  467. package/dist/esm/polyfills/index.js +0 -34
  468. package/dist/esm/polyfills/system.js +0 -6
  469. package/dist/esm/regular-86225e9d.js +0 -16041
  470. package/dist/esm/xpl-avatar_12.entry.js +0 -347
  471. package/dist/esm/xpl-backdrop.entry.js +0 -17
  472. package/dist/esm/xpl-choicelist.entry.js +0 -46
  473. package/dist/esm/xpl-divider.entry.js +0 -15
  474. package/dist/esm/xpl-dropdown-group_3.entry.js +0 -107
  475. package/dist/esm/xpl-dropdown_2.entry.js +0 -116
  476. package/dist/esm/xpl-pagination.entry.js +0 -75
  477. package/dist/esm/xpl-select.entry.js +0 -606
  478. package/dist/stories/application-shell.stories.js +0 -776
  479. package/dist/stories/avatar.stories.js +0 -173
  480. package/dist/stories/backdrop.stories.js +0 -18
  481. package/dist/stories/badge.stories.js +0 -48
  482. package/dist/stories/breadcrumbs.stories.js +0 -117
  483. package/dist/stories/button-row.stories.js +0 -68
  484. package/dist/stories/button.stories.js +0 -122
  485. package/dist/stories/checkbox.stories.js +0 -78
  486. package/dist/stories/choicelist.stories.js +0 -112
  487. package/dist/stories/content-area.stories.js +0 -53
  488. package/dist/stories/divider.stories.js +0 -34
  489. package/dist/stories/dropdown.stories.js +0 -377
  490. package/dist/stories/input.stories.js +0 -268
  491. package/dist/stories/list.stories.js +0 -154
  492. package/dist/stories/main-nav.stories.js +0 -308
  493. package/dist/stories/pagination.stories.js +0 -84
  494. package/dist/stories/radio.stories.js +0 -68
  495. package/dist/stories/secondary-nav.stories.js +0 -76
  496. package/dist/stories/select.stories.js +0 -119
  497. package/dist/stories/table.stories.js +0 -107
  498. package/dist/stories/tabs.stories.js +0 -24
  499. package/dist/stories/toggle.stories.js +0 -84
  500. package/dist/stories/utility-bar.stories.js +0 -94
  501. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/application-shell.stories.d.ts +0 -71
  502. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/avatar.stories.d.ts +0 -91
  503. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/backdrop.stories.d.ts +0 -16
  504. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/badge.stories.d.ts +0 -48
  505. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -53
  506. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/button-row.stories.d.ts +0 -49
  507. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/button.stories.d.ts +0 -91
  508. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/checkbox.stories.d.ts +0 -72
  509. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/choicelist.stories.d.ts +0 -41
  510. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/content-area.stories.d.ts +0 -29
  511. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/divider.stories.d.ts +0 -40
  512. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/dropdown.stories.d.ts +0 -135
  513. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/grid.stories.d.ts +0 -150
  514. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/input.stories.d.ts +0 -190
  515. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/list.stories.d.ts +0 -71
  516. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/main-nav.stories.d.ts +0 -30
  517. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
  518. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/radio.stories.d.ts +0 -64
  519. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -16
  520. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/select.stories.d.ts +0 -74
  521. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/table.stories.d.ts +0 -49
  522. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
  523. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/toggle.stories.d.ts +0 -74
  524. package/dist/types/Users/fernandogelin/Xplor/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -20
  525. package/dist/types/components/xpl-dropdown/dropdownoption.d.ts +0 -10
  526. package/dist/types/components/xpl-select/selectchoice.d.ts +0 -4
  527. package/loader/package.json +0 -11
  528. /package/dist/collection/components/xpl-dropdown/{dropdownoption.js → dropdown-option.js} +0 -0
@@ -1,75 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-392b5b96.js';
2
-
3
- const XplPagination = class {
4
- constructor(hostRef) {
5
- registerInstance(this, hostRef);
6
- this.page = createEvent(this, "page", 7);
7
- /**
8
- * Private `_goto` method respects the `waitForCallback` prop --
9
- * it will always emit the `page` event, but won't actually update
10
- * the state of what the current page is, leaving that to the caller
11
- * to update once (presumably) some other data has loaded.
12
- */
13
- this._goto = (n) => {
14
- this.page.emit(n);
15
- if (!this.waitForCallback) {
16
- this.current = n;
17
- }
18
- };
19
- this.goPrev = () => {
20
- if (this.current > 1)
21
- this._goto(this.current - 1);
22
- };
23
- this.goNext = () => {
24
- const numPages = Math.ceil(this.total / this.perPage);
25
- if (this.current < numPages)
26
- this._goto(this.current + 1);
27
- };
28
- this.total = undefined;
29
- this.perPage = undefined;
30
- this.waitForCallback = undefined;
31
- this.current = 1;
32
- }
33
- /**
34
- * Calling `goto` with a page number (which should probably be
35
- * taken from the `page` event) updates the pagination's state
36
- * and re-renders it, showing the appropriate buttons given the current page.
37
- * @param n
38
- */
39
- async goto(n) {
40
- this.current = n;
41
- }
42
- render() {
43
- const numPages = Math.ceil(this.total / this.perPage);
44
- let showing = [1];
45
- if (numPages < 7)
46
- showing = [1, 2, 3, 4, 5, 6];
47
- if (this.current <= 3 || this.current >= numPages - 2) {
48
- showing = [1, 2, 3, '...', numPages - 2, numPages - 1, numPages];
49
- }
50
- else {
51
- showing = [
52
- 1,
53
- '...',
54
- this.current - 1,
55
- this.current,
56
- this.current + 1,
57
- '...',
58
- numPages,
59
- ];
60
- }
61
- const showingFirst = (this.current - 1) * this.perPage + 1;
62
- const showingLast = Math.min(showingFirst + this.perPage - 1, this.total);
63
- return (h(Host, null, h("div", { class: "xpl-pagination" }, h("div", null, h("p", null, "Showing ", h("span", null, showingFirst), " to", ' ', h("span", null, showingLast), " of", ' ', h("span", null, this.total), " results")), h("div", null, h("nav", { "aria-label": "Pagination" }, h("button", { onClick: this.goPrev, class: "xpl-pagination-prev" }, h("span", null, "Previous"), h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z", "clip-rule": "evenodd" }))), showing.map((n) => {
64
- if (n === '...') {
65
- return (h("span", { class: "xpl-pagination-ellipsis" }, "..."));
66
- }
67
- if (n === this.current) {
68
- return (h("button", { "aria-current": "page", class: "xpl-pagination-current" }, n));
69
- }
70
- return (h("button", { onClick: () => this._goto(n) }, n));
71
- }), h("button", { onClick: this.goNext, class: "xpl-pagination-next" }, h("span", null, "Next"), h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", "clip-rule": "evenodd" }))))))));
72
- }
73
- };
74
-
75
- export { XplPagination as xpl_pagination };
@@ -1,606 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-392b5b96.js';
2
- import { v as v4 } from './v4-929670b7.js';
3
-
4
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
-
6
- /**
7
- * lodash (Custom Build) <https://lodash.com/>
8
- * Build: `lodash modularize exports="npm" -o ./`
9
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
10
- * Released under MIT license <https://lodash.com/license>
11
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
12
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
13
- */
14
-
15
- /** Used as the `TypeError` message for "Functions" methods. */
16
- var FUNC_ERROR_TEXT = 'Expected a function';
17
-
18
- /** Used as references for various `Number` constants. */
19
- var NAN = 0 / 0;
20
-
21
- /** `Object#toString` result references. */
22
- var symbolTag = '[object Symbol]';
23
-
24
- /** Used to match leading and trailing whitespace. */
25
- var reTrim = /^\s+|\s+$/g;
26
-
27
- /** Used to detect bad signed hexadecimal string values. */
28
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
29
-
30
- /** Used to detect binary string values. */
31
- var reIsBinary = /^0b[01]+$/i;
32
-
33
- /** Used to detect octal string values. */
34
- var reIsOctal = /^0o[0-7]+$/i;
35
-
36
- /** Built-in method references without a dependency on `root`. */
37
- var freeParseInt = parseInt;
38
-
39
- /** Detect free variable `global` from Node.js. */
40
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
41
-
42
- /** Detect free variable `self`. */
43
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
44
-
45
- /** Used as a reference to the global object. */
46
- var root = freeGlobal || freeSelf || Function('return this')();
47
-
48
- /** Used for built-in method references. */
49
- var objectProto = Object.prototype;
50
-
51
- /**
52
- * Used to resolve the
53
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
54
- * of values.
55
- */
56
- var objectToString = objectProto.toString;
57
-
58
- /* Built-in method references for those with the same name as other `lodash` methods. */
59
- var nativeMax = Math.max,
60
- nativeMin = Math.min;
61
-
62
- /**
63
- * Gets the timestamp of the number of milliseconds that have elapsed since
64
- * the Unix epoch (1 January 1970 00:00:00 UTC).
65
- *
66
- * @static
67
- * @memberOf _
68
- * @since 2.4.0
69
- * @category Date
70
- * @returns {number} Returns the timestamp.
71
- * @example
72
- *
73
- * _.defer(function(stamp) {
74
- * console.log(_.now() - stamp);
75
- * }, _.now());
76
- * // => Logs the number of milliseconds it took for the deferred invocation.
77
- */
78
- var now = function() {
79
- return root.Date.now();
80
- };
81
-
82
- /**
83
- * Creates a debounced function that delays invoking `func` until after `wait`
84
- * milliseconds have elapsed since the last time the debounced function was
85
- * invoked. The debounced function comes with a `cancel` method to cancel
86
- * delayed `func` invocations and a `flush` method to immediately invoke them.
87
- * Provide `options` to indicate whether `func` should be invoked on the
88
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
89
- * with the last arguments provided to the debounced function. Subsequent
90
- * calls to the debounced function return the result of the last `func`
91
- * invocation.
92
- *
93
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
94
- * invoked on the trailing edge of the timeout only if the debounced function
95
- * is invoked more than once during the `wait` timeout.
96
- *
97
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
98
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
99
- *
100
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
101
- * for details over the differences between `_.debounce` and `_.throttle`.
102
- *
103
- * @static
104
- * @memberOf _
105
- * @since 0.1.0
106
- * @category Function
107
- * @param {Function} func The function to debounce.
108
- * @param {number} [wait=0] The number of milliseconds to delay.
109
- * @param {Object} [options={}] The options object.
110
- * @param {boolean} [options.leading=false]
111
- * Specify invoking on the leading edge of the timeout.
112
- * @param {number} [options.maxWait]
113
- * The maximum time `func` is allowed to be delayed before it's invoked.
114
- * @param {boolean} [options.trailing=true]
115
- * Specify invoking on the trailing edge of the timeout.
116
- * @returns {Function} Returns the new debounced function.
117
- * @example
118
- *
119
- * // Avoid costly calculations while the window size is in flux.
120
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
121
- *
122
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
123
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
124
- * 'leading': true,
125
- * 'trailing': false
126
- * }));
127
- *
128
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
129
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
130
- * var source = new EventSource('/stream');
131
- * jQuery(source).on('message', debounced);
132
- *
133
- * // Cancel the trailing debounced invocation.
134
- * jQuery(window).on('popstate', debounced.cancel);
135
- */
136
- function debounce(func, wait, options) {
137
- var lastArgs,
138
- lastThis,
139
- maxWait,
140
- result,
141
- timerId,
142
- lastCallTime,
143
- lastInvokeTime = 0,
144
- leading = false,
145
- maxing = false,
146
- trailing = true;
147
-
148
- if (typeof func != 'function') {
149
- throw new TypeError(FUNC_ERROR_TEXT);
150
- }
151
- wait = toNumber(wait) || 0;
152
- if (isObject(options)) {
153
- leading = !!options.leading;
154
- maxing = 'maxWait' in options;
155
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
156
- trailing = 'trailing' in options ? !!options.trailing : trailing;
157
- }
158
-
159
- function invokeFunc(time) {
160
- var args = lastArgs,
161
- thisArg = lastThis;
162
-
163
- lastArgs = lastThis = undefined;
164
- lastInvokeTime = time;
165
- result = func.apply(thisArg, args);
166
- return result;
167
- }
168
-
169
- function leadingEdge(time) {
170
- // Reset any `maxWait` timer.
171
- lastInvokeTime = time;
172
- // Start the timer for the trailing edge.
173
- timerId = setTimeout(timerExpired, wait);
174
- // Invoke the leading edge.
175
- return leading ? invokeFunc(time) : result;
176
- }
177
-
178
- function remainingWait(time) {
179
- var timeSinceLastCall = time - lastCallTime,
180
- timeSinceLastInvoke = time - lastInvokeTime,
181
- result = wait - timeSinceLastCall;
182
-
183
- return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
184
- }
185
-
186
- function shouldInvoke(time) {
187
- var timeSinceLastCall = time - lastCallTime,
188
- timeSinceLastInvoke = time - lastInvokeTime;
189
-
190
- // Either this is the first call, activity has stopped and we're at the
191
- // trailing edge, the system time has gone backwards and we're treating
192
- // it as the trailing edge, or we've hit the `maxWait` limit.
193
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
194
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
195
- }
196
-
197
- function timerExpired() {
198
- var time = now();
199
- if (shouldInvoke(time)) {
200
- return trailingEdge(time);
201
- }
202
- // Restart the timer.
203
- timerId = setTimeout(timerExpired, remainingWait(time));
204
- }
205
-
206
- function trailingEdge(time) {
207
- timerId = undefined;
208
-
209
- // Only invoke if we have `lastArgs` which means `func` has been
210
- // debounced at least once.
211
- if (trailing && lastArgs) {
212
- return invokeFunc(time);
213
- }
214
- lastArgs = lastThis = undefined;
215
- return result;
216
- }
217
-
218
- function cancel() {
219
- if (timerId !== undefined) {
220
- clearTimeout(timerId);
221
- }
222
- lastInvokeTime = 0;
223
- lastArgs = lastCallTime = lastThis = timerId = undefined;
224
- }
225
-
226
- function flush() {
227
- return timerId === undefined ? result : trailingEdge(now());
228
- }
229
-
230
- function debounced() {
231
- var time = now(),
232
- isInvoking = shouldInvoke(time);
233
-
234
- lastArgs = arguments;
235
- lastThis = this;
236
- lastCallTime = time;
237
-
238
- if (isInvoking) {
239
- if (timerId === undefined) {
240
- return leadingEdge(lastCallTime);
241
- }
242
- if (maxing) {
243
- // Handle invocations in a tight loop.
244
- timerId = setTimeout(timerExpired, wait);
245
- return invokeFunc(lastCallTime);
246
- }
247
- }
248
- if (timerId === undefined) {
249
- timerId = setTimeout(timerExpired, wait);
250
- }
251
- return result;
252
- }
253
- debounced.cancel = cancel;
254
- debounced.flush = flush;
255
- return debounced;
256
- }
257
-
258
- /**
259
- * Creates a throttled function that only invokes `func` at most once per
260
- * every `wait` milliseconds. The throttled function comes with a `cancel`
261
- * method to cancel delayed `func` invocations and a `flush` method to
262
- * immediately invoke them. Provide `options` to indicate whether `func`
263
- * should be invoked on the leading and/or trailing edge of the `wait`
264
- * timeout. The `func` is invoked with the last arguments provided to the
265
- * throttled function. Subsequent calls to the throttled function return the
266
- * result of the last `func` invocation.
267
- *
268
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
269
- * invoked on the trailing edge of the timeout only if the throttled function
270
- * is invoked more than once during the `wait` timeout.
271
- *
272
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
273
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
274
- *
275
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
276
- * for details over the differences between `_.throttle` and `_.debounce`.
277
- *
278
- * @static
279
- * @memberOf _
280
- * @since 0.1.0
281
- * @category Function
282
- * @param {Function} func The function to throttle.
283
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
284
- * @param {Object} [options={}] The options object.
285
- * @param {boolean} [options.leading=true]
286
- * Specify invoking on the leading edge of the timeout.
287
- * @param {boolean} [options.trailing=true]
288
- * Specify invoking on the trailing edge of the timeout.
289
- * @returns {Function} Returns the new throttled function.
290
- * @example
291
- *
292
- * // Avoid excessively updating the position while scrolling.
293
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
294
- *
295
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
296
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
297
- * jQuery(element).on('click', throttled);
298
- *
299
- * // Cancel the trailing throttled invocation.
300
- * jQuery(window).on('popstate', throttled.cancel);
301
- */
302
- function throttle(func, wait, options) {
303
- var leading = true,
304
- trailing = true;
305
-
306
- if (typeof func != 'function') {
307
- throw new TypeError(FUNC_ERROR_TEXT);
308
- }
309
- if (isObject(options)) {
310
- leading = 'leading' in options ? !!options.leading : leading;
311
- trailing = 'trailing' in options ? !!options.trailing : trailing;
312
- }
313
- return debounce(func, wait, {
314
- 'leading': leading,
315
- 'maxWait': wait,
316
- 'trailing': trailing
317
- });
318
- }
319
-
320
- /**
321
- * Checks if `value` is the
322
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
323
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
324
- *
325
- * @static
326
- * @memberOf _
327
- * @since 0.1.0
328
- * @category Lang
329
- * @param {*} value The value to check.
330
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
331
- * @example
332
- *
333
- * _.isObject({});
334
- * // => true
335
- *
336
- * _.isObject([1, 2, 3]);
337
- * // => true
338
- *
339
- * _.isObject(_.noop);
340
- * // => true
341
- *
342
- * _.isObject(null);
343
- * // => false
344
- */
345
- function isObject(value) {
346
- var type = typeof value;
347
- return !!value && (type == 'object' || type == 'function');
348
- }
349
-
350
- /**
351
- * Checks if `value` is object-like. A value is object-like if it's not `null`
352
- * and has a `typeof` result of "object".
353
- *
354
- * @static
355
- * @memberOf _
356
- * @since 4.0.0
357
- * @category Lang
358
- * @param {*} value The value to check.
359
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
360
- * @example
361
- *
362
- * _.isObjectLike({});
363
- * // => true
364
- *
365
- * _.isObjectLike([1, 2, 3]);
366
- * // => true
367
- *
368
- * _.isObjectLike(_.noop);
369
- * // => false
370
- *
371
- * _.isObjectLike(null);
372
- * // => false
373
- */
374
- function isObjectLike(value) {
375
- return !!value && typeof value == 'object';
376
- }
377
-
378
- /**
379
- * Checks if `value` is classified as a `Symbol` primitive or object.
380
- *
381
- * @static
382
- * @memberOf _
383
- * @since 4.0.0
384
- * @category Lang
385
- * @param {*} value The value to check.
386
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
387
- * @example
388
- *
389
- * _.isSymbol(Symbol.iterator);
390
- * // => true
391
- *
392
- * _.isSymbol('abc');
393
- * // => false
394
- */
395
- function isSymbol(value) {
396
- return typeof value == 'symbol' ||
397
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
398
- }
399
-
400
- /**
401
- * Converts `value` to a number.
402
- *
403
- * @static
404
- * @memberOf _
405
- * @since 4.0.0
406
- * @category Lang
407
- * @param {*} value The value to process.
408
- * @returns {number} Returns the number.
409
- * @example
410
- *
411
- * _.toNumber(3.2);
412
- * // => 3.2
413
- *
414
- * _.toNumber(Number.MIN_VALUE);
415
- * // => 5e-324
416
- *
417
- * _.toNumber(Infinity);
418
- * // => Infinity
419
- *
420
- * _.toNumber('3.2');
421
- * // => 3.2
422
- */
423
- function toNumber(value) {
424
- if (typeof value == 'number') {
425
- return value;
426
- }
427
- if (isSymbol(value)) {
428
- return NAN;
429
- }
430
- if (isObject(value)) {
431
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
432
- value = isObject(other) ? (other + '') : other;
433
- }
434
- if (typeof value != 'string') {
435
- return value === 0 ? value : +value;
436
- }
437
- value = value.replace(reTrim, '');
438
- var isBinary = reIsBinary.test(value);
439
- return (isBinary || reIsOctal.test(value))
440
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
441
- : (reIsBadHex.test(value) ? NAN : +value);
442
- }
443
-
444
- var lodash_throttle = throttle;
445
-
446
- function tagWidth(text) {
447
- const context = document.createElement('canvas').getContext('2d');
448
- context.font =
449
- "14px apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif";
450
- return context.measureText(text).width + 44; // = text + l/r padding + margin-right
451
- }
452
- const XplSelect = class {
453
- constructor(hostRef) {
454
- registerInstance(this, hostRef);
455
- this.choices = [];
456
- this.description = undefined;
457
- this.disabled = undefined;
458
- this.error = undefined;
459
- this.label = undefined;
460
- this.mode = 'single';
461
- this.placeholder = undefined;
462
- this.truncate = true;
463
- this.active = false;
464
- this.id = v4();
465
- this.keepFocus = false;
466
- this.selected = undefined;
467
- this.value = '';
468
- this.displayValue = '';
469
- this.visibleChoices = Infinity;
470
- }
471
- componentWillLoad() {
472
- this.selected =
473
- this.choices && this.choices.length > 0
474
- ? this.choices.map(() => false)
475
- : [];
476
- window.addEventListener('click', (e) => {
477
- const el = e.target;
478
- const select = el.closest('.xpl-select');
479
- if (select === null || select !== this.container) {
480
- this.active = false;
481
- }
482
- });
483
- window.addEventListener('resize', lodash_throttle(() => {
484
- this.maybeTruncateChoices();
485
- }, 250));
486
- }
487
- componentDidLoad() {
488
- this.dropdown = this.container.querySelector('xpl-dropdown');
489
- }
490
- maybeTruncateChoices() {
491
- if (this.mode === 'single' || !this.truncate)
492
- return;
493
- const containerWidth = this.container.getBoundingClientRect().width;
494
- let visibleChoices = 0;
495
- let visibleChoicesWidth = 0;
496
- const actualNumSelected = this.selected.filter((a) => a).length;
497
- for (let i = 0; i < actualNumSelected; i++) {
498
- visibleChoicesWidth += tagWidth(this.getDisplayValue(i));
499
- if (visibleChoicesWidth > containerWidth - 140)
500
- break;
501
- visibleChoices++;
502
- }
503
- if (visibleChoices >= actualNumSelected)
504
- visibleChoices = Infinity;
505
- if (visibleChoices < 1)
506
- visibleChoices = 1;
507
- this.visibleChoices = visibleChoices;
508
- }
509
- flattenChoices() {
510
- return this.choices.reduce((acc, curr) => [
511
- ...acc,
512
- ...(curr.groupName ? curr.options : [curr]),
513
- ], []);
514
- }
515
- getDisplayValue(i) {
516
- return this.flattenChoices()[i].label || this.flattenChoices()[i].value;
517
- }
518
- getActualValue(i) {
519
- return this.flattenChoices()[i].value || this.flattenChoices()[i].label;
520
- }
521
- update() {
522
- this.selected = this.flattenChoices().map(({ isSelected }) => isSelected);
523
- if (this.mode === 'single') {
524
- const selected = this.selected.findIndex((v) => v);
525
- this.value = selected >= 0 ? this.getActualValue(selected) : '';
526
- this.displayValue =
527
- selected >= 0 ? this.getDisplayValue(selected) : '';
528
- }
529
- else if (this.mode === 'multi') {
530
- this.value = this.selected
531
- .map((v, i) => {
532
- return v ? this.getActualValue(i) : '';
533
- })
534
- .filter((v) => v.length > 0)
535
- .join('|');
536
- }
537
- }
538
- render() {
539
- let visibleChoices = 0;
540
- return (h(Host, { class: {
541
- 'xpl-select': true,
542
- 'xpl-select--disabled': this.disabled,
543
- 'xpl-select--no-truncate': !this.truncate,
544
- }, onKeyDown: (e) => {
545
- if (e.key === 'Escape')
546
- this.active = false;
547
- }, ref: (el) => (this.container = el) }, this.label || this.description ? (h("label", { class: {
548
- 'xpl-label': true,
549
- 'xpl-label--disabled': this.disabled,
550
- }, htmlFor: this.id }, this.label, this.description && (h("small", { class: {
551
- 'xpl-description': true,
552
- 'xpl-description--disabled': this.disabled,
553
- } }, this.description)))) : null, h("div", { class: {
554
- 'xpl-input': true,
555
- 'xpl-input--disabled': this.disabled,
556
- 'xpl-input--error': this.error !== undefined,
557
- } }, h("div", { class: "xpl-input-wrapper" }, h("div", { class: {
558
- 'xpl-select-value': true,
559
- 'xpl-select-value--active': this.mode === 'multi' &&
560
- this.value.length > 0,
561
- 'has-value': this.value.length > 0,
562
- } }, this.mode === 'single'
563
- ? this.displayValue || this.placeholder
564
- : this.value.length > 0
565
- ? this.selected.map((v, i) => {
566
- if (!v)
567
- return null;
568
- if (visibleChoices >= this.visibleChoices)
569
- return null;
570
- visibleChoices++;
571
- return (h("xpl-tag", { onClose: () => {
572
- this.flattenChoices().forEach((v, j) => {
573
- if (i === j)
574
- v.isSelected =
575
- false;
576
- });
577
- const mapOptions = (option) => {
578
- option.options =
579
- option.groupName
580
- ? option.options.map(mapOptions)
581
- : undefined;
582
- return option;
583
- };
584
- this.choices =
585
- this.choices.map(mapOptions);
586
- this.update();
587
- this.maybeTruncateChoices();
588
- } }, this.getDisplayValue(i)));
589
- })
590
- : this.placeholder, this.visibleChoices < Infinity &&
591
- `+ ${this.selected.filter((a) => a).length -
592
- this.visibleChoices} more`), h("button", { disabled: this.disabled, id: this.id, onKeyDown: (e) => {
593
- if (e.key === 'Tab')
594
- this.keepFocus = true;
595
- }, onClick: () => {
596
- const { dropdown } = this;
597
- if (!this.disabled)
598
- dropdown.isOpen = !dropdown.isOpen;
599
- } })), !this.disabled && (h("xpl-dropdown", { options: this.choices, mode: this.mode, triggerId: this.id, update: () => {
600
- this.update();
601
- this.maybeTruncateChoices();
602
- } })), this.error !== undefined && this.error.length > 0 && (h("label", { class: "xpl-input-error", htmlFor: this.id }, h("svg", { width: "10", height: "11", viewBox: "0 0 10 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M9.84375 5.25C9.84375 2.59375 7.65625 0.40625 5 0.40625C2.32422 0.40625 0.15625 2.59375 0.15625 5.25C0.15625 7.92578 2.32422 10.0938 5 10.0938C7.65625 10.0938 9.84375 7.92578 9.84375 5.25ZM5 6.22656C5.48828 6.22656 5.89844 6.63672 5.89844 7.125C5.89844 7.63281 5.48828 8.02344 5 8.02344C4.49219 8.02344 4.10156 7.63281 4.10156 7.125C4.10156 6.63672 4.49219 6.22656 5 6.22656ZM4.14062 3.00391C4.12109 2.86719 4.23828 2.75 4.375 2.75H5.60547C5.74219 2.75 5.85938 2.86719 5.83984 3.00391L5.70312 5.66016C5.68359 5.79688 5.58594 5.875 5.46875 5.875H4.51172C4.39453 5.875 4.29688 5.79688 4.27734 5.66016L4.14062 3.00391Z" })), this.error))), h("input", { type: "hidden", value: this.value })));
603
- }
604
- };
605
-
606
- export { XplSelect as xpl_select };