@aquera/nile-elements 0.0.31 → 0.0.33

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 (225) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +4 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +4 -0
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/index.d.ts +1 -0
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/index.js +2 -0
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/index.js.map +1 -0
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.css.d.ts +12 -0
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.css.js +18 -0
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.css.js.map +1 -0
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +35 -0
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.js +61 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -0
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/index.d.ts +1 -0
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/index.js +2 -0
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/index.js.map +1 -0
  16. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.d.ts +12 -0
  17. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js +47 -0
  18. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js.map +1 -0
  19. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +34 -0
  20. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +74 -0
  21. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -0
  22. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/index.d.ts +1 -0
  23. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/index.js +2 -0
  24. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/index.js.map +1 -0
  25. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.css.d.ts +12 -0
  26. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.css.js +71 -0
  27. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.css.js.map +1 -0
  28. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.d.ts +26 -0
  29. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.js +46 -0
  30. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.js.map +1 -0
  31. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/extensionSetup.d.ts +33 -0
  32. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/extensionSetup.js +63 -0
  33. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/extensionSetup.js.map +1 -0
  34. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/index.d.ts +1 -0
  35. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/index.js +2 -0
  36. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/index.js.map +1 -0
  37. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.css.d.ts +12 -0
  38. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.css.js +42 -0
  39. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -0
  40. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.d.ts +43 -0
  41. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.js +114 -0
  42. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.js.map +1 -0
  43. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/arrowright.d.ts +1 -1
  44. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/arrowright.js +1 -1
  45. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/arrowright.js.map +1 -1
  46. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.d.ts +2 -1
  47. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js +9 -6
  48. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
  49. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js +11 -0
  50. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  51. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +11 -5
  52. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +55 -7
  53. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  54. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.css.js +7 -15
  55. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.css.js.map +1 -1
  56. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.d.ts +1 -0
  57. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.js +21 -2
  58. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.js.map +1 -1
  59. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.css.js +4 -4
  60. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.css.js.map +1 -1
  61. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tooltip/nile-tooltip.css.js +1 -1
  62. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  63. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tooltip/nile-tooltip.js +2 -2
  64. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  65. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  66. package/dist/index.cjs.js +1 -1
  67. package/dist/index.esm.js +1 -1
  68. package/dist/index.iife.js +545 -374
  69. package/dist/nile-breadcrumb/index.cjs.js +2 -0
  70. package/dist/nile-breadcrumb/index.cjs.js.map +1 -0
  71. package/dist/nile-breadcrumb/index.esm.js +1 -0
  72. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +2 -0
  73. package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -0
  74. package/dist/nile-breadcrumb/nile-breadcrumb.css.cjs.js +2 -0
  75. package/dist/nile-breadcrumb/nile-breadcrumb.css.cjs.js.map +1 -0
  76. package/dist/nile-breadcrumb/nile-breadcrumb.css.esm.js +6 -0
  77. package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +6 -0
  78. package/dist/nile-breadcrumb-item/index.cjs.js +2 -0
  79. package/dist/nile-breadcrumb-item/index.cjs.js.map +1 -0
  80. package/dist/nile-breadcrumb-item/index.esm.js +1 -0
  81. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +2 -0
  82. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -0
  83. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js +2 -0
  84. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js.map +1 -0
  85. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.esm.js +35 -0
  86. package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +13 -0
  87. package/dist/nile-card/index.cjs.js +2 -0
  88. package/dist/nile-card/index.cjs.js.map +1 -0
  89. package/dist/nile-card/index.esm.js +1 -0
  90. package/dist/nile-card/nile-card.cjs.js +2 -0
  91. package/dist/nile-card/nile-card.cjs.js.map +1 -0
  92. package/dist/nile-card/nile-card.css.cjs.js +2 -0
  93. package/dist/nile-card/nile-card.css.cjs.js.map +1 -0
  94. package/dist/nile-card/nile-card.css.esm.js +59 -0
  95. package/dist/nile-card/nile-card.esm.js +9 -0
  96. package/dist/nile-code-editor/extensionSetup.cjs.js +7 -0
  97. package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -0
  98. package/dist/nile-code-editor/extensionSetup.esm.js +1 -0
  99. package/dist/nile-code-editor/index.cjs.js +2 -0
  100. package/dist/nile-code-editor/index.cjs.js.map +1 -0
  101. package/dist/nile-code-editor/index.esm.js +1 -0
  102. package/dist/nile-code-editor/nile-code-editor.cjs.js +3 -0
  103. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -0
  104. package/dist/nile-code-editor/nile-code-editor.css.cjs.js +2 -0
  105. package/dist/nile-code-editor/nile-code-editor.css.cjs.js.map +1 -0
  106. package/dist/nile-code-editor/nile-code-editor.css.esm.js +30 -0
  107. package/dist/nile-code-editor/nile-code-editor.esm.js +9 -0
  108. package/dist/nile-icon/icons/svg/arrowright.cjs.js +1 -1
  109. package/dist/nile-icon/icons/svg/arrowright.cjs.js.map +1 -1
  110. package/dist/nile-icon/icons/svg/arrowright.esm.js +1 -1
  111. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  112. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  113. package/dist/nile-icon-button/nile-icon-button.esm.js +4 -3
  114. package/dist/nile-switcher/index.cjs.js +1 -1
  115. package/dist/nile-switcher/index.esm.js +1 -1
  116. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  117. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  118. package/dist/nile-switcher/nile-switcher.css.cjs.js +1 -1
  119. package/dist/nile-switcher/nile-switcher.css.cjs.js.map +1 -1
  120. package/dist/nile-switcher/nile-switcher.css.esm.js +13 -2
  121. package/dist/nile-switcher/nile-switcher.esm.js +38 -30
  122. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  123. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  124. package/dist/nile-tag/nile-tag.css.cjs.js +1 -1
  125. package/dist/nile-tag/nile-tag.css.cjs.js.map +1 -1
  126. package/dist/nile-tag/nile-tag.css.esm.js +9 -17
  127. package/dist/nile-tag/nile-tag.esm.js +3 -3
  128. package/dist/nile-toast/nile-toast.css.cjs.js +1 -1
  129. package/dist/nile-toast/nile-toast.css.cjs.js.map +1 -1
  130. package/dist/nile-toast/nile-toast.css.esm.js +4 -4
  131. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  132. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  133. package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
  134. package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
  135. package/dist/nile-tooltip/nile-tooltip.css.esm.js +1 -1
  136. package/dist/nile-tooltip/nile-tooltip.esm.js +2 -2
  137. package/dist/src/index.d.ts +4 -0
  138. package/dist/src/index.js +4 -0
  139. package/dist/src/index.js.map +1 -1
  140. package/dist/src/nile-breadcrumb/index.d.ts +1 -0
  141. package/dist/src/nile-breadcrumb/index.js +2 -0
  142. package/dist/src/nile-breadcrumb/index.js.map +1 -0
  143. package/dist/src/nile-breadcrumb/nile-breadcrumb.css.d.ts +12 -0
  144. package/dist/src/nile-breadcrumb/nile-breadcrumb.css.js +18 -0
  145. package/dist/src/nile-breadcrumb/nile-breadcrumb.css.js.map +1 -0
  146. package/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +35 -0
  147. package/dist/src/nile-breadcrumb/nile-breadcrumb.js +61 -0
  148. package/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -0
  149. package/dist/src/nile-breadcrumb-item/index.d.ts +1 -0
  150. package/dist/src/nile-breadcrumb-item/index.js +2 -0
  151. package/dist/src/nile-breadcrumb-item/index.js.map +1 -0
  152. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.d.ts +12 -0
  153. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js +47 -0
  154. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js.map +1 -0
  155. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +34 -0
  156. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +74 -0
  157. package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -0
  158. package/dist/src/nile-card/index.d.ts +1 -0
  159. package/dist/src/nile-card/index.js +2 -0
  160. package/dist/src/nile-card/index.js.map +1 -0
  161. package/dist/src/nile-card/nile-card.css.d.ts +12 -0
  162. package/dist/src/nile-card/nile-card.css.js +71 -0
  163. package/dist/src/nile-card/nile-card.css.js.map +1 -0
  164. package/dist/src/nile-card/nile-card.d.ts +26 -0
  165. package/dist/src/nile-card/nile-card.js +46 -0
  166. package/dist/src/nile-card/nile-card.js.map +1 -0
  167. package/dist/src/nile-code-editor/extensionSetup.d.ts +33 -0
  168. package/dist/src/nile-code-editor/extensionSetup.js +63 -0
  169. package/dist/src/nile-code-editor/extensionSetup.js.map +1 -0
  170. package/dist/src/nile-code-editor/index.d.ts +1 -0
  171. package/dist/src/nile-code-editor/index.js +2 -0
  172. package/dist/src/nile-code-editor/index.js.map +1 -0
  173. package/dist/src/nile-code-editor/nile-code-editor.css.d.ts +12 -0
  174. package/dist/src/nile-code-editor/nile-code-editor.css.js +42 -0
  175. package/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -0
  176. package/dist/src/nile-code-editor/nile-code-editor.d.ts +43 -0
  177. package/dist/src/nile-code-editor/nile-code-editor.js +114 -0
  178. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -0
  179. package/dist/src/nile-icon/icons/svg/arrowright.d.ts +1 -1
  180. package/dist/src/nile-icon/icons/svg/arrowright.js +1 -1
  181. package/dist/src/nile-icon/icons/svg/arrowright.js.map +1 -1
  182. package/dist/src/nile-icon-button/nile-icon-button.d.ts +2 -1
  183. package/dist/src/nile-icon-button/nile-icon-button.js +9 -6
  184. package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
  185. package/dist/src/nile-switcher/nile-switcher.css.js +11 -0
  186. package/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  187. package/dist/src/nile-switcher/nile-switcher.d.ts +11 -5
  188. package/dist/src/nile-switcher/nile-switcher.js +55 -7
  189. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  190. package/dist/src/nile-tag/nile-tag.css.js +7 -15
  191. package/dist/src/nile-tag/nile-tag.css.js.map +1 -1
  192. package/dist/src/nile-tag/nile-tag.d.ts +1 -0
  193. package/dist/src/nile-tag/nile-tag.js +21 -2
  194. package/dist/src/nile-tag/nile-tag.js.map +1 -1
  195. package/dist/src/nile-toast/nile-toast.css.js +4 -4
  196. package/dist/src/nile-toast/nile-toast.css.js.map +1 -1
  197. package/dist/src/nile-tooltip/nile-tooltip.css.js +1 -1
  198. package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  199. package/dist/src/nile-tooltip/nile-tooltip.js +2 -2
  200. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  201. package/dist/tsconfig.tsbuildinfo +1 -1
  202. package/package.json +1 -1
  203. package/src/index.ts +5 -1
  204. package/src/nile-breadcrumb/index.ts +1 -0
  205. package/src/nile-breadcrumb/nile-breadcrumb.css.ts +20 -0
  206. package/src/nile-breadcrumb/nile-breadcrumb.ts +78 -0
  207. package/src/nile-breadcrumb-item/index.ts +1 -0
  208. package/src/nile-breadcrumb-item/nile-breadcrumb-item.css.ts +49 -0
  209. package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +83 -0
  210. package/src/nile-card/index.ts +1 -0
  211. package/src/nile-card/nile-card.css.ts +73 -0
  212. package/src/nile-card/nile-card.ts +53 -0
  213. package/src/nile-code-editor/extensionSetup.ts +125 -0
  214. package/src/nile-code-editor/index.ts +1 -0
  215. package/src/nile-code-editor/nile-code-editor.css.ts +44 -0
  216. package/src/nile-code-editor/nile-code-editor.ts +127 -0
  217. package/src/nile-icon/icons/svg/arrowright.ts +1 -1
  218. package/src/nile-icon-button/nile-icon-button.ts +9 -6
  219. package/src/nile-switcher/nile-switcher.css.ts +11 -0
  220. package/src/nile-switcher/nile-switcher.ts +70 -10
  221. package/src/nile-tag/nile-tag.css.ts +7 -15
  222. package/src/nile-tag/nile-tag.ts +24 -2
  223. package/src/nile-toast/nile-toast.css.ts +4 -4
  224. package/src/nile-tooltip/nile-tooltip.css.ts +1 -1
  225. package/src/nile-tooltip/nile-tooltip.ts +2 -2
