@aquera/nile-elements 1.9.4 → 1.9.6

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 (198) hide show
  1. package/README.md +13 -0
  2. package/dist/index-5fef1a0d.esm.js +1 -0
  3. package/dist/index-8f38fae3.cjs.js +2 -0
  4. package/dist/index-8f38fae3.cjs.js.map +1 -0
  5. package/dist/index.cjs.js +1 -1
  6. package/dist/index.esm.js +1 -1
  7. package/dist/index.js +1527 -804
  8. package/dist/nile-chip/nile-chip.css.cjs.js +1 -1
  9. package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
  10. package/dist/nile-chip/nile-chip.css.esm.js +8 -1
  11. package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
  12. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  13. package/dist/nile-code-editor/nile-code-editor.esm.js +3 -3
  14. package/dist/nile-combobox/index.cjs.js +1 -1
  15. package/dist/nile-combobox/index.esm.js +1 -1
  16. package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
  17. package/dist/nile-combobox/nile-combobox.esm.js +1 -1
  18. package/dist/nile-command-menu/index.cjs.js +2 -0
  19. package/dist/nile-command-menu/index.cjs.js.map +1 -0
  20. package/dist/nile-command-menu/index.esm.js +1 -0
  21. package/dist/nile-command-menu/nile-command-menu.cjs.js +2 -0
  22. package/dist/nile-command-menu/nile-command-menu.cjs.js.map +1 -0
  23. package/dist/nile-command-menu/nile-command-menu.css.cjs.js +2 -0
  24. package/dist/nile-command-menu/nile-command-menu.css.cjs.js.map +1 -0
  25. package/dist/nile-command-menu/nile-command-menu.css.esm.js +182 -0
  26. package/dist/nile-command-menu/nile-command-menu.esm.js +97 -0
  27. package/dist/nile-command-menu-group/index.cjs.js +2 -0
  28. package/dist/nile-command-menu-group/index.cjs.js.map +1 -0
  29. package/dist/nile-command-menu-group/index.esm.js +1 -0
  30. package/dist/nile-command-menu-group/nile-command-menu-group.cjs.js +2 -0
  31. package/dist/nile-command-menu-group/nile-command-menu-group.cjs.js.map +1 -0
  32. package/dist/nile-command-menu-group/nile-command-menu-group.css.cjs.js +2 -0
  33. package/dist/nile-command-menu-group/nile-command-menu-group.css.cjs.js.map +1 -0
  34. package/dist/nile-command-menu-group/nile-command-menu-group.css.esm.js +33 -0
  35. package/dist/nile-command-menu-group/nile-command-menu-group.esm.js +11 -0
  36. package/dist/nile-command-menu-item/index.cjs.js +2 -0
  37. package/dist/nile-command-menu-item/index.cjs.js.map +1 -0
  38. package/dist/nile-command-menu-item/index.esm.js +1 -0
  39. package/dist/nile-command-menu-item/nile-command-menu-item.cjs.js +2 -0
  40. package/dist/nile-command-menu-item/nile-command-menu-item.cjs.js.map +1 -0
  41. package/dist/nile-command-menu-item/nile-command-menu-item.css.cjs.js +2 -0
  42. package/dist/nile-command-menu-item/nile-command-menu-item.css.cjs.js.map +1 -0
  43. package/dist/nile-command-menu-item/nile-command-menu-item.css.esm.js +115 -0
  44. package/dist/nile-command-menu-item/nile-command-menu-item.esm.js +21 -0
  45. package/dist/nile-detail/index.cjs.js +1 -1
  46. package/dist/nile-detail/index.esm.js +1 -1
  47. package/dist/nile-detail/nile-detail.cjs.js +1 -1
  48. package/dist/nile-detail/nile-detail.esm.js +1 -1
  49. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  50. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  51. package/dist/nile-dialog/nile-dialog.esm.js +1 -1
  52. package/dist/nile-dot-stepper/index.cjs.js +2 -0
  53. package/dist/nile-dot-stepper/index.cjs.js.map +1 -0
  54. package/dist/nile-dot-stepper/index.esm.js +1 -0
  55. package/dist/nile-dot-stepper/nile-dot-stepper.cjs.js +2 -0
  56. package/dist/nile-dot-stepper/nile-dot-stepper.cjs.js.map +1 -0
  57. package/dist/nile-dot-stepper/nile-dot-stepper.css.cjs.js +2 -0
  58. package/dist/nile-dot-stepper/nile-dot-stepper.css.cjs.js.map +1 -0
  59. package/dist/nile-dot-stepper/nile-dot-stepper.css.esm.js +77 -0
  60. package/dist/nile-dot-stepper/nile-dot-stepper.esm.js +24 -0
  61. package/dist/nile-hero/nile-hero.cjs.js +1 -1
  62. package/dist/nile-hero/nile-hero.cjs.js.map +1 -1
  63. package/dist/nile-hero/nile-hero.css.cjs.js +1 -1
  64. package/dist/nile-hero/nile-hero.css.cjs.js.map +1 -1
  65. package/dist/nile-hero/nile-hero.css.esm.js +14 -14
  66. package/dist/nile-hero/nile-hero.esm.js +1 -1
  67. package/dist/nile-hero-header/nile-hero-header.cjs.js +1 -1
  68. package/dist/nile-hero-header/nile-hero-header.cjs.js.map +1 -1
  69. package/dist/nile-hero-header/nile-hero-header.css.cjs.js +1 -1
  70. package/dist/nile-hero-header/nile-hero-header.css.cjs.js.map +1 -1
  71. package/dist/nile-hero-header/nile-hero-header.css.esm.js +11 -11
  72. package/dist/nile-hero-header/nile-hero-header.esm.js +3 -3
  73. package/dist/nile-rich-text-editor/index.cjs.js +1 -1
  74. package/dist/nile-rich-text-editor/index.esm.js +1 -1
  75. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +1 -1
  76. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -1
  77. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
  78. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
  79. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +70 -0
  80. package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
  81. package/dist/nile-rich-text-editor/nile-rte-image.cjs.js +3 -0
  82. package/dist/nile-rich-text-editor/nile-rte-image.cjs.js.map +1 -0
  83. package/dist/nile-rich-text-editor/nile-rte-image.esm.js +96 -0
  84. package/dist/nile-section-message/nile-section-message.css.cjs.js +1 -1
  85. package/dist/nile-section-message/nile-section-message.css.cjs.js.map +1 -1
  86. package/dist/nile-section-message/nile-section-message.css.esm.js +7 -8
  87. package/dist/src/index.d.ts +4 -0
  88. package/dist/src/index.js +4 -0
  89. package/dist/src/index.js.map +1 -1
  90. package/dist/src/nile-chip/nile-chip.css.js +8 -1
  91. package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
  92. package/dist/src/nile-code-editor/nile-code-editor.js +3 -3
  93. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  94. package/dist/src/nile-command-menu/index.d.ts +1 -0
  95. package/dist/src/nile-command-menu/index.js +2 -0
  96. package/dist/src/nile-command-menu/index.js.map +1 -0
  97. package/dist/src/nile-command-menu/nile-command-menu.css.d.ts +12 -0
  98. package/dist/src/nile-command-menu/nile-command-menu.css.js +194 -0
  99. package/dist/src/nile-command-menu/nile-command-menu.css.js.map +1 -0
  100. package/dist/src/nile-command-menu/nile-command-menu.d.ts +137 -0
  101. package/dist/src/nile-command-menu/nile-command-menu.js +557 -0
  102. package/dist/src/nile-command-menu/nile-command-menu.js.map +1 -0
  103. package/dist/src/nile-command-menu/nile-command-menu.test.d.ts +3 -0
  104. package/dist/src/nile-command-menu/nile-command-menu.test.js +268 -0
  105. package/dist/src/nile-command-menu/nile-command-menu.test.js.map +1 -0
  106. package/dist/src/nile-command-menu-group/index.d.ts +1 -0
  107. package/dist/src/nile-command-menu-group/index.js +2 -0
  108. package/dist/src/nile-command-menu-group/index.js.map +1 -0
  109. package/dist/src/nile-command-menu-group/nile-command-menu-group.css.d.ts +12 -0
  110. package/dist/src/nile-command-menu-group/nile-command-menu-group.css.js +45 -0
  111. package/dist/src/nile-command-menu-group/nile-command-menu-group.css.js.map +1 -0
  112. package/dist/src/nile-command-menu-group/nile-command-menu-group.d.ts +38 -0
  113. package/dist/src/nile-command-menu-group/nile-command-menu-group.js +68 -0
  114. package/dist/src/nile-command-menu-group/nile-command-menu-group.js.map +1 -0
  115. package/dist/src/nile-command-menu-group/nile-command-menu-group.test.d.ts +2 -0
  116. package/dist/src/nile-command-menu-group/nile-command-menu-group.test.js +22 -0
  117. package/dist/src/nile-command-menu-group/nile-command-menu-group.test.js.map +1 -0
  118. package/dist/src/nile-command-menu-item/index.d.ts +1 -0
  119. package/dist/src/nile-command-menu-item/index.js +2 -0
  120. package/dist/src/nile-command-menu-item/index.js.map +1 -0
  121. package/dist/src/nile-command-menu-item/nile-command-menu-item.css.d.ts +12 -0
  122. package/dist/src/nile-command-menu-item/nile-command-menu-item.css.js +127 -0
  123. package/dist/src/nile-command-menu-item/nile-command-menu-item.css.js.map +1 -0
  124. package/dist/src/nile-command-menu-item/nile-command-menu-item.d.ts +73 -0
  125. package/dist/src/nile-command-menu-item/nile-command-menu-item.js +174 -0
  126. package/dist/src/nile-command-menu-item/nile-command-menu-item.js.map +1 -0
  127. package/dist/src/nile-command-menu-item/nile-command-menu-item.test.d.ts +1 -0
  128. package/dist/src/nile-command-menu-item/nile-command-menu-item.test.js +35 -0
  129. package/dist/src/nile-command-menu-item/nile-command-menu-item.test.js.map +1 -0
  130. package/dist/src/nile-dialog/nile-dialog.js +1 -1
  131. package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
  132. package/dist/src/nile-dot-stepper/index.d.ts +1 -0
  133. package/dist/src/nile-dot-stepper/index.js +2 -0
  134. package/dist/src/nile-dot-stepper/index.js.map +1 -0
  135. package/dist/src/nile-dot-stepper/nile-dot-stepper.css.d.ts +12 -0
  136. package/dist/src/nile-dot-stepper/nile-dot-stepper.css.js +89 -0
  137. package/dist/src/nile-dot-stepper/nile-dot-stepper.css.js.map +1 -0
  138. package/dist/src/nile-dot-stepper/nile-dot-stepper.d.ts +48 -0
  139. package/dist/src/nile-dot-stepper/nile-dot-stepper.js +153 -0
  140. package/dist/src/nile-dot-stepper/nile-dot-stepper.js.map +1 -0
  141. package/dist/src/nile-dot-stepper/nile-dot-stepper.test.d.ts +1 -0
  142. package/dist/src/nile-dot-stepper/nile-dot-stepper.test.js +319 -0
  143. package/dist/src/nile-dot-stepper/nile-dot-stepper.test.js.map +1 -0
  144. package/dist/src/nile-hero/nile-hero.css.js +12 -12
  145. package/dist/src/nile-hero/nile-hero.css.js.map +1 -1
  146. package/dist/src/nile-hero/nile-hero.js +1 -1
  147. package/dist/src/nile-hero/nile-hero.js.map +1 -1
  148. package/dist/src/nile-hero-header/nile-hero-header.css.js +9 -9
  149. package/dist/src/nile-hero-header/nile-hero-header.css.js.map +1 -1
  150. package/dist/src/nile-hero-header/nile-hero-header.js +1 -1
  151. package/dist/src/nile-hero-header/nile-hero-header.js.map +1 -1
  152. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +70 -0
  153. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
  154. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +3 -0
  155. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +81 -3
  156. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
  157. package/dist/src/nile-rich-text-editor/nile-rte-image.d.ts +87 -0
  158. package/dist/src/nile-rich-text-editor/nile-rte-image.js +1073 -0
  159. package/dist/src/nile-rich-text-editor/nile-rte-image.js.map +1 -0
  160. package/dist/src/nile-section-message/nile-section-message.css.js +7 -8
  161. package/dist/src/nile-section-message/nile-section-message.css.js.map +1 -1
  162. package/dist/src/version.js +1 -1
  163. package/dist/src/version.js.map +1 -1
  164. package/dist/tsconfig.tsbuildinfo +1 -1
  165. package/package.json +2 -1
  166. package/src/index.ts +4 -0
  167. package/src/nile-chip/nile-chip.css.ts +8 -1
  168. package/src/nile-code-editor/nile-code-editor.ts +3 -3
  169. package/src/nile-command-menu/index.ts +1 -0
  170. package/src/nile-command-menu/nile-command-menu.css.ts +196 -0
  171. package/src/nile-command-menu/nile-command-menu.test.ts +289 -0
  172. package/src/nile-command-menu/nile-command-menu.ts +601 -0
  173. package/src/nile-command-menu-group/index.ts +1 -0
  174. package/src/nile-command-menu-group/nile-command-menu-group.css.ts +47 -0
  175. package/src/nile-command-menu-group/nile-command-menu-group.test.ts +23 -0
  176. package/src/nile-command-menu-group/nile-command-menu-group.ts +72 -0
  177. package/src/nile-command-menu-item/index.ts +1 -0
  178. package/src/nile-command-menu-item/nile-command-menu-item.css.ts +129 -0
  179. package/src/nile-command-menu-item/nile-command-menu-item.test.ts +36 -0
  180. package/src/nile-command-menu-item/nile-command-menu-item.ts +172 -0
  181. package/src/nile-dialog/nile-dialog.ts +1 -1
  182. package/src/nile-dot-stepper/index.ts +1 -0
  183. package/src/nile-dot-stepper/nile-dot-stepper.css.ts +90 -0
  184. package/src/nile-dot-stepper/nile-dot-stepper.test.ts +493 -0
  185. package/src/nile-dot-stepper/nile-dot-stepper.ts +159 -0
  186. package/src/nile-hero/nile-hero.css.ts +12 -12
  187. package/src/nile-hero/nile-hero.ts +1 -1
  188. package/src/nile-hero-header/nile-hero-header.css.ts +9 -9
  189. package/src/nile-hero-header/nile-hero-header.ts +1 -1
  190. package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +70 -0
  191. package/src/nile-rich-text-editor/nile-rich-text-editor.ts +89 -3
  192. package/src/nile-rich-text-editor/nile-rte-image.ts +1132 -0
  193. package/src/nile-section-message/nile-section-message.css.ts +7 -8
  194. package/stories/dot-stepper.stories.ts +67 -0
  195. package/vscode-html-custom-data.json +220 -1
  196. package/dist/index-c0b5232c.cjs.js +0 -2
  197. package/dist/index-c0b5232c.cjs.js.map +0 -1
  198. package/dist/index-e43a18eb.esm.js +0 -1
