@aquera/nile-elements 0.0.3-1 → 0.0.3-3

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 (221) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +2 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +2 -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-checkbox/nile-checkbox.css.js +5 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -0
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.js +25 -1
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.css.js +9 -11
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.css.js.map +1 -1
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.d.ts +3 -2
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.js +32 -8
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.js.map +1 -1
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/index.d.ts +1 -0
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/index.js +2 -0
  16. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/index.js.map +1 -0
  17. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.css.d.ts +12 -0
  18. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.css.js +33 -0
  19. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.css.js.map +1 -0
  20. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.d.ts +31 -0
  21. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.js +44 -0
  22. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.js.map +1 -0
  23. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/index.d.ts +1 -0
  24. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/index.js +2 -0
  25. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/index.js.map +1 -0
  26. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.css.d.ts +12 -0
  27. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.css.js +31 -0
  28. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.css.js.map +1 -0
  29. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.d.ts +31 -0
  30. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.js +44 -0
  31. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.js.map +1 -0
  32. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js +1 -0
  33. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
  34. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.css.js +21 -8
  35. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.css.js.map +1 -1
  36. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js +18 -24
  37. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js.map +1 -1
  38. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.css.js +8 -0
  39. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.css.js.map +1 -1
  40. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.d.ts +2 -3
  41. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js +24 -20
  42. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  43. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js +17 -11
  44. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js.map +1 -1
  45. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.d.ts +2 -2
  46. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +24 -15
  47. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
  48. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +7 -0
  49. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
  50. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +2 -0
  51. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.js +23 -0
  52. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  53. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.css.js +68 -41
  54. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.css.js.map +1 -1
  55. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.d.ts +1 -1
  56. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.js +9 -6
  57. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.js.map +1 -1
  58. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.css.js +15 -10
  59. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
  60. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.js +15 -18
  61. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.js.map +1 -1
  62. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  63. package/dist/index.cjs.js +1 -1
  64. package/dist/index.esm.js +1 -1
  65. package/dist/index.iife.js +305 -176
  66. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  67. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  68. package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
  69. package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
  70. package/dist/nile-checkbox/nile-checkbox.css.esm.js +5 -1
  71. package/dist/nile-checkbox/nile-checkbox.esm.js +15 -5
  72. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  73. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  74. package/dist/nile-chip/nile-chip.css.cjs.js +1 -1
  75. package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
  76. package/dist/nile-chip/nile-chip.css.esm.js +9 -11
  77. package/dist/nile-chip/nile-chip.esm.js +17 -7
  78. package/dist/nile-form-error-message/index.cjs.js +2 -0
  79. package/dist/nile-form-error-message/index.cjs.js.map +1 -0
  80. package/dist/nile-form-error-message/index.esm.js +1 -0
  81. package/dist/nile-form-error-message/nile-form-error-message.cjs.js +2 -0
  82. package/dist/nile-form-error-message/nile-form-error-message.cjs.js.map +1 -0
  83. package/dist/nile-form-error-message/nile-form-error-message.css.cjs.js +2 -0
  84. package/dist/nile-form-error-message/nile-form-error-message.css.cjs.js.map +1 -0
  85. package/dist/nile-form-error-message/nile-form-error-message.css.esm.js +21 -0
  86. package/dist/nile-form-error-message/nile-form-error-message.esm.js +5 -0
  87. package/dist/nile-form-help-text/index.cjs.js +2 -0
  88. package/dist/nile-form-help-text/index.cjs.js.map +1 -0
  89. package/dist/nile-form-help-text/index.esm.js +1 -0
  90. package/dist/nile-form-help-text/nile-form-help-text.cjs.js +2 -0
  91. package/dist/nile-form-help-text/nile-form-help-text.cjs.js.map +1 -0
  92. package/dist/nile-form-help-text/nile-form-help-text.css.cjs.js +2 -0
  93. package/dist/nile-form-help-text/nile-form-help-text.css.cjs.js.map +1 -0
  94. package/dist/nile-form-help-text/nile-form-help-text.css.esm.js +19 -0
  95. package/dist/nile-form-help-text/nile-form-help-text.esm.js +5 -0
  96. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  97. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  98. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -0
  99. package/dist/nile-input/nile-input.cjs.js +1 -1
  100. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  101. package/dist/nile-input/nile-input.css.cjs.js +1 -1
  102. package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
  103. package/dist/nile-input/nile-input.css.esm.js +21 -8
  104. package/dist/nile-input/nile-input.esm.js +12 -23
  105. package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
  106. package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
  107. package/dist/nile-radio-group/nile-radio-group.css.cjs.js +1 -1
  108. package/dist/nile-radio-group/nile-radio-group.css.cjs.js.map +1 -1
  109. package/dist/nile-radio-group/nile-radio-group.css.esm.js +10 -2
  110. package/dist/nile-radio-group/nile-radio-group.esm.js +14 -14
  111. package/dist/nile-select/nile-select.cjs.js +1 -1
  112. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  113. package/dist/nile-select/nile-select.css.cjs.js +1 -1
  114. package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
  115. package/dist/nile-select/nile-select.css.esm.js +17 -11
  116. package/dist/nile-select/nile-select.esm.js +18 -17
  117. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
  118. package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
  119. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
  120. package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
  121. package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +7 -0
  122. package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +11 -2
  123. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  124. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  125. package/dist/nile-tag/nile-tag.css.cjs.js +1 -1
  126. package/dist/nile-tag/nile-tag.css.cjs.js.map +1 -1
  127. package/dist/nile-tag/nile-tag.css.esm.js +70 -43
  128. package/dist/nile-tag/nile-tag.esm.js +7 -4
  129. package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
  130. package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
  131. package/dist/nile-textarea/nile-textarea.css.cjs.js +1 -1
  132. package/dist/nile-textarea/nile-textarea.css.cjs.js.map +1 -1
  133. package/dist/nile-textarea/nile-textarea.css.esm.js +15 -10
  134. package/dist/nile-textarea/nile-textarea.esm.js +12 -20
  135. package/dist/src/index.d.ts +2 -0
  136. package/dist/src/index.js +2 -0
  137. package/dist/src/index.js.map +1 -1
  138. package/dist/src/nile-checkbox/nile-checkbox.css.js +5 -1
  139. package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
  140. package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -0
  141. package/dist/src/nile-checkbox/nile-checkbox.js +25 -1
  142. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  143. package/dist/src/nile-chip/nile-chip.css.js +9 -11
  144. package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
  145. package/dist/src/nile-chip/nile-chip.d.ts +3 -2
  146. package/dist/src/nile-chip/nile-chip.js +32 -8
  147. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  148. package/dist/src/nile-form-error-message/index.d.ts +1 -0
  149. package/dist/src/nile-form-error-message/index.js +2 -0
  150. package/dist/src/nile-form-error-message/index.js.map +1 -0
  151. package/dist/src/nile-form-error-message/nile-form-error-message.css.d.ts +12 -0
  152. package/dist/src/nile-form-error-message/nile-form-error-message.css.js +33 -0
  153. package/dist/src/nile-form-error-message/nile-form-error-message.css.js.map +1 -0
  154. package/dist/src/nile-form-error-message/nile-form-error-message.d.ts +31 -0
  155. package/dist/src/nile-form-error-message/nile-form-error-message.js +44 -0
  156. package/dist/src/nile-form-error-message/nile-form-error-message.js.map +1 -0
  157. package/dist/src/nile-form-help-text/index.d.ts +1 -0
  158. package/dist/src/nile-form-help-text/index.js +2 -0
  159. package/dist/src/nile-form-help-text/index.js.map +1 -0
  160. package/dist/src/nile-form-help-text/nile-form-help-text.css.d.ts +12 -0
  161. package/dist/src/nile-form-help-text/nile-form-help-text.css.js +31 -0
  162. package/dist/src/nile-form-help-text/nile-form-help-text.css.js.map +1 -0
  163. package/dist/src/nile-form-help-text/nile-form-help-text.d.ts +31 -0
  164. package/dist/src/nile-form-help-text/nile-form-help-text.js +44 -0
  165. package/dist/src/nile-form-help-text/nile-form-help-text.js.map +1 -0
  166. package/dist/src/nile-icon-button/nile-icon-button.js +1 -0
  167. package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
  168. package/dist/src/nile-input/nile-input.css.js +21 -8
  169. package/dist/src/nile-input/nile-input.css.js.map +1 -1
  170. package/dist/src/nile-input/nile-input.js +18 -24
  171. package/dist/src/nile-input/nile-input.js.map +1 -1
  172. package/dist/src/nile-radio-group/nile-radio-group.css.js +8 -0
  173. package/dist/src/nile-radio-group/nile-radio-group.css.js.map +1 -1
  174. package/dist/src/nile-radio-group/nile-radio-group.d.ts +2 -3
  175. package/dist/src/nile-radio-group/nile-radio-group.js +24 -20
  176. package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  177. package/dist/src/nile-select/nile-select.css.js +17 -11
  178. package/dist/src/nile-select/nile-select.css.js.map +1 -1
  179. package/dist/src/nile-select/nile-select.d.ts +2 -2
  180. package/dist/src/nile-select/nile-select.js +24 -15
  181. package/dist/src/nile-select/nile-select.js.map +1 -1
  182. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +7 -0
  183. package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
  184. package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +2 -0
  185. package/dist/src/nile-slide-toggle/nile-slide-toggle.js +23 -0
  186. package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
  187. package/dist/src/nile-tag/nile-tag.css.js +68 -41
  188. package/dist/src/nile-tag/nile-tag.css.js.map +1 -1
  189. package/dist/src/nile-tag/nile-tag.d.ts +1 -1
  190. package/dist/src/nile-tag/nile-tag.js +9 -6
  191. package/dist/src/nile-tag/nile-tag.js.map +1 -1
  192. package/dist/src/nile-textarea/nile-textarea.css.js +15 -10
  193. package/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
  194. package/dist/src/nile-textarea/nile-textarea.js +15 -18
  195. package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
  196. package/dist/tsconfig.tsbuildinfo +1 -1
  197. package/package.json +1 -1
  198. package/src/index.ts +2 -0
  199. package/src/nile-checkbox/nile-checkbox.css.ts +5 -1
  200. package/src/nile-checkbox/nile-checkbox.ts +26 -1
  201. package/src/nile-chip/nile-chip.css.ts +9 -11
  202. package/src/nile-chip/nile-chip.ts +32 -6
  203. package/src/nile-form-error-message/index.ts +1 -0
  204. package/src/nile-form-error-message/nile-form-error-message.css.ts +35 -0
  205. package/src/nile-form-error-message/nile-form-error-message.ts +54 -0
  206. package/src/nile-form-help-text/index.ts +1 -0
  207. package/src/nile-form-help-text/nile-form-help-text.css.ts +33 -0
  208. package/src/nile-form-help-text/nile-form-help-text.ts +54 -0
  209. package/src/nile-icon-button/nile-icon-button.ts +1 -0
  210. package/src/nile-input/nile-input.css.ts +21 -8
  211. package/src/nile-input/nile-input.ts +71 -38
  212. package/src/nile-radio-group/nile-radio-group.css.ts +8 -0
  213. package/src/nile-radio-group/nile-radio-group.ts +25 -15
  214. package/src/nile-select/nile-select.css.ts +17 -11
  215. package/src/nile-select/nile-select.ts +24 -12
  216. package/src/nile-slide-toggle/nile-slide-toggle.css.ts +7 -0
  217. package/src/nile-slide-toggle/nile-slide-toggle.ts +24 -0
  218. package/src/nile-tag/nile-tag.css.ts +68 -41
  219. package/src/nile-tag/nile-tag.ts +11 -8
  220. package/src/nile-textarea/nile-textarea.css.ts +15 -10
  221. package/src/nile-textarea/nile-textarea.ts +20 -18
