@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
@@ -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 { css } from 'lit-element';
8
+ /**
9
+ * FormHelpText CSS
10
+ */
11
+ export const styles = css `
12
+ :host {
13
+
14
+ }
15
+
16
+ .nile-form-help-text {
17
+ display: flex;
18
+ align-items: center;
19
+ color: var(--nile-colors-dark-500);
20
+ font-family: Colfax-regular;
21
+ font-size: 12px;
22
+ font-style: normal;
23
+ font-weight: 400;
24
+ line-height: 12px;
25
+ letter-spacing: 0.2px;
26
+ margin-top: 6px;
27
+ }
28
+
29
+ `;
30
+ export default [styles];
31
+ //# sourceMappingURL=nile-form-help-text.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-form-help-text.css.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/nile-form-help-text.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;CAkBxB,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 * FormHelpText CSS\n */\nexport const styles = css`\n\t:host {\n\n\t}\n\n .nile-form-help-text {\n display: flex;\n align-items: center;\n color: var(--nile-colors-dark-500);\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`;\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-help-text
12
+ *
13
+ */
14
+ export declare class NileFormHelpText extends LitElement {
15
+ /**
16
+ * The styles for FormHelpText
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 NileFormHelpText;
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ 'nile-form-help-text': NileFormHelpText;
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-help-text.css';
11
+ /**
12
+ * Nile icon component.
13
+ *
14
+ * @tag nile-form-help-text
15
+ *
16
+ */
17
+ let NileFormHelpText = class NileFormHelpText extends LitElement {
18
+ /**
19
+ * The styles for FormHelpText
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-help-text">
34
+ <slot> </slot>
35
+ </div>
36
+ `;
37
+ }
38
+ };
39
+ NileFormHelpText = __decorate([
40
+ customElement('nile-form-help-text')
41
+ ], NileFormHelpText);
42
+ export { NileFormHelpText };
43
+ export default NileFormHelpText;
44
+ //# sourceMappingURL=nile-form-help-text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-form-help-text.js","sourceRoot":"","sources":["../../../src/nile-form-help-text/nile-form-help-text.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,2BAA2B,CAAC;AAEjD;;;;;GAKG;AAEH,IAAa,gBAAgB,GAA7B,MAAa,gBAAiB,SAAQ,UAAU;IAE/C;;;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,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CA2B5B;SA3BY,gBAAgB;AA6B7B,eAAe,gBAAgB,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-help-text.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-help-text\n *\n */\n@customElement('nile-form-help-text')\nexport class NileFormHelpText extends LitElement {\n\n\t/**\n\t * The styles for FormHelpText\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-help-text\">\n <slot> </slot>\n </div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileFormHelpText;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-help-text': NileFormHelpText;\n }\n}\n"]}
@@ -102,6 +102,7 @@ let NileIconButton = class NileIconButton extends NileElement {
102
102
  library=${ifDefined(this.library)}
103
103
  src=${ifDefined(this.src)}
104
104
  aria-hidden="true"
105
+ size="14"
105
106
  ></nile-icon>
106
107
  </${tag}>
107
108
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"nile-icon-button.js","sourceRoot":"","sources":["../../../src/nile-icon-button/nile-icon-button.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,wBAAwB,CAAC;AAE9C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,WAAW,MAAM,0BAA0B,C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CAAC;8CAA6C;AAE1D;IAAR,KAAK,EAAE;gDAA0B;AAGtB;IAAX,QAAQ,EAAE;4CAAe;AAGd;IAAX,QAAQ,EAAE;+CAAkB;AAMjB;IAAX,QAAQ,EAAE;2CAAc;AAGb;IAAX,QAAQ,EAAE;4CAAe;AAGd;IAAX,QAAQ,EAAE;8CAAkD;AAGjD;IAAX,QAAQ,EAAE;gDAAmB;AAMlB;IAAX,QAAQ,EAAE;6CAAY;AAGqB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAkB;AAnClD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA0G1B;SA1GY,cAAc;AA6G3B,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 {LitElement, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-icon-button.css';\n\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { literal, html } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\n\n/**\n * @summary Icons buttons are simple, icon-only buttons that can be used for actions and in toolbars.\n * @status stable\n * @since 2.0\n *\n * @dependency nile-icon\n *\n * @event nile-blur - Emitted when the icon button loses focus.\n * @event nile-focus - Emitted when the icon button gains focus.\n *\n * @csspart base - The component's base wrapper.\n */\n/**\n * Nile icon component.\n *\n * @tag nile-icon-button\n *\n */\n@customElement('nile-icon-button')\nexport class NileIconButton extends NileElement {\n static styles: CSSResultGroup = styles;\n\n @query('.icon-button') button: HTMLButtonElement | HTMLLinkElement;\n\n @state() private hasFocus = false;\n\n /** The name of the icon to draw. Available names depend on the icon library being used. */\n @property() name?: string;\n\n /** The name of a registered custom icon library. */\n @property() library?: string;\n\n /**\n * An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\n * can result in XSS attacks.\n */\n @property() src?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @property() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @property() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @property() download?: string;\n\n /**\n * A description that gets read by assistive devices. For optimal accessibility, you should always include a label\n * that describes what the icon button does.\n */\n @property() label = '';\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus');\n }\n\n private handleClick(event: MouseEvent) {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /** Simulates a click on the icon button. */\n click() {\n this.button.click();\n }\n\n /** Sets focus on the icon button. */\n focus(options?: FocusOptions) {\n this.button.focus(options);\n }\n\n /** Removes focus from the icon button. */\n blur() {\n this.button.blur();\n }\n\n render(): TemplateResult {\n const isLink = this.href ? true : false;\n const tag = isLink ? literal`a` : literal`button`;\n\n /* eslint-disable lit/binding-positions, lit/no-invalid-html */\n return html`\n <${tag}\n part=\"base\"\n class=${classMap({\n 'icon-button': true,\n 'icon-button--disabled': !isLink && this.disabled,\n 'icon-button--focused': this.hasFocus\n })}\n ?disabled=${ifDefined(isLink ? undefined : this.disabled)}\n type=${ifDefined(isLink ? undefined : 'button')}\n href=${ifDefined(isLink ? this.href : undefined)}\n target=${ifDefined(isLink ? this.target : undefined)}\n download=${ifDefined(isLink ? this.download : undefined)}\n rel=${ifDefined(isLink && this.target ? 'noreferrer noopener' : undefined)}\n role=${ifDefined(isLink ? undefined : 'button')}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-label=\"${this.label}\"\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n >\n <nile-icon\n class=\"icon-button__icon\"\n name=${ifDefined(this.name)}\n library=${ifDefined(this.library)}\n src=${ifDefined(this.src)}\n aria-hidden=\"true\"\n ></nile-icon>\n </${tag}>\n `;\n }\n}\n\n\nexport default NileIconButton;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-icon-button': NileIconButton;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-icon-button.js","sourceRoot":"","sources":["../../../src/nile-icon-button/nile-icon-button.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,wBAAwB,CAAC;AAE9C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH;;;;;GAKG;AAEH,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,WAAW;IAA/C;;QAKmB,aAAQ,GAAG,KAAK,CAAC;QAuBlC;;;WAGG;QACS,UAAK,GAAG,EAAE,CAAC;QAEvB,2BAA2B;QACiB,aAAQ,GAAG,KAAK,CAAC;IAwE/D,CAAC;IAtES,UAAU;QAChB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzB,CAAC;IAEO,W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,CAAC;gDAAkB;AAnClD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA2G1B;SA3GY,cAAc;AA8G3B,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 {LitElement, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-icon-button.css';\n\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { literal, html } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\n\n/**\n * @summary Icons buttons are simple, icon-only buttons that can be used for actions and in toolbars.\n * @status stable\n * @since 2.0\n *\n * @dependency nile-icon\n *\n * @event nile-blur - Emitted when the icon button loses focus.\n * @event nile-focus - Emitted when the icon button gains focus.\n *\n * @csspart base - The component's base wrapper.\n */\n/**\n * Nile icon component.\n *\n * @tag nile-icon-button\n *\n */\n@customElement('nile-icon-button')\nexport class NileIconButton extends NileElement {\n static styles: CSSResultGroup = styles;\n\n @query('.icon-button') button: HTMLButtonElement | HTMLLinkElement;\n\n @state() private hasFocus = false;\n\n /** The name of the icon to draw. Available names depend on the icon library being used. */\n @property() name?: string;\n\n /** The name of a registered custom icon library. */\n @property() library?: string;\n\n /**\n * An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\n * can result in XSS attacks.\n */\n @property() src?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @property() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @property() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @property() download?: string;\n\n /**\n * A description that gets read by assistive devices. For optimal accessibility, you should always include a label\n * that describes what the icon button does.\n */\n @property() label = '';\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus');\n }\n\n private handleClick(event: MouseEvent) {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /** Simulates a click on the icon button. */\n click() {\n this.button.click();\n }\n\n /** Sets focus on the icon button. */\n focus(options?: FocusOptions) {\n this.button.focus(options);\n }\n\n /** Removes focus from the icon button. */\n blur() {\n this.button.blur();\n }\n\n render(): TemplateResult {\n const isLink = this.href ? true : false;\n const tag = isLink ? literal`a` : literal`button`;\n\n /* eslint-disable lit/binding-positions, lit/no-invalid-html */\n return html`\n <${tag}\n part=\"base\"\n class=${classMap({\n 'icon-button': true,\n 'icon-button--disabled': !isLink && this.disabled,\n 'icon-button--focused': this.hasFocus\n })}\n ?disabled=${ifDefined(isLink ? undefined : this.disabled)}\n type=${ifDefined(isLink ? undefined : 'button')}\n href=${ifDefined(isLink ? this.href : undefined)}\n target=${ifDefined(isLink ? this.target : undefined)}\n download=${ifDefined(isLink ? this.download : undefined)}\n rel=${ifDefined(isLink && this.target ? 'noreferrer noopener' : undefined)}\n role=${ifDefined(isLink ? undefined : 'button')}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-label=\"${this.label}\"\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n >\n <nile-icon\n class=\"icon-button__icon\"\n name=${ifDefined(this.name)}\n library=${ifDefined(this.library)}\n src=${ifDefined(this.src)}\n aria-hidden=\"true\"\n size=\"14\"\n ></nile-icon>\n </${tag}>\n `;\n }\n}\n\n\nexport default NileIconButton;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-icon-button': NileIconButton;\n }\n}\n"]}
@@ -26,6 +26,13 @@ export const styles = css `
26
26
  display: inline-block;
27
27
  color: inherit;
28
28
  margin-bottom: 12px;
29
+ color: var(--nile-colors-dark-900);
30
+ font-family: Colfax-regular;
31
+ font-size: 14px;
32
+ font-style: normal;
33
+ font-weight: 400;
34
+ line-height: 14px;
35
+ letter-spacing: 0.2px;
29
36
  }
30
37
 
31
38
  .form-control--has-label.form-control--medium .form-control__label {
@@ -35,7 +42,7 @@ export const styles = css `
35
42
  :host([required]) .form-control--has-label .form-control__label::after {
36
43
  content: '*';
37
44
  margin-inline-start: -2px;
38
- color: undefined;
45
+ color: #A4121C;
39
46
  }
40
47
 
41
48
  /* Help text */
@@ -72,16 +79,19 @@ export const styles = css `
72
79
  justify-content: start;
73
80
  position: relative;
74
81
  width: 100%;
75
- font-family: inherit;
76
82
  font-weight: 400;
77
- letter-spacing: normal;
78
83
  vertical-align: middle;
79
84
  overflow: hidden;
80
85
  cursor: text;
81
86
  transition: 150ms color, 150ms border, 150ms box-shadow,
82
87
  150ms background-color;
83
88
  box-sizing: border-box;
84
- }
89
+ color: var(--nile-colors-dark-900);
90
+ font-family: Colfax-regular;
91
+ font-size: 14px;
92
+ font-style: normal;
93
+ line-height: 14px;
94
+ letter-spacing: 0.2px; }
85
95
 
86
96
  /* Standard inputs */
87
97
  .input--standard {
@@ -155,12 +165,8 @@ export const styles = css `
155
165
 
156
166
  .input__control {
157
167
  flex: 1 1 auto;
158
- font-family: inherit;
159
- font-size: inherit;
160
- font-weight: inherit;
161
168
  min-width: 0;
162
169
  height: 100%;
163
- color: hsl(240 5.3% 26.1%);
164
170
  border: none;
165
171
  background: none;
166
172
  box-shadow: none;
@@ -168,6 +174,13 @@ export const styles = css `
168
174
  margin: 0;
169
175
  cursor: inherit;
170
176
  -webkit-appearance: none;
177
+ color: var(--nile-colors-dark-900);
178
+ font-family: Colfax-regular;
179
+ font-size: 14px;
180
+ font-style: normal;
181
+ font-weight: 400;
182
+ line-height: 14px;
183
+ letter-spacing: 0.2px;
171
184
  }
172
185
 
173
186
  .input__control::-webkit-search-decoration,
@@ -1 +1 @@
1
- {"version":3,"file":"nile-input.css.js","sourceRoot":"","sources":["../../../src/nile-input/nile-input.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqaxB,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 * Input CSS\n */\nexport const styles = css`\n :host {\n display: block;\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 }\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: #7F7F7F;\n margin-top: 6px;\n }\n\n /* Error message */\n .form-control__error-message {\n display: block;\n color: #A4121C;\n margin-top: 12px;\n font-size: 12px;\n font-style: normal;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 10.24px;\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 .input {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: stretch;\n justify-content: start;\n position: relative;\n width: 100%;\n font-family: inherit;\n font-weight: 400;\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: text;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n box-sizing: border-box;\n }\n\n /* Standard inputs */\n .input--standard {\n background-color: hsl(0, 0%, 100%);\n border: solid 1px #c7ced4;\n }\n\n .input--standard:hover:not(.input--disabled) {\n background-color: hsl(0, 0%, 100%);\n border-color: #000;\n }\n\n .input--standard.input--focused:not(.input--disabled) {\n background-color: hsl(0, 0%, 100%);\n border-color: #005ea6;\n }\n\n .input--standard.input--focused:not(.input--disabled) .input__control {\n color: hsl(240 5.3% 26.1%);\n }\n\n .input--standard.input--disabled {\n background-color: #fff;\n border-color: #c7ced4;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .input--standard.input--disabled .input__control {\n color: hsl(240 5.9% 10%);\n }\n\n .input--standard.input--disabled .input__control::placeholder {\n color: hsl(240 5.2% 33.9%);\n }\n\n .input--standard.input--warning {\n border-color: var(--nile-colors-yellow-500);\n }\n\n .input--standard.input--error {\n border-color: #e5434d;\n }\n\n .input--standard.input--success {\n border-color: #43e5c0;\n }\n\n /* Filled inputs */\n .input--filled {\n border: none;\n background-color: hsl(240 4.8% 95.9%);\n color: hsl(240 5.3% 26.1%);\n }\n\n .input--filled:hover:not(.input--disabled) {\n background-color: hsl(240 4.8% 95.9%);\n }\n\n .input--filled.input--focused:not(.input--disabled) {\n background-color: hsl(240 4.8% 95.9%);\n outline: solid 3px hsl(200.4 98% 39.4%);\n outline-offset: 1px;\n }\n\n .input--filled.input--disabled {\n background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .input__control {\n flex: 1 1 auto;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n min-width: 0;\n height: 100%;\n color: hsl(240 5.3% 26.1%);\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n cursor: inherit;\n -webkit-appearance: none;\n }\n\n .input__control::-webkit-search-decoration,\n .input__control::-webkit-search-cancel-button,\n .input__control::-webkit-search-results-button,\n .input__control::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n .input__control:-webkit-autofill {\n box-shadow: 0 0 0 3.125rem hsl(0, 0%, 100%) inset !important;\n -webkit-text-fill-color: hsl(198.6 88.7% 48.4%);\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:hover {\n box-shadow: 0 0 0 3.125rem hsl(0, 0%, 100%) inset !important;\n -webkit-text-fill-color: hsl(198.6 88.7% 48.4%);\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:focus {\n box-shadow: 0 0 0 3.125rem hsl(0, 0%, 100%) inset !important;\n -webkit-text-fill-color: hsl(198.6 88.7% 48.4%);\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:active {\n box-shadow: 0 0 0 3.125rem hsl(0, 0%, 100%) inset !important;\n -webkit-text-fill-color: hsl(198.6 88.7% 48.4%);\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input--filled .input__control:-webkit-autofill {\n box-shadow: 0 0 0 3.125rem hsl(240 4.8% 95.9%) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:hover {\n box-shadow: 0 0 0 3.125rem hsl(240 4.8% 95.9%) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:focus {\n box-shadow: 0 0 0 3.125rem hsl(240 4.8% 95.9%) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:active {\n box-shadow: 0 0 0 3.125rem hsl(240 4.8% 95.9%) inset !important;\n }\n\n .input__control::placeholder {\n color: hsl(240 3.8% 46.1%);\n user-select: none;\n }\n\n .input:hover:not(.input--disabled) .input__control {\n color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:focus {\n outline: none;\n }\n\n .input__prefix,\n .input__suffix {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n cursor: default;\n }\n\n .input__prefix::slotted(nile-icon) {\n color: hsl(240 3.8% 46.1%);\n }\n\n .input__suffix::slotted(nile-icon) {\n color: hsl(240 3.8% 46.1%);\n }\n\n /*\n * Size modifiers\n */\n\n .input--small {\n border-radius: 0.25rem;\n font-size: 0.875rem;\n height: 1.875rem;\n }\n\n .input--small .input__control {\n height: calc(1.875rem);\n padding: 0 0.75rem;\n }\n\n .input--small .input__clear {\n width: calc(1em + 0.75rem * 2);\n }\n\n .input--small .input__password-toggle {\n width: calc(1em + 0.75rem * 2);\n }\n\n .input--small .input__prefix::slotted(*) {\n margin-inline-start: 0.75rem;\n }\n\n .input--small .input__suffix::slotted(*) {\n margin-inline-end: 0.75rem;\n }\n\n .input--medium {\n border-radius: 0.25rem;\n font-size: 1rem;\n height: 38px;\n }\n\n .input--medium .input__control {\n height: 14px;\n padding: 12px;\n }\n\n .input--medium .input__clear {\n width: calc(1em + 1rem * 2);\n }\n\n .input--medium .input__password-toggle {\n width: calc(1em + 1rem * 2);\n }\n\n .input--medium .input__prefix::slotted(*) {\n margin-inline-start: 12px;\n }\n\n .input--medium .input__suffix::slotted(*) {\n margin-inline-end: 12px;\n }\n\n .input--large {\n border-radius: 0.25rem;\n font-size: 1.25rem;\n height: 3.125rem;\n }\n\n .input--large .input__control {\n height: calc(3.125rem - 1px * 2);\n padding: 0 1.25rem;\n }\n\n .input--large .input__clear {\n width: calc(1em + 1.25rem * 2);\n }\n\n .input--large .input__password-toggle {\n width: calc(1em + 1.25rem * 2);\n }\n\n .input--large .input__prefix::slotted(*) {\n margin-inline-start: 1.25rem;\n }\n\n .input--large .input__suffix::slotted(*) {\n margin-inline-end: 1.25rem;\n }\n\n /*\n * Pill modifier\n */\n\n .input--pill.input--small {\n border-radius: 1.875rem;\n }\n\n .input--pill.input--medium {\n border-radius: 2.5rem;\n }\n\n .input--pill.input--large {\n border-radius: 3.125rem;\n }\n\n /*\n * Clearable + Password Toggle\n */\n\n .input__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: hsl(240 3.8% 46.1%);\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .input__password-toggle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: hsl(240 3.8% 46.1%);\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .input__clear:hover {\n color: hsl(240 5.2% 33.9%);\n }\n\n .input__password-toggle:hover {\n color: hsl(240 5.2% 33.9%);\n }\n\n .input__clear:focus,\n .input__password-toggle:focus {\n outline: none;\n }\n\n .input--empty .input__clear {\n visibility: hidden;\n }\n\n /* Don't show the browser's password toggle in Edge */\n ::-ms-reveal {\n display: none;\n }\n\n /* Hide the built-in number spinner */\n .input--no-spin-buttons input[type='number']::-webkit-outer-spin-button,\n .input--no-spin-buttons input[type='number']::-webkit-inner-spin-button {\n -webkit-appearance: none;\n display: none;\n }\n\n .input--no-spin-buttons input[type='number'] {\n -moz-appearance: textfield;\n }\n\n :host([no-border]) .input--standard {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard:hover:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard.input--focused:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard.input--focused:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-input.css.js","sourceRoot":"","sources":["../../../src/nile-input/nile-input.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkbxB,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 * Input CSS\n */\nexport const styles = css`\n :host {\n display: block;\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: #A4121C;\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: #7F7F7F;\n margin-top: 6px;\n }\n\n /* Error message */\n .form-control__error-message {\n display: block;\n color: #A4121C;\n margin-top: 12px;\n font-size: 12px;\n font-style: normal;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 10.24px;\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 .input {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: stretch;\n justify-content: start;\n position: relative;\n width: 100%;\n font-weight: 400;\n vertical-align: middle;\n overflow: hidden;\n cursor: text;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n box-sizing: border-box;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n line-height: 14px;\n letter-spacing: 0.2px; }\n\n /* Standard inputs */\n .input--standard {\n background-color: hsl(0, 0%, 100%);\n border: solid 1px #c7ced4;\n }\n\n .input--standard:hover:not(.input--disabled) {\n background-color: hsl(0, 0%, 100%);\n border-color: #000;\n }\n\n .input--standard.input--focused:not(.input--disabled) {\n background-color: hsl(0, 0%, 100%);\n border-color: #005ea6;\n }\n\n .input--standard.input--focused:not(.input--disabled) .input__control {\n color: hsl(240 5.3% 26.1%);\n }\n\n .input--standard.input--disabled {\n background-color: #fff;\n border-color: #c7ced4;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .input--standard.input--disabled .input__control {\n color: hsl(240 5.9% 10%);\n }\n\n .input--standard.input--disabled .input__control::placeholder {\n color: hsl(240 5.2% 33.9%);\n }\n\n .input--standard.input--warning {\n border-color: var(--nile-colors-yellow-500);\n }\n\n .input--standard.input--error {\n border-color: #e5434d;\n }\n\n .input--standard.input--success {\n border-color: #43e5c0;\n }\n\n /* Filled inputs */\n .input--filled {\n border: none;\n background-color: hsl(240 4.8% 95.9%);\n color: hsl(240 5.3% 26.1%);\n }\n\n .input--filled:hover:not(.input--disabled) {\n background-color: hsl(240 4.8% 95.9%);\n }\n\n .input--filled.input--focused:not(.input--disabled) {\n background-color: hsl(240 4.8% 95.9%);\n outline: solid 3px hsl(200.4 98% 39.4%);\n outline-offset: 1px;\n }\n\n .input--filled.input--disabled {\n background-color: hsl(240 4.8% 95.9%);\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .input__control {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n border: none;\n background: none;\n box-shadow: none;\n padding: 0;\n margin: 0;\n cursor: inherit;\n -webkit-appearance: none;\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 .input__control::-webkit-search-decoration,\n .input__control::-webkit-search-cancel-button,\n .input__control::-webkit-search-results-button,\n .input__control::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n .input__control:-webkit-autofill {\n box-shadow: 0 0 0 3.125rem hsl(0, 0%, 100%) inset !important;\n -webkit-text-fill-color: hsl(198.6 88.7% 48.4%);\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:hover {\n box-shadow: 0 0 0 3.125rem hsl(0, 0%, 100%) inset !important;\n -webkit-text-fill-color: hsl(198.6 88.7% 48.4%);\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:focus {\n box-shadow: 0 0 0 3.125rem hsl(0, 0%, 100%) inset !important;\n -webkit-text-fill-color: hsl(198.6 88.7% 48.4%);\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:active {\n box-shadow: 0 0 0 3.125rem hsl(0, 0%, 100%) inset !important;\n -webkit-text-fill-color: hsl(198.6 88.7% 48.4%);\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input--filled .input__control:-webkit-autofill {\n box-shadow: 0 0 0 3.125rem hsl(240 4.8% 95.9%) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:hover {\n box-shadow: 0 0 0 3.125rem hsl(240 4.8% 95.9%) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:focus {\n box-shadow: 0 0 0 3.125rem hsl(240 4.8% 95.9%) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:active {\n box-shadow: 0 0 0 3.125rem hsl(240 4.8% 95.9%) inset !important;\n }\n\n .input__control::placeholder {\n color: hsl(240 3.8% 46.1%);\n user-select: none;\n }\n\n .input:hover:not(.input--disabled) .input__control {\n color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:focus {\n outline: none;\n }\n\n .input__prefix,\n .input__suffix {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n cursor: default;\n }\n\n .input__prefix::slotted(nile-icon) {\n color: hsl(240 3.8% 46.1%);\n }\n\n .input__suffix::slotted(nile-icon) {\n color: hsl(240 3.8% 46.1%);\n }\n\n /*\n * Size modifiers\n */\n\n .input--small {\n border-radius: 0.25rem;\n font-size: 0.875rem;\n height: 1.875rem;\n }\n\n .input--small .input__control {\n height: calc(1.875rem);\n padding: 0 0.75rem;\n }\n\n .input--small .input__clear {\n width: calc(1em + 0.75rem * 2);\n }\n\n .input--small .input__password-toggle {\n width: calc(1em + 0.75rem * 2);\n }\n\n .input--small .input__prefix::slotted(*) {\n margin-inline-start: 0.75rem;\n }\n\n .input--small .input__suffix::slotted(*) {\n margin-inline-end: 0.75rem;\n }\n\n .input--medium {\n border-radius: 0.25rem;\n font-size: 1rem;\n height: 38px;\n }\n\n .input--medium .input__control {\n height: 14px;\n padding: 12px;\n }\n\n .input--medium .input__clear {\n width: calc(1em + 1rem * 2);\n }\n\n .input--medium .input__password-toggle {\n width: calc(1em + 1rem * 2);\n }\n\n .input--medium .input__prefix::slotted(*) {\n margin-inline-start: 12px;\n }\n\n .input--medium .input__suffix::slotted(*) {\n margin-inline-end: 12px;\n }\n\n .input--large {\n border-radius: 0.25rem;\n font-size: 1.25rem;\n height: 3.125rem;\n }\n\n .input--large .input__control {\n height: calc(3.125rem - 1px * 2);\n padding: 0 1.25rem;\n }\n\n .input--large .input__clear {\n width: calc(1em + 1.25rem * 2);\n }\n\n .input--large .input__password-toggle {\n width: calc(1em + 1.25rem * 2);\n }\n\n .input--large .input__prefix::slotted(*) {\n margin-inline-start: 1.25rem;\n }\n\n .input--large .input__suffix::slotted(*) {\n margin-inline-end: 1.25rem;\n }\n\n /*\n * Pill modifier\n */\n\n .input--pill.input--small {\n border-radius: 1.875rem;\n }\n\n .input--pill.input--medium {\n border-radius: 2.5rem;\n }\n\n .input--pill.input--large {\n border-radius: 3.125rem;\n }\n\n /*\n * Clearable + Password Toggle\n */\n\n .input__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: hsl(240 3.8% 46.1%);\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .input__password-toggle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: hsl(240 3.8% 46.1%);\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .input__clear:hover {\n color: hsl(240 5.2% 33.9%);\n }\n\n .input__password-toggle:hover {\n color: hsl(240 5.2% 33.9%);\n }\n\n .input__clear:focus,\n .input__password-toggle:focus {\n outline: none;\n }\n\n .input--empty .input__clear {\n visibility: hidden;\n }\n\n /* Don't show the browser's password toggle in Edge */\n ::-ms-reveal {\n display: none;\n }\n\n /* Hide the built-in number spinner */\n .input--no-spin-buttons input[type='number']::-webkit-outer-spin-button,\n .input--no-spin-buttons input[type='number']::-webkit-inner-spin-button {\n -webkit-appearance: none;\n display: none;\n }\n\n .input--no-spin-buttons input[type='number'] {\n -moz-appearance: textfield;\n }\n\n :host([no-border]) .input--standard {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard:hover:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard.input--focused:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard.input--focused:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n`;\n\nexport default [styles];\n"]}
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { __decorate } from "tslib";
8
- import { html, property } from 'lit-element';
8
+ import { html, property, } from 'lit-element';
9
9
  import { customElement } from 'lit/decorators.js';
10
10
  import { styles } from './nile-input.css';
11
11
  import '../nile-icon';
@@ -28,7 +28,7 @@ let NileInput = class NileInput extends NileElement {
28
28
  constructor() {
29
29
  super(...arguments);
30
30
  this.formControlController = new FormControlController(this, {
31
- assumeInteractionOn: ['nile-blur', 'nile-input']
31
+ assumeInteractionOn: ['nile-blur', 'nile-input'],
32
32
  });
33
33
  this.hasSlotController = new HasSlotController(this, 'help-text', 'label');
34
34
  this.hasFocus = false;
@@ -256,9 +256,12 @@ let NileInput = class NileInput extends NileElement {
256
256
  const hasLabelSlot = this.hasSlotController.test('label');
257
257
  const hasHelpTextSlot = this.hasSlotController.test('help-text');
258
258
  const hasLabel = this.label ? true : !!hasLabelSlot;
259
- const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
259
+ const hasHelpText = this.helpText ? true : false;
260
260
  const hasErrorMessage = this.errorMessage ? true : false;
261
- const hasClearIcon = this.clearable && !this.disabled && !this.readonly && (typeof this.value === 'number' || this.value.length > 0);
261
+ const hasClearIcon = this.clearable &&
262
+ !this.disabled &&
263
+ !this.readonly &&
264
+ (typeof this.value === 'number' || this.value.length > 0);
262
265
  return html `
263
266
  <div
264
267
  part="form-control"
@@ -268,7 +271,7 @@ let NileInput = class NileInput extends NileElement {
268
271
  'form-control--medium': this.size === 'medium',
269
272
  'form-control--large': this.size === 'large',
270
273
  'form-control--has-label': hasLabel,
271
- 'form-control--has-help-text': hasHelpText
274
+ 'form-control--has-help-text': hasHelpText,
272
275
  })}
273
276
  >
274
277
  <label
@@ -393,26 +396,17 @@ let NileInput = class NileInput extends NileElement {
393
396
  </div>
394
397
  </div>
395
398
 
396
- <slot
397
- name="help-text"
398
- part="form-control-help-text"
399
- id="help-text"
400
- class="form-control__help-text"
401
- aria-hidden=${hasHelpText ? 'false' : 'true'}
402
- >
403
- ${this.helpText}
404
- </slot>
399
+ ${hasHelpText
400
+ ? html `
401
+ <nile-form-help-text>${this.helpText}</nile-form-help-text>
402
+ `
403
+ : ``}
404
+
405
405
  ${hasErrorMessage
406
406
  ? html `
407
- <slot
408
- name="error-message"
409
- part="form-control-error-message"
410
- id="error-message"
411
- class="form-control__error-message"
412
- aria-hidden=${hasErrorMessage ? 'false' : 'true'}
407
+ <nile-form-error-message
408
+ >${this.errorMessage}</nile-form-error-message
413
409
  >
414
- ${this.errorMessage}
415
- </slot>
416
410
  `
417
411
  : ``}
418
412
  </div>
@@ -535,8 +529,8 @@ __decorate([
535
529
  converter: {
536
530
  // Allow "true|false" attribute values but keep the property boolean
537
531
  fromAttribute: value => (!value || value === 'false' ? false : true),
538
- toAttribute: value => (value ? 'true' : 'false')
539
- }
532
+ toAttribute: value => (value ? 'true' : 'false'),
533
+ },
540
534
  })
541
535
  ], NileInput.prototype, "spellcheck", void 0);
542
536
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"nile-input.js","sourceRoot":"","sources":["../../../src/nile-input/nile-input.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACxC,OAAO,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OA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AE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAIjD;AAGD;IADC,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;iDAM7C;AAGD;IADC,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;kDAI9C;AAxRU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAkiBrB;SAliBY,SAAS;AAoiBtB,eAAe,SAAS,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-input.css';\nimport '../nile-icon'\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { FormControlController } from '../internal/form';\nimport { HasSlotController } from '../internal/slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\n\n/**\n * Nile icon component.\n *\n * @tag nile-input\n *\n */\n@customElement('nile-input')\nexport class NileInput extends NileElement implements NileFormControl {\n static styles: CSSResultGroup = styles;\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['nile-blur', 'nile-input']\n });\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label');\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a filled input. */\n @property({ type: Boolean, reflect: true }) filled = false;\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\n /** Draws a pill-style input with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\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 /** The input's error message. If you need to display HTML, use the `error-message` slot instead. */\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle = false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible = false;\n\n /** Hides the browser's built-in increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons = 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 input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string;\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false')\n }\n })\n spellcheck = true;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n /** Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. */\n get valueAsDate() {\n const input = document.createElement('input');\n input.type = 'date';\n input.value = this.value;\n return input.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n const input = document.createElement('input');\n input.type = 'date';\n input.valueAsDate = newValue;\n this.value = input.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n const input = document.createElement('input');\n input.type = 'number';\n input.value = this.value;\n return input.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n const input = document.createElement('input');\n input.type = 'number';\n input.valueAsNumber = newValue;\n this.value = input.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur', { value: this.value });\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emit('nile-change', { value: this.value });\n }\n\n private handleClearClick(event: MouseEvent) {\n this.value = '';\n this.emit('nile-clear', { value: this.value });\n this.emit('nile-input', { value: this.value });\n this.emit('nile-change', { value: this.value });\n this.input.focus();\n\n event.stopPropagation();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus', { value: this.value });\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n this.emit('nile-input', { value: this.value });\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n this.formControlController.updateValidity();\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n this.formControlController.updateValidity();\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: 'select' | 'start' | 'end' | 'preserve'\n ) {\n // @ts-expect-error - start, end, and selectMode are optional\n this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n // /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n // showPicker() {\n // if ('showPicker' in HTMLInputElement.prototype) {\n // this.input.showPicker();\n // }\n // }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n const hasErrorMessage = this.errorMessage ? true : false;\n const hasClearIcon =\n this.clearable && !this.disabled && !this.readonly && (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText\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 part=\"form-control-input\" class=\"form-control-input\">\n <div\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--pill': this.pill,\n 'input--standard': !this.filled,\n 'input--warning': this.warning,\n 'input--error': this.error,\n 'input--success': this.success,\n 'input--filled': this.filled,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons,\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"input__prefix\"></slot>\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control\"\n type=${\n this.type === 'password' && this.passwordVisible\n ? 'text'\n : this.type\n }\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${\n hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=\"clearEntry\"\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <nile-icon name=\"error\" library=\"system\"></nile-icon>\n </slot>\n </button>\n `\n : ''\n }\n ${\n this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.passwordVisible\n ? 'hidePassword'\n : 'showPassword'}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <nile-icon\n name=\"eye\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <nile-icon\n name=\"eye\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `}\n </button>\n `\n : ''\n }\n\n <slot name=\"suffix\" part=\"suffix\" class=\"input__suffix\"></slot>\n </div>\n </div>\n\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 ${\n hasErrorMessage\n ? html`\n <slot\n name=\"error-message\"\n part=\"form-control-error-message\"\n id=\"error-message\"\n class=\"form-control__error-message\"\n aria-hidden=${hasErrorMessage ? 'false' : 'true'}\n >\n ${this.errorMessage}\n </slot>\n `\n : ``\n }\n </div>\n </div>\n `;\n }\n}\n\nexport default NileInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-input': NileInput;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-input.js","sourceRoot":"","sources":["../../../src/nile-input/nile-input.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,kBAAkB,CAAC;AAC1C,OAAO,cAAc,CAAC;AACtB,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,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,WAAgC,MAAM,0BAA0B,CAAC;AAExE;;;;;GAKG;AAE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EAAE;sCAAsB;AAGrB;IAAX,QAAQ,EAAE;sCAAsB;AAMrB;IAAX,QAAQ,EAAE;uCAAsB;AAGrB;IAAX,QAAQ,EAAE;iDAMM;AAGL;IAAX,QAAQ,EAAE;8CAA2B;AAM1B;IAAX,QAAQ,EAAE;+CAAsB;AAGJ;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CAAoB;AAGpC;IAAX,QAAQ,EAAE;+CAOA;AAWX;IARC,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACT,oEAAoE;YACpE,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;YACpE,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;SACjD;KACF,CAAC;6CACgB;AAMN;IAAX,QAAQ,EAAE;4CAQD;AAiHV;IADC,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAIjD;AAGD;IADC,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;iDAM7C;AAGD;IADC,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;kDAI9C;AApTU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA8jBrB;SA9jBY,SAAS;AAgkBtB,eAAe,SAAS,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-input.css';\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { FormControlController } from '../internal/form';\nimport { HasSlotController } from '../internal/slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\n/**\n * Nile icon component.\n *\n * @tag nile-input\n *\n */\n@customElement('nile-input')\nexport class NileInput extends NileElement implements NileFormControl {\n static styles: CSSResultGroup = styles;\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['nile-blur', 'nile-input'],\n });\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a filled input. */\n @property({ type: Boolean, reflect: true }) filled = false;\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 /** Draws a pill-style input with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\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 /** The input's error message. If you need to display HTML, use the `error-message` slot instead. */\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle =\n false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible =\n false;\n\n /** Hides the browser's built-in increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons =\n 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 input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize:\n | 'off'\n | 'none'\n | 'on'\n | 'sentences'\n | 'words'\n | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string;\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint:\n | 'enter'\n | 'done'\n | 'go'\n | 'next'\n | 'previous'\n | 'search'\n | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false'),\n },\n })\n spellcheck = true;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode:\n | 'none'\n | 'text'\n | 'decimal'\n | 'numeric'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n /** Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. */\n get valueAsDate() {\n const input = document.createElement('input');\n input.type = 'date';\n input.value = this.value;\n return input.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n const input = document.createElement('input');\n input.type = 'date';\n input.valueAsDate = newValue;\n this.value = input.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n const input = document.createElement('input');\n input.type = 'number';\n input.value = this.value;\n return input.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n const input = document.createElement('input');\n input.type = 'number';\n input.valueAsNumber = newValue;\n this.value = input.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur', { value: this.value });\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emit('nile-change', { value: this.value });\n }\n\n private handleClearClick(event: MouseEvent) {\n this.value = '';\n this.emit('nile-clear', { value: this.value });\n this.emit('nile-input', { value: this.value });\n this.emit('nile-change', { value: this.value });\n this.input.focus();\n\n event.stopPropagation();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus', { value: this.value });\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n this.emit('nile-input', { value: this.value });\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const hasModifier =\n event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n this.formControlController.updateValidity();\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n this.formControlController.updateValidity();\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(\n selectionStart,\n selectionEnd,\n selectionDirection\n );\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: 'select' | 'start' | 'end' | 'preserve'\n ) {\n // @ts-expect-error - start, end, and selectMode are optional\n this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n // /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n // showPicker() {\n // if ('showPicker' in HTMLInputElement.prototype) {\n // this.input.showPicker();\n // }\n // }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n const hasClearIcon =\n this.clearable &&\n !this.disabled &&\n !this.readonly &&\n (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\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 part=\"form-control-input\" class=\"form-control-input\">\n <div\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--pill': this.pill,\n 'input--standard': !this.filled,\n 'input--warning': this.warning,\n 'input--error': this.error,\n 'input--success': this.success,\n 'input--filled': this.filled,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons,\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"input__prefix\"></slot>\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control\"\n type=${\n this.type === 'password' && this.passwordVisible\n ? 'text'\n : this.type\n }\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${\n hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=\"clearEntry\"\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <nile-icon name=\"error\" library=\"system\"></nile-icon>\n </slot>\n </button>\n `\n : ''\n }\n ${\n this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.passwordVisible\n ? 'hidePassword'\n : 'showPassword'}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <nile-icon\n name=\"eye\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <nile-icon\n name=\"eye\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `}\n </button>\n `\n : ''\n }\n\n <slot name=\"suffix\" part=\"suffix\" class=\"input__suffix\"></slot>\n </div>\n </div>\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 </div>\n </div>\n `;\n }\n}\n\nexport default NileInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-input': NileInput;\n }\n}\n"]}
@@ -18,6 +18,14 @@ export default css `
18
18
 
19
19
  .form-control__label {
20
20
  padding: 0;
21
+ font-size: 14px;
22
+ color: var(--nile-colors-dark-900);
23
+ font-family: Colfax-regular;
24
+ font-size: 14px;
25
+ font-style: normal;
26
+ font-weight: 400;
27
+ line-height: 14px;
28
+ letter-spacing: 0.2px;
21
29
  }
22
30
 
23
31
  .radio-group--required .radio-group__label::after {
@@ -1 +1 @@
1
- {"version":3,"file":"nile-radio-group.css.js","sourceRoot":"","sources":["../../../src/nile-radio-group/nile-radio-group.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCjB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport default css`\n\n :host {\n display: block;\n }\n\n .form-control--inline-radio ::slotted(nile-radio) {\n display: inline-block;\n margin-right: 1.3rem !important;\n }\n\n .form-control {\n border: none;\n padding: 0;\n margin: 0;\n }\n\n .form-control__label {\n padding: 0;\n }\n\n .radio-group--required .radio-group__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n`;\n"]}
1
+ {"version":3,"file":"nile-radio-group.css.js","sourceRoot":"","sources":["../../../src/nile-radio-group/nile-radio-group.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CjB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport default css`\n\n :host {\n display: block;\n }\n\n .form-control--inline-radio ::slotted(nile-radio) {\n display: inline-block;\n margin-right: 1.3rem !important;\n }\n\n .form-control {\n border: none;\n padding: 0;\n margin: 0;\n }\n\n .form-control__label {\n padding: 0;\n font-size: 14px;\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 .radio-group--required .radio-group__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n`;\n"]}
@@ -21,15 +21,12 @@ export declare class NileRadioGroup extends NileElement {
21
21
  private customValidityMessage;
22
22
  defaultSlot: HTMLSlotElement;
23
23
  private hasButtonGroup;
24
- private errorMessage;
25
24
  defaultValue: string;
26
25
  /**
27
26
  * The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot
28
27
  * instead.
29
28
  */
30
29
  label: string;
31
- /** The radio groups's help text. If you need to display HTML, use the `help-text` slot instead. */
32
- helpText: string;
33
30
  /** The name of the radio group, submitted as a name/value pair with form data. */
34
31
  name: string;
35
32
  /** The current value of the radio group, submitted as a name/value pair with form data. */
@@ -46,6 +43,8 @@ export declare class NileRadioGroup extends NileElement {
46
43
  labelInline: boolean;
47
44
  /** Used to disabled or not */
48
45
  disabled: boolean;
46
+ helpText: string;
47
+ errorMessage: string;
49
48
  connectedCallback(): void;
50
49
  private getAllRadios;
51
50
  private handleRadioClick;