@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,79 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-2ab4832e.js');
6
-
7
- const XplPagination = class {
8
- constructor(hostRef) {
9
- index.registerInstance(this, hostRef);
10
- this.page = index.createEvent(this, "page", 7);
11
- /**
12
- * Private `_goto` method respects the `waitForCallback` prop --
13
- * it will always emit the `page` event, but won't actually update
14
- * the state of what the current page is, leaving that to the caller
15
- * to update once (presumably) some other data has loaded.
16
- */
17
- this._goto = (n) => {
18
- this.page.emit(n);
19
- if (!this.waitForCallback) {
20
- this.current = n;
21
- }
22
- };
23
- this.goPrev = () => {
24
- if (this.current > 1)
25
- this._goto(this.current - 1);
26
- };
27
- this.goNext = () => {
28
- const numPages = Math.ceil(this.total / this.perPage);
29
- if (this.current < numPages)
30
- this._goto(this.current + 1);
31
- };
32
- this.total = undefined;
33
- this.perPage = undefined;
34
- this.waitForCallback = undefined;
35
- this.current = 1;
36
- }
37
- /**
38
- * Calling `goto` with a page number (which should probably be
39
- * taken from the `page` event) updates the pagination's state
40
- * and re-renders it, showing the appropriate buttons given the current page.
41
- * @param n
42
- */
43
- async goto(n) {
44
- this.current = n;
45
- }
46
- render() {
47
- const numPages = Math.ceil(this.total / this.perPage);
48
- let showing = [1];
49
- if (numPages < 7)
50
- showing = [1, 2, 3, 4, 5, 6];
51
- if (this.current <= 3 || this.current >= numPages - 2) {
52
- showing = [1, 2, 3, '...', numPages - 2, numPages - 1, numPages];
53
- }
54
- else {
55
- showing = [
56
- 1,
57
- '...',
58
- this.current - 1,
59
- this.current,
60
- this.current + 1,
61
- '...',
62
- numPages,
63
- ];
64
- }
65
- const showingFirst = (this.current - 1) * this.perPage + 1;
66
- const showingLast = Math.min(showingFirst + this.perPage - 1, this.total);
67
- return (index.h(index.Host, null, index.h("div", { class: "xpl-pagination" }, index.h("div", null, index.h("p", null, "Showing ", index.h("span", null, showingFirst), " to", ' ', index.h("span", null, showingLast), " of", ' ', index.h("span", null, this.total), " results")), index.h("div", null, index.h("nav", { "aria-label": "Pagination" }, index.h("button", { onClick: this.goPrev, class: "xpl-pagination-prev" }, index.h("span", null, "Previous"), index.h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, index.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) => {
68
- if (n === '...') {
69
- return (index.h("span", { class: "xpl-pagination-ellipsis" }, "..."));
70
- }
71
- if (n === this.current) {
72
- return (index.h("button", { "aria-current": "page", class: "xpl-pagination-current" }, n));
73
- }
74
- return (index.h("button", { onClick: () => this._goto(n) }, n));
75
- }), index.h("button", { onClick: this.goNext, class: "xpl-pagination-next" }, index.h("span", null, "Next"), index.h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, index.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" }))))))));
76
- }
77
- };
78
-
79
- exports.xpl_pagination = XplPagination;
@@ -1,610 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-2ab4832e.js');
6
- const v4 = require('./v4-14140ff3.js');
7
-
8
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
-
10
- /**
11
- * lodash (Custom Build) <https://lodash.com/>
12
- * Build: `lodash modularize exports="npm" -o ./`
13
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
14
- * Released under MIT license <https://lodash.com/license>
15
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
16
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
17
- */
18
-
19
- /** Used as the `TypeError` message for "Functions" methods. */
20
- var FUNC_ERROR_TEXT = 'Expected a function';
21
-
22
- /** Used as references for various `Number` constants. */
23
- var NAN = 0 / 0;
24
-
25
- /** `Object#toString` result references. */
26
- var symbolTag = '[object Symbol]';
27
-
28
- /** Used to match leading and trailing whitespace. */
29
- var reTrim = /^\s+|\s+$/g;
30
-
31
- /** Used to detect bad signed hexadecimal string values. */
32
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
33
-
34
- /** Used to detect binary string values. */
35
- var reIsBinary = /^0b[01]+$/i;
36
-
37
- /** Used to detect octal string values. */
38
- var reIsOctal = /^0o[0-7]+$/i;
39
-
40
- /** Built-in method references without a dependency on `root`. */
41
- var freeParseInt = parseInt;
42
-
43
- /** Detect free variable `global` from Node.js. */
44
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
45
-
46
- /** Detect free variable `self`. */
47
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
48
-
49
- /** Used as a reference to the global object. */
50
- var root = freeGlobal || freeSelf || Function('return this')();
51
-
52
- /** Used for built-in method references. */
53
- var objectProto = Object.prototype;
54
-
55
- /**
56
- * Used to resolve the
57
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
58
- * of values.
59
- */
60
- var objectToString = objectProto.toString;
61
-
62
- /* Built-in method references for those with the same name as other `lodash` methods. */
63
- var nativeMax = Math.max,
64
- nativeMin = Math.min;
65
-
66
- /**
67
- * Gets the timestamp of the number of milliseconds that have elapsed since
68
- * the Unix epoch (1 January 1970 00:00:00 UTC).
69
- *
70
- * @static
71
- * @memberOf _
72
- * @since 2.4.0
73
- * @category Date
74
- * @returns {number} Returns the timestamp.
75
- * @example
76
- *
77
- * _.defer(function(stamp) {
78
- * console.log(_.now() - stamp);
79
- * }, _.now());
80
- * // => Logs the number of milliseconds it took for the deferred invocation.
81
- */
82
- var now = function() {
83
- return root.Date.now();
84
- };
85
-
86
- /**
87
- * Creates a debounced function that delays invoking `func` until after `wait`
88
- * milliseconds have elapsed since the last time the debounced function was
89
- * invoked. The debounced function comes with a `cancel` method to cancel
90
- * delayed `func` invocations and a `flush` method to immediately invoke them.
91
- * Provide `options` to indicate whether `func` should be invoked on the
92
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
93
- * with the last arguments provided to the debounced function. Subsequent
94
- * calls to the debounced function return the result of the last `func`
95
- * invocation.
96
- *
97
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
98
- * invoked on the trailing edge of the timeout only if the debounced function
99
- * is invoked more than once during the `wait` timeout.
100
- *
101
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
102
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
103
- *
104
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
105
- * for details over the differences between `_.debounce` and `_.throttle`.
106
- *
107
- * @static
108
- * @memberOf _
109
- * @since 0.1.0
110
- * @category Function
111
- * @param {Function} func The function to debounce.
112
- * @param {number} [wait=0] The number of milliseconds to delay.
113
- * @param {Object} [options={}] The options object.
114
- * @param {boolean} [options.leading=false]
115
- * Specify invoking on the leading edge of the timeout.
116
- * @param {number} [options.maxWait]
117
- * The maximum time `func` is allowed to be delayed before it's invoked.
118
- * @param {boolean} [options.trailing=true]
119
- * Specify invoking on the trailing edge of the timeout.
120
- * @returns {Function} Returns the new debounced function.
121
- * @example
122
- *
123
- * // Avoid costly calculations while the window size is in flux.
124
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
125
- *
126
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
127
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
128
- * 'leading': true,
129
- * 'trailing': false
130
- * }));
131
- *
132
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
133
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
134
- * var source = new EventSource('/stream');
135
- * jQuery(source).on('message', debounced);
136
- *
137
- * // Cancel the trailing debounced invocation.
138
- * jQuery(window).on('popstate', debounced.cancel);
139
- */
140
- function debounce(func, wait, options) {
141
- var lastArgs,
142
- lastThis,
143
- maxWait,
144
- result,
145
- timerId,
146
- lastCallTime,
147
- lastInvokeTime = 0,
148
- leading = false,
149
- maxing = false,
150
- trailing = true;
151
-
152
- if (typeof func != 'function') {
153
- throw new TypeError(FUNC_ERROR_TEXT);
154
- }
155
- wait = toNumber(wait) || 0;
156
- if (isObject(options)) {
157
- leading = !!options.leading;
158
- maxing = 'maxWait' in options;
159
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
160
- trailing = 'trailing' in options ? !!options.trailing : trailing;
161
- }
162
-
163
- function invokeFunc(time) {
164
- var args = lastArgs,
165
- thisArg = lastThis;
166
-
167
- lastArgs = lastThis = undefined;
168
- lastInvokeTime = time;
169
- result = func.apply(thisArg, args);
170
- return result;
171
- }
172
-
173
- function leadingEdge(time) {
174
- // Reset any `maxWait` timer.
175
- lastInvokeTime = time;
176
- // Start the timer for the trailing edge.
177
- timerId = setTimeout(timerExpired, wait);
178
- // Invoke the leading edge.
179
- return leading ? invokeFunc(time) : result;
180
- }
181
-
182
- function remainingWait(time) {
183
- var timeSinceLastCall = time - lastCallTime,
184
- timeSinceLastInvoke = time - lastInvokeTime,
185
- result = wait - timeSinceLastCall;
186
-
187
- return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
188
- }
189
-
190
- function shouldInvoke(time) {
191
- var timeSinceLastCall = time - lastCallTime,
192
- timeSinceLastInvoke = time - lastInvokeTime;
193
-
194
- // Either this is the first call, activity has stopped and we're at the
195
- // trailing edge, the system time has gone backwards and we're treating
196
- // it as the trailing edge, or we've hit the `maxWait` limit.
197
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
198
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
199
- }
200
-
201
- function timerExpired() {
202
- var time = now();
203
- if (shouldInvoke(time)) {
204
- return trailingEdge(time);
205
- }
206
- // Restart the timer.
207
- timerId = setTimeout(timerExpired, remainingWait(time));
208
- }
209
-
210
- function trailingEdge(time) {
211
- timerId = undefined;
212
-
213
- // Only invoke if we have `lastArgs` which means `func` has been
214
- // debounced at least once.
215
- if (trailing && lastArgs) {
216
- return invokeFunc(time);
217
- }
218
- lastArgs = lastThis = undefined;
219
- return result;
220
- }
221
-
222
- function cancel() {
223
- if (timerId !== undefined) {
224
- clearTimeout(timerId);
225
- }
226
- lastInvokeTime = 0;
227
- lastArgs = lastCallTime = lastThis = timerId = undefined;
228
- }
229
-
230
- function flush() {
231
- return timerId === undefined ? result : trailingEdge(now());
232
- }
233
-
234
- function debounced() {
235
- var time = now(),
236
- isInvoking = shouldInvoke(time);
237
-
238
- lastArgs = arguments;
239
- lastThis = this;
240
- lastCallTime = time;
241
-
242
- if (isInvoking) {
243
- if (timerId === undefined) {
244
- return leadingEdge(lastCallTime);
245
- }
246
- if (maxing) {
247
- // Handle invocations in a tight loop.
248
- timerId = setTimeout(timerExpired, wait);
249
- return invokeFunc(lastCallTime);
250
- }
251
- }
252
- if (timerId === undefined) {
253
- timerId = setTimeout(timerExpired, wait);
254
- }
255
- return result;
256
- }
257
- debounced.cancel = cancel;
258
- debounced.flush = flush;
259
- return debounced;
260
- }
261
-
262
- /**
263
- * Creates a throttled function that only invokes `func` at most once per
264
- * every `wait` milliseconds. The throttled function comes with a `cancel`
265
- * method to cancel delayed `func` invocations and a `flush` method to
266
- * immediately invoke them. Provide `options` to indicate whether `func`
267
- * should be invoked on the leading and/or trailing edge of the `wait`
268
- * timeout. The `func` is invoked with the last arguments provided to the
269
- * throttled function. Subsequent calls to the throttled function return the
270
- * result of the last `func` invocation.
271
- *
272
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
273
- * invoked on the trailing edge of the timeout only if the throttled function
274
- * is invoked more than once during the `wait` timeout.
275
- *
276
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
277
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
278
- *
279
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
280
- * for details over the differences between `_.throttle` and `_.debounce`.
281
- *
282
- * @static
283
- * @memberOf _
284
- * @since 0.1.0
285
- * @category Function
286
- * @param {Function} func The function to throttle.
287
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
288
- * @param {Object} [options={}] The options object.
289
- * @param {boolean} [options.leading=true]
290
- * Specify invoking on the leading edge of the timeout.
291
- * @param {boolean} [options.trailing=true]
292
- * Specify invoking on the trailing edge of the timeout.
293
- * @returns {Function} Returns the new throttled function.
294
- * @example
295
- *
296
- * // Avoid excessively updating the position while scrolling.
297
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
298
- *
299
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
300
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
301
- * jQuery(element).on('click', throttled);
302
- *
303
- * // Cancel the trailing throttled invocation.
304
- * jQuery(window).on('popstate', throttled.cancel);
305
- */
306
- function throttle(func, wait, options) {
307
- var leading = true,
308
- trailing = true;
309
-
310
- if (typeof func != 'function') {
311
- throw new TypeError(FUNC_ERROR_TEXT);
312
- }
313
- if (isObject(options)) {
314
- leading = 'leading' in options ? !!options.leading : leading;
315
- trailing = 'trailing' in options ? !!options.trailing : trailing;
316
- }
317
- return debounce(func, wait, {
318
- 'leading': leading,
319
- 'maxWait': wait,
320
- 'trailing': trailing
321
- });
322
- }
323
-
324
- /**
325
- * Checks if `value` is the
326
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
327
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
328
- *
329
- * @static
330
- * @memberOf _
331
- * @since 0.1.0
332
- * @category Lang
333
- * @param {*} value The value to check.
334
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
335
- * @example
336
- *
337
- * _.isObject({});
338
- * // => true
339
- *
340
- * _.isObject([1, 2, 3]);
341
- * // => true
342
- *
343
- * _.isObject(_.noop);
344
- * // => true
345
- *
346
- * _.isObject(null);
347
- * // => false
348
- */
349
- function isObject(value) {
350
- var type = typeof value;
351
- return !!value && (type == 'object' || type == 'function');
352
- }
353
-
354
- /**
355
- * Checks if `value` is object-like. A value is object-like if it's not `null`
356
- * and has a `typeof` result of "object".
357
- *
358
- * @static
359
- * @memberOf _
360
- * @since 4.0.0
361
- * @category Lang
362
- * @param {*} value The value to check.
363
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
364
- * @example
365
- *
366
- * _.isObjectLike({});
367
- * // => true
368
- *
369
- * _.isObjectLike([1, 2, 3]);
370
- * // => true
371
- *
372
- * _.isObjectLike(_.noop);
373
- * // => false
374
- *
375
- * _.isObjectLike(null);
376
- * // => false
377
- */
378
- function isObjectLike(value) {
379
- return !!value && typeof value == 'object';
380
- }
381
-
382
- /**
383
- * Checks if `value` is classified as a `Symbol` primitive or object.
384
- *
385
- * @static
386
- * @memberOf _
387
- * @since 4.0.0
388
- * @category Lang
389
- * @param {*} value The value to check.
390
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
391
- * @example
392
- *
393
- * _.isSymbol(Symbol.iterator);
394
- * // => true
395
- *
396
- * _.isSymbol('abc');
397
- * // => false
398
- */
399
- function isSymbol(value) {
400
- return typeof value == 'symbol' ||
401
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
402
- }
403
-
404
- /**
405
- * Converts `value` to a number.
406
- *
407
- * @static
408
- * @memberOf _
409
- * @since 4.0.0
410
- * @category Lang
411
- * @param {*} value The value to process.
412
- * @returns {number} Returns the number.
413
- * @example
414
- *
415
- * _.toNumber(3.2);
416
- * // => 3.2
417
- *
418
- * _.toNumber(Number.MIN_VALUE);
419
- * // => 5e-324
420
- *
421
- * _.toNumber(Infinity);
422
- * // => Infinity
423
- *
424
- * _.toNumber('3.2');
425
- * // => 3.2
426
- */
427
- function toNumber(value) {
428
- if (typeof value == 'number') {
429
- return value;
430
- }
431
- if (isSymbol(value)) {
432
- return NAN;
433
- }
434
- if (isObject(value)) {
435
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
436
- value = isObject(other) ? (other + '') : other;
437
- }
438
- if (typeof value != 'string') {
439
- return value === 0 ? value : +value;
440
- }
441
- value = value.replace(reTrim, '');
442
- var isBinary = reIsBinary.test(value);
443
- return (isBinary || reIsOctal.test(value))
444
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
445
- : (reIsBadHex.test(value) ? NAN : +value);
446
- }
447
-
448
- var lodash_throttle = throttle;
449
-
450
- function tagWidth(text) {
451
- const context = document.createElement('canvas').getContext('2d');
452
- context.font =
453
- "14px apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif";
454
- return context.measureText(text).width + 44; // = text + l/r padding + margin-right
455
- }
456
- const XplSelect = class {
457
- constructor(hostRef) {
458
- index.registerInstance(this, hostRef);
459
- this.choices = [];
460
- this.description = undefined;
461
- this.disabled = undefined;
462
- this.error = undefined;
463
- this.label = undefined;
464
- this.mode = 'single';
465
- this.placeholder = undefined;
466
- this.truncate = true;
467
- this.active = false;
468
- this.id = v4.v4();
469
- this.keepFocus = false;
470
- this.selected = undefined;
471
- this.value = '';
472
- this.displayValue = '';
473
- this.visibleChoices = Infinity;
474
- }
475
- componentWillLoad() {
476
- this.selected =
477
- this.choices && this.choices.length > 0
478
- ? this.choices.map(() => false)
479
- : [];
480
- window.addEventListener('click', (e) => {
481
- const el = e.target;
482
- const select = el.closest('.xpl-select');
483
- if (select === null || select !== this.container) {
484
- this.active = false;
485
- }
486
- });
487
- window.addEventListener('resize', lodash_throttle(() => {
488
- this.maybeTruncateChoices();
489
- }, 250));
490
- }
491
- componentDidLoad() {
492
- this.dropdown = this.container.querySelector('xpl-dropdown');
493
- }
494
- maybeTruncateChoices() {
495
- if (this.mode === 'single' || !this.truncate)
496
- return;
497
- const containerWidth = this.container.getBoundingClientRect().width;
498
- let visibleChoices = 0;
499
- let visibleChoicesWidth = 0;
500
- const actualNumSelected = this.selected.filter((a) => a).length;
501
- for (let i = 0; i < actualNumSelected; i++) {
502
- visibleChoicesWidth += tagWidth(this.getDisplayValue(i));
503
- if (visibleChoicesWidth > containerWidth - 140)
504
- break;
505
- visibleChoices++;
506
- }
507
- if (visibleChoices >= actualNumSelected)
508
- visibleChoices = Infinity;
509
- if (visibleChoices < 1)
510
- visibleChoices = 1;
511
- this.visibleChoices = visibleChoices;
512
- }
513
- flattenChoices() {
514
- return this.choices.reduce((acc, curr) => [
515
- ...acc,
516
- ...(curr.groupName ? curr.options : [curr]),
517
- ], []);
518
- }
519
- getDisplayValue(i) {
520
- return this.flattenChoices()[i].label || this.flattenChoices()[i].value;
521
- }
522
- getActualValue(i) {
523
- return this.flattenChoices()[i].value || this.flattenChoices()[i].label;
524
- }
525
- update() {
526
- this.selected = this.flattenChoices().map(({ isSelected }) => isSelected);
527
- if (this.mode === 'single') {
528
- const selected = this.selected.findIndex((v) => v);
529
- this.value = selected >= 0 ? this.getActualValue(selected) : '';
530
- this.displayValue =
531
- selected >= 0 ? this.getDisplayValue(selected) : '';
532
- }
533
- else if (this.mode === 'multi') {
534
- this.value = this.selected
535
- .map((v, i) => {
536
- return v ? this.getActualValue(i) : '';
537
- })
538
- .filter((v) => v.length > 0)
539
- .join('|');
540
- }
541
- }
542
- render() {
543
- let visibleChoices = 0;
544
- return (index.h(index.Host, { class: {
545
- 'xpl-select': true,
546
- 'xpl-select--disabled': this.disabled,
547
- 'xpl-select--no-truncate': !this.truncate,
548
- }, onKeyDown: (e) => {
549
- if (e.key === 'Escape')
550
- this.active = false;
551
- }, ref: (el) => (this.container = el) }, this.label || this.description ? (index.h("label", { class: {
552
- 'xpl-label': true,
553
- 'xpl-label--disabled': this.disabled,
554
- }, htmlFor: this.id }, this.label, this.description && (index.h("small", { class: {
555
- 'xpl-description': true,
556
- 'xpl-description--disabled': this.disabled,
557
- } }, this.description)))) : null, index.h("div", { class: {
558
- 'xpl-input': true,
559
- 'xpl-input--disabled': this.disabled,
560
- 'xpl-input--error': this.error !== undefined,
561
- } }, index.h("div", { class: "xpl-input-wrapper" }, index.h("div", { class: {
562
- 'xpl-select-value': true,
563
- 'xpl-select-value--active': this.mode === 'multi' &&
564
- this.value.length > 0,
565
- 'has-value': this.value.length > 0,
566
- } }, this.mode === 'single'
567
- ? this.displayValue || this.placeholder
568
- : this.value.length > 0
569
- ? this.selected.map((v, i) => {
570
- if (!v)
571
- return null;
572
- if (visibleChoices >= this.visibleChoices)
573
- return null;
574
- visibleChoices++;
575
- return (index.h("xpl-tag", { onClose: () => {
576
- this.flattenChoices().forEach((v, j) => {
577
- if (i === j)
578
- v.isSelected =
579
- false;
580
- });
581
- const mapOptions = (option) => {
582
- option.options =
583
- option.groupName
584
- ? option.options.map(mapOptions)
585
- : undefined;
586
- return option;
587
- };
588
- this.choices =
589
- this.choices.map(mapOptions);
590
- this.update();
591
- this.maybeTruncateChoices();
592
- } }, this.getDisplayValue(i)));
593
- })
594
- : this.placeholder, this.visibleChoices < Infinity &&
595
- `+ ${this.selected.filter((a) => a).length -
596
- this.visibleChoices} more`), index.h("button", { disabled: this.disabled, id: this.id, onKeyDown: (e) => {
597
- if (e.key === 'Tab')
598
- this.keepFocus = true;
599
- }, onClick: () => {
600
- const { dropdown } = this;
601
- if (!this.disabled)
602
- dropdown.isOpen = !dropdown.isOpen;
603
- } })), !this.disabled && (index.h("xpl-dropdown", { options: this.choices, mode: this.mode, triggerId: this.id, update: () => {
604
- this.update();
605
- this.maybeTruncateChoices();
606
- } })), this.error !== undefined && this.error.length > 0 && (index.h("label", { class: "xpl-input-error", htmlFor: this.id }, index.h("svg", { width: "10", height: "11", viewBox: "0 0 10 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.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))), index.h("input", { type: "hidden", value: this.value })));
607
- }
608
- };
609
-
610
- exports.xpl_select = XplSelect;
@@ -1 +0,0 @@
1
- export {};