@nasa-terra/components 0.0.1 → 0.0.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 (250) hide show
  1. package/cdn/chunks/{chunk.4YOL6PQR.js → chunk.2LH52WLN.js} +5 -5
  2. package/cdn/chunks/{chunk.RBKBAQOH.js → chunk.2WF7EATT.js} +3 -3
  3. package/cdn/chunks/{chunk.ZQ5WJYY5.js → chunk.3NOH36JE.js} +1 -1
  4. package/{dist/chunks/chunk.IEU4MULT.js → cdn/chunks/chunk.4OFE6FHL.js} +1 -1
  5. package/cdn/chunks/{chunk.FZT3BVW7.js → chunk.5NSDKQFA.js} +1 -1
  6. package/cdn/chunks/{chunk.IQITDFID.js → chunk.5OVZEQPW.js} +1 -1
  7. package/cdn/chunks/{chunk.JV6B7CXO.js → chunk.5UBB7KZQ.js} +1 -1
  8. package/cdn/chunks/{chunk.JCZW2OWI.js → chunk.76UFIPPH.js} +1 -1
  9. package/cdn/chunks/{chunk.MIAPAPCI.js → chunk.7UVCVDMD.js} +1 -1
  10. package/cdn/chunks/{chunk.BINGLTII.js → chunk.BHVFJEIU.js} +1 -1
  11. package/cdn/chunks/{chunk.FXIUS5TR.js → chunk.BLFAG25A.js} +1 -1
  12. package/cdn/chunks/{chunk.QQ33BJLG.js → chunk.C3FZSGJM.js} +1 -1
  13. package/cdn/chunks/{chunk.WNRL2JWN.js → chunk.CO6OXP3P.js} +1 -1
  14. package/cdn/chunks/{chunk.UQVPFKN3.js → chunk.CSZAFBCJ.js} +7 -7
  15. package/cdn/chunks/{chunk.RVJP24KU.js → chunk.EGBZ7Z36.js} +1 -1
  16. package/cdn/chunks/{chunk.NU4LRV7F.js → chunk.EH44OY6V.js} +1 -1
  17. package/cdn/chunks/{chunk.2B4YBQ5O.js → chunk.FYB4LVNE.js} +4 -4
  18. package/cdn/chunks/{chunk.VEUDIPUW.js → chunk.H4SLY4KN.js} +1 -1
  19. package/cdn/chunks/{chunk.KVY2Y3KE.js → chunk.HMECFSJ3.js} +1 -1
  20. package/cdn/chunks/{chunk.TV2NZLRC.js → chunk.II3GR7YQ.js} +1 -1
  21. package/{dist/chunks/chunk.7DEY3B3N.js → cdn/chunks/chunk.KCXQJJZ4.js} +1 -1
  22. package/cdn/chunks/{chunk.DQGFAA4K.js → chunk.KFYWXDIT.js} +1 -1
  23. package/cdn/chunks/{chunk.M25XJ2VR.js → chunk.KQ6GR2XZ.js} +8 -8
  24. package/{dist/chunks/chunk.NZIGCRLS.js → cdn/chunks/chunk.KZIVL4LN.js} +1 -1
  25. package/cdn/chunks/{chunk.2O76GCUZ.js → chunk.MOL3RELR.js} +1 -1
  26. package/cdn/chunks/{chunk.MQ5JNQCQ.js → chunk.ORXIH4AJ.js} +1 -1
  27. package/cdn/chunks/{chunk.GCKJPPGU.js → chunk.P4LXCHCY.js} +1 -1
  28. package/cdn/chunks/{chunk.J576Q62R.js → chunk.PUWFHEBP.js} +1 -1
  29. package/cdn/chunks/{chunk.KXLY6BVH.js → chunk.PYRUETLC.js} +4 -4
  30. package/cdn/chunks/{chunk.ITX3RB2M.js → chunk.RDW2UZ5N.js} +1 -1
  31. package/{dist/chunks/chunk.IP3XWLQI.js → cdn/chunks/chunk.RS4CISKV.js} +1 -1
  32. package/cdn/chunks/{chunk.MOJMTJF6.js → chunk.S6SLZPVX.js} +1 -1
  33. package/cdn/chunks/{chunk.IO4MLLEG.js → chunk.SQUNJ4EJ.js} +1 -1
  34. package/cdn/chunks/{chunk.MXAZ646L.js → chunk.SXUZHG2G.js} +1 -1
  35. package/cdn/chunks/{chunk.R3AE5AQ5.js → chunk.VHMYUAU5.js} +1 -1
  36. package/cdn/components/button/button.component.js +2 -2
  37. package/cdn/components/button/button.js +3 -3
  38. package/cdn/components/chip/chip.component.js +2 -2
  39. package/cdn/components/chip/chip.js +3 -3
  40. package/cdn/components/combobox/combobox.component.js +3 -3
  41. package/cdn/components/combobox/combobox.js +4 -4
  42. package/cdn/components/date-range-slider/date-range-slider.component.js +3 -3
  43. package/cdn/components/date-range-slider/date-range-slider.js +4 -4
  44. package/cdn/components/icon/icon.component.js +4 -4
  45. package/cdn/components/icon/icon.js +5 -5
  46. package/cdn/components/icon/library.js +2 -2
  47. package/cdn/components/loader/loader.component.js +2 -2
  48. package/cdn/components/loader/loader.js +3 -3
  49. package/cdn/components/map/map.component.js +4 -4
  50. package/cdn/components/map/map.js +5 -5
  51. package/cdn/components/plot/plot.component.js +2 -2
  52. package/cdn/components/plot/plot.js +3 -3
  53. package/cdn/components/spatial-picker/spatial-picker.component.js +5 -5
  54. package/cdn/components/spatial-picker/spatial-picker.js +6 -6
  55. package/cdn/components/time-series/time-series.component.js +23 -23
  56. package/cdn/components/time-series/time-series.controller.js +1 -1
  57. package/cdn/components/time-series/time-series.js +24 -24
  58. package/cdn/components/variable-combobox/variable-combobox.component.js +8 -8
  59. package/cdn/components/variable-combobox/variable-combobox.js +9 -9
  60. package/cdn/custom-elements.json +154 -154
  61. package/cdn/react/button/index.js +3 -3
  62. package/cdn/react/chip/index.js +3 -3
  63. package/cdn/react/combobox/index.js +4 -4
  64. package/cdn/react/date-range-slider/index.js +4 -4
  65. package/cdn/react/icon/index.js +5 -5
  66. package/cdn/react/index.d.ts +2 -2
  67. package/cdn/react/index.js +45 -45
  68. package/cdn/react/loader/index.js +3 -3
  69. package/cdn/react/map/index.js +5 -5
  70. package/cdn/react/plot/index.js +3 -3
  71. package/cdn/react/spatial-picker/index.js +6 -6
  72. package/cdn/react/time-series/index.js +24 -24
  73. package/cdn/react/variable-combobox/index.js +9 -9
  74. package/cdn/terra-ui-components.js +43 -43
  75. package/cdn/types/vue/index.d.ts +16 -16
  76. package/cdn/utilities/icon-library.js +2 -2
  77. package/cdn/vscode.html-custom-data.json +16 -16
  78. package/cdn/web-types.json +39 -39
  79. package/{cdn/chunks/chunk.36AVAQOO.js → dist/chunks/chunk.26XMYCND.js} +3 -3
  80. package/{cdn/chunks/chunk.7DEY3B3N.js → dist/chunks/chunk.34BDCGAS.js} +1 -1
  81. package/{cdn/chunks/chunk.JOVDYQHE.js → dist/chunks/chunk.356TZEPJ.js} +1 -1
  82. package/{cdn/chunks/chunk.KH54YRZ3.js → dist/chunks/chunk.37CMTFD4.js} +1 -1
  83. package/dist/chunks/{chunk.EMISRECR.js → chunk.37V2INM4.js} +5 -5
  84. package/dist/chunks/{chunk.5B33QFBB.js → chunk.3OTXIELM.js} +1 -1
  85. package/{cdn/chunks/chunk.27YQ2AOA.js → dist/chunks/chunk.4WNMOJSX.js} +6 -6
  86. package/{cdn/chunks/chunk.GHCQCYO6.js → dist/chunks/chunk.5LBNOLAY.js} +1 -1
  87. package/dist/chunks/{chunk.PGNCNTOA.js → chunk.6G6MC7ET.js} +1 -1
  88. package/{cdn/chunks/chunk.77L4US7V.js → dist/chunks/chunk.6HBNUONX.js} +1 -1
  89. package/{cdn/chunks/chunk.P7W2ODWK.js → dist/chunks/chunk.6HHKJO37.js} +1 -1
  90. package/{cdn/chunks/chunk.MKXJDRVT.js → dist/chunks/chunk.ACNC5AZO.js} +1 -1
  91. package/{cdn/chunks/chunk.OLCGKQR3.js → dist/chunks/chunk.D44WRZDJ.js} +1 -1
  92. package/dist/chunks/{chunk.OOUCODFZ.js → chunk.DKCU7YEZ.js} +1 -1
  93. package/{cdn/chunks/chunk.SMRM4VEQ.js → dist/chunks/chunk.EPMXIUY7.js} +1 -1
  94. package/dist/chunks/{chunk.ORZO3BCW.js → chunk.HBEQ6SPT.js} +1 -1
  95. package/dist/chunks/{chunk.BB7N2ZYB.js → chunk.HJ4OGF6V.js} +1 -1
  96. package/dist/chunks/{chunk.P25SJ6YA.js → chunk.K3PPW47B.js} +1 -1
  97. package/dist/chunks/{chunk.RDOXOIYG.js → chunk.KWCEJCNP.js} +1 -1
  98. package/dist/chunks/{chunk.NOEGCTIS.js → chunk.LAFN7QOI.js} +7 -7
  99. package/dist/chunks/{chunk.MOJMTJF6.js → chunk.LMUMRQLT.js} +1 -1
  100. package/{cdn/chunks/chunk.YOR2OZZR.js → dist/chunks/chunk.LXV5KI76.js} +1 -1
  101. package/{cdn/chunks/chunk.ZPPR6CPT.js → dist/chunks/chunk.NA6RDAQK.js} +1 -1
  102. package/dist/chunks/{chunk.FXIUS5TR.js → chunk.R32FZJSC.js} +1 -1
  103. package/dist/chunks/{chunk.EFAXKQZX.js → chunk.RCELHBSG.js} +1 -1
  104. package/{cdn/chunks/chunk.ZAHTEXVC.js → dist/chunks/chunk.RHF5LAQQ.js} +1 -1
  105. package/{cdn/chunks/chunk.UJBBUYTN.js → dist/chunks/chunk.TEY3I3LS.js} +1 -1
  106. package/dist/chunks/{chunk.2I657ASB.js → chunk.TFKJWQKC.js} +1 -1
  107. package/dist/chunks/{chunk.FGILL5W6.js → chunk.UTUM2YTN.js} +1 -1
  108. package/dist/chunks/{chunk.65A3A43G.js → chunk.WCD47X2N.js} +1 -1
  109. package/{cdn/chunks/chunk.Y3WAKQQ3.js → dist/chunks/chunk.WHJHZJ6L.js} +2 -2
  110. package/{cdn/chunks/chunk.UE4FYVUH.js → dist/chunks/chunk.XK7GWNRK.js} +1 -1
  111. package/dist/chunks/{chunk.QSCELHEQ.js → chunk.XPQYTQXW.js} +1 -1
  112. package/dist/chunks/{chunk.FZT3BVW7.js → chunk.ZI3RW2HX.js} +1 -1
  113. package/{cdn/chunks/chunk.SJADWOCY.js → dist/chunks/chunk.ZUWKLZ5N.js} +1 -1
  114. package/dist/components/button/button.component.js +2 -2
  115. package/dist/components/button/button.js +3 -3
  116. package/dist/components/chip/chip.component.js +2 -2
  117. package/dist/components/chip/chip.js +3 -3
  118. package/dist/components/combobox/combobox.component.js +3 -3
  119. package/dist/components/combobox/combobox.js +4 -4
  120. package/dist/components/date-range-slider/date-range-slider.component.js +3 -3
  121. package/dist/components/date-range-slider/date-range-slider.js +4 -4
  122. package/dist/components/icon/icon.component.js +4 -4
  123. package/dist/components/icon/icon.js +5 -5
  124. package/dist/components/icon/library.js +2 -2
  125. package/dist/components/loader/loader.component.js +2 -2
  126. package/dist/components/loader/loader.js +3 -3
  127. package/dist/components/map/map.component.js +4 -4
  128. package/dist/components/map/map.js +5 -5
  129. package/dist/components/plot/plot.component.js +2 -2
  130. package/dist/components/plot/plot.js +3 -3
  131. package/dist/components/spatial-picker/spatial-picker.component.js +5 -5
  132. package/dist/components/spatial-picker/spatial-picker.js +6 -6
  133. package/dist/components/time-series/time-series.component.js +19 -19
  134. package/dist/components/time-series/time-series.controller.js +1 -1
  135. package/dist/components/time-series/time-series.js +20 -20
  136. package/dist/components/variable-combobox/variable-combobox.component.js +8 -8
  137. package/dist/components/variable-combobox/variable-combobox.js +9 -9
  138. package/dist/custom-elements.json +154 -154
  139. package/dist/react/button/index.js +3 -3
  140. package/dist/react/chip/index.js +3 -3
  141. package/dist/react/combobox/index.js +4 -4
  142. package/dist/react/date-range-slider/index.js +4 -4
  143. package/dist/react/icon/index.js +5 -5
  144. package/dist/react/index.d.ts +2 -2
  145. package/dist/react/index.js +43 -43
  146. package/dist/react/loader/index.js +3 -3
  147. package/dist/react/map/index.js +5 -5
  148. package/dist/react/plot/index.js +3 -3
  149. package/dist/react/spatial-picker/index.js +6 -6
  150. package/dist/react/time-series/index.js +20 -20
  151. package/dist/react/variable-combobox/index.js +9 -9
  152. package/dist/terra-ui-components.js +41 -41
  153. package/dist/types/vue/index.d.ts +16 -16
  154. package/dist/utilities/icon-library.js +2 -2
  155. package/dist/vscode.html-custom-data.json +16 -16
  156. package/dist/web-types.json +39 -39
  157. package/package.json +1 -1
  158. package/cdn/chunks/chunk.2I657ASB.js +0 -85
  159. package/cdn/chunks/chunk.2J6CFV4K.js +0 -11
  160. package/cdn/chunks/chunk.2V4XFMTB.js +0 -7
  161. package/cdn/chunks/chunk.3ZGFXEAJ.js +0 -273
  162. package/cdn/chunks/chunk.7VUSSQRI.js +0 -20
  163. package/cdn/chunks/chunk.AAWOHDFX.js +0 -259
  164. package/cdn/chunks/chunk.AEIZVWLR.js +0 -24
  165. package/cdn/chunks/chunk.BB7N2ZYB.js +0 -21
  166. package/cdn/chunks/chunk.BLNUBLUS.js +0 -289
  167. package/cdn/chunks/chunk.D33ZL7ZQ.js +0 -21
  168. package/cdn/chunks/chunk.DL3FIOYA.js +0 -21
  169. package/cdn/chunks/chunk.EFAXKQZX.js +0 -11
  170. package/cdn/chunks/chunk.EMISRECR.js +0 -214
  171. package/cdn/chunks/chunk.FGILL5W6.js +0 -118
  172. package/cdn/chunks/chunk.I2NEFB34.js +0 -99
  173. package/cdn/chunks/chunk.I32QCWMN.js +0 -21
  174. package/cdn/chunks/chunk.IBEKZVOY.js +0 -80
  175. package/cdn/chunks/chunk.IP3XWLQI.js +0 -11
  176. package/cdn/chunks/chunk.JFU3ZCDL.js +0 -359
  177. package/cdn/chunks/chunk.LELNKRPW.js +0 -685
  178. package/cdn/chunks/chunk.MDM7S6E6.js +0 -21
  179. package/cdn/chunks/chunk.MWHQHPUM.js +0 -54
  180. package/cdn/chunks/chunk.N2DS7NLI.js +0 -102
  181. package/cdn/chunks/chunk.NYBJ252W.js +0 -318
  182. package/cdn/chunks/chunk.OIDMX5LU.js +0 -10
  183. package/cdn/chunks/chunk.OOUCODFZ.js +0 -179
  184. package/cdn/chunks/chunk.OQE2USZJ.js +0 -41
  185. package/cdn/chunks/chunk.OU4UPMYR.js +0 -330
  186. package/cdn/chunks/chunk.P25SJ6YA.js +0 -478
  187. package/cdn/chunks/chunk.PJXIJK2G.js +0 -102
  188. package/cdn/chunks/chunk.RDOXOIYG.js +0 -11
  189. package/cdn/chunks/chunk.RYPAZDXE.js +0 -61
  190. package/cdn/chunks/chunk.SCU5LFS3.js +0 -325
  191. package/cdn/chunks/chunk.SHS42OAD.js +0 -620
  192. package/cdn/chunks/chunk.SQMSSGQI.js +0 -11
  193. package/cdn/chunks/chunk.T322FDKI.js +0 -300
  194. package/cdn/chunks/chunk.UU46CLE7.js +0 -120
  195. package/cdn/chunks/chunk.WGFD2LHA.js +0 -83
  196. package/cdn/chunks/chunk.WL747XGE.js +0 -194
  197. package/cdn/chunks/chunk.ZCNMYQP2.js +0 -113
  198. package/cdn/chunks/chunk.ZGJAUXFV.js +0 -39
  199. package/cdn/chunks/chunk.ZK7QVWBI.js +0 -37
  200. package/cdn/chunks/chunk.ZVKNJQPF.js +0 -25
  201. package/dist/chunks/chunk.27YQ2AOA.js +0 -251
  202. package/dist/chunks/chunk.2O76GCUZ.js +0 -21
  203. package/dist/chunks/chunk.2WZAYHEX.js +0 -214
  204. package/dist/chunks/chunk.356SSUTI.js +0 -11
  205. package/dist/chunks/chunk.36AVAQOO.js +0 -404
  206. package/dist/chunks/chunk.3D66L46K.js +0 -11
  207. package/dist/chunks/chunk.3LUNFNDR.js +0 -118
  208. package/dist/chunks/chunk.4MN2BLJS.js +0 -21
  209. package/dist/chunks/chunk.D6FJH7WA.js +0 -21
  210. package/dist/chunks/chunk.DDPOISEU.js +0 -179
  211. package/dist/chunks/chunk.EBBV6NVD.js +0 -11
  212. package/dist/chunks/chunk.GHCQCYO6.js +0 -179
  213. package/dist/chunks/chunk.HO5CZIK5.js +0 -11
  214. package/dist/chunks/chunk.I32QCWMN.js +0 -21
  215. package/dist/chunks/chunk.IO4MLLEG.js +0 -21
  216. package/dist/chunks/chunk.J4B6HPXD.js +0 -11
  217. package/dist/chunks/chunk.J576Q62R.js +0 -11
  218. package/dist/chunks/chunk.JCZW2OWI.js +0 -11
  219. package/dist/chunks/chunk.K2HRGRYE.js +0 -11
  220. package/dist/chunks/chunk.KXNDHJXA.js +0 -404
  221. package/dist/chunks/chunk.MIAPAPCI.js +0 -21
  222. package/dist/chunks/chunk.MXAZ646L.js +0 -11
  223. package/dist/chunks/chunk.NNLAIN52.js +0 -11
  224. package/dist/chunks/chunk.NO35M7LF.js +0 -21
  225. package/dist/chunks/chunk.NU4LRV7F.js +0 -21
  226. package/dist/chunks/chunk.OIGE7CMM.js +0 -11
  227. package/dist/chunks/chunk.P4QMMCAR.js +0 -24
  228. package/dist/chunks/chunk.PJXIJK2G.js +0 -102
  229. package/dist/chunks/chunk.Q7F3GGVA.js +0 -251
  230. package/dist/chunks/chunk.QQ33BJLG.js +0 -11
  231. package/dist/chunks/chunk.SBTZE5QZ.js +0 -21
  232. package/dist/chunks/chunk.SCU5LFS3.js +0 -325
  233. package/dist/chunks/chunk.SJADWOCY.js +0 -11
  234. package/dist/chunks/chunk.SMRM4VEQ.js +0 -11
  235. package/dist/chunks/chunk.T7MOUOBT.js +0 -11
  236. package/dist/chunks/chunk.UE4FYVUH.js +0 -25
  237. package/dist/chunks/chunk.UJBBUYTN.js +0 -11
  238. package/dist/chunks/chunk.WGFD2LHA.js +0 -83
  239. package/dist/chunks/chunk.WL747XGE.js +0 -194
  240. package/dist/chunks/chunk.WNRL2JWN.js +0 -21
  241. package/dist/chunks/chunk.XKDGF53W.js +0 -21
  242. package/dist/chunks/chunk.XLYZ6HY4.js +0 -179
  243. package/dist/chunks/chunk.XXV47QL2.js +0 -21
  244. package/dist/chunks/chunk.Y3WAKQQ3.js +0 -179
  245. package/dist/chunks/chunk.Y5CHSR6B.js +0 -21
  246. package/dist/chunks/chunk.YDJ7Z7YW.js +0 -478
  247. package/dist/chunks/chunk.YDMA4OA3.js +0 -11
  248. package/dist/chunks/chunk.Z2WXDYZC.js +0 -85
  249. package/{dist/chunks/chunk.MDRUDBRH.js → cdn/chunks/chunk.7DOMZGX7.js} +3 -3
  250. package/{cdn/chunks/chunk.MDRUDBRH.js → dist/chunks/chunk.7DOMZGX7.js} +3 -3