@@ -0,0 +1,71 @@
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-element';
8
+ /**
9
+ * Card CSS
10
+ */
11
+ export const styles = css `
12
+
13
+ :host {
14
+ box-sizing: border-box;
15
+ }
16
+
17
+ :host *,
18
+ :host *::before,
19
+ :host *::after {
20
+ box-sizing: inherit;
21
+ }
22
+
23
+ [hidden] {
24
+ display: none !important;
25
+ }
26
+
27
+ :host {
28
+ --border-color: var(--nile-colors-neutral-400);
29
+ --border-radius: 8px;
30
+ --border-width: 1px;
31
+ --padding: 18px;
32
+ --footer-padding: 9px 18px;
33
+ ;
34
+
35
+ display: inline-block;
36
+ }
37
+
38
+ .card {
39
+ display: flex;
40
+ flex-direction: column;
41
+ background-color: var(--nile-colors-white-base);
42
+ border: solid var(--border-width) var(--border-color);
43
+ border-radius: var(--border-radius);
44
+ }
45
+
46
+ .card__body {
47
+ display: block;
48
+ padding: var(--padding);
49
+ }
50
+
51
+ .card--has-footer {
52
+ border-radius: var(--border-radius) var(--border-radius) 0 0;
53
+ border-bottom: none;
54
+ }
55
+
56
+ .card__footer {
57
+ display: block;
58
+ border-top: solid var(--border-width) var(--border-color);
59
+ padding: var(--footer-padding);
60
+ border: 1px solid var(--nile-colors-neutral-500);
61
+ background: var(--nile-colors-neutral-100);
62
+ border-radius: 0 0 4px 4px;
63
+ }
64
+
65
+ .card:not(.card--has-footer) .card__footer {
66
+ display: none;
67
+ }
68
+
69
+ `;
70
+ export default [styles];
71
+ //# sourceMappingURL=nile-card.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-card.css.js","sourceRoot":"","sources":["../../../src/nile-card/nile-card.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DxB,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-element';\n\n/**\n * Card CSS\n */\nexport const styles = css`\n\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n --border-color: var(--nile-colors-neutral-400);\n --border-radius: 8px;\n --border-width: 1px;\n --padding: 18px;\n --footer-padding: 9px 18px;\n;\n\n display: inline-block;\n }\n\n .card {\n display: flex;\n flex-direction: column;\n background-color: var(--nile-colors-white-base);\n border: solid var(--border-width) var(--border-color);\n border-radius: var(--border-radius);\n }\n\n .card__body {\n display: block;\n padding: var(--padding);\n }\n\n .card--has-footer {\n border-radius: var(--border-radius) var(--border-radius) 0 0;\n border-bottom: none;\n }\n\n .card__footer {\n display: block;\n border-top: solid var(--border-width) var(--border-color);\n padding: var(--footer-padding);\n border: 1px solid var(--nile-colors-neutral-500);\n background: var(--nile-colors-neutral-100);\n border-radius: 0 0 4px 4px;\n }\n\n .card:not(.card--has-footer) .card__footer {\n display: none;\n }\n\n`;\n\nexport default [styles];\n"]}
@@ -0,0 +1,26 @@
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 { TemplateResult } from 'lit-element';
8
+ import NileElements from '../internal/nile-element';
9
+ import { CSSResultGroup } from 'lit';
10
+ /**
11
+ * Nile icon component.
12
+ *
13
+ * @tag nile-card
14
+ *
15
+ */
16
+ export declare class NileCard extends NileElements {
17
+ static styles: CSSResultGroup;
18
+ private readonly hasSlotController;
19
+ render(): TemplateResult<1>;
20
+ }
21
+ export default NileCard;
22
+ declare global {
23
+ interface HTMLElementTagNameMap {
24
+ 'nile-card': NileCard;
25
+ }
26
+ }
@@ -0,0 +1,46 @@
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-element';
9
+ import { customElement } from 'lit/decorators.js';
10
+ import { styles } from './nile-card.css';
11
+ import { classMap } from 'lit/directives/class-map.js';
12
+ import { HasSlotController } from '../internal/slot';
13
+ import NileElements from '../internal/nile-element';
14
+ /**
15
+ * Nile icon component.
16
+ *
17
+ * @tag nile-card
18
+ *
19
+ */
20
+ let NileCard = class NileCard extends NileElements {
21
+ constructor() {
22
+ super(...arguments);
23
+ this.hasSlotController = new HasSlotController(this, 'footer');
24
+ }
25
+ render() {
26
+ return html `
27
+ <div
28
+ part="base"
29
+ class=${classMap({
30
+ card: true,
31
+ 'card--has-footer': this.hasSlotController.test('footer'),
32
+ })}
33
+ >
34
+ <slot part="body" class="card__body"></slot>
35
+ </div>
36
+ <slot name="footer" part="footer" ?hidden="${!this.hasSlotController.test('footer')}" class="card__footer"></slot>
37
+ `;
38
+ }
39
+ };
40
+ NileCard.styles = styles;
41
+ NileCard = __decorate([
42
+ customElement('nile-card')
43
+ ], NileCard);
44
+ export { NileCard };
45
+ export default NileCard;
46
+ //# sourceMappingURL=nile-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-card.js","sourceRoot":"","sources":["../../../src/nile-card/nile-card.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAA2C,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAIpD;;;;;GAKG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,YAAY;IAAnC;;QAIY,sBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAgB7E,CAAC;IAdC,MAAM;QACJ,OAAO,IAAI,CAAA;;;gBAGC,QAAQ,CAAC;YACf,IAAI,EAAE,IAAI;YACV,kBAAkB,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC;SAC1D,CAAC;;;;mDAIyC,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC;KACpF,CAAC;IACJ,CAAC;;AAjBM,eAAM,GAAmB,MAAM,CAAC;AAF5B,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAoBpB;SApBY,QAAQ;AAuBrB,eAAe,QAAQ,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 {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-card.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport NileElements from '../internal/nile-element';\nimport { CSSResultGroup } from 'lit';\n\n\n/**\n * Nile icon component.\n *\n * @tag nile-card\n *\n */\n@customElement('nile-card')\nexport class NileCard extends NileElements {\n\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n card: true,\n 'card--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <slot part=\"body\" class=\"card__body\"></slot>\n </div>\n <slot name=\"footer\" part=\"footer\" ?hidden=\"${!this.hasSlotController.test('footer')}\" class=\"card__footer\"></slot>\n `;\n }\n}\n\n\nexport default NileCard;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-card': NileCard;\n }\n}\n"]}
@@ -0,0 +1,33 @@
1
+ import { Extension } from '@codemirror/state';
2
+ export interface BasicSetupOptions extends MinimalSetupOptions {
3
+ lineNumbers?: boolean;
4
+ highlightActiveLineGutter?: boolean;
5
+ foldGutter?: boolean;
6
+ dropCursor?: boolean;
7
+ allowMultipleSelections?: boolean;
8
+ indentOnInput?: boolean;
9
+ bracketMatching?: boolean;
10
+ closeBrackets?: boolean;
11
+ autocompletion?: boolean;
12
+ rectangularSelection?: boolean;
13
+ crosshairCursor?: boolean;
14
+ highlightActiveLine?: boolean;
15
+ highlightSelectionMatches?: boolean;
16
+ closeBracketsKeymap?: boolean;
17
+ searchKeymap?: boolean;
18
+ foldKeymap?: boolean;
19
+ completionKeymap?: boolean;
20
+ lintKeymap?: boolean;
21
+ tabSize?: number;
22
+ }
23
+ export declare const isValidSetup: (item: any) => any;
24
+ export declare const basicSetup: (options?: BasicSetupOptions) => Extension[];
25
+ export interface MinimalSetupOptions {
26
+ highlightSpecialChars?: boolean;
27
+ history?: boolean;
28
+ drawSelection?: boolean;
29
+ syntaxHighlighting?: boolean;
30
+ defaultKeymap?: boolean;
31
+ historyKeymap?: boolean;
32
+ }
33
+ export declare const minimalSetup: (options?: MinimalSetupOptions) => Extension[];
@@ -0,0 +1,63 @@
1
+ import { lineNumbers, highlightActiveLineGutter, highlightSpecialChars, drawSelection, dropCursor, rectangularSelection, crosshairCursor, highlightActiveLine, keymap, } from '@codemirror/view';
2
+ import { EditorState } from '@codemirror/state';
3
+ import { history, defaultKeymap, historyKeymap } from '@codemirror/commands';
4
+ import { highlightSelectionMatches, searchKeymap } from '@codemirror/search';
5
+ import { closeBrackets, autocompletion, closeBracketsKeymap, } from '@codemirror/autocomplete';
6
+ import { foldGutter, indentOnInput, syntaxHighlighting, defaultHighlightStyle, bracketMatching, indentUnit, foldKeymap, } from '@codemirror/language';
7
+ import { lintKeymap } from '@codemirror/lint';
8
+ export const isValidSetup = (item) => {
9
+ return typeof item === 'undefined' || item;
10
+ };
11
+ export const basicSetup = (options = {}) => {
12
+ const { crosshairCursor: initCrosshairCursor = false } = options;
13
+ let keymaps = [];
14
+ isValidSetup(options.defaultKeymap) && keymaps.push(...defaultKeymap);
15
+ isValidSetup(options.closeBracketsKeymap) &&
16
+ keymaps.push(...closeBracketsKeymap);
17
+ isValidSetup(options.searchKeymap) && keymaps.push(...searchKeymap);
18
+ isValidSetup(options.historyKeymap) && keymaps.push(...historyKeymap);
19
+ isValidSetup(options.foldKeymap) && keymaps.push(...foldKeymap);
20
+ isValidSetup(options.lintKeymap) && keymaps.push(...lintKeymap);
21
+ const extensions = [];
22
+ isValidSetup(options.lineNumbers) && extensions.push(lineNumbers());
23
+ isValidSetup(options.highlightActiveLineGutter) &&
24
+ extensions.push(highlightActiveLineGutter());
25
+ isValidSetup(options.highlightSpecialChars) &&
26
+ extensions.push(highlightSpecialChars());
27
+ isValidSetup(options.history) && extensions.push(history());
28
+ isValidSetup(options.foldGutter) && extensions.push(foldGutter());
29
+ isValidSetup(options.drawSelection) && extensions.push(drawSelection());
30
+ isValidSetup(options.dropCursor) && extensions.push(dropCursor());
31
+ isValidSetup(options.allowMultipleSelections) &&
32
+ extensions.push(EditorState.allowMultipleSelections.of(true));
33
+ isValidSetup(options.indentOnInput) && extensions.push(indentOnInput());
34
+ isValidSetup(options.syntaxHighlighting) &&
35
+ extensions.push(syntaxHighlighting(defaultHighlightStyle, { fallback: true }));
36
+ isValidSetup(options.bracketMatching) && extensions.push(bracketMatching());
37
+ isValidSetup(options.closeBrackets) && extensions.push(closeBrackets());
38
+ isValidSetup(options.autocompletion) && extensions.push(autocompletion());
39
+ isValidSetup(options.rectangularSelection) &&
40
+ extensions.push(rectangularSelection());
41
+ isValidSetup(options.crosshairCursor) && extensions.push(crosshairCursor());
42
+ isValidSetup(options.highlightActiveLine) &&
43
+ extensions.push(highlightActiveLine());
44
+ isValidSetup(options.highlightSelectionMatches) &&
45
+ extensions.push(highlightSelectionMatches());
46
+ if (options.tabSize && typeof options.tabSize === 'number')
47
+ extensions.push(indentUnit.of(' '.repeat(options.tabSize)));
48
+ return extensions.concat([keymap.of(keymaps.flat())]).filter(Boolean);
49
+ };
50
+ export const minimalSetup = (options = {}) => {
51
+ let keymaps = [];
52
+ isValidSetup(options.defaultKeymap) && keymaps.push(...defaultKeymap);
53
+ isValidSetup(options.historyKeymap) && keymaps.push(...historyKeymap);
54
+ const extensions = [];
55
+ isValidSetup(options.highlightSpecialChars) &&
56
+ extensions.push(highlightSpecialChars());
57
+ isValidSetup(options.history) && extensions.push(history());
58
+ isValidSetup(options.drawSelection) && extensions.push(drawSelection());
59
+ isValidSetup(options.syntaxHighlighting) &&
60
+ extensions.push(syntaxHighlighting(defaultHighlightStyle, { fallback: true }));
61
+ return extensions.concat([keymap.of(keymaps.flat())]).filter(Boolean);
62
+ };
63
+ //# sourceMappingURL=extensionSetup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensionSetup.js","sourceRoot":"","sources":["../../../src/nile-code-editor/extensionSetup.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EACX,yBAAyB,EACzB,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,MAAM,GACP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAa,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EACL,aAAa,EACb,cAAc,EACd,mBAAmB,GAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAwB9C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAS,EAAE,EAAE;IACxC,OAAO,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAA6B,EAAE,EAAe,EAAE;IACzE,MAAM,EAAE,eAAe,EAAE,mBAAmB,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IACjE,IAAI,OAAO,GAAiB,EAAE,CA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AC","sourcesContent":["import {\n KeyBinding,\n lineNumbers,\n highlightActiveLineGutter,\n highlightSpecialChars,\n drawSelection,\n dropCursor,\n rectangularSelection,\n crosshairCursor,\n highlightActiveLine,\n keymap,\n} from '@codemirror/view';\nimport { EditorState, Extension } from '@codemirror/state';\nimport { history, defaultKeymap, historyKeymap } from '@codemirror/commands';\nimport { highlightSelectionMatches, searchKeymap } from '@codemirror/search';\nimport {\n closeBrackets,\n autocompletion,\n closeBracketsKeymap,\n completionKeymap,\n} from '@codemirror/autocomplete';\nimport {\n foldGutter,\n indentOnInput,\n syntaxHighlighting,\n defaultHighlightStyle,\n bracketMatching,\n indentUnit,\n foldKeymap,\n} from '@codemirror/language';\n\nimport { lintKeymap } from '@codemirror/lint';\n\nexport interface BasicSetupOptions extends MinimalSetupOptions {\n lineNumbers?: boolean;\n highlightActiveLineGutter?: boolean;\n foldGutter?: boolean;\n dropCursor?: boolean;\n allowMultipleSelections?: boolean;\n indentOnInput?: boolean;\n bracketMatching?: boolean;\n closeBrackets?: boolean;\n autocompletion?: boolean;\n rectangularSelection?: boolean;\n crosshairCursor?: boolean;\n highlightActiveLine?: boolean;\n highlightSelectionMatches?: boolean;\n closeBracketsKeymap?: boolean;\n searchKeymap?: boolean;\n foldKeymap?: boolean;\n completionKeymap?: boolean;\n lintKeymap?: boolean;\n tabSize?: number;\n}\n\nexport const isValidSetup = (item: any) => {\n return typeof item === 'undefined' || item;\n};\n\nexport const basicSetup = (options: BasicSetupOptions = {}): Extension[] => {\n const { crosshairCursor: initCrosshairCursor = false } = options;\n let keymaps: KeyBinding[] = [];\n isValidSetup(options.defaultKeymap) && keymaps.push(...defaultKeymap);\n isValidSetup(options.closeBracketsKeymap) &&\n keymaps.push(...closeBracketsKeymap);\n isValidSetup(options.searchKeymap) && keymaps.push(...searchKeymap);\n isValidSetup(options.historyKeymap) && keymaps.push(...historyKeymap);\n isValidSetup(options.foldKeymap) && keymaps.push(...foldKeymap);\n isValidSetup(options.lintKeymap) && keymaps.push(...lintKeymap);\n const extensions: Extension[] = [];\n isValidSetup(options.lineNumbers) && extensions.push(lineNumbers());\n isValidSetup(options.highlightActiveLineGutter) &&\n extensions.push(highlightActiveLineGutter());\n isValidSetup(options.highlightSpecialChars) &&\n extensions.push(highlightSpecialChars());\n isValidSetup(options.history) && extensions.push(history());\n isValidSetup(options.foldGutter) && extensions.push(foldGutter());\n isValidSetup(options.drawSelection) && extensions.push(drawSelection());\n isValidSetup(options.dropCursor) && extensions.push(dropCursor());\n isValidSetup(options.allowMultipleSelections) &&\n extensions.push(EditorState.allowMultipleSelections.of(true));\n isValidSetup(options.indentOnInput) && extensions.push(indentOnInput());\n isValidSetup(options.syntaxHighlighting) &&\n extensions.push(\n syntaxHighlighting(defaultHighlightStyle, { fallback: true })\n );\n isValidSetup(options.bracketMatching) && extensions.push(bracketMatching());\n isValidSetup(options.closeBrackets) && extensions.push(closeBrackets());\n isValidSetup(options.autocompletion) && extensions.push(autocompletion());\n isValidSetup(options.rectangularSelection) &&\n extensions.push(rectangularSelection());\n isValidSetup(options.crosshairCursor) && extensions.push(crosshairCursor());\n isValidSetup(options.highlightActiveLine) &&\n extensions.push(highlightActiveLine());\n isValidSetup(options.highlightSelectionMatches) &&\n extensions.push(highlightSelectionMatches());\n if (options.tabSize && typeof options.tabSize === 'number')\n extensions.push(indentUnit.of(' '.repeat(options.tabSize)));\n return extensions.concat([keymap.of(keymaps.flat())]).filter(Boolean);\n};\n\nexport interface MinimalSetupOptions {\n highlightSpecialChars?: boolean;\n history?: boolean;\n drawSelection?: boolean;\n syntaxHighlighting?: boolean;\n defaultKeymap?: boolean;\n historyKeymap?: boolean;\n}\n\nexport const minimalSetup = (options: MinimalSetupOptions = {}) => {\n let keymaps: KeyBinding[] = [];\n isValidSetup(options.defaultKeymap) && keymaps.push(...defaultKeymap);\n isValidSetup(options.historyKeymap) && keymaps.push(...historyKeymap);\n const extensions: Extension[] = [];\n isValidSetup(options.highlightSpecialChars) &&\n extensions.push(highlightSpecialChars());\n isValidSetup(options.history) && extensions.push(history());\n isValidSetup(options.drawSelection) && extensions.push(drawSelection());\n isValidSetup(options.syntaxHighlighting) &&\n extensions.push(\n syntaxHighlighting(defaultHighlightStyle, { fallback: true })\n );\n return extensions.concat([keymap.of(keymaps.flat())]).filter(Boolean);\n};\n"]}
@@ -0,0 +1 @@
1
+ export { NileCodeEditor } from './nile-code-editor';
@@ -0,0 +1,2 @@
1
+ export { NileCodeEditor } from './nile-code-editor';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-code-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { NileCodeEditor } from './nile-code-editor';\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
+ * CodeEditor CSS
9
+ */
10
+ export declare const styles: import("lit-element").CSSResult;
11
+ declare const _default: import("lit-element").CSSResult[];
12
+ export default _default;
@@ -0,0 +1,42 @@
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-element';
8
+ /**
9
+ * CodeEditor CSS
10
+ */
11
+ export const styles = css `
12
+ :host {
13
+ display: block;
14
+ }
15
+
16
+ .code-mirror {
17
+ display: flex;
18
+ justify-content: flex-end;
19
+ flex-direction: row-reverse;
20
+ gap: 0.6rem;
21
+ }
22
+
23
+ .cm-editor {
24
+ overflow: hidden;
25
+ width: 100%;
26
+ height: 100%;
27
+ }
28
+
29
+ .ͼ1.cm-focused {
30
+ outline: none;
31
+ }
32
+
33
+ .code-editor__icon__container {
34
+ cursor: pointer;
35
+ }
36
+
37
+ .code-editor__icon__container {
38
+ padding-right: 5px;
39
+ }
40
+ `;
41
+ export default [styles];
42
+ //# sourceMappingURL=nile-code-editor.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-code-editor.css.js","sourceRoot":"","sources":["../../../src/nile-code-editor/nile-code-editor.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BxB,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-element';\n\n/**\n * CodeEditor CSS\n */\nexport const styles = css`\n :host {\n display: block;\n }\n\n .code-mirror {\n display: flex;\n justify-content: flex-end;\n flex-direction: row-reverse;\n gap: 0.6rem;\n }\n\n .cm-editor {\n overflow: hidden;\n width: 100%;\n height: 100%;\n }\n\n .ͼ1.cm-focused {\n outline: none;\n }\n\n .code-editor__icon__container {\n cursor: pointer;\n }\n\n .code-editor__icon__container {\n padding-right: 5px;\n }\n`;\n\nexport default [styles];\n"]}
@@ -0,0 +1,43 @@
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 { CSSResultArray, TemplateResult } from 'lit-element';
8
+ import { EditorView } from 'codemirror';
9
+ import { Compartment } from '@codemirror/state';
10
+ import NileElement from '../internal/nile-element';
11
+ /**
12
+ * Nile icon component.
13
+ *
14
+ * @tag nile-code-editor
15
+ *
16
+ */
17
+ export declare class NileCodeEditor extends NileElement {
18
+ codeEditor: HTMLInputElement;
19
+ multiline: true;
20
+ value: true;
21
+ customOptions: any;
22
+ showLineNumbers: any;
23
+ /**
24
+ * The styles for CodeEditor
25
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
26
+ */
27
+ static get styles(): CSSResultArray;
28
+ connectedCallback(): void;
29
+ view: EditorView;
30
+ convertToSingleLine(code: any): any;
31
+ lineNumbersComp: Compartment;
32
+ updated(): void;
33
+ emitValues(value: string): void;
34
+ expandCodeEditor(): void;
35
+ restrictSingleLine(): import("@codemirror/state").Extension;
36
+ render(): TemplateResult;
37
+ }
38
+ export default NileCodeEditor;
39
+ declare global {
40
+ interface HTMLElementTagNameMap {
41
+ 'nile-code-editor': NileCodeEditor;
42
+ }
43
+ }
@@ -0,0 +1,114 @@
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, property, } from 'lit-element';
9
+ import { customElement, query } from 'lit/decorators.js';
10
+ import { styles } from './nile-code-editor.css';
11
+ import { EditorView } from 'codemirror';
12
+ import { EditorState, Compartment } from '@codemirror/state';
13
+ import { javascript, javascriptLanguage } from '@codemirror/lang-javascript';
14
+ import { autocompletion } from '@codemirror/autocomplete';
15
+ import NileElement from '../internal/nile-element';
16
+ import { basicSetup } from './extensionSetup';
17
+ // Choose the appropriate mode for your use case
18
+ /**
19
+ * Nile icon component.
20
+ *
21
+ * @tag nile-code-editor
22
+ *
23
+ */
24
+ let NileCodeEditor = class NileCodeEditor extends NileElement {
25
+ constructor() {
26
+ super(...arguments);
27
+ this.lineNumbersComp = new Compartment();
28
+ /* #endregion */
29
+ }
30
+ /**
31
+ * The styles for CodeEditor
32
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
33
+ */
34
+ static get styles() {
35
+ return [styles];
36
+ }
37
+ connectedCallback() {
38
+ super.connectedCallback();
39
+ }
40
+ convertToSingleLine(code) {
41
+ // Remove line breaks and unnecessary whitespace
42
+ return code.replace(/\s+/g, ' ').trim();
43
+ }
44
+ updated() {
45
+ const customAutoCompletions = javascriptLanguage.data.of({
46
+ autocomplete: this.customOptions,
47
+ });
48
+ let startState = EditorState.create({
49
+ doc: !this.multiline ? this.convertToSingleLine(this.value) : this.value,
50
+ extensions: [
51
+ basicSetup({
52
+ lineNumbers: !!this.showLineNumbers,
53
+ foldGutter: !this.multiline ? false : true,
54
+ }),
55
+ customAutoCompletions,
56
+ autocompletion(),
57
+ javascript(),
58
+ !this.multiline ? this.restrictSingleLine() : [],
59
+ EditorView.updateListener.of((v) => {
60
+ if (v.docChanged) {
61
+ this.emitValues(this.view.state.doc.toString());
62
+ }
63
+ }),
64
+ ],
65
+ });
66
+ this.view = new EditorView({
67
+ state: startState,
68
+ parent: this.codeEditor,
69
+ });
70
+ }
71
+ emitValues(value) {
72
+ this.emit('nile-change', { value: value });
73
+ }
74
+ expandCodeEditor() {
75
+ this.emit('nile-expand', { expand: true });
76
+ }
77
+ restrictSingleLine() {
78
+ return EditorState.transactionFilter.of(tr => tr.newDoc.lines > 1 ? [] : tr);
79
+ }
80
+ render() {
81
+ return html `<div class="code-mirror">
82
+ ${!this.multiline
83
+ ? html `<nile-icon
84
+ name="fullscreenshrink"
85
+ class="code-editor__icon__container"
86
+ size="16"
87
+ color="black"
88
+ @click="${(e) => this.expandCodeEditor()}"
89
+ ></nile-icon>`
90
+ : ''}
91
+ </div>`;
92
+ }
93
+ };
94
+ __decorate([
95
+ query('.code-mirror')
96
+ ], NileCodeEditor.prototype, "codeEditor", void 0);
97
+ __decorate([
98
+ property({ type: Boolean })
99
+ ], NileCodeEditor.prototype, "multiline", void 0);
100
+ __decorate([
101
+ property({ type: String })
102
+ ], NileCodeEditor.prototype, "value", void 0);
103
+ __decorate([
104
+ property({ type: String })
105
+ ], NileCodeEditor.prototype, "customOptions", void 0);
106
+ __decorate([
107
+ property({ type: String })
108
+ ], NileCodeEditor.prototype, "showLineNumbers", void 0);
109
+ NileCodeEditor = __decorate([
110
+ customElement('nile-code-editor')
111
+ ], NileCodeEditor);
112
+ export { NileCodeEditor };
113
+ export default NileCodeEditor;
114
+ //# sourceMappingURL=nile-code-editor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-code-editor.js","sourceRoot":"","sources":["../../../src/nile-code-editor/nile-code-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,gDAAgD;AAEhD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QAyBL,oBAAe,GAAG,IAAI,WAAW,EAAE,CAAC;QA0DpC,gBAAgB;IAClB,CAAC;IA7EC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;IAC5B,CAAC;IAID,mBAAmB,CAAC,IAAS;QAC3B,gDAAgD;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC;IAGD,OAAO;QACL,MAAM,qBAAqB,GAAG,kBAAkB,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IAC7C,CAAC;IAED,kBAAkB;QAChB,OAAO,WAAW,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAC3C,EAAE,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAC9B,CAAC;IACJ,CAAC;IACM,MAAM;QACX,OAAO,IAAI,CAAA;QACP,CAAC,IAAI,CAAC,SAAS;YACf,CAAC,CAAC,IAAI,CAAA;;;;;sBAKQ,CAAC,CAAc,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE;wBACzC;YAChB,CAAC,CAAC,EAAE;WACD,CAAC;IACV,CAAC;CAGF,CAAA;AAnFwB;IAAtB,KAAK,CAAC,cAAc,CAAC;kDAA8B;AACvB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDAAiB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAa;AACZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAsB;AALtC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAoF1B;SApFY,cAAc;AAsF3B,eAAe,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 {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query } from 'lit/decorators.js';\nimport { styles } from './nile-code-editor.css';\nimport { EditorView } from 'codemirror';\nimport { ViewUpdate } from '@codemirror/view';\nimport { EditorState, Compartment } from '@codemirror/state';\nimport { javascript, javascriptLanguage } from '@codemirror/lang-javascript';\nimport { autocompletion } from '@codemirror/autocomplete';\nimport { CompletionContext } from '@codemirror/autocomplete';\nimport NileElement from '../internal/nile-element';\nimport { basicSetup } from './extensionSetup';\n\n// Choose the appropriate mode for your use case\n\n/**\n * Nile icon component.\n *\n * @tag nile-code-editor\n *\n */\n@customElement('nile-code-editor')\nexport class NileCodeEditor extends NileElement {\n @query('.code-mirror') codeEditor: HTMLInputElement;\n @property({ type: Boolean }) multiline: true;\n @property({ type: String }) value: true;\n @property({ type: String }) customOptions: any;\n @property({ type: String }) showLineNumbers: any;\n\n /**\n * The styles for CodeEditor\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n }\n\n view: EditorView;\n\n convertToSingleLine(code: any) {\n // Remove line breaks and unnecessary whitespace\n return code.replace(/\\s+/g, ' ').trim();\n }\n lineNumbersComp = new Compartment();\n\n updated() {\n const customAutoCompletions = javascriptLanguage.data.of({\n autocomplete: this.customOptions,\n });\n let startState = EditorState.create({\n doc: !this.multiline ? this.convertToSingleLine(this.value) : this.value,\n extensions: [\n basicSetup({\n lineNumbers: !!this.showLineNumbers,\n foldGutter: !this.multiline ? false : true,\n }),\n customAutoCompletions,\n autocompletion(),\n javascript(),\n !this.multiline ? this.restrictSingleLine() : [],\n EditorView.updateListener.of((v: ViewUpdate) => {\n if (v.docChanged) {\n this.emitValues(this.view.state.doc.toString());\n }\n }),\n ],\n });\n\n this.view = new EditorView({\n state: startState,\n parent: this.codeEditor,\n });\n }\n\n emitValues(value: string) {\n this.emit('nile-change', { value: value });\n }\n\n expandCodeEditor() {\n this.emit('nile-expand', { expand: true });\n }\n\n restrictSingleLine() {\n return EditorState.transactionFilter.of(tr =>\n tr.newDoc.lines > 1 ? [] : tr\n );\n }\n public render(): TemplateResult {\n return html`<div class=\"code-mirror\">\n ${!this.multiline\n ? html`<nile-icon\n name=\"fullscreenshrink\"\n class=\"code-editor__icon__container\"\n size=\"16\"\n color=\"black\"\n @click=\"${(e: CustomEvent) => this.expandCodeEditor()}\"\n ></nile-icon>`\n : ''}\n </div>`;\n }\n\n /* #endregion */\n}\n\nexport default NileCodeEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-code-editor': NileCodeEditor;\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Do not edit directly
3
3
  */