@@ -26,3 +26,5 @@ export { NileChip } from './nile-chip';
26
26
  export { NileTextarea } from './nile-textarea';
27
27
  export { NileDatePicker } from './nile-date-picker';
28
28
  export { NileErrorMessage } from './nile-error-message';
29
+ export { NileFormErrorMessage } from './nile-form-error-message';
30
+ export { NileFormHelpText } from './nile-form-help-text';
package/dist/src/index.js CHANGED
@@ -26,4 +26,6 @@ export { NileChip } from './nile-chip';
26
26
  export { NileTextarea } from './nile-textarea';
27
27
  export { NileDatePicker } from './nile-date-picker';
28
28
  export { NileErrorMessage } from './nile-error-message';
29
+ export { NileFormErrorMessage } from './nile-form-error-message';
30
+ export { NileFormHelpText } from './nile-form-help-text';
29
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileSidebar } from './nile-sidebar';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSelect } from './nile-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileSidebar } from './nile-sidebar';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSelect } from './nile-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\n"]}
@@ -98,12 +98,16 @@ export const styles = css `
98
98
 
99
99
  .checkbox__label {
100
100
  display: inline-block;
101
- color: var(--nile-type-scale-3);
102
101
  line-height: 14px;
103
102
  font-size: 14px;
104
103
  margin-inline-start: 0.5em;
105
104
  user-select: none;
106
105
  margin-top: 2px;
106
+ color: var(--nile-colors-dark-900);
107
+ font-family: Colfax-regular;
108
+ font-style: normal;
109
+ font-weight: 400;
110
+ letter-spacing: 0.2px;
107
111
  }
108
112
 
109
113
  :host([required]) .checkbox__label::after {
@@ -1 +1 @@
1
- {"version":3,"file":"nile-checkbox.css.js","sourceRoot":"","sources":["../../../src/nile-checkbox/nile-checkbox.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GxB,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 * Checkbox CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n }\n\n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: top;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .checkbox--medium {\n --toggle-size: var(--nile-type-scale-3);\n font-size: var(--nile-type-scale-3);\n }\n\n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-colors-neutral-700);\n background-color: var(--nile-colors-white-base);\n border-radius: 4px;\n transition: var(--nile-transition-duration-default border-color), var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color, var(--nile-transition-duration-default box-shadow);\n }\n\n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n\n /* svg {\n display:none !important;\n } */\n\n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control:hover {\n background: var(--nile-colors-primary-100);\n border: 1px solid var(--nile-colors-primary-600);\n border-radius: 4px;\n }\n\n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-colors-primary-600);\n background-color: var(--nile-colors-primary-600);\n }\n\n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__control:hover {\n background: var(--nile-colors-primary-900);\n border: 1px solid var(--nile-colors-primary-900);\n }\n\n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Disabled */\n .checkbox--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .checkbox__label {\n display: inline-block;\n color: var(--nile-type-scale-3);\n line-height: 14px;\n font-size: 14px;\n margin-inline-start: 0.5em;\n user-select: none;\n margin-top: 2px;\n }\n\n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px\n }\n\n :host {\n --nile-svg-stroke: white;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-checkbox.css.js","sourceRoot":"","sources":["../../../src/nile-checkbox/nile-checkbox.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GxB,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 * Checkbox CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n }\n\n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: top;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .checkbox--medium {\n --toggle-size: var(--nile-type-scale-3);\n font-size: var(--nile-type-scale-3);\n }\n\n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-colors-neutral-700);\n background-color: var(--nile-colors-white-base);\n border-radius: 4px;\n transition: var(--nile-transition-duration-default border-color), var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color, var(--nile-transition-duration-default box-shadow);\n }\n\n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n\n /* svg {\n display:none !important;\n } */\n\n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control:hover {\n background: var(--nile-colors-primary-100);\n border: 1px solid var(--nile-colors-primary-600);\n border-radius: 4px;\n }\n\n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-colors-primary-600);\n background-color: var(--nile-colors-primary-600);\n }\n\n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__control:hover {\n background: var(--nile-colors-primary-900);\n border: 1px solid var(--nile-colors-primary-900);\n }\n\n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Disabled */\n .checkbox--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .checkbox__label {\n display: inline-block;\n line-height: 14px;\n font-size: 14px;\n margin-inline-start: 0.5em;\n user-select: none;\n margin-top: 2px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-style: normal;\n font-weight: 400;\n letter-spacing: 0.2px;\n }\n\n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px\n }\n\n :host {\n --nile-svg-stroke: white;\n }\n`;\n\nexport default [styles];\n"]}
@@ -59,6 +59,8 @@ export declare class NileCheckbox extends NileElement {
59
59
  indeterminate: boolean;
60
60
  /** The default value of the form control. Primarily used for resetting the form control. */
61
61
  defaultChecked: boolean;
62
+ helpText: string;
63
+ errorMessage: string;
62
64
  /**
63
65
  * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
64
66
  * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
@@ -64,6 +64,8 @@ let NileCheckbox = class NileCheckbox extends NileElement {
64
64
  this.indeterminate = false;
65
65
  /** The default value of the form control. Primarily used for resetting the form control. */
66
66
  this.defaultChecked = false;
67
+ this.helpText = '';
68
+ this.errorMessage = '';
67
69
  /**
68
70
  * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
69
71
  * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
@@ -112,6 +114,8 @@ let NileCheckbox = class NileCheckbox extends NileElement {
112
114
  this.input.blur();
113
115
  }
114
116
  render() {
117
+ const hasHelpText = this.helpText ? true : false;
118
+ const hasErrorMessage = this.errorMessage ? true : false;
115
119
  return html `
116
120
  <label
117
121
  part="base"
@@ -180,6 +184,20 @@ let NileCheckbox = class NileCheckbox extends NileElement {
180
184
  <slot></slot>
181
185
  </div>
182
186
  </label>
187
+
188
+ ${hasHelpText
189
+ ? html `
190
+ <nile-form-help-text>${this.helpText}</nile-form-help-text>
191
+ `
192
+ : ``}
193
+
194
+ ${hasErrorMessage
195
+ ? html `
196
+ <nile-form-error-message
197
+ >${this.errorMessage}</nile-form-error-message
198
+ >
199
+ `
200
+ : ``}
183
201
  `;
184
202
  }
185
203
  };
@@ -209,7 +227,7 @@ __decorate([
209
227
  property({ type: Boolean, reflect: true })
210
228
  ], NileCheckbox.prototype, "checked", void 0);
211
229
  __decorate([
212
- property({ type: Boolean, reflect: true })
230
+ property({ type: String, reflect: true })
213
231
  ], NileCheckbox.prototype, "label", void 0);
214
232
  __decorate([
215
233
  property({ type: Boolean, reflect: true })
@@ -217,6 +235,12 @@ __decorate([
217
235
  __decorate([
218
236
  defaultValue('checked')
219
237
  ], NileCheckbox.prototype, "defaultChecked", void 0);
238
+ __decorate([
239
+ property({ attribute: 'help-text' })
240
+ ], NileCheckbox.prototype, "helpText", void 0);
241
+ __decorate([
242
+ property({ attribute: 'error-message' })
243
+ ], NileCheckbox.prototype, "errorMessage", void 0);
220
244
  __decorate([
221
245
  property({ reflect: true })
222
246
  ], NileCheckbox.prototype, "form", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-checkbox.js","sourceRoot":"","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;GAKG;AAEH,IAAa,YAAY,GAAzB,MAAa,YAAa,SAAQ,WAAW;IA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,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AA+B7D;IADC,KAAK,CAAC,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAInE;AAlFU,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CA6KxB;SA7KY,YAAY;AA+KzB,eAAe,YAAY,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 } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n * @event nile-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n\n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n\n static styles: CSSResultGroup = styles;\n\n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n\n @property() title = ''; // make reactive to pass through\n\n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n\n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** Label, declared this property for backward compatibility of old component */\n @property({ type: Boolean, reflect: true }) label = '';\n\n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.dispatchEvent(\n new CustomEvent('valueChange', {\n composed: true,\n bubbles: true,\n detail: {\n checked: this.checked,\n },\n })\n );\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n\n private handleInput() {\n this.emit('input');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n\n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n\n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n\n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n\n\n render() {\n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate,\n 'checkbox--medium': this.size === 'medium',\n })}\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n\n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n\n <div part=\"label\" class=\"checkbox__label\">\n ${typeof this.label === 'boolean' ? '' : this.label}\n <slot></slot>\n </div>\n </label>\n `;\n }\n}\n\nexport default NileCheckbox;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-checkbox.js","sourceRoot":"","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"names":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AE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAkB;AA+B7D;IADC,KAAK,CAAC,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAInE;AAtFU,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAsMxB;SAtMY,YAAY;AAwMzB,eAAe,YAAY,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 } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n * @event nile-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n\n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n\n static styles: CSSResultGroup = styles;\n\n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n\n @property() title = ''; // make reactive to pass through\n\n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n\n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n\n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.dispatchEvent(\n new CustomEvent('valueChange', {\n composed: true,\n bubbles: true,\n detail: {\n checked: this.checked,\n },\n })\n );\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n\n private handleInput() {\n this.emit('input');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n\n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n\n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n\n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n\n\n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate,\n 'checkbox--medium': this.size === 'medium',\n })}\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n\n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n\n <div part=\"label\" class=\"checkbox__label\">\n ${typeof this.label === 'boolean' ? '' : this.label}\n <slot></slot>\n </div>\n </label>\n\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n `;\n }\n}\n\nexport default NileCheckbox;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}\n"]}