@@ -0,0 +1,268 @@
1
+ import { expect, fixture, html, oneEvent, waitUntil } from '@open-wc/testing';
2
+ import './nile-command-menu';
3
+ import '../nile-command-menu-group/nile-command-menu-group';
4
+ import '../nile-command-menu-item/nile-command-menu-item';
5
+ const withItems = html `
6
+ <nile-command-menu>
7
+ <nile-command-menu-group heading="Pages">
8
+ <nile-command-menu-item value="home">Home</nile-command-menu-item>
9
+ <nile-command-menu-item value="settings">Settings</nile-command-menu-item>
10
+ </nile-command-menu-group>
11
+ <nile-command-menu-group heading="Actions">
12
+ <nile-command-menu-item value="new">New file</nile-command-menu-item>
13
+ <nile-command-menu-item value="disabled" disabled>Disabled</nile-command-menu-item>
14
+ </nile-command-menu-group>
15
+ </nile-command-menu>
16
+ `;
17
+ describe('NileCommandMenu', () => {
18
+ it('1. renders', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el).to.exist; });
19
+ it('2. shadow root', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot).to.not.be.null; });
20
+ it('3. tag name', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.tagName.toLowerCase()).to.equal('nile-command-menu'); });
21
+ it('4. open defaults false', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.open).to.be.false; });
22
+ it('5. placeholder default', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.placeholder).to.equal('Search commands...'); });
23
+ it('6. label default', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.label).to.equal('Command menu'); });
24
+ it('7. noResultsMessage default', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.noResultsMessage).to.equal('No results found'); });
25
+ it('8. customSearch defaults false', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.customSearch).to.be.false; });
26
+ it('9. keepOpenOnSelect defaults false', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.keepOpenOnSelect).to.be.false; });
27
+ it('10. preventOverlayClose defaults false', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.preventOverlayClose).to.be.false; });
28
+ it('11. base part', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('[part="base"]')).to.exist; });
29
+ it('12. overlay part', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('[part="overlay"]')).to.exist; });
30
+ it('13. panel part', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('[part="panel"]')).to.exist; });
31
+ it('14. input part', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('[part="input"]')).to.exist; });
32
+ it('15. list part', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('[part="list"]')).to.exist; });
33
+ it('16. footer part', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('[part="footer"]')).to.exist; });
34
+ it('17. empty part', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('[part="empty"]')).to.exist; });
35
+ it('18. default slot', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('slot:not([name])')).to.exist; });
36
+ it('19. footer slot', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('slot[name="footer"]')).to.exist; });
37
+ it('20. empty slot', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('slot[name="empty"]')).to.exist; });
38
+ it('21. dialog role', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('[role="dialog"]')).to.exist; });
39
+ it('22. listbox role', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('[role="listbox"]')).to.exist; });
40
+ it('23. input combobox role', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot.querySelector('input[role="combobox"]')).to.exist; });
41
+ it('24. placeholder applied', async () => { const el = await fixture(html `<nile-command-menu placeholder="Find..."></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot.querySelector('input').placeholder).to.equal('Find...'); });
42
+ it('25. show method', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.show).to.be.a('function'); });
43
+ it('26. hide method', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.hide).to.be.a('function'); });
44
+ it('27. show opens', async () => { const el = await fixture(withItems); await el.show(); expect(el.open).to.be.true; await el.hide(); });
45
+ it('28. nile-show event', async () => { const el = await fixture(withItems); setTimeout(() => el.show()); const ev = await oneEvent(el, 'nile-show'); expect(ev).to.exist; await el.hide(); });
46
+ it('29. nile-after-show event', async () => { const el = await fixture(withItems); setTimeout(() => el.show()); const ev = await oneEvent(el, 'nile-after-show'); expect(ev).to.exist; await el.hide(); });
47
+ it('30. hide closes', async () => { const el = await fixture(withItems); await el.show(); await el.hide(); expect(el.open).to.be.false; });
48
+ it('31. filters items by query', async () => {
49
+ const el = await fixture(withItems);
50
+ await el.show();
51
+ const input = el.shadowRoot.querySelector('input');
52
+ input.value = 'settings';
53
+ input.dispatchEvent(new Event('input'));
54
+ await el.updateComplete;
55
+ const visible = [...el.querySelectorAll('nile-command-menu-item')].filter(i => !i.hidden);
56
+ expect(visible.length).to.equal(1);
57
+ expect(visible[0].value).to.equal('settings');
58
+ await el.hide();
59
+ });
60
+ it('32. hides empty groups', async () => {
61
+ const el = await fixture(withItems);
62
+ await el.show();
63
+ const input = el.shadowRoot.querySelector('input');
64
+ input.value = 'home';
65
+ input.dispatchEvent(new Event('input'));
66
+ await el.updateComplete;
67
+ const groups = el.querySelectorAll('nile-command-menu-group');
68
+ expect(groups[0].hidden).to.be.false; // Pages (has Home)
69
+ expect(groups[1].hidden).to.be.true; // Actions (no match)
70
+ await el.hide();
71
+ });
72
+ it('33. shows empty state on no match', async () => {
73
+ const el = await fixture(withItems);
74
+ await el.show();
75
+ const input = el.shadowRoot.querySelector('input');
76
+ input.value = 'zzzznomatch';
77
+ input.dispatchEvent(new Event('input'));
78
+ await el.updateComplete;
79
+ expect(el.shadowRoot.querySelector('.command__empty--visible')).to.exist;
80
+ await el.hide();
81
+ });
82
+ it('34. emits nile-search', async () => {
83
+ const el = await fixture(withItems);
84
+ await el.show();
85
+ const input = el.shadowRoot.querySelector('input');
86
+ setTimeout(() => { input.value = 'x'; input.dispatchEvent(new Event('input')); });
87
+ const ev = await oneEvent(el, 'nile-search');
88
+ expect(ev.detail.value).to.equal('x');
89
+ await el.hide();
90
+ });
91
+ it('35. emits nile-select on click', async () => {
92
+ const el = await fixture(withItems);
93
+ await el.show();
94
+ const item = el.querySelector('nile-command-menu-item[value="home"]');
95
+ setTimeout(() => item.click());
96
+ const ev = await oneEvent(el, 'nile-select');
97
+ expect(ev.detail.value).to.equal('home');
98
+ });
99
+ it('36. select closes by default', async () => {
100
+ const el = await fixture(withItems);
101
+ await el.show();
102
+ const item = el.querySelector('nile-command-menu-item[value="home"]');
103
+ item.click();
104
+ await waitUntil(() => !el.open);
105
+ expect(el.open).to.be.false;
106
+ });
107
+ it('37. keep-open-on-select stays open', async () => {
108
+ const el = await fixture(html `
109
+ <nile-command-menu keepopenonselect>
110
+ <nile-command-menu-item value="home">Home</nile-command-menu-item>
111
+ </nile-command-menu>
112
+ `);
113
+ await el.show();
114
+ el.querySelector('nile-command-menu-item').click();
115
+ await el.updateComplete;
116
+ expect(el.open).to.be.true;
117
+ await el.hide();
118
+ });
119
+ it('38. disabled item not selected on click', async () => {
120
+ const el = await fixture(withItems);
121
+ await el.show();
122
+ let fired = false;
123
+ el.addEventListener('nile-select', () => (fired = true));
124
+ el.querySelector('nile-command-menu-item[value="disabled"]').click();
125
+ await el.updateComplete;
126
+ expect(fired).to.be.false;
127
+ await el.hide();
128
+ });
129
+ it('39. arrow down moves active item', async () => {
130
+ const el = await fixture(withItems);
131
+ await el.show();
132
+ const panel = el.shadowRoot.querySelector('[role="dialog"]');
133
+ panel.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true }));
134
+ await el.updateComplete;
135
+ const active = [...el.querySelectorAll('nile-command-menu-item')].filter(i => i.active);
136
+ expect(active.length).to.equal(1);
137
+ await el.hide();
138
+ });
139
+ it('40. first visible item active on open', async () => {
140
+ const el = await fixture(withItems);
141
+ await el.show();
142
+ const active = [...el.querySelectorAll('nile-command-menu-item')].filter(i => i.active);
143
+ expect(active.length).to.equal(1);
144
+ expect(active[0].value).to.equal('home');
145
+ await el.hide();
146
+ });
147
+ it('41. enter selects active item', async () => {
148
+ const el = await fixture(withItems);
149
+ await el.show();
150
+ const panel = el.shadowRoot.querySelector('[role="dialog"]');
151
+ setTimeout(() => panel.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true })));
152
+ const ev = await oneEvent(el, 'nile-select');
153
+ expect(ev.detail.value).to.equal('home');
154
+ });
155
+ it('42. custom-search does not auto-filter', async () => {
156
+ const el = await fixture(html `
157
+ <nile-command-menu customsearch>
158
+ <nile-command-menu-item value="a">Alpha</nile-command-menu-item>
159
+ <nile-command-menu-item value="b">Beta</nile-command-menu-item>
160
+ </nile-command-menu>
161
+ `);
162
+ await el.show();
163
+ const input = el.shadowRoot.querySelector('input');
164
+ input.value = 'zzz';
165
+ input.dispatchEvent(new Event('input'));
166
+ await el.updateComplete;
167
+ const visible = [...el.querySelectorAll('nile-command-menu-item')].filter(i => !i.hidden);
168
+ expect(visible.length).to.equal(2);
169
+ await el.hide();
170
+ });
171
+ it('43. nile-request-close cancelable', async () => {
172
+ const el = await fixture(withItems);
173
+ await el.show();
174
+ el.addEventListener('nile-request-close', e => e.preventDefault());
175
+ const overlay = el.shadowRoot.querySelector('.command__overlay');
176
+ overlay.click();
177
+ await el.updateComplete;
178
+ expect(el.open).to.be.true;
179
+ await el.hide();
180
+ });
181
+ it('44. overlay click closes', async () => {
182
+ const el = await fixture(withItems);
183
+ await el.show();
184
+ const overlay = el.shadowRoot.querySelector('.command__overlay');
185
+ overlay.click();
186
+ await waitUntil(() => !el.open);
187
+ expect(el.open).to.be.false;
188
+ });
189
+ it('45. has-footer class when footer slotted', async () => {
190
+ const el = await fixture(html `
191
+ <nile-command-menu><div slot="footer">footer</div></nile-command-menu>
192
+ `);
193
+ await el.updateComplete;
194
+ expect(el.shadowRoot.querySelector('.command--has-footer')).to.exist;
195
+ });
196
+ it('46. resets query on reopen', async () => {
197
+ const el = await fixture(withItems);
198
+ await el.show();
199
+ const input = el.shadowRoot.querySelector('input');
200
+ input.value = 'home';
201
+ input.dispatchEvent(new Event('input'));
202
+ await el.updateComplete;
203
+ await el.hide();
204
+ await el.show();
205
+ expect(el.value).to.equal('');
206
+ await el.hide();
207
+ });
208
+ it('S1. scopes empty by default', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.scopes).to.deep.equal([]); });
209
+ it('S2. no scopes row when empty', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot.querySelector('[part="scopes"]')).to.be.null; });
210
+ it('S3. scopes attribute parses comma list', async () => { const el = await fixture(html `<nile-command-menu scopes="Pages, Actions"></nile-command-menu>`); expect(el.scopes.map(s => s.value)).to.deep.equal(['pages', 'actions']); });
211
+ it('S4. scopes row renders tags', async () => { const el = await fixture(html `<nile-command-menu scopes="Pages, Actions"></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot.querySelector('[part="scopes"]')).to.exist; expect(el.shadowRoot.querySelectorAll('nile-tag').length).to.equal(2); });
212
+ it('S5. default scopes label', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); expect(el.scopesLabel).to.equal('Searching for'); });
213
+ it('S6. scope filters items', async () => {
214
+ const el = await fixture(html `
215
+ <nile-command-menu scopes="Pages, Actions">
216
+ <nile-command-menu-item value="home" scope="pages">Home</nile-command-menu-item>
217
+ <nile-command-menu-item value="run" scope="actions">Run</nile-command-menu-item>
218
+ </nile-command-menu>
219
+ `);
220
+ await el.show();
221
+ el.scopes = [{ label: 'Pages', value: 'pages' }];
222
+ await el.updateComplete;
223
+ const visible = [...el.querySelectorAll('nile-command-menu-item')].filter(i => !i.hidden);
224
+ expect(visible.map(i => i.value)).to.deep.equal(['home']);
225
+ await el.hide();
226
+ });
227
+ it('S7. scoped item with no scope always shown', async () => {
228
+ const el = await fixture(html `
229
+ <nile-command-menu scopes="Pages">
230
+ <nile-command-menu-item value="home" scope="pages">Home</nile-command-menu-item>
231
+ <nile-command-menu-item value="global">Global</nile-command-menu-item>
232
+ <nile-command-menu-item value="run" scope="actions">Run</nile-command-menu-item>
233
+ </nile-command-menu>
234
+ `);
235
+ await el.show();
236
+ const visible = [...el.querySelectorAll('nile-command-menu-item')].filter(i => !i.hidden);
237
+ expect(visible.map(i => i.value)).to.have.members(['home', 'global']);
238
+ expect(visible.map(i => i.value)).to.not.include('run');
239
+ await el.hide();
240
+ });
241
+ it('S8. removing a scope emits event and refilters', async () => {
242
+ const el = await fixture(html `
243
+ <nile-command-menu scopes="Pages, Actions">
244
+ <nile-command-menu-item value="home" scope="pages">Home</nile-command-menu-item>
245
+ <nile-command-menu-item value="run" scope="actions">Run</nile-command-menu-item>
246
+ </nile-command-menu>
247
+ `);
248
+ await el.show();
249
+ const tag = el.shadowRoot.querySelector('nile-tag'); // first tag = Pages
250
+ setTimeout(() => tag.dispatchEvent(new CustomEvent('nile-remove', { bubbles: true, composed: true })));
251
+ const ev = await oneEvent(el, 'nile-scope-remove');
252
+ expect(ev.detail.scope.value).to.equal('pages');
253
+ await el.updateComplete;
254
+ expect(el.scopes.map(s => s.value)).to.deep.equal(['actions']);
255
+ const visible = [...el.querySelectorAll('nile-command-menu-item')].filter(i => !i.hidden);
256
+ expect(visible.map(i => i.value)).to.deep.equal(['run']);
257
+ await el.hide();
258
+ });
259
+ it('47a. footer hints render by default', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot.querySelector('[part="hints"]')).to.exist; expect(el.shadowRoot.querySelectorAll('.command__footer kbd').length).to.be.greaterThan(0); });
260
+ it('47b. has-footer by default (hints)', async () => { const el = await fixture(html `<nile-command-menu></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot.querySelector('.command--has-footer')).to.exist; });
261
+ it('47c. no-footer-hints removes hints', async () => { const el = await fixture(html `<nile-command-menu nofooterhints></nile-command-menu>`); await el.updateComplete; expect(el.noFooterHints).to.be.true; expect(el.shadowRoot.querySelector('[part="hints"]')).to.be.null; });
262
+ it('47d. no-footer-hints hides footer', async () => { const el = await fixture(html `<nile-command-menu nofooterhints></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot.querySelector('.command--has-footer')).to.be.null; });
263
+ it('47. is defined', async () => { expect(customElements.get('nile-command-menu')).to.exist; });
264
+ it('48. has styles', async () => { expect((await import('./nile-command-menu')).NileCommandMenu.styles).to.exist; });
265
+ it('49. open reflects', async () => { const el = await fixture(html `<nile-command-menu open></nile-command-menu>`); expect(el.hasAttribute('open')).to.be.true; });
266
+ it('50. createElement', async () => { const el = document.createElement('nile-command-menu'); document.body.appendChild(el); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; document.body.removeChild(el); });
267
+ });
268
+ //# sourceMappingURL=nile-command-menu.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-command-menu.test.js","sourceRoot":"","sources":["../../../src/nile-command-menu/nile-command-menu.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oDAAoD,CAAC;AAC5D,OAAO,kDAAkD,CAAC;AAI1D,MAAM,SAAS,GAAG,IAAI,CAAA;;;;;;;;;;;CAWrB,CAAC;AAEF,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,OAAO,CAAkB,IAAI,CAAA,yCAAyC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACjJ,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,OAAO,CAAkB,IAAI,CAAA,yCAAyC,CAA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,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnP,CAAC,CAAC,CAAC","sourcesContent":["import { expect, fixture, html, oneEvent, waitUntil } from '@open-wc/testing';\nimport './nile-command-menu';\nimport '../nile-command-menu-group/nile-command-menu-group';\nimport '../nile-command-menu-item/nile-command-menu-item';\nimport type { NileCommandMenu } from './nile-command-menu';\nimport type { NileCommandMenuItem } from '../nile-command-menu-item/nile-command-menu-item';\n\nconst withItems = html`\n <nile-command-menu>\n <nile-command-menu-group heading=\"Pages\">\n <nile-command-menu-item value=\"home\">Home</nile-command-menu-item>\n <nile-command-menu-item value=\"settings\">Settings</nile-command-menu-item>\n </nile-command-menu-group>\n <nile-command-menu-group heading=\"Actions\">\n <nile-command-menu-item value=\"new\">New file</nile-command-menu-item>\n <nile-command-menu-item value=\"disabled\" disabled>Disabled</nile-command-menu-item>\n </nile-command-menu-group>\n </nile-command-menu>\n`;\n\ndescribe('NileCommandMenu', () => {\n it('1. renders', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el).to.exist; });\n it('2. shadow root', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot).to.not.be.null; });\n it('3. tag name', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.tagName.toLowerCase()).to.equal('nile-command-menu'); });\n it('4. open defaults false', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.open).to.be.false; });\n it('5. placeholder default', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.placeholder).to.equal('Search commands...'); });\n it('6. label default', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.label).to.equal('Command menu'); });\n it('7. noResultsMessage default', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.noResultsMessage).to.equal('No results found'); });\n it('8. customSearch defaults false', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.customSearch).to.be.false; });\n it('9. keepOpenOnSelect defaults false', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.keepOpenOnSelect).to.be.false; });\n it('10. preventOverlayClose defaults false', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.preventOverlayClose).to.be.false; });\n it('11. base part', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('[part=\"base\"]')).to.exist; });\n it('12. overlay part', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('[part=\"overlay\"]')).to.exist; });\n it('13. panel part', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('[part=\"panel\"]')).to.exist; });\n it('14. input part', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('[part=\"input\"]')).to.exist; });\n it('15. list part', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('[part=\"list\"]')).to.exist; });\n it('16. footer part', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('[part=\"footer\"]')).to.exist; });\n it('17. empty part', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('[part=\"empty\"]')).to.exist; });\n it('18. default slot', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('slot:not([name])')).to.exist; });\n it('19. footer slot', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('slot[name=\"footer\"]')).to.exist; });\n it('20. empty slot', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('slot[name=\"empty\"]')).to.exist; });\n it('21. dialog role', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('[role=\"dialog\"]')).to.exist; });\n it('22. listbox role', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('[role=\"listbox\"]')).to.exist; });\n it('23. input combobox role', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.shadowRoot!.querySelector('input[role=\"combobox\"]')).to.exist; });\n it('24. placeholder applied', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu placeholder=\"Find...\"></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot!.querySelector('input')!.placeholder).to.equal('Find...'); });\n it('25. show method', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.show).to.be.a('function'); });\n it('26. hide method', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.hide).to.be.a('function'); });\n it('27. show opens', async () => { const el = await fixture<NileCommandMenu>(withItems); await el.show(); expect(el.open).to.be.true; await el.hide(); });\n it('28. nile-show event', async () => { const el = await fixture<NileCommandMenu>(withItems); setTimeout(() => el.show()); const ev = await oneEvent(el, 'nile-show'); expect(ev).to.exist; await el.hide(); });\n it('29. nile-after-show event', async () => { const el = await fixture<NileCommandMenu>(withItems); setTimeout(() => el.show()); const ev = await oneEvent(el, 'nile-after-show'); expect(ev).to.exist; await el.hide(); });\n it('30. hide closes', async () => { const el = await fixture<NileCommandMenu>(withItems); await el.show(); await el.hide(); expect(el.open).to.be.false; });\n\n it('31. filters items by query', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const input = el.shadowRoot!.querySelector('input')!;\n input.value = 'settings';\n input.dispatchEvent(new Event('input'));\n await el.updateComplete;\n const visible = [...el.querySelectorAll<NileCommandMenuItem>('nile-command-menu-item')].filter(i => !i.hidden);\n expect(visible.length).to.equal(1);\n expect(visible[0].value).to.equal('settings');\n await el.hide();\n });\n\n it('32. hides empty groups', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const input = el.shadowRoot!.querySelector('input')!;\n input.value = 'home';\n input.dispatchEvent(new Event('input'));\n await el.updateComplete;\n const groups = el.querySelectorAll('nile-command-menu-group');\n expect(groups[0].hidden).to.be.false; // Pages (has Home)\n expect(groups[1].hidden).to.be.true; // Actions (no match)\n await el.hide();\n });\n\n it('33. shows empty state on no match', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const input = el.shadowRoot!.querySelector('input')!;\n input.value = 'zzzznomatch';\n input.dispatchEvent(new Event('input'));\n await el.updateComplete;\n expect(el.shadowRoot!.querySelector('.command__empty--visible')).to.exist;\n await el.hide();\n });\n\n it('34. emits nile-search', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const input = el.shadowRoot!.querySelector('input')!;\n setTimeout(() => { input.value = 'x'; input.dispatchEvent(new Event('input')); });\n const ev = await oneEvent(el, 'nile-search');\n expect(ev.detail.value).to.equal('x');\n await el.hide();\n });\n\n it('35. emits nile-select on click', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const item = el.querySelector<NileCommandMenuItem>('nile-command-menu-item[value=\"home\"]')!;\n setTimeout(() => item.click());\n const ev = await oneEvent(el, 'nile-select');\n expect(ev.detail.value).to.equal('home');\n });\n\n it('36. select closes by default', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const item = el.querySelector<NileCommandMenuItem>('nile-command-menu-item[value=\"home\"]')!;\n item.click();\n await waitUntil(() => !el.open);\n expect(el.open).to.be.false;\n });\n\n it('37. keep-open-on-select stays open', async () => {\n const el = await fixture<NileCommandMenu>(html`\n <nile-command-menu keepopenonselect>\n <nile-command-menu-item value=\"home\">Home</nile-command-menu-item>\n </nile-command-menu>\n `);\n await el.show();\n el.querySelector<NileCommandMenuItem>('nile-command-menu-item')!.click();\n await el.updateComplete;\n expect(el.open).to.be.true;\n await el.hide();\n });\n\n it('38. disabled item not selected on click', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n let fired = false;\n el.addEventListener('nile-select', () => (fired = true));\n el.querySelector<NileCommandMenuItem>('nile-command-menu-item[value=\"disabled\"]')!.click();\n await el.updateComplete;\n expect(fired).to.be.false;\n await el.hide();\n });\n\n it('39. arrow down moves active item', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const panel = el.shadowRoot!.querySelector('[role=\"dialog\"]')!;\n panel.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true }));\n await el.updateComplete;\n const active = [...el.querySelectorAll<NileCommandMenuItem>('nile-command-menu-item')].filter(i => i.active);\n expect(active.length).to.equal(1);\n await el.hide();\n });\n\n it('40. first visible item active on open', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const active = [...el.querySelectorAll<NileCommandMenuItem>('nile-command-menu-item')].filter(i => i.active);\n expect(active.length).to.equal(1);\n expect(active[0].value).to.equal('home');\n await el.hide();\n });\n\n it('41. enter selects active item', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const panel = el.shadowRoot!.querySelector('[role=\"dialog\"]')!;\n setTimeout(() => panel.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true })));\n const ev = await oneEvent(el, 'nile-select');\n expect(ev.detail.value).to.equal('home');\n });\n\n it('42. custom-search does not auto-filter', async () => {\n const el = await fixture<NileCommandMenu>(html`\n <nile-command-menu customsearch>\n <nile-command-menu-item value=\"a\">Alpha</nile-command-menu-item>\n <nile-command-menu-item value=\"b\">Beta</nile-command-menu-item>\n </nile-command-menu>\n `);\n await el.show();\n const input = el.shadowRoot!.querySelector('input')!;\n input.value = 'zzz';\n input.dispatchEvent(new Event('input'));\n await el.updateComplete;\n const visible = [...el.querySelectorAll<NileCommandMenuItem>('nile-command-menu-item')].filter(i => !i.hidden);\n expect(visible.length).to.equal(2);\n await el.hide();\n });\n\n it('43. nile-request-close cancelable', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n el.addEventListener('nile-request-close', e => e.preventDefault());\n const overlay = el.shadowRoot!.querySelector('.command__overlay') as HTMLElement;\n overlay.click();\n await el.updateComplete;\n expect(el.open).to.be.true;\n await el.hide();\n });\n\n it('44. overlay click closes', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const overlay = el.shadowRoot!.querySelector('.command__overlay') as HTMLElement;\n overlay.click();\n await waitUntil(() => !el.open);\n expect(el.open).to.be.false;\n });\n\n it('45. has-footer class when footer slotted', async () => {\n const el = await fixture<NileCommandMenu>(html`\n <nile-command-menu><div slot=\"footer\">footer</div></nile-command-menu>\n `);\n await el.updateComplete;\n expect(el.shadowRoot!.querySelector('.command--has-footer')).to.exist;\n });\n\n it('46. resets query on reopen', async () => {\n const el = await fixture<NileCommandMenu>(withItems);\n await el.show();\n const input = el.shadowRoot!.querySelector('input')!;\n input.value = 'home';\n input.dispatchEvent(new Event('input'));\n await el.updateComplete;\n await el.hide();\n await el.show();\n expect(el.value).to.equal('');\n await el.hide();\n });\n\n it('S1. scopes empty by default', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.scopes).to.deep.equal([]); });\n it('S2. no scopes row when empty', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot!.querySelector('[part=\"scopes\"]')).to.be.null; });\n it('S3. scopes attribute parses comma list', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu scopes=\"Pages, Actions\"></nile-command-menu>`); expect(el.scopes.map(s => s.value)).to.deep.equal(['pages', 'actions']); });\n it('S4. scopes row renders tags', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu scopes=\"Pages, Actions\"></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot!.querySelector('[part=\"scopes\"]')).to.exist; expect(el.shadowRoot!.querySelectorAll('nile-tag').length).to.equal(2); });\n it('S5. default scopes label', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); expect(el.scopesLabel).to.equal('Searching for'); });\n it('S6. scope filters items', async () => {\n const el = await fixture<NileCommandMenu>(html`\n <nile-command-menu scopes=\"Pages, Actions\">\n <nile-command-menu-item value=\"home\" scope=\"pages\">Home</nile-command-menu-item>\n <nile-command-menu-item value=\"run\" scope=\"actions\">Run</nile-command-menu-item>\n </nile-command-menu>\n `);\n await el.show();\n el.scopes = [{ label: 'Pages', value: 'pages' }];\n await el.updateComplete;\n const visible = [...el.querySelectorAll<NileCommandMenuItem>('nile-command-menu-item')].filter(i => !i.hidden);\n expect(visible.map(i => i.value)).to.deep.equal(['home']);\n await el.hide();\n });\n it('S7. scoped item with no scope always shown', async () => {\n const el = await fixture<NileCommandMenu>(html`\n <nile-command-menu scopes=\"Pages\">\n <nile-command-menu-item value=\"home\" scope=\"pages\">Home</nile-command-menu-item>\n <nile-command-menu-item value=\"global\">Global</nile-command-menu-item>\n <nile-command-menu-item value=\"run\" scope=\"actions\">Run</nile-command-menu-item>\n </nile-command-menu>\n `);\n await el.show();\n const visible = [...el.querySelectorAll<NileCommandMenuItem>('nile-command-menu-item')].filter(i => !i.hidden);\n expect(visible.map(i => i.value)).to.have.members(['home', 'global']);\n expect(visible.map(i => i.value)).to.not.include('run');\n await el.hide();\n });\n it('S8. removing a scope emits event and refilters', async () => {\n const el = await fixture<NileCommandMenu>(html`\n <nile-command-menu scopes=\"Pages, Actions\">\n <nile-command-menu-item value=\"home\" scope=\"pages\">Home</nile-command-menu-item>\n <nile-command-menu-item value=\"run\" scope=\"actions\">Run</nile-command-menu-item>\n </nile-command-menu>\n `);\n await el.show();\n const tag = el.shadowRoot!.querySelector('nile-tag')!; // first tag = Pages\n setTimeout(() => tag.dispatchEvent(new CustomEvent('nile-remove', { bubbles: true, composed: true })));\n const ev = await oneEvent(el, 'nile-scope-remove');\n expect(ev.detail.scope.value).to.equal('pages');\n await el.updateComplete;\n expect(el.scopes.map(s => s.value)).to.deep.equal(['actions']);\n const visible = [...el.querySelectorAll<NileCommandMenuItem>('nile-command-menu-item')].filter(i => !i.hidden);\n expect(visible.map(i => i.value)).to.deep.equal(['run']);\n await el.hide();\n });\n\n it('47a. footer hints render by default', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot!.querySelector('[part=\"hints\"]')).to.exist; expect(el.shadowRoot!.querySelectorAll('.command__footer kbd').length).to.be.greaterThan(0); });\n it('47b. has-footer by default (hints)', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot!.querySelector('.command--has-footer')).to.exist; });\n it('47c. no-footer-hints removes hints', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu nofooterhints></nile-command-menu>`); await el.updateComplete; expect(el.noFooterHints).to.be.true; expect(el.shadowRoot!.querySelector('[part=\"hints\"]')).to.be.null; });\n it('47d. no-footer-hints hides footer', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu nofooterhints></nile-command-menu>`); await el.updateComplete; expect(el.shadowRoot!.querySelector('.command--has-footer')).to.be.null; });\n it('47. is defined', async () => { expect(customElements.get('nile-command-menu')).to.exist; });\n it('48. has styles', async () => { expect((await import('./nile-command-menu')).NileCommandMenu.styles).to.exist; });\n it('49. open reflects', async () => { const el = await fixture<NileCommandMenu>(html`<nile-command-menu open></nile-command-menu>`); expect(el.hasAttribute('open')).to.be.true; });\n it('50. createElement', async () => { const el = document.createElement('nile-command-menu') as NileCommandMenu; document.body.appendChild(el); await el.updateComplete; expect(el.shadowRoot).to.not.be.null; document.body.removeChild(el); });\n});\n"]}
@@ -0,0 +1 @@
1
+ export { NileCommandMenuGroup } from './nile-command-menu-group';
@@ -0,0 +1,2 @@
1
+ export { NileCommandMenuGroup } from './nile-command-menu-group';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-command-menu-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { NileCommandMenuGroup } from './nile-command-menu-group';\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ /**
8
+ * CommandMenuGroup CSS
9
+ */
10
+ export declare const styles: import("lit").CSSResult;
11
+ declare const _default: import("lit").CSSResult[];
12
+ export default _default;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { css } from 'lit';
8
+ /**
9
+ * CommandMenuGroup CSS
10
+ */
11
+ export const styles = css `
12
+ :host {
13
+ box-sizing: border-box;
14
+ display: block;
15
+ -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
16
+ -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
17
+ text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
18
+ }
19
+
20
+ :host([hidden]) {
21
+ display: none !important;
22
+ }
23
+
24
+ .group {
25
+ padding-bottom: var(--nile-spacing-xs, var(--ng-spacing-xs));
26
+ }
27
+
28
+ .group__heading {
29
+ display: block;
30
+ padding: var(--nile-spacing-md, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg)) var(--nile-spacing-xs, var(--ng-spacing-xs));
31
+ font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));
32
+ font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));
33
+ font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));
34
+ line-height: 1.4;
35
+ letter-spacing: 0.04em;
36
+ text-transform: uppercase;
37
+ color: var(--nile-colors-dark-500, var(--ng-colors-text-quaternary-500));
38
+ }
39
+
40
+ .group__heading--empty {
41
+ display: none;
42
+ }
43
+ `;
44
+ export default [styles];
45
+ //# sourceMappingURL=nile-command-menu-group.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-command-menu-group.css.js","sourceRoot":"","sources":["../../../src/nile-command-menu-group/nile-command-menu-group.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * CommandMenuGroup CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n display: block;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n .group {\n padding-bottom: var(--nile-spacing-xs, var(--ng-spacing-xs));\n }\n\n .group__heading {\n display: block;\n padding: var(--nile-spacing-md, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg)) var(--nile-spacing-xs, var(--ng-spacing-xs));\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n line-height: 1.4;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-quaternary-500));\n }\n\n .group__heading--empty {\n display: none;\n }\n`;\n\nexport default [styles];\n"]}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import NileElement from '../internal/nile-element';
8
+ import type { CSSResultGroup } from 'lit';
9
+ /**
10
+ * Groups related commands under an optional heading inside a `nile-command-menu`.
11
+ *
12
+ * @tag nile-command-menu-group
13
+ *
14
+ * @summary A labelled section of command items within a command menu.
15
+ * @status stable
16
+ * @since 2.0
17
+ *
18
+ * @slot - The group's command items (`nile-command-menu-item`).
19
+ * @slot heading - The group heading. Takes precedence over the `heading` attribute when provided.
20
+ *
21
+ * @csspart base - The component's base wrapper.
22
+ * @csspart heading - The group heading.
23
+ * @csspart items - The wrapper around the slotted items.
24
+ */
25
+ export declare class NileCommandMenuGroup extends NileElement {
26
+ static styles: CSSResultGroup;
27
+ private readonly hasSlotController;
28
+ /** The text heading shown above the group's items. Use the `heading` slot for richer content. */
29
+ heading: string;
30
+ connectedCallback(): void;
31
+ render(): import("lit-html").TemplateResult<1>;
32
+ }
33
+ export default NileCommandMenuGroup;
34
+ declare global {
35
+ interface HTMLElementTagNameMap {
36
+ 'nile-command-menu-group': NileCommandMenuGroup;
37
+ }
38
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { __decorate } from "tslib";
8
+ import { html } from 'lit';
9
+ import { customElement, property } from 'lit/decorators.js';
10
+ import { classMap } from 'lit/directives/class-map.js';
11
+ import { styles } from './nile-command-menu-group.css';
12
+ import { HasSlotController } from '../internal/slot';
13
+ import NileElement from '../internal/nile-element';
14
+ /**
15
+ * Groups related commands under an optional heading inside a `nile-command-menu`.
16
+ *
17
+ * @tag nile-command-menu-group
18
+ *
19
+ * @summary A labelled section of command items within a command menu.
20
+ * @status stable
21
+ * @since 2.0
22
+ *
23
+ * @slot - The group's command items (`nile-command-menu-item`).
24
+ * @slot heading - The group heading. Takes precedence over the `heading` attribute when provided.
25
+ *
26
+ * @csspart base - The component's base wrapper.
27
+ * @csspart heading - The group heading.
28
+ * @csspart items - The wrapper around the slotted items.
29
+ */
30
+ let NileCommandMenuGroup = class NileCommandMenuGroup extends NileElement {
31
+ constructor() {
32
+ super(...arguments);
33
+ this.hasSlotController = new HasSlotController(this, 'heading');
34
+ /** The text heading shown above the group's items. Use the `heading` slot for richer content. */
35
+ this.heading = '';
36
+ }
37
+ connectedCallback() {
38
+ super.connectedCallback();
39
+ this.setAttribute('role', 'group');
40
+ }
41
+ render() {
42
+ const hasHeading = this.heading.length > 0 || this.hasSlotController.test('heading');
43
+ return html `
44
+ <div part="base" class="group">
45
+ <div
46
+ part="heading"
47
+ class=${classMap({
48
+ group__heading: true,
49
+ 'group__heading--empty': !hasHeading,
50
+ })}
51
+ >
52
+ <slot name="heading">${this.heading}</slot>
53
+ </div>
54
+ <slot part="items" class="group__items"></slot>
55
+ </div>
56
+ `;
57
+ }
58
+ };
59
+ NileCommandMenuGroup.styles = styles;
60
+ __decorate([
61
+ property()
62
+ ], NileCommandMenuGroup.prototype, "heading", void 0);
63
+ NileCommandMenuGroup = __decorate([
64
+ customElement('nile-command-menu-group')
65
+ ], NileCommandMenuGroup);
66
+ export { NileCommandMenuGroup };
67
+ export default NileCommandMenuGroup;
68
+ //# sourceMappingURL=nile-command-menu-group.js.map
@@ -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B,CA+BhC;;AAED,eAAe,oBAAoB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-command-menu-group.css';\nimport { HasSlotController } from '../internal/slot';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Groups related commands under an optional heading inside a `nile-command-menu`.\n *\n * @tag nile-command-menu-group\n *\n * @summary A labelled section of command items within a command menu.\n * @status stable\n * @since 2.0\n *\n * @slot - The group's command items (`nile-command-menu-item`).\n * @slot heading - The group heading. Takes precedence over the `heading` attribute when provided.\n *\n * @csspart base - The component's base wrapper.\n * @csspart heading - The group heading.\n * @csspart items - The wrapper around the slotted items.\n */\n@customElement('nile-command-menu-group')\nexport class NileCommandMenuGroup extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'heading');\n\n /** The text heading shown above the group's items. Use the `heading` slot for richer content. */\n @property() heading = '';\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'group');\n }\n\n render() {\n const hasHeading = this.heading.length > 0 || this.hasSlotController.test('heading');\n\n return html`\n <div part=\"base\" class=\"group\">\n <div\n part=\"heading\"\n class=${classMap({\n group__heading: true,\n 'group__heading--empty': !hasHeading,\n })}\n >\n <slot name=\"heading\">${this.heading}</slot>\n </div>\n <slot part=\"items\" class=\"group__items\"></slot>\n </div>\n `;\n }\n}\n\nexport default NileCommandMenuGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-command-menu-group': NileCommandMenuGroup;\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import './nile-command-menu-group';
2
+ import '../nile-command-menu-item/nile-command-menu-item';
@@ -0,0 +1,22 @@
1
+ import { expect, fixture, html } from '@open-wc/testing';
2
+ import './nile-command-menu-group';
3
+ import '../nile-command-menu-item/nile-command-menu-item';
4
+ describe('NileCommandMenuGroup', () => {
5
+ it('1. renders', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); expect(el).to.exist; });
6
+ it('2. shadow root', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot).to.not.be.null; });
7
+ it('3. tag name', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); expect(el.tagName.toLowerCase()).to.equal('nile-command-menu-group'); });
8
+ it('4. heading defaults empty', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); expect(el.heading).to.equal(''); });
9
+ it('5. set heading', async () => { const el = await fixture(html `<nile-command-menu-group heading="Actions"></nile-command-menu-group>`); expect(el.heading).to.equal('Actions'); });
10
+ it('6. role group', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); expect(el.getAttribute('role')).to.equal('group'); });
11
+ it('7. base part', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot.querySelector('[part="base"]')).to.exist; });
12
+ it('8. heading part', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot.querySelector('[part="heading"]')).to.exist; });
13
+ it('9. items slot', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot.querySelector('slot[part="items"]')).to.exist; });
14
+ it('10. heading slot', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot.querySelector('slot[name="heading"]')).to.exist; });
15
+ it('11. heading text rendered', async () => { const el = await fixture(html `<nile-command-menu-group heading="Pages"></nile-command-menu-group>`); await el.updateComplete; expect(el.shadowRoot.querySelector('[part="heading"]').textContent).to.contain('Pages'); });
16
+ it('12. heading hidden when empty', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); await el.updateComplete; expect(el.shadowRoot.querySelector('.group__heading--empty')).to.exist; });
17
+ it('13. heading visible when set', async () => { const el = await fixture(html `<nile-command-menu-group heading="X"></nile-command-menu-group>`); await el.updateComplete; expect(el.shadowRoot.querySelector('.group__heading--empty')).to.be.null; });
18
+ it('14. holds items', async () => { const el = await fixture(html `<nile-command-menu-group heading="A"><nile-command-menu-item>One</nile-command-menu-item></nile-command-menu-group>`); expect(el.querySelectorAll('nile-command-menu-item').length).to.equal(1); });
19
+ it('15. dynamic heading', async () => { const el = await fixture(html `<nile-command-menu-group></nile-command-menu-group>`); el.heading = 'New'; await el.updateComplete; expect(el.shadowRoot.querySelector('[part="heading"]').textContent).to.contain('New'); });
20
+ it('16. is defined', async () => { expect(customElements.get('nile-command-menu-group')).to.exist; });
21
+ });
22
+ //# sourceMappingURL=nile-command-menu-group.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-command-menu-group.test.js","sourceRoot":"","sources":["../../../src/nile-command-menu-group/nile-command-menu-group.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,2BAA2B,CAAC;AACnC,OAAO,kDAAkD,CAAC;AAG1D,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,OAAO,CAAuB,IAAI,CAAA,qDAAqD,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAClK,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,OAAO,CAAuB,IAAI,CAAA,qDAAqD,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC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AAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC,CAAC,CAAC","sourcesContent":["import { expect, fixture, html } from '@open-wc/testing';\nimport './nile-command-menu-group';\nimport '../nile-command-menu-item/nile-command-menu-item';\nimport type { NileCommandMenuGroup } from './nile-command-menu-group';\n\ndescribe('NileCommandMenuGroup', () => {\n it('1. renders', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); expect(el).to.exist; });\n it('2. shadow root', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot).to.not.be.null; });\n it('3. tag name', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); expect(el.tagName.toLowerCase()).to.equal('nile-command-menu-group'); });\n it('4. heading defaults empty', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); expect(el.heading).to.equal(''); });\n it('5. set heading', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group heading=\"Actions\"></nile-command-menu-group>`); expect(el.heading).to.equal('Actions'); });\n it('6. role group', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); expect(el.getAttribute('role')).to.equal('group'); });\n it('7. base part', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot!.querySelector('[part=\"base\"]')).to.exist; });\n it('8. heading part', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot!.querySelector('[part=\"heading\"]')).to.exist; });\n it('9. items slot', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot!.querySelector('slot[part=\"items\"]')).to.exist; });\n it('10. heading slot', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); expect(el.shadowRoot!.querySelector('slot[name=\"heading\"]')).to.exist; });\n it('11. heading text rendered', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group heading=\"Pages\"></nile-command-menu-group>`); await el.updateComplete; expect(el.shadowRoot!.querySelector('[part=\"heading\"]')!.textContent).to.contain('Pages'); });\n it('12. heading hidden when empty', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); await el.updateComplete; expect(el.shadowRoot!.querySelector('.group__heading--empty')).to.exist; });\n it('13. heading visible when set', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group heading=\"X\"></nile-command-menu-group>`); await el.updateComplete; expect(el.shadowRoot!.querySelector('.group__heading--empty')).to.be.null; });\n it('14. holds items', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group heading=\"A\"><nile-command-menu-item>One</nile-command-menu-item></nile-command-menu-group>`); expect(el.querySelectorAll('nile-command-menu-item').length).to.equal(1); });\n it('15. dynamic heading', async () => { const el = await fixture<NileCommandMenuGroup>(html`<nile-command-menu-group></nile-command-menu-group>`); el.heading = 'New'; await el.updateComplete; expect(el.shadowRoot!.querySelector('[part=\"heading\"]')!.textContent).to.contain('New'); });\n it('16. is defined', async () => { expect(customElements.get('nile-command-menu-group')).to.exist; });\n});\n"]}
@@ -0,0 +1 @@
1
+ export { NileCommandMenuItem } from './nile-command-menu-item';