4
- declare const _default: "PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMxMTE7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5JY29uPC90aXRsZT48cG9seWdvbiBjbGFzcz0iY2xzLTEiIHBvaW50cz0iNSAxNC43MSA0LjI5IDE0IDEwLjI5IDggNC4yOSAyIDUgMS4yOSAxMS43MSA4IDUgMTQuNzEiLz48L3N2Zz4=";
4
+ declare const _default: "PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQuOTk5OTggMTUuMjFMNC4yODk5OCAxNC41TDEwLjI5IDguNDk5OThMNC4yODk5OCAyLjQ5OTk4TDQuOTk5OTggMS43ODk5OEwxMS43MSA4LjQ5OTk4TDQuOTk5OTggMTUuMjFaIiBmaWxsPSIjN0Y3RjdGIi8+PC9zdmc+";
5
5
  export default _default;
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Do not edit directly
3
3
  */
4
- export default "PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMxMTE7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5JY29uPC90aXRsZT48cG9seWdvbiBjbGFzcz0iY2xzLTEiIHBvaW50cz0iNSAxNC43MSA0LjI5IDE0IDEwLjI5IDggNC4yOSAyIDUgMS4yOSAxMS43MSA4IDUgMTQuNzEiLz48L3N2Zz4=";
4
+ export default "PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQuOTk5OTggMTUuMjFMNC4yODk5OCAxNC41TDEwLjI5IDguNDk5OThMNC4yODk5OCAyLjQ5OTk4TDQuOTk5OTggMS43ODk5OEwxMS43MSA4LjQ5OTk4TDQuOTk5OTggMTUuMjFaIiBmaWxsPSIjN0Y3RjdGIi8+PC9zdmc+";
5
5
  //# sourceMappingURL=arrowright.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrowright.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/arrowright.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,kVAAkV,CAAC","sourcesContent":["/**\n * Do not edit directly\n */\n\nexport default \"PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMxMTE7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5JY29uPC90aXRsZT48cG9seWdvbiBjbGFzcz0iY2xzLTEiIHBvaW50cz0iNSAxNC43MSA0LjI5IDE0IDEwLjI5IDggNC4yOSAyIDUgMS4yOSAxMS43MSA4IDUgMTQuNzEiLz48L3N2Zz4=\";"]}