@@ -35,19 +35,18 @@ export const styles = css `
35
35
  .form-control--has-label .form-control__label {
36
36
  display: inline-block;
37
37
  color: inherit;
38
- margin-bottom: 0.125rem;
39
- }
40
-
41
- .form-control--has-label.form-control--small .form-control__label {
42
- font-size: 0.875rem;
38
+ margin-bottom: 12px;
39
+ color: var(--nile-colors-dark-900);
40
+ font-family: Colfax-regular;
41
+ font-size: 14px;
42
+ font-style: normal;
43
+ font-weight: 400;
44
+ line-height: 14px;
45
+ letter-spacing: 0.2px;
43
46
  }
44
47
 
45
48
  .form-control--has-label.form-control--medium .form-control__label {
46
- font-size: 1rem;
47
- }
48
-
49
- .form-control--has-label.form-control--large .form-control__label {
50
- font-size: 1.25rem;
49
+ font-size: 14px;
51
50
  }
52
51
 
53
52
  :host([required]) .form-control--has-label .form-control__label::after {
@@ -90,7 +89,6 @@ export const styles = css `
90
89
  background-color: #fff;
91
90
  border-radius: 0.25rem;
92
91
  border: solid 1px #c7ced4;
93
- padding: 5px 10px;
94
92
  display: flex;