@@ -1,478 +0,0 @@
1
- import {
2
- combobox_styles_default
3
- } from "./chunk.JFU3ZCDL.js";
4
- import {
5
- clearSelection,
6
- walkToOption
7
- } from "./chunk.LMGJJIIS.js";
8
- import {
9
- watch
10
- } from "./chunk.ZK7QVWBI.js";
11
- import {
12
- TerraElement,
13
- component_styles_default
14
- } from "./chunk.PJXIJK2G.js";
15
- import {
16
- __decorateClass,
17
- __privateAdd,
18
- __privateGet,
19
- __privateSet,
20
- __spreadProps,
21
- __spreadValues
22
- } from "./chunk.RYPAZDXE.js";
23
-
24
- // src/components/combobox/combobox.component.ts
25
- import Fuse from "fuse.js";
26
- import { LitElement, html, nothing } from "lit";
27
- import { property, state } from "lit/decorators.js";
28
- import { ref } from "lit/directives/ref.js";
29
- import { repeat } from "lit/directives/repeat.js";
30
- import { cache } from "lit/directives/cache.js";
31
- import { choose } from "lit/directives/choose.js";
32
- import { map } from "lit/directives/map.js";
33
- var _combobox, _listbox, _searchEngine, _walker, _renderListItem, _renderGroupListItem, _renderError, _renderLoading, _dispatchChange, _handleButtonClick, _handleComboboxChange, _handleOptionClick, _handleKeydown, _manageListboxVisibility, _selectOption;
34
- var _TerraCombobox = class _TerraCombobox extends TerraElement {
35
- constructor() {
36
- super(...arguments);
37
- __privateAdd(this, _combobox, null);
38
- __privateAdd(this, _listbox, null);
39
- __privateAdd(this, _searchEngine, null);
40
- __privateAdd(this, _walker, null);
41
- this.label = "Search for Items";
42
- this.name = "Item";
43
- this.hideHelp = false;
44
- this.hideLabel = false;
45
- this.status = "INITIAL";
46
- this.content = {
47
- type: "GroupedListItem" /* GroupedListItem */,
48
- data: []
49
- };
50
- this.isExpanded = false;
51
- this.query = _TerraCombobox.initialQuery;
52
- this.searchResults = [];
53
- __privateAdd(this, _renderListItem, (listItem, index) => {
54
- return html`
55
- <li
56
- id="listbox-option-${index}"
57
- role="option"
58
- class="listbox-option"
59
- data-name=${listItem.name}
60
- data-event-detail=${JSON.stringify({
61
- name: listItem.name,
62
- value: listItem.value
63
- })}
64
- >
65
- ${listItem.name}
66
- </li>
67
- `;
68
- });
69
- __privateAdd(this, _renderGroupListItem, (groupListItem, index) => {
70
- return html`
71
- <li class="listbox-option-group" data-tree-walker="filter_skip">
72
- <span class="group-title" data-tree-walker="filter_skip"
73
- >${groupListItem.name}</span
74
- >
75
- <ul data-tree-walker="filter_skip">
76
- ${repeat(
77
- groupListItem.items,
78
- (item) => `${item.name}_${item.value}`,
79
- (item, subIndex) => {
80
- return html`
81
- <li
82
- id="listbox-option-${index}.${subIndex}"
83
- role="option"
84
- class="listbox-option"
85
- data-name=${item.title ? item.title : item.name}
86
- data-event-detail=${JSON.stringify({
87
- name: item.name,
88
- value: item.value
89
- })}
90
- >
91
- ${item.title ? item.title : item.name}
92
- </li>
93
- `;
94
- }
95
- )}
96
- </ul>
97
- </li>
98
- `;
99
- });
100
- __privateAdd(this, _renderError, () => {
101
- return html`
102
- <li class="error listbox-option-group">${this.content.data}</li>
103
- `;
104
- });
105
- __privateAdd(this, _renderLoading, () => {
106
- return html`
107
- <li class="skeleton listbox-option-group">
108
- <span class="skeleton-title"></span>
109
- <ul>
110
- <li class="listbox-option"></li>
111
- </ul>
112
- </li>
113
- <li class="skeleton listbox-option-group">
114
- <span class="skeleton-title"></span>
115
- <ul>
116
- <li class="listbox-option"></li>
117
- </ul>
118
- </li>
119
- <li class="skeleton listbox-option-group">
120
- <span class="skeleton-title"></span>
121
- <ul>
122
- <li class="listbox-option"></li>
123
- </ul>
124
- </li>
125
- `;
126
- });
127
- __privateAdd(this, _dispatchChange, (stringifiedData) => {
128
- this.emit("terra-combobox-change", { detail: JSON.parse(stringifiedData) });
129
- });
130
- __privateAdd(this, _handleButtonClick, () => {
131
- var _a;
132
- this.isExpanded = !this.isExpanded;
133
- (_a = __privateGet(this, _combobox)) == null ? void 0 : _a.focus();
134
- });
135
- __privateAdd(this, _handleComboboxChange, (event) => {
136
- var _a;
137
- const target = event.target;
138
- this.query = target.value;
139
- if (target.value) {
140
- this.isExpanded = true;
141
- }
142
- this.searchResults = (_a = __privateGet(this, _searchEngine)) == null ? void 0 : _a.search(target.value).map(({ item }) => item);
143
- });
144
- __privateAdd(this, _handleOptionClick, (event) => {
145
- const path = event.composedPath();
146
- const [target] = path.filter(
147
- (eventTarget) => eventTarget.role === "option"
148
- );
149
- if (!target)
150
- return;
151
- __privateGet(this, _selectOption).call(this, target);
152
- });
153
- __privateAdd(this, _handleKeydown, (event) => {
154
- var _a;
155
- switch (event.key) {
156
- case "ArrowDown": {
157
- clearSelection(
158
- __privateGet(this, _combobox),
159
- __privateGet(this, _listbox)
160
- );
161
- if (!this.isExpanded) {
162
- this.isExpanded = true;
163
- }
164
- if (event.altKey) {
165
- break;
166
- }
167
- walkToOption(
168
- __privateGet(this, _walker),
169
- __privateGet(this, _combobox),
170
- "next"
171
- );
172
- break;
173
- }
174
- case "ArrowUp": {
175
- clearSelection(
176
- __privateGet(this, _combobox),
177
- __privateGet(this, _listbox)
178
- );
179
- if (!this.isExpanded) {
180
- this.isExpanded = true;
181
- }
182
- walkToOption(
183
- __privateGet(this, _walker),
184
- __privateGet(this, _combobox),
185
- "previous"
186
- );
187
- break;
188
- }
189
- case "Enter": {
190
- __privateGet(this, _selectOption).call(this, (_a = __privateGet(this, _walker)) == null ? void 0 : _a.currentNode);
191
- break;
192
- }
193
- case "Escape": {
194
- clearSelection(
195
- __privateGet(this, _combobox),
196
- __privateGet(this, _listbox)
197
- );
198
- if (this.isExpanded) {
199
- this.isExpanded = false;
200
- } else {
201
- this.query = _TerraCombobox.initialQuery;
202
- }
203
- break;
204
- }
205
- default: {
206
- break;
207
- }
208
- }
209
- });
210
- __privateAdd(this, _manageListboxVisibility, (event) => {
211
- const path = event.composedPath();
212
- const containedThis = path.some(
213
- (eventTarget) => eventTarget.localName === _TerraCombobox.tagName
214
- );
215
- if (!containedThis) {
216
- this.isExpanded = false;
217
- }
218
- });
219
- __privateAdd(this, _selectOption, (option) => {
220
- const { name, eventDetail } = option.dataset;
221
- this.query = `${name}`;
222
- __privateGet(this, _dispatchChange).call(this, eventDetail);
223
- this.isExpanded = false;
224
- clearSelection(
225
- __privateGet(this, _combobox),
226
- __privateGet(this, _listbox)
227
- );
228
- });
229
- }
230
- connectedCallback() {
231
- super.connectedCallback();
232
- globalThis.addEventListener("click", __privateGet(this, _manageListboxVisibility));
233
- const list = this.content.type === "GroupedListItem" || this.content.type === "ListItem" ? this.content.data : [];
234
- __privateSet(this, _searchEngine, new Fuse(list, {
235
- //* @see https://www.fusejs.io/examples.html#nested-search
236
- findAllMatches: true,
237
- keys: [
238
- "name",
239
- // to search in the name of the GroupedListItem
240
- "items.name",
241
- // to search in the name of each ListItem
242
- "items.title",
243
- // to search in the title of each ListItem
244
- "items.value"
245
- // to search in the value of each ListItem
246
- ],
247
- useExtendedSearch: true
248
- }));
249
- }
250
- disconnectedCallback() {
251
- super.disconnectedCallback();
252
- globalThis.addEventListener("click", __privateGet(this, _manageListboxVisibility));
253
- }
254
- contentChanged(_oldValue, newValue) {
255
- const list = newValue.type === "GroupedListItem" || newValue.type === "ListItem" ? newValue.data : [];
256
- __privateSet(this, _searchEngine, new Fuse(list, {
257
- //* @see https://www.fusejs.io/examples.html#nested-search
258
- findAllMatches: true,
259
- keys: [
260
- "name",
261
- // to search in the name of the GroupedListItem
262
- "items.name",
263
- // to search in the name of each ListItem
264
- "items.title",
265
- // to search in the title of each ListItem
266
- "items.value"
267
- // to search in the value of each ListItem
268
- ],
269
- useExtendedSearch: true
270
- }));
271
- }
272
- render() {
273
- var _a;
274
- return html`<search part="base" title="Search through the list.">
275
- <label
276
- for="combobox"
277
- class=${this.hideLabel ? "sr-only" : "search-input-label"}
278
- >${this.label}</label
279
- >
280
- <div class="search-input-group">
281
- <input
282
- ${ref((el) => {
283
- var _a2;
284
- if (el) {
285
- (_a2 = __privateGet(this, _combobox)) != null ? _a2 : __privateSet(this, _combobox, el);
286
- }
287
- })}
288
- aria-autocomplete="list"
289
- aria-controls="listbox"
290
- aria-expanded=${this.isExpanded}
291
- class="combobox"
292
- id="combobox"
293
- part="combobox"
294
- role="combobox"
295
- type="text"
296
- .placeholder=${(_a = this.placeholder) != null ? _a : `${this.label}\u2026`}
297
- .value=${this.query}
298
- @input=${__privateGet(this, _handleComboboxChange)}
299
- @keydown=${__privateGet(this, _handleKeydown)}
300
- />
301
- <button
302
- aria-controls="listbox"
303
- aria-expanded=${this.isExpanded}
304
- aria-label="List of Searchable Items"
305
- class="combobox-button"
306
- id="combobox-button"
307
- part="button"
308
- tabindex="-1"
309
- type="button"
310
- @click=${__privateGet(this, _handleButtonClick)}
311
- >
312
- ${["COMPLETE", "ERROR", "INITIAL"].includes(this.status) ? html`<svg
313
- aria-hidden="true"
314
- class="button-icon chevron"
315
- focusable="false"
316
- viewBox="0 0 400 400"
317
- xmlns="http://www.w3.org/2000/svg"
318
- fill="currentColor"
319
- >
320
- <path
321
- d="m4.2 122.2 195.1 195.1 196.5-196.6-37.9-38-157.8 157.8-156.8-156.8z"
322
- ></path>
323
- </svg> ` : html`<svg
324
- class="button-icon spinner"
325
- stroke="currentColor"
326
- viewBox="0 0 24 24"
327
- xmlns="http://www.w3.org/2000/svg"
328
- >
329
- <circle
330
- cx="12"
331
- cy="12"
332
- r="9.5"
333
- fill="none"
334
- stroke-width="3"
335
- ></circle>
336
- </svg>`}
337
- </button>
338
-
339
- ${this.hideHelp ? nothing : html`<p class="search-help">
340
- See
341
- <a
342
- href="https://www.fusejs.io/examples.html#extended-search"
343
- rel="noopener noreferrer"
344
- target="_blank"
345
- >extended search syntax
346
- <svg
347
- aria-hidden="true"
348
- class="external-link"
349
- xmlns="http://www.w3.org/2000/svg"
350
- width="14"
351
- height="14"
352
- viewBox="0 0 24 24"
353
- >
354
- <path
355
- d="M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"
356
- /></svg></a
357
- >.
358
- </p>`}
359
- </div>
360
-
361
- <ul
362
- ${ref((el) => {
363
- var _a2;
364
- if (el) {
365
- (_a2 = __privateGet(this, _listbox)) != null ? _a2 : __privateSet(this, _listbox, el);
366
- __privateSet(this, _walker, document.createTreeWalker(
367
- el,
368
- NodeFilter.SHOW_ELEMENT,
369
- (node) => {
370
- return node.dataset.treeWalker === "filter_skip" ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
371
- }
372
- ));
373
- }
374
- })}
375
- ?inert=${!this.isExpanded}
376
- ?open=${this.isExpanded}
377
- @click=${__privateGet(this, _handleOptionClick)}
378
- aria-label=${this.query ? `${this.name} Matching ${this.query}` : this.name}
379
- id="listbox"
380
- part="listbox"
381
- role="listbox"
382
- class="search-results"
383
- >
384
- ${choose(this.status, [
385
- [
386
- "INITIAL",
387
- () => {
388
- return nothing;
389
- }
390
- ],
391
- ["PENDING", __privateGet(this, _renderLoading)],
392
- [
393
- "COMPLETE",
394
- () => {
395
- return this.content.type === "ListItem" /* ListItem */ ? cache(
396
- this.query === _TerraCombobox.initialQuery ? map(
397
- this.content.data,
398
- __privateGet(this, _renderListItem)
399
- ) : map(
400
- this.searchResults,
401
- __privateGet(this, _renderListItem)
402
- )
403
- ) : this.content.type === "GroupedListItem" /* GroupedListItem */ ? cache(
404
- this.query === _TerraCombobox.initialQuery ? map(
405
- this.content.data,
406
- __privateGet(this, _renderGroupListItem)
407
- ) : map(
408
- this.searchResults,
409
- __privateGet(this, _renderGroupListItem)
410
- )
411
- ) : nothing;
412
- }
413
- ],
414
- ["ERROR", __privateGet(this, _renderError)]
415
- ])}
416
- </ul>
417
- </search>`;
418
- }
419
- };
420
- _combobox = new WeakMap();
421
- _listbox = new WeakMap();
422
- _searchEngine = new WeakMap();
423
- _walker = new WeakMap();
424
- _renderListItem = new WeakMap();
425
- _renderGroupListItem = new WeakMap();
426
- _renderError = new WeakMap();
427
- _renderLoading = new WeakMap();
428
- _dispatchChange = new WeakMap();
429
- _handleButtonClick = new WeakMap();
430
- _handleComboboxChange = new WeakMap();
431
- _handleOptionClick = new WeakMap();
432
- _handleKeydown = new WeakMap();
433
- _manageListboxVisibility = new WeakMap();
434
- _selectOption = new WeakMap();
435
- _TerraCombobox.styles = [component_styles_default, combobox_styles_default];
436
- _TerraCombobox.shadowRootOptions = __spreadProps(__spreadValues({}, LitElement.shadowRootOptions), {
437
- delegatesFocus: true
438
- });
439
- _TerraCombobox.tagName = "terra-combobox";
440
- _TerraCombobox.initialQuery = "";
441
- __decorateClass([
442
- property()
443
- ], _TerraCombobox.prototype, "label", 2);
444
- __decorateClass([
445
- property()
446
- ], _TerraCombobox.prototype, "name", 2);
447
- __decorateClass([
448
- property()
449
- ], _TerraCombobox.prototype, "placeholder", 2);
450
- __decorateClass([
451
- property({ attribute: "hide-help", type: Boolean })
452
- ], _TerraCombobox.prototype, "hideHelp", 2);
453
- __decorateClass([
454
- property({ attribute: "hide-label", type: Boolean })
455
- ], _TerraCombobox.prototype, "hideLabel", 2);
456
- __decorateClass([
457
- property()
458
- ], _TerraCombobox.prototype, "status", 2);
459
- __decorateClass([
460
- property({ type: Object })
461
- ], _TerraCombobox.prototype, "content", 2);
462
- __decorateClass([
463
- state()
464
- ], _TerraCombobox.prototype, "isExpanded", 2);
465
- __decorateClass([
466
- state()
467
- ], _TerraCombobox.prototype, "query", 2);
468
- __decorateClass([
469
- state()
470
- ], _TerraCombobox.prototype, "searchResults", 2);
471
- __decorateClass([
472
- watch("content")
473
- ], _TerraCombobox.prototype, "contentChanged", 1);
474
- var TerraCombobox = _TerraCombobox;
475
-
476
- export {
477
- TerraCombobox
478
- };
@@ -1,102 +0,0 @@
1
- import {
2
- __decorateClass,
3
- __spreadValues
4
- } from "./chunk.RYPAZDXE.js";
5
-
6
- // src/styles/component.styles.ts
7
- import { css } from "lit";
8
- var component_styles_default = css`
9
- :host {
10
- box-sizing: border-box;
11
- }
12
-
13
- :host *,
14
- :host *::before,
15
- :host *::after {
16
- box-sizing: inherit;
17
- }
18
-
19
- [hidden] {
20
- display: none !important;
21
- }
22
-
23
- /* UTILITY CSS */
24
- .sr-only {
25
- block-size: 1px;
26
- border-width: 0;
27
- clip: rect(0, 0, 0, 0);
28
- margin: -1px;
29
- overflow: hidden;
30
- padding: 0;
31
- position: absolute;
32
- white-space: nowrap;
33
- width: 1px;
34
- }
35
- `;
36
-
37
- // src/internal/terra-element.ts
38
- import { LitElement } from "lit";
39
- import { property } from "lit/decorators.js";
40
- var TerraElement = class extends LitElement {
41
- emit(name, options) {
42
- const event = new CustomEvent(name, __spreadValues({
43
- bubbles: true,
44
- cancelable: false,
45
- composed: true,
46
- detail: {}
47
- }, options));
48
- this.dispatchEvent(event);
49
- return event;
50
- }
51
- /* eslint-enable */
52
- static define(name, elementConstructor = this, options = {}) {
53
- const currentlyRegisteredConstructor = customElements.get(name);
54
- if (!currentlyRegisteredConstructor) {
55
- customElements.define(
56
- name,
57
- class extends elementConstructor {
58
- },
59
- options
60
- );
61
- return;
62
- }
63
- let newVersion = " (unknown version)";
64
- let existingVersion = newVersion;
65
- if ("version" in elementConstructor && elementConstructor.version) {
66
- newVersion = " v" + elementConstructor.version;
67
- }
68
- if ("version" in currentlyRegisteredConstructor && currentlyRegisteredConstructor.version) {
69
- existingVersion = " v" + currentlyRegisteredConstructor.version;
70
- }
71
- if (newVersion && existingVersion && newVersion === existingVersion) {
72
- return;
73
- }
74
- console.warn(
75
- `Attempted to register <${name}>${newVersion}, but <${name}>${existingVersion} has already been registered.`
76
- );
77
- }
78
- constructor() {
79
- super();
80
- Object.entries(
81
- this.constructor.dependencies
82
- ).forEach(([name, component]) => {
83
- ;
84
- this.constructor.define(name, component);
85
- });
86
- }
87
- };
88
- /* eslint-disable */
89
- // @ts-expect-error This is auto-injected at build time.
90
- TerraElement.version = "0.0.0";
91
- TerraElement.dependencies = {};
92
- __decorateClass([
93
- property()
94
- ], TerraElement.prototype, "dir", 2);
95
- __decorateClass([
96
- property()
97
- ], TerraElement.prototype, "lang", 2);
98
-
99
- export {
100
- component_styles_default,
101
- TerraElement
102
- };
@@ -1,11 +0,0 @@
1
- import {
2
- TerraDateRangeSlider
3
- } from "./chunk.GHCQCYO6.js";
4
-
5
- // src/components/date-range-slider/date-range-slider.ts
6
- var date_range_slider_default = TerraDateRangeSlider;
7
- TerraDateRangeSlider.define("terra-date-range-slider");
8
-
9
- export {
10
- date_range_slider_default
11
- };
@@ -1,61 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
- var __decorateClass = (decorators, target, key, kind) => {
22
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
23
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
24
- if (decorator = decorators[i])
25
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
26
- if (kind && result)
27
- __defProp(target, key, result);
28
- return result;
29
- };
30
- var __accessCheck = (obj, member, msg) => {
31
- if (!member.has(obj))
32
- throw TypeError("Cannot " + msg);
33
- };
34
- var __privateGet = (obj, member, getter) => {
35
- __accessCheck(obj, member, "read from private field");
36
- return getter ? getter.call(obj) : member.get(obj);
37
- };
38
- var __privateAdd = (obj, member, value) => {
39
- if (member.has(obj))
40
- throw TypeError("Cannot add the same private member more than once");
41
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
42
- };
43
- var __privateSet = (obj, member, value, setter) => {
44
- __accessCheck(obj, member, "write to private field");
45
- setter ? setter.call(obj, value) : member.set(obj, value);
46
- return value;
47
- };
48
- var __privateMethod = (obj, member, method) => {
49
- __accessCheck(obj, member, "access private method");
50
- return method;
51
- };
52
-
53
- export {
54
- __spreadValues,
55
- __spreadProps,
56
- __decorateClass,
57
- __privateGet,
58
- __privateAdd,
59
- __privateSet,
60
- __privateMethod
61
- };