1
+ {"version":3,"file":"arrowright.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/arrowright.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,0WAA0W,CAAC","sourcesContent":["/**\n * Do not edit directly\n */\n\nexport default \"PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQuOTk5OTggMTUuMjFMNC4yODk5OCAxNC41TDEwLjI5IDguNDk5OThMNC4yODk5OCAyLjQ5OTk4TDQuOTk5OTggMS43ODk5OEwxMS43MSA4LjQ5OTk4TDQuOTk5OTggMTUuMjFaIiBmaWxsPSIjN0Y3RjdGIi8+PC9zdmc+\";"]}
@@ -53,7 +53,8 @@ export declare class NileIconButton extends NileElement {
53
53
  /** Disables the button. */
54
54
  disabled: boolean;
55
55
  /**Default color to icon */
56
- color: string;
56
+ color?: string;
57
+ ishovered: boolean;
57
58
  private handleBlur;
58
59
  private handleFocus;
59
60
  private handleClick;
@@ -43,8 +43,7 @@ let NileIconButton = class NileIconButton extends NileElement {
43
43
  this.label = '';
44
44
  /** Disables the button. */
45
45
  this.disabled = false;
46
- /**Default color to icon */
47
- this.color = '#7F7F7F';
46
+ this.ishovered = false;
48
47
  }
49
48
  handleBlur() {
50
49
  this.hasFocus = false;
@@ -73,10 +72,10 @@ let NileIconButton = class NileIconButton extends NileElement {
73
72
  this.button.blur();
74
73
  }
75
74
  handleMouseOver(e) {
76
- this.color = 'black';
75
+ this.ishovered = true;
77
76
  }
78
- handleMouseLeave() {
79
- this.color = '#7F7F7F';
77
+ handleMouseLeave(e) {
78
+ this.ishovered = false;
80
79
  }
81
80
  render() {
82
81
  const isLink = this.href ? true : false;
@@ -106,12 +105,13 @@ let NileIconButton = class NileIconButton extends NileElement {
106
105
  @mouseover=${this.handleMouseOver}
107
106
  @mouseleave=${this.handleMouseLeave}
108
107
  >
108
+
109
109
  <nile-icon
110
110
  class="icon-button__icon"
111
111
  name=${ifDefined(this.name)}
112
112
  library=${ifDefined(this.library)}
113
113
  src=${ifDefined(this.src)}
114
- color=${ifDefined(this.color)}
114
+ color=${this.ishovered ? 'black' : ifDefined(this.color)}
115
115
  aria-hidden="true"
116
116
  size="14"
117
117
  ></nile-icon>
@@ -153,6 +153,9 @@ __decorate([
153
153
  __decorate([
154
154
  property({ type: String, reflect: true })
155
155
  ], NileIconButton.prototype, "color", void 0);
156
+ __decorate([
157
+ property({ type: Boolean, reflect: true })
158
+ ], NileIconButton.prototype, "ishovered", void 0);
156
159
  NileIconButton = __decorate([
157
160
  customElement('nile-icon-button')
158
161
  ], NileIconButton);