95
93
  flex-wrap: wrap;
96
94
  width: 100%;
@@ -1 +1 @@
1
- {"version":3,"file":"nile-chip.css.js","sourceRoot":"","sources":["../../../src/nile-chip/nile-chip.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoJxB,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 * Chip CSS\n */\nexport const styles = css`\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 .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: inline-block;\n color: inherit;\n margin-bottom: 0.125rem;\n }\n\n .form-control--has-label.form-control--small .form-control__label {\n font-size: 0.875rem;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: 1rem;\n }\n\n .form-control--has-label.form-control--large .form-control__label {\n font-size: 1.25rem;\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: undefined;\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: hsl(240 3.8% 46.1%);\n margin-top: 0.125rem;\n }\n\n .form-control--has-help-text.form-control--small .form-control__help-text {\n font-size: 0.75rem;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 0.875rem;\n }\n\n .form-control--has-help-text.form-control--large .form-control__help-text {\n font-size: 1rem;\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: 0.25rem;\n }\n\n :host {\n display: block;\n font-family: inherit;\n }\n\n .nile-chip {\n padding: 5px 10px;\n background-color: #fff;\n border-radius: 0.25rem;\n border: solid 1px #c7ced4;\n padding: 5px 10px;\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n overflow-x: hidden;\n }\n\n .nile-chip--no-wrap {\n flex-wrap: nowrap;\n overflow-x: scroll;\n }\n\n .nile-chip::-webkit-scrollbar {\n height: 2px;\n }\n\n .nile-chip::-webkit-scrollbar-thumb {\n background: var(\n --nile-colors-primary-600\n );\n }\n\n .nile-chip--disabled {\n background-color: hsl(240 4.8% 95.9%);\n border-color: hsl(240 4.9% 83.9%);\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .nile-chip:hover:not(.nile-chip--disabled) {\n background-color: #fff;\n box-shadow: 0 0 0 1px hsl(198.6 88.7% 48.4% / 40%);\n }\n\n .nile-chip.nile-chip--focused:not(.nile-chip--disabled) {\n background-color: #fff;\n border-color: #005ea6;\n box-shadow: 0 0 0 1px hsl(198.6 88.7% 48.4% / 40%);\n }\n\n .nile-chip.nile-chip--disabled {\n background-color: hsl(240 4.8% 95.9%);\n border-color: hsl(240 4.9% 83.9%);\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .nile-chip.nile-chip--warning {\n border-color: #e5bf43;\n }\n\n .nile-chip.nile-chip--error {\n border-color: #e5434d;\n }\n\n .nile-chip.nile-chip--success {\n border-color: #43e5c0;\n }\n\n .nile-chip__auto-complete {\n flex: 1;\n }\n .nile-chip__tags {\n margin: 0.05rem;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-chip.css.js","sourceRoot":"","sources":["../../../src/nile-chip/nile-chip.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJxB,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 * Chip CSS\n */\nexport const styles = css`\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 .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: inline-block;\n color: inherit;\n margin-bottom: 12px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: 14px;\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: undefined;\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: hsl(240 3.8% 46.1%);\n margin-top: 0.125rem;\n }\n\n .form-control--has-help-text.form-control--small .form-control__help-text {\n font-size: 0.75rem;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 0.875rem;\n }\n\n .form-control--has-help-text.form-control--large .form-control__help-text {\n font-size: 1rem;\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: 0.25rem;\n }\n\n :host {\n display: block;\n font-family: inherit;\n }\n\n .nile-chip {\n padding: 5px 10px;\n background-color: #fff;\n border-radius: 0.25rem;\n border: solid 1px #c7ced4;\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n overflow-x: hidden;\n }\n\n .nile-chip--no-wrap {\n flex-wrap: nowrap;\n overflow-x: scroll;\n }\n\n .nile-chip::-webkit-scrollbar {\n height: 2px;\n }\n\n .nile-chip::-webkit-scrollbar-thumb {\n background: var(\n --nile-colors-primary-600\n );\n }\n\n .nile-chip--disabled {\n background-color: hsl(240 4.8% 95.9%);\n border-color: hsl(240 4.9% 83.9%);\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .nile-chip:hover:not(.nile-chip--disabled) {\n background-color: #fff;\n box-shadow: 0 0 0 1px hsl(198.6 88.7% 48.4% / 40%);\n }\n\n .nile-chip.nile-chip--focused:not(.nile-chip--disabled) {\n background-color: #fff;\n border-color: #005ea6;\n box-shadow: 0 0 0 1px hsl(198.6 88.7% 48.4% / 40%);\n }\n\n .nile-chip.nile-chip--disabled {\n background-color: hsl(240 4.8% 95.9%);\n border-color: hsl(240 4.9% 83.9%);\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .nile-chip.nile-chip--warning {\n border-color: #e5bf43;\n }\n\n .nile-chip.nile-chip--error {\n border-color: #e5434d;\n }\n\n .nile-chip.nile-chip--success {\n border-color: #43e5c0;\n }\n\n .nile-chip__auto-complete {\n flex: 1;\n }\n .nile-chip__tags {\n margin: 0.05rem;\n }\n`;\n\nexport default [styles];\n"]}
@@ -33,12 +33,13 @@ export declare class NileChip extends NileElement {
33
33
  readonly: boolean;
34
34
  /** Disables the input. */
35
35
  disabled: boolean;
36
- /** The input's help text. If you need to display HTML, use the `help-text` slot instead. */
37
- helpText: string;
38
36
  autoCompleteOptions: any[];
39
37
  filteredAutoCompleteOptions: any[];
40
38
  value: any[];
41
39
  noWrap: boolean;
40
+ errorIndexes: number[];
41
+ helpText: string;
42
+ errorMessage: string;
42
43
  onAutoCompleteOptionsChanged(): void;
43
44
  onValueChanged(): void;
44
45
  onTagsChanged(): void;
@@ -39,13 +39,14 @@ let NileChip = class NileChip extends NileElement {
39
39
  this.readonly = false;
40
40
  /** Disables the input. */
41
41
  this.disabled = false;
42
- /** The input's help text. If you need to display HTML, use the `help-text` slot instead. */
43
- this.helpText = '';
44
42
  // Auto-complete options
45
43
  this.autoCompleteOptions = [];
46
44
  this.filteredAutoCompleteOptions = [];
47
45
  this.value = [];
48
46
  this.noWrap = false;
47
+ this.errorIndexes = [];
48
+ this.helpText = '';
49
+ this.errorMessage = '';
49
50
  }
50
51
  static get styles() {
51
52
  return [styles];
@@ -125,7 +126,8 @@ let NileChip = class NileChip extends NileElement {
125
126
  const hasHelpTextSlot = this.hasSlotController.test('help-text');
126
127
  // Check if label and help text are present
127
128
  const hasLabel = this.label ? true : !!hasLabelSlot;
128
- const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
129
+ const hasHelpText = this.helpText ? true : false;
130
+ const hasErrorMessage = this.errorMessage ? true : false;
129
131
  return html `
130
132
  <div
131
133
  part="form-control"
@@ -155,9 +157,12 @@ let NileChip = class NileChip extends NileElement {
155
157
  'nile-chip--no-wrap': this.noWrap,
156
158
  })}
157
159
  >
158
- ${this.tags.map(tag => html `
160
+ ${this.tags.map((tag, index) => html `
159
161
  <nile-tag
160
- class="nile-chip__tags"
162
+ class=${classMap({
163
+ 'nile-chip__tags': true,
164
+ })}
165
+ .variant=${this.errorIndexes.includes(index) ? 'error' : 'normal'}
161
166
  @nile-remove=${() => this.handleRemove(tag)}
162
167
  removable
163
168
  pill
@@ -189,6 +194,19 @@ let NileChip = class NileChip extends NileElement {
189
194
  ${this.helpText}
190
195
  </slot>
191
196
  </div>
197
+ ${hasHelpText
198
+ ? html `
199
+ <nile-form-help-text>${this.helpText}</nile-form-help-text>
200
+ `
201
+ : ``}
202
+
203
+ ${hasErrorMessage
204
+ ? html `
205
+ <nile-form-error-message
206
+ >${this.errorMessage}</nile-form-error-message
207
+ >
208
+ `
209
+ : ``}
192
210
  </div>
193
211
  `;
194
212
  }
@@ -235,9 +253,6 @@ __decorate([
235
253
  __decorate([
236
254
  property({ type: Boolean, reflect: true })
237
255
  ], NileChip.prototype, "disabled", void 0);
238
- __decorate([
239
- property({ attribute: 'help-text' })
240
- ], NileChip.prototype, "helpText", void 0);
241
256
  __decorate([
242
257
  property({ type: Array })
243
258
  ], NileChip.prototype, "autoCompleteOptions", void 0);
@@ -250,6 +265,15 @@ __decorate([
250
265
  __decorate([
251
266
  property({ type: Boolean })
252
267
  ], NileChip.prototype, "noWrap", void 0);
268
+ __decorate([
269
+ property({ type: Array })
270
+ ], NileChip.prototype, "errorIndexes", void 0);
271
+ __decorate([
272
+ property({ attribute: 'help-text' })
273
+ ], NileChip.prototype, "helpText", void 0);
274
+ __decorate([
275
+ property({ attribute: 'error-message' })
276
+ ], NileChip.prototype, "errorMessage", void 0);
253
277
  __decorate([
254
278
  watch('autoCompleteOptions')
255
279
  ], NileChip.prototype, "onAutoCompleteOptionsChanged", null);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-chip.js","sourceRoot":"","sources":["../../../src/nile-chip/nile-chip.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAgC,MAAM,0BAA0B,CAAC;AAOxE,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,WAAW;IAAzC;;QAKmB,sBAAiB,GAAG,IAAI,iBAAiB,CACxD,IAAI,EACJ,WAAW,EACX,OAAO,CACR,CAAC;QAEO,SAAI,GAAa,EAAE,CAAC;QAEpB,eAAU,GAAW,EAAE,CAAC;QAExB,mBAAc,GAAY,KAAK,CAAC;QAIzC,yEAAyE;QAC5C,YAAO,GAAG,KAAK,CAAC;QAE7C,wEAAwE;QAC3C,UAAK,GAAG,KAAK,CAAC;QAE3C,yEAAyE;QAC5C,YAAO,GAAG,KAAK,CAAC;QAE7C,sCAAsC;QACT,iBAAY,GAAG,KAAK,CAAC;QAElD,oFAAoF;QAC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,CAwOpB;SAxOY,QAAQ;AA0OrB,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 {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-chip.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport { watch } from '../internal/watch';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\ninterface CustomEventDetail {\n value: string;\n}\n\n@customElement('nile-chip')\nexport class NileChip extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @state() tags: string[] = [];\n\n @state() inputValue: string = '';\n\n @state() isDropdownOpen: boolean = false;\n\n @query('nile-auto-complete') autoComplete!: any;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Disables the duplicate entries. */\n @property({ type: Boolean }) noDuplicates = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = 'type here...';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** The input's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n // Auto-complete options\n @property({ type: Array }) autoCompleteOptions: any[] = [];\n\n @property({ type: Array }) filteredAutoCompleteOptions: any[] = [];\n\n @property({ type: Array }) value: any[] = [];\n\n @property({ type: Boolean }) noWrap: boolean = false;\n\n @watch('autoCompleteOptions')\n onAutoCompleteOptionsChanged() {\n this.filteredAutoCompleteOptions = [...this.autoCompleteOptions];\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n\n @watch('value')\n onValueChanged() {\n this.tags = [...this.value];\n this.onTagsChanged();\n }\n\n @watch('tags')\n onTagsChanged() {\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.tags.includes(option)\n );\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n\n private handleSelect(event: CustomEvent<CustomEventDetail>) {\n // Add the selected value to the tags array only if it doesn't already exist\n if (!this.noDuplicates || !this.tags.includes(event.detail.value)) {\n this.tags = [...this.tags, event.detail.value];\n this.emit('nile-chip-change', { value: this.tags });\n this.resetInput();\n }\n }\n\n private handleRemove(value: string) {\n // Remove the tag from the tags array\n this.tags = this.tags.filter(tag => tag !== value);\n\n if (this.noDuplicates && this.autoCompleteOptions.includes(value)) {\n this.filteredAutoCompleteOptions = [\n ...this.filteredAutoCompleteOptions,\n value,\n ];\n }\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n private handleInputChange(event: CustomEvent<CustomEventDetail>) {\n // Update the input value\n this.inputValue = event.detail.value;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (!this.acceptUserInput) {\n return;\n }\n\n if (\n event.key === 'Enter' &&\n this.inputValue &&\n (!this.noDuplicates || !this.tags.includes(this.inputValue))\n ) {\n this.tags = [...this.tags, this.inputValue];\n this.resetInput();\n this.emit('nile-chip-change', { value: this.tags });\n }\n }\n\n private handleFocus() {\n this.isDropdownOpen = true;\n }\n\n private resetInput() {\n // Reset the input-related properties\n this.inputValue = '';\n this.isDropdownOpen = false;\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n\n render() {\n // Check if slots are present\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n\n // Check if label and help text are present\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'nile-chip--disabled': this.disabled,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div\n class=${classMap({\n 'nile-chip': true,\n 'nile-chip--warning': this.warning,\n 'nile-chip--error': this.error,\n 'nile-chip--success': this.success,\n 'nile-chip--no-wrap': this.noWrap,\n })}\n >\n ${this.tags.map(\n tag => html`\n <nile-tag\n class=\"nile-chip__tags\"\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n pill\n >\n ${tag}\n </nile-tag>\n `\n )}\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n openOnFocus\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-complete=${this.handleSelect}\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n ${this.helpText}\n </slot>\n </div>\n </div>\n `;\n }\n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-chip.js","sourceRoot":"","sources":["../../../src/nile-chip/nile-chip.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAgC,MAAM,0BAA0B,CAAC;AAOxE,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,WAAW;IAAzC;;QAKmB,sBAAiB,GAAG,IAAI,iBAAiB,CACxD,IAAI,EACJ,WAAW,EACX,OAAO,CACR,CAAC;QAEO,SAAI,GAAa,EAAE,CAAC;QAEpB,eAAU,GAAW,EAAE,CAAC;QAExB,mBAAc,GAAY,KAAK,CAAC;QAIzC,yEAAyE;QAC5C,YAAO,GAAG,KAAK,CAAC;QAE7C,wEAAwE;QAC3C,UAAK,GAAG,KAAK,CAAC;QAE3C,yEAAyE;QAC5C,YAAO,GAAG,KAAK,CAAC;QAE7C,sCAAsC;QACT,iBAAY,GAAG,KAAK,CAAC;QAElD,oFAAoF;QACxE,UAAK,GAAG,EAAE,CAAC;QAEvB,uDAAuD;QAC1B,oBAAe,GAAG,KAAK,CAAC;QAErD,uDAAuD;QAC1B,cAAS,GAAG,KAAK,CAAC;QAE/C,kEAAkE;QACtD,gBAAW,GAAG,cAAc,CAAC;QAEzC,gCAAgC;QACY,aAAQ,GAAG,KAAK,CAAC;QAE7D,0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AE,OAAO,EAAE,CAAC;wCAAyB;AAE1B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAA6B;AAEjB;IAArC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;0CAAe;AAEV;IAAzC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;8CAAmB;AAI5D;IADC,KAAK,CAAC,qBAAqB,CAAC;4DAU5B;AAGD;IADC,KAAK,CAAC,OAAO,CAAC;8CAId;AAGD;IADC,KAAK,CAAC,MAAM,CAAC;6CAQb;AA3FU,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAkQpB;SAlQY,QAAQ;AAoQrB,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 {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-chip.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport { watch } from '../internal/watch';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\ninterface CustomEventDetail {\n value: string;\n}\n\n@customElement('nile-chip')\nexport class NileChip extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @state() tags: string[] = [];\n\n @state() inputValue: string = '';\n\n @state() isDropdownOpen: boolean = false;\n\n @query('nile-auto-complete') autoComplete!: any;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Disables the duplicate entries. */\n @property({ type: Boolean }) noDuplicates = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = 'type here...';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n // Auto-complete options\n @property({ type: Array }) autoCompleteOptions: any[] = [];\n\n @property({ type: Array }) filteredAutoCompleteOptions: any[] = [];\n\n @property({ type: Array }) value: any[] = [];\n\n @property({ type: Boolean }) noWrap: boolean = false;\n\n @property({ type: Array }) errorIndexes: number[] = [];\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n\n @watch('autoCompleteOptions')\n onAutoCompleteOptionsChanged() {\n this.filteredAutoCompleteOptions = [...this.autoCompleteOptions];\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n\n @watch('value')\n onValueChanged() {\n this.tags = [...this.value];\n this.onTagsChanged();\n }\n\n @watch('tags')\n onTagsChanged() {\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.tags.includes(option)\n );\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n\n private handleSelect(event: CustomEvent<CustomEventDetail>) {\n // Add the selected value to the tags array only if it doesn't already exist\n if (!this.noDuplicates || !this.tags.includes(event.detail.value)) {\n this.tags = [...this.tags, event.detail.value];\n this.emit('nile-chip-change', { value: this.tags });\n this.resetInput();\n }\n }\n\n private handleRemove(value: string) {\n // Remove the tag from the tags array\n this.tags = this.tags.filter(tag => tag !== value);\n\n if (this.noDuplicates && this.autoCompleteOptions.includes(value)) {\n this.filteredAutoCompleteOptions = [\n ...this.filteredAutoCompleteOptions,\n value,\n ];\n }\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n private handleInputChange(event: CustomEvent<CustomEventDetail>) {\n // Update the input value\n this.inputValue = event.detail.value;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (!this.acceptUserInput) {\n return;\n }\n\n if (\n event.key === 'Enter' &&\n this.inputValue &&\n (!this.noDuplicates || !this.tags.includes(this.inputValue))\n ) {\n this.tags = [...this.tags, this.inputValue];\n this.resetInput();\n this.emit('nile-chip-change', { value: this.tags });\n }\n }\n\n private handleFocus() {\n this.isDropdownOpen = true;\n }\n\n private resetInput() {\n // Reset the input-related properties\n this.inputValue = '';\n this.isDropdownOpen = false;\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n\n render() {\n // Check if slots are present\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n\n // Check if label and help text are present\n const hasLabel = this.label ? true : !!hasLabelSlot;\n\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'nile-chip--disabled': this.disabled,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div\n class=${classMap({\n 'nile-chip': true,\n 'nile-chip--warning': this.warning,\n 'nile-chip--error': this.error,\n 'nile-chip--success': this.success,\n 'nile-chip--no-wrap': this.noWrap,\n })}\n >\n ${this.tags.map(\n (tag, index) => html`\n <nile-tag\n class=${classMap({\n 'nile-chip__tags': true,\n })}\n .variant=${this.errorIndexes.includes(index) ? 'error' : 'normal'}\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n pill\n >\n ${tag}\n </nile-tag>\n `\n )}\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n openOnFocus\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-complete=${this.handleSelect}\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n ${this.helpText}\n </slot>\n </div>\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n `;\n }\n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export { NileFormErrorMessage } from './nile-form-error-message';
@@ -0,0 +1,2 @@
1
+ export { NileFormErrorMessage } from './nile-form-error-message';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-form-error-message/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { NileFormErrorMessage } from './nile-form-error-message';\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
+ * FormErrorMessage 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,33 @@
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
+ * FormErrorMessage CSS
10
+ */
11
+ export const styles = css `
12
+ :host {
13
+ }
14
+
15
+ .nile-form-error-message {
16
+ display: flex;
17
+ align-items: center;
18
+ color: var(--nile-colors-red-700);
19
+ font-family: Colfax-regular;
20
+ font-size: 12px;
21
+ font-style: normal;
22
+ font-weight: 400;
23
+ line-height: 12px;
24
+ letter-spacing: 0.2px;
25
+ margin-top: 6px;
26
+ }
27
+
28
+ .nile-form-error-message__icon {
29
+ margin-right: 6px;
30
+ }
31
+ `;
32
+ export default [styles];
33
+ //# sourceMappingURL=nile-form-error-message.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-form-error-message.css.js","sourceRoot":"","sources":["../../../src/nile-form-error-message/nile-form-error-message.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;CAoBxB,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 * FormErrorMessage CSS\n */\nexport const styles = css`\n :host {\n }\n\n .nile-form-error-message {\n display: flex;\n align-items: center;\n color: var(--nile-colors-red-700);\n font-family: Colfax-regular;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 12px;\n letter-spacing: 0.2px;\n margin-top: 6px;\n }\n\n .nile-form-error-message__icon {\n margin-right: 6px;\n }\n`;\n\nexport default [styles];\n"]}
@@ -0,0 +1,31 @@
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 { LitElement, CSSResultArray, TemplateResult } from 'lit-element';
8
+ /**
9
+ * Nile icon component.
10
+ *
11
+ * @tag nile-form-error-message
12
+ *
13
+ */
14
+ export declare class NileFormErrorMessage extends LitElement {
15
+ /**
16
+ * The styles for FormErrorMessage
17
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
18
+ */
19
+ static get styles(): CSSResultArray;
20
+ /**
21
+ * Render method
22
+ * @slot This is a slot test
23
+ */
24
+ render(): TemplateResult;
25
+ }
26
+ export default NileFormErrorMessage;
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ 'nile-form-error-message': NileFormErrorMessage;
30
+ }
31
+ }
@@ -0,0 +1,44 @@
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 { LitElement, html } from 'lit-element';
9
+ import { customElement } from 'lit/decorators.js';
10
+ import { styles } from './nile-form-error-message.css';
11
+ /**
12
+ * Nile icon component.
13
+ *
14
+ * @tag nile-form-error-message
15
+ *
16
+ */
17
+ let NileFormErrorMessage = class NileFormErrorMessage extends LitElement {
18
+ /**
19
+ * The styles for FormErrorMessage
20
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
21
+ */
22
+ static get styles() {
23
+ return [styles];
24
+ }
25
+ /* #endregion */
26
+ /* #region Methods */
27
+ /**
28
+ * Render method
29
+ * @slot This is a slot test
30
+ */
31
+ render() {
32
+ return html `
33
+ <div class="nile-form-error-message">
34
+ <nile-icon name="info2" size="14" class="nile-form-error-message__icon" color="#A4121C"> </nile-icon> <slot> </slot>
35
+ </div>
36
+ `;
37
+ }
38
+ };
39
+ NileFormErrorMessage = __decorate([
40
+ customElement('nile-form-error-message')
41
+ ], NileFormErrorMessage);
42
+ export { NileFormErrorMessage };
43
+ export default NileFormErrorMessage;
44
+ //# sourceMappingURL=nile-form-error-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-form-error-message.js","sourceRoot":"","sources":["../../../src/nile-form-error-message/nile-form-error-message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,UAAU,EAAE,IAAI,EAA2C,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAErD;;;;;GAKG;AAEH,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,UAAU;IAEnD;;;OAGG;IACI,MAAM,KAAK,MAAM;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAErB;;;OAGG;IACI,MAAM;QACZ,OAAO,IAAI,CAAA;;;;IAIT,CAAC;IACJ,CAAC;CAGD,CAAA;AA3BY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CA2BhC;SA3BY,oBAAoB;AA6BjC,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 {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-form-error-message.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-error-message\n *\n */\n@customElement('nile-form-error-message')\nexport class NileFormErrorMessage extends LitElement {\n\n\t/**\n\t * The styles for FormErrorMessage\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n <div class=\"nile-form-error-message\">\n <nile-icon name=\"info2\" size=\"14\" class=\"nile-form-error-message__icon\" color=\"#A4121C\"> </nile-icon> <slot> </slot>\n </div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileFormErrorMessage;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-error-message': NileFormErrorMessage;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export { NileFormHelpText } from './nile-form-help-text';
@@ -0,0 +1,2 @@
1
+ export { NileFormHelpText } from './nile-form-help-text';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["export { NileFormHelpText } from './nile-form-help-text';\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
+ * FormHelpText CSS
9
+ */
10
+ export declare const styles: import("lit-element").CSSResult;
11
+ declare const _default: import("lit-element").CSSResult[];
12
+ export default _default;