@nova-design-system/nova-webcomponents 3.0.0-beta.17

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 (540) hide show
  1. package/LICENSE.MD +157 -0
  2. package/dist/blazor-docs.json +9342 -0
  3. package/dist/cjs/app-globals-2ceecab2.js +11 -0
  4. package/dist/cjs/app-globals-2ceecab2.js.map +1 -0
  5. package/dist/cjs/clsx-fc789adc.js +7 -0
  6. package/dist/cjs/clsx-fc789adc.js.map +1 -0
  7. package/dist/cjs/constants-33057c89.js +140 -0
  8. package/dist/cjs/constants-33057c89.js.map +1 -0
  9. package/dist/cjs/fade.animation-0d33d198.js +1875 -0
  10. package/dist/cjs/fade.animation-0d33d198.js.map +1 -0
  11. package/dist/cjs/grow.animation-46e7ae4b.js +119 -0
  12. package/dist/cjs/grow.animation-46e7ae4b.js.map +1 -0
  13. package/dist/cjs/index-5d1f2412.js +1984 -0
  14. package/dist/cjs/index-5d1f2412.js.map +1 -0
  15. package/dist/cjs/index.cjs.js +494 -0
  16. package/dist/cjs/index.cjs.js.map +1 -0
  17. package/dist/cjs/loader.cjs.js +17 -0
  18. package/dist/cjs/loader.cjs.js.map +1 -0
  19. package/dist/cjs/native.cjs.js +48 -0
  20. package/dist/cjs/native.cjs.js.map +1 -0
  21. package/dist/cjs/nv-alert.cjs.entry.js +140 -0
  22. package/dist/cjs/nv-alert.cjs.entry.js.map +1 -0
  23. package/dist/cjs/nv-avatar.cjs.entry.js +73 -0
  24. package/dist/cjs/nv-avatar.cjs.entry.js.map +1 -0
  25. package/dist/cjs/nv-badge.cjs.entry.js +119 -0
  26. package/dist/cjs/nv-badge.cjs.entry.js.map +1 -0
  27. package/dist/cjs/nv-base.cjs.entry.js +75 -0
  28. package/dist/cjs/nv-base.cjs.entry.js.map +1 -0
  29. package/dist/cjs/nv-button.cjs.entry.js +91 -0
  30. package/dist/cjs/nv-button.cjs.entry.js.map +1 -0
  31. package/dist/cjs/nv-col.cjs.entry.js +41 -0
  32. package/dist/cjs/nv-col.cjs.entry.js.map +1 -0
  33. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js +94 -0
  34. package/dist/cjs/nv-fieldcheckbox.cjs.entry.js.map +1 -0
  35. package/dist/cjs/nv-fieldnumber.cjs.entry.js +94 -0
  36. package/dist/cjs/nv-fieldnumber.cjs.entry.js.map +1 -0
  37. package/dist/cjs/nv-fieldpassword.cjs.entry.js +79 -0
  38. package/dist/cjs/nv-fieldpassword.cjs.entry.js.map +1 -0
  39. package/dist/cjs/nv-fieldradio.cjs.entry.js +81 -0
  40. package/dist/cjs/nv-fieldradio.cjs.entry.js.map +1 -0
  41. package/dist/cjs/nv-fieldselect.cjs.entry.js +290 -0
  42. package/dist/cjs/nv-fieldselect.cjs.entry.js.map +1 -0
  43. package/dist/cjs/nv-fieldtext.cjs.entry.js +83 -0
  44. package/dist/cjs/nv-fieldtext.cjs.entry.js.map +1 -0
  45. package/dist/cjs/nv-fieldtextarea.cjs.entry.js +151 -0
  46. package/dist/cjs/nv-fieldtextarea.cjs.entry.js.map +1 -0
  47. package/dist/cjs/nv-fieldtoggle.cjs.entry.js +64 -0
  48. package/dist/cjs/nv-fieldtoggle.cjs.entry.js.map +1 -0
  49. package/dist/cjs/nv-icon.cjs.entry.js +66 -0
  50. package/dist/cjs/nv-icon.cjs.entry.js.map +1 -0
  51. package/dist/cjs/nv-iconbutton.cjs.entry.js +92 -0
  52. package/dist/cjs/nv-iconbutton.cjs.entry.js.map +1 -0
  53. package/dist/cjs/nv-loader.cjs.entry.js +29 -0
  54. package/dist/cjs/nv-loader.cjs.entry.js.map +1 -0
  55. package/dist/cjs/nv-menu.cjs.entry.js +189 -0
  56. package/dist/cjs/nv-menu.cjs.entry.js.map +1 -0
  57. package/dist/cjs/nv-menuitem.cjs.entry.js +30 -0
  58. package/dist/cjs/nv-menuitem.cjs.entry.js.map +1 -0
  59. package/dist/cjs/nv-popover.cjs.entry.js +2327 -0
  60. package/dist/cjs/nv-popover.cjs.entry.js.map +1 -0
  61. package/dist/cjs/nv-row.cjs.entry.js +24 -0
  62. package/dist/cjs/nv-row.cjs.entry.js.map +1 -0
  63. package/dist/cjs/nv-stack.cjs.entry.js +31 -0
  64. package/dist/cjs/nv-stack.cjs.entry.js.map +1 -0
  65. package/dist/cjs/nv-tooltip.cjs.entry.js +37 -0
  66. package/dist/cjs/nv-tooltip.cjs.entry.js.map +1 -0
  67. package/dist/cjs/timeline.animation-dbb9c5ea.js +107 -0
  68. package/dist/cjs/timeline.animation-dbb9c5ea.js.map +1 -0
  69. package/dist/cjs/v4-7014b8b0.js +67 -0
  70. package/dist/cjs/v4-7014b8b0.js.map +1 -0
  71. package/dist/collection/animations/collapse.animation.js +82 -0
  72. package/dist/collection/animations/collapse.animation.js.map +1 -0
  73. package/dist/collection/animations/fade.animation.js +66 -0
  74. package/dist/collection/animations/fade.animation.js.map +1 -0
  75. package/dist/collection/animations/grow.animation.js +87 -0
  76. package/dist/collection/animations/grow.animation.js.map +1 -0
  77. package/dist/collection/animations/index.js +5 -0
  78. package/dist/collection/animations/index.js.map +1 -0
  79. package/dist/collection/animations/timeline.animation.js +21 -0
  80. package/dist/collection/animations/timeline.animation.js.map +1 -0
  81. package/dist/collection/collection-manifest.json +35 -0
  82. package/dist/collection/components/nv-alert/nv-alert.css +113 -0
  83. package/dist/collection/components/nv-alert/nv-alert.docs.js +61 -0
  84. package/dist/collection/components/nv-alert/nv-alert.docs.js.map +1 -0
  85. package/dist/collection/components/nv-alert/nv-alert.js +355 -0
  86. package/dist/collection/components/nv-alert/nv-alert.js.map +1 -0
  87. package/dist/collection/components/nv-avatar/nv-avatar.css +154 -0
  88. package/dist/collection/components/nv-avatar/nv-avatar.docs.js +42 -0
  89. package/dist/collection/components/nv-avatar/nv-avatar.docs.js.map +1 -0
  90. package/dist/collection/components/nv-avatar/nv-avatar.js +311 -0
  91. package/dist/collection/components/nv-avatar/nv-avatar.js.map +1 -0
  92. package/dist/collection/components/nv-badge/nv-badge.css +174 -0
  93. package/dist/collection/components/nv-badge/nv-badge.docs.js +72 -0
  94. package/dist/collection/components/nv-badge/nv-badge.docs.js.map +1 -0
  95. package/dist/collection/components/nv-badge/nv-badge.js +354 -0
  96. package/dist/collection/components/nv-badge/nv-badge.js.map +1 -0
  97. package/dist/collection/components/nv-base/nv-base.docs.js +5 -0
  98. package/dist/collection/components/nv-base/nv-base.docs.js.map +1 -0
  99. package/dist/collection/components/nv-base/nv-base.js +69 -0
  100. package/dist/collection/components/nv-base/nv-base.js.map +1 -0
  101. package/dist/collection/components/nv-button/nv-button.css +259 -0
  102. package/dist/collection/components/nv-button/nv-button.docs.js +56 -0
  103. package/dist/collection/components/nv-button/nv-button.docs.js.map +1 -0
  104. package/dist/collection/components/nv-button/nv-button.js +241 -0
  105. package/dist/collection/components/nv-button/nv-button.js.map +1 -0
  106. package/dist/collection/components/nv-col/nv-col.css +45 -0
  107. package/dist/collection/components/nv-col/nv-col.docs.js +18 -0
  108. package/dist/collection/components/nv-col/nv-col.docs.js.map +1 -0
  109. package/dist/collection/components/nv-col/nv-col.js +63 -0
  110. package/dist/collection/components/nv-col/nv-col.js.map +1 -0
  111. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.css +136 -0
  112. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js +231 -0
  113. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.js.map +1 -0
  114. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js +448 -0
  115. package/dist/collection/components/nv-fieldcheckbox/nv-fieldcheckbox.js.map +1 -0
  116. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.css +183 -0
  117. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js +180 -0
  118. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.docs.js.map +1 -0
  119. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js +435 -0
  120. package/dist/collection/components/nv-fieldnumber/nv-fieldnumber.js.map +1 -0
  121. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.css +149 -0
  122. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js +189 -0
  123. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.docs.js.map +1 -0
  124. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js +465 -0
  125. package/dist/collection/components/nv-fieldpassword/nv-fieldpassword.js.map +1 -0
  126. package/dist/collection/components/nv-fieldradio/nv-fieldradio.css +133 -0
  127. package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js +121 -0
  128. package/dist/collection/components/nv-fieldradio/nv-fieldradio.docs.js.map +1 -0
  129. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js +347 -0
  130. package/dist/collection/components/nv-fieldradio/nv-fieldradio.js.map +1 -0
  131. package/dist/collection/components/nv-fieldselect/nv-fieldselect.css +197 -0
  132. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js +157 -0
  133. package/dist/collection/components/nv-fieldselect/nv-fieldselect.docs.js.map +1 -0
  134. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js +610 -0
  135. package/dist/collection/components/nv-fieldselect/nv-fieldselect.js.map +1 -0
  136. package/dist/collection/components/nv-fieldtext/nv-fieldtext.css +141 -0
  137. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js +206 -0
  138. package/dist/collection/components/nv-fieldtext/nv-fieldtext.docs.js.map +1 -0
  139. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js +499 -0
  140. package/dist/collection/components/nv-fieldtext/nv-fieldtext.js.map +1 -0
  141. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.css +141 -0
  142. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js +175 -0
  143. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.docs.js.map +1 -0
  144. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js +527 -0
  145. package/dist/collection/components/nv-fieldtextarea/nv-fieldtextarea.js.map +1 -0
  146. package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.css +114 -0
  147. package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.docs.js +65 -0
  148. package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.docs.js.map +1 -0
  149. package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.js +283 -0
  150. package/dist/collection/components/nv-fieldtoggle/nv-fieldtoggle.js.map +1 -0
  151. package/dist/collection/components/nv-icon/nv-icon.css +32 -0
  152. package/dist/collection/components/nv-icon/nv-icon.docs.js +31 -0
  153. package/dist/collection/components/nv-icon/nv-icon.docs.js.map +1 -0
  154. package/dist/collection/components/nv-icon/nv-icon.js +245 -0
  155. package/dist/collection/components/nv-icon/nv-icon.js.map +1 -0
  156. package/dist/collection/components/nv-icon/nv-icons.js +450 -0
  157. package/dist/collection/components/nv-icon/nv-icons.js.map +1 -0
  158. package/dist/collection/components/nv-icon/test/nv-icon.test.js +25 -0
  159. package/dist/collection/components/nv-icon/test/nv-icon.test.js.map +1 -0
  160. package/dist/collection/components/nv-iconbutton/nv-iconbutton.css +152 -0
  161. package/dist/collection/components/nv-iconbutton/nv-iconbutton.docs.js +61 -0
  162. package/dist/collection/components/nv-iconbutton/nv-iconbutton.docs.js.map +1 -0
  163. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js +263 -0
  164. package/dist/collection/components/nv-iconbutton/nv-iconbutton.js.map +1 -0
  165. package/dist/collection/components/nv-loader/nv-loader.css +162 -0
  166. package/dist/collection/components/nv-loader/nv-loader.docs.js +27 -0
  167. package/dist/collection/components/nv-loader/nv-loader.docs.js.map +1 -0
  168. package/dist/collection/components/nv-loader/nv-loader.js +78 -0
  169. package/dist/collection/components/nv-loader/nv-loader.js.map +1 -0
  170. package/dist/collection/components/nv-menu/nv-menu.css +61 -0
  171. package/dist/collection/components/nv-menu/nv-menu.docs.js +40 -0
  172. package/dist/collection/components/nv-menu/nv-menu.docs.js.map +1 -0
  173. package/dist/collection/components/nv-menu/nv-menu.js +355 -0
  174. package/dist/collection/components/nv-menu/nv-menu.js.map +1 -0
  175. package/dist/collection/components/nv-menuitem/nv-menuitem.css +29 -0
  176. package/dist/collection/components/nv-menuitem/nv-menuitem.docs.js +6 -0
  177. package/dist/collection/components/nv-menuitem/nv-menuitem.docs.js.map +1 -0
  178. package/dist/collection/components/nv-menuitem/nv-menuitem.js +111 -0
  179. package/dist/collection/components/nv-menuitem/nv-menuitem.js.map +1 -0
  180. package/dist/collection/components/nv-popover/nv-popover.css +42 -0
  181. package/dist/collection/components/nv-popover/nv-popover.docs.js +74 -0
  182. package/dist/collection/components/nv-popover/nv-popover.docs.js.map +1 -0
  183. package/dist/collection/components/nv-popover/nv-popover.js +587 -0
  184. package/dist/collection/components/nv-popover/nv-popover.js.map +1 -0
  185. package/dist/collection/components/nv-row/nv-row.css +7 -0
  186. package/dist/collection/components/nv-row/nv-row.docs.js +13 -0
  187. package/dist/collection/components/nv-row/nv-row.docs.js.map +1 -0
  188. package/dist/collection/components/nv-row/nv-row.js +23 -0
  189. package/dist/collection/components/nv-row/nv-row.js.map +1 -0
  190. package/dist/collection/components/nv-stack/nv-stack.css +61 -0
  191. package/dist/collection/components/nv-stack/nv-stack.docs.js +39 -0
  192. package/dist/collection/components/nv-stack/nv-stack.docs.js.map +1 -0
  193. package/dist/collection/components/nv-stack/nv-stack.js +123 -0
  194. package/dist/collection/components/nv-stack/nv-stack.js.map +1 -0
  195. package/dist/collection/components/nv-tooltip/nv-tooltip.css +22 -0
  196. package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js +38 -0
  197. package/dist/collection/components/nv-tooltip/nv-tooltip.docs.js.map +1 -0
  198. package/dist/collection/components/nv-tooltip/nv-tooltip.js +102 -0
  199. package/dist/collection/components/nv-tooltip/nv-tooltip.js.map +1 -0
  200. package/dist/collection/dev/dev-components.js +3 -0
  201. package/dist/collection/dev/dev-components.js.map +1 -0
  202. package/dist/collection/dev/dev-forms.js +3 -0
  203. package/dist/collection/dev/dev-forms.js.map +1 -0
  204. package/dist/collection/dev/dev-root.js +23 -0
  205. package/dist/collection/dev/dev-root.js.map +1 -0
  206. package/dist/collection/dev/dev-utils.js +54 -0
  207. package/dist/collection/dev/dev-utils.js.map +1 -0
  208. package/dist/collection/fonts/TT_Norms_Pro_Bold.woff2 +0 -0
  209. package/dist/collection/fonts/TT_Norms_Pro_Medium.woff2 +0 -0
  210. package/dist/collection/fonts/TT_Norms_Pro_Mono_Bold.woff2 +0 -0
  211. package/dist/collection/fonts/TT_Norms_Pro_Mono_Medium.woff2 +0 -0
  212. package/dist/collection/fonts/TT_Norms_Pro_Mono_Regular.woff2 +0 -0
  213. package/dist/collection/fonts/TT_Norms_Pro_Regular.woff2 +0 -0
  214. package/dist/collection/global.js +6 -0
  215. package/dist/collection/global.js.map +1 -0
  216. package/dist/collection/index.js +10 -0
  217. package/dist/collection/index.js.map +1 -0
  218. package/dist/collection/utils/class.utils.js +15 -0
  219. package/dist/collection/utils/class.utils.js.map +1 -0
  220. package/dist/collection/utils/constants.js +122 -0
  221. package/dist/collection/utils/constants.js.map +1 -0
  222. package/dist/collection/utils/events.utils.js +19 -0
  223. package/dist/collection/utils/events.utils.js.map +1 -0
  224. package/dist/components/index.d.ts +33 -0
  225. package/dist/components/index.js +488 -0
  226. package/dist/components/index.js.map +1 -0
  227. package/dist/components/nv-alert.d.ts +11 -0
  228. package/dist/components/nv-alert.js +171 -0
  229. package/dist/components/nv-alert.js.map +1 -0
  230. package/dist/components/nv-avatar.d.ts +11 -0
  231. package/dist/components/nv-avatar.js +106 -0
  232. package/dist/components/nv-avatar.js.map +1 -0
  233. package/dist/components/nv-badge.d.ts +11 -0
  234. package/dist/components/nv-badge.js +154 -0
  235. package/dist/components/nv-badge.js.map +1 -0
  236. package/dist/components/nv-base.d.ts +11 -0
  237. package/dist/components/nv-base.js +89 -0
  238. package/dist/components/nv-base.js.map +1 -0
  239. package/dist/components/nv-button.d.ts +11 -0
  240. package/dist/components/nv-button.js +116 -0
  241. package/dist/components/nv-button.js.map +1 -0
  242. package/dist/components/nv-col.d.ts +11 -0
  243. package/dist/components/nv-col.js +57 -0
  244. package/dist/components/nv-col.js.map +1 -0
  245. package/dist/components/nv-fieldcheckbox.d.ts +11 -0
  246. package/dist/components/nv-fieldcheckbox.js +128 -0
  247. package/dist/components/nv-fieldcheckbox.js.map +1 -0
  248. package/dist/components/nv-fieldnumber.d.ts +11 -0
  249. package/dist/components/nv-fieldnumber.js +134 -0
  250. package/dist/components/nv-fieldnumber.js.map +1 -0
  251. package/dist/components/nv-fieldpassword.d.ts +11 -0
  252. package/dist/components/nv-fieldpassword.js +134 -0
  253. package/dist/components/nv-fieldpassword.js.map +1 -0
  254. package/dist/components/nv-fieldradio.d.ts +11 -0
  255. package/dist/components/nv-fieldradio.js +110 -0
  256. package/dist/components/nv-fieldradio.js.map +1 -0
  257. package/dist/components/nv-fieldselect.d.ts +11 -0
  258. package/dist/components/nv-fieldselect.js +332 -0
  259. package/dist/components/nv-fieldselect.js.map +1 -0
  260. package/dist/components/nv-fieldtext.d.ts +11 -0
  261. package/dist/components/nv-fieldtext.js +125 -0
  262. package/dist/components/nv-fieldtext.js.map +1 -0
  263. package/dist/components/nv-fieldtextarea.d.ts +11 -0
  264. package/dist/components/nv-fieldtextarea.js +188 -0
  265. package/dist/components/nv-fieldtextarea.js.map +1 -0
  266. package/dist/components/nv-fieldtoggle.d.ts +11 -0
  267. package/dist/components/nv-fieldtoggle.js +91 -0
  268. package/dist/components/nv-fieldtoggle.js.map +1 -0
  269. package/dist/components/nv-icon.d.ts +11 -0
  270. package/dist/components/nv-icon.js +8 -0
  271. package/dist/components/nv-icon.js.map +1 -0
  272. package/dist/components/nv-iconbutton.d.ts +11 -0
  273. package/dist/components/nv-iconbutton.js +8 -0
  274. package/dist/components/nv-iconbutton.js.map +1 -0
  275. package/dist/components/nv-loader.d.ts +11 -0
  276. package/dist/components/nv-loader.js +8 -0
  277. package/dist/components/nv-loader.js.map +1 -0
  278. package/dist/components/nv-menu.d.ts +11 -0
  279. package/dist/components/nv-menu.js +216 -0
  280. package/dist/components/nv-menu.js.map +1 -0
  281. package/dist/components/nv-menuitem.d.ts +11 -0
  282. package/dist/components/nv-menuitem.js +55 -0
  283. package/dist/components/nv-menuitem.js.map +1 -0
  284. package/dist/components/nv-popover.d.ts +11 -0
  285. package/dist/components/nv-popover.js +8 -0
  286. package/dist/components/nv-popover.js.map +1 -0
  287. package/dist/components/nv-row.d.ts +11 -0
  288. package/dist/components/nv-row.js +38 -0
  289. package/dist/components/nv-row.js.map +1 -0
  290. package/dist/components/nv-stack.d.ts +11 -0
  291. package/dist/components/nv-stack.js +51 -0
  292. package/dist/components/nv-stack.js.map +1 -0
  293. package/dist/components/nv-tooltip.d.ts +11 -0
  294. package/dist/components/nv-tooltip.js +61 -0
  295. package/dist/components/nv-tooltip.js.map +1 -0
  296. package/dist/components/p-1daca48a.js +1871 -0
  297. package/dist/components/p-1daca48a.js.map +1 -0
  298. package/dist/components/p-42301d8f.js +104 -0
  299. package/dist/components/p-42301d8f.js.map +1 -0
  300. package/dist/components/p-50bd2808.js +1198 -0
  301. package/dist/components/p-50bd2808.js.map +1 -0
  302. package/dist/components/p-6146d4b0.js +87 -0
  303. package/dist/components/p-6146d4b0.js.map +1 -0
  304. package/dist/components/p-632bedb8.js +1730 -0
  305. package/dist/components/p-632bedb8.js.map +1 -0
  306. package/dist/components/p-8a1a6e56.js +5 -0
  307. package/dist/components/p-8a1a6e56.js.map +1 -0
  308. package/dist/components/p-8da6d9a3.js +43 -0
  309. package/dist/components/p-8da6d9a3.js.map +1 -0
  310. package/dist/components/p-a15ddd42.js +138 -0
  311. package/dist/components/p-a15ddd42.js.map +1 -0
  312. package/dist/components/p-be79e7bc.js +121 -0
  313. package/dist/components/p-be79e7bc.js.map +1 -0
  314. package/dist/components/p-c711fe67.js +2355 -0
  315. package/dist/components/p-c711fe67.js.map +1 -0
  316. package/dist/components/p-f5ff676c.js +65 -0
  317. package/dist/components/p-f5ff676c.js.map +1 -0
  318. package/dist/docs.d.ts +435 -0
  319. package/dist/docs.json +9249 -0
  320. package/dist/esm/app-globals-df0a3c8d.js +9 -0
  321. package/dist/esm/app-globals-df0a3c8d.js.map +1 -0
  322. package/dist/esm/clsx-297c1ffe.js +5 -0
  323. package/dist/esm/clsx-297c1ffe.js.map +1 -0
  324. package/dist/esm/constants-e9bee611.js +138 -0
  325. package/dist/esm/constants-e9bee611.js.map +1 -0
  326. package/dist/esm/fade.animation-2a077983.js +1871 -0
  327. package/dist/esm/fade.animation-2a077983.js.map +1 -0
  328. package/dist/esm/grow.animation-88a8ee8f.js +114 -0
  329. package/dist/esm/grow.animation-88a8ee8f.js.map +1 -0
  330. package/dist/esm/index-179dfba2.js +1952 -0
  331. package/dist/esm/index-179dfba2.js.map +1 -0
  332. package/dist/esm/index.js +487 -0
  333. package/dist/esm/index.js.map +1 -0
  334. package/dist/esm/loader.js +13 -0
  335. package/dist/esm/loader.js.map +1 -0
  336. package/dist/esm/native.js +43 -0
  337. package/dist/esm/native.js.map +1 -0
  338. package/dist/esm/nv-alert.entry.js +136 -0
  339. package/dist/esm/nv-alert.entry.js.map +1 -0
  340. package/dist/esm/nv-avatar.entry.js +69 -0
  341. package/dist/esm/nv-avatar.entry.js.map +1 -0
  342. package/dist/esm/nv-badge.entry.js +115 -0
  343. package/dist/esm/nv-badge.entry.js.map +1 -0
  344. package/dist/esm/nv-base.entry.js +71 -0
  345. package/dist/esm/nv-base.entry.js.map +1 -0
  346. package/dist/esm/nv-button.entry.js +87 -0
  347. package/dist/esm/nv-button.entry.js.map +1 -0
  348. package/dist/esm/nv-col.entry.js +37 -0
  349. package/dist/esm/nv-col.entry.js.map +1 -0
  350. package/dist/esm/nv-fieldcheckbox.entry.js +90 -0
  351. package/dist/esm/nv-fieldcheckbox.entry.js.map +1 -0
  352. package/dist/esm/nv-fieldnumber.entry.js +90 -0
  353. package/dist/esm/nv-fieldnumber.entry.js.map +1 -0
  354. package/dist/esm/nv-fieldpassword.entry.js +75 -0
  355. package/dist/esm/nv-fieldpassword.entry.js.map +1 -0
  356. package/dist/esm/nv-fieldradio.entry.js +77 -0
  357. package/dist/esm/nv-fieldradio.entry.js.map +1 -0
  358. package/dist/esm/nv-fieldselect.entry.js +286 -0
  359. package/dist/esm/nv-fieldselect.entry.js.map +1 -0
  360. package/dist/esm/nv-fieldtext.entry.js +79 -0
  361. package/dist/esm/nv-fieldtext.entry.js.map +1 -0
  362. package/dist/esm/nv-fieldtextarea.entry.js +147 -0
  363. package/dist/esm/nv-fieldtextarea.entry.js.map +1 -0
  364. package/dist/esm/nv-fieldtoggle.entry.js +60 -0
  365. package/dist/esm/nv-fieldtoggle.entry.js.map +1 -0
  366. package/dist/esm/nv-icon.entry.js +62 -0
  367. package/dist/esm/nv-icon.entry.js.map +1 -0
  368. package/dist/esm/nv-iconbutton.entry.js +88 -0
  369. package/dist/esm/nv-iconbutton.entry.js.map +1 -0
  370. package/dist/esm/nv-loader.entry.js +25 -0
  371. package/dist/esm/nv-loader.entry.js.map +1 -0
  372. package/dist/esm/nv-menu.entry.js +185 -0
  373. package/dist/esm/nv-menu.entry.js.map +1 -0
  374. package/dist/esm/nv-menuitem.entry.js +26 -0
  375. package/dist/esm/nv-menuitem.entry.js.map +1 -0
  376. package/dist/esm/nv-popover.entry.js +2323 -0
  377. package/dist/esm/nv-popover.entry.js.map +1 -0
  378. package/dist/esm/nv-row.entry.js +20 -0
  379. package/dist/esm/nv-row.entry.js.map +1 -0
  380. package/dist/esm/nv-stack.entry.js +27 -0
  381. package/dist/esm/nv-stack.entry.js.map +1 -0
  382. package/dist/esm/nv-tooltip.entry.js +33 -0
  383. package/dist/esm/nv-tooltip.entry.js.map +1 -0
  384. package/dist/esm/timeline.animation-1b88f052.js +104 -0
  385. package/dist/esm/timeline.animation-1b88f052.js.map +1 -0
  386. package/dist/esm/v4-a79185f4.js +65 -0
  387. package/dist/esm/v4-a79185f4.js.map +1 -0
  388. package/dist/index.cjs.js +1 -0
  389. package/dist/index.js +1 -0
  390. package/dist/native/fonts/TT_Norms_Pro_Bold.woff2 +0 -0
  391. package/dist/native/fonts/TT_Norms_Pro_Medium.woff2 +0 -0
  392. package/dist/native/fonts/TT_Norms_Pro_Mono_Bold.woff2 +0 -0
  393. package/dist/native/fonts/TT_Norms_Pro_Mono_Medium.woff2 +0 -0
  394. package/dist/native/fonts/TT_Norms_Pro_Mono_Regular.woff2 +0 -0
  395. package/dist/native/fonts/TT_Norms_Pro_Regular.woff2 +0 -0
  396. package/dist/native/index.esm.js +2 -0
  397. package/dist/native/index.esm.js.map +1 -0
  398. package/dist/native/native.css +1 -0
  399. package/dist/native/native.esm.js +2 -0
  400. package/dist/native/native.esm.js.map +1 -0
  401. package/dist/native/p-06f64d05.entry.js +2 -0
  402. package/dist/native/p-06f64d05.entry.js.map +1 -0
  403. package/dist/native/p-0aa0193b.entry.js +2 -0
  404. package/dist/native/p-0aa0193b.entry.js.map +1 -0
  405. package/dist/native/p-124a7067.entry.js +2 -0
  406. package/dist/native/p-124a7067.entry.js.map +1 -0
  407. package/dist/native/p-13d0ab5b.entry.js +2 -0
  408. package/dist/native/p-13d0ab5b.entry.js.map +1 -0
  409. package/dist/native/p-14c08510.entry.js +2 -0
  410. package/dist/native/p-14c08510.entry.js.map +1 -0
  411. package/dist/native/p-1ceee367.entry.js +2 -0
  412. package/dist/native/p-1ceee367.entry.js.map +1 -0
  413. package/dist/native/p-1daca48a.js +16 -0
  414. package/dist/native/p-1daca48a.js.map +1 -0
  415. package/dist/native/p-29d482cd.entry.js +2 -0
  416. package/dist/native/p-29d482cd.entry.js.map +1 -0
  417. package/dist/native/p-42301d8f.js +2 -0
  418. package/dist/native/p-42301d8f.js.map +1 -0
  419. package/dist/native/p-43cd42ca.entry.js +2 -0
  420. package/dist/native/p-43cd42ca.entry.js.map +1 -0
  421. package/dist/native/p-519e0f59.entry.js +2 -0
  422. package/dist/native/p-519e0f59.entry.js.map +1 -0
  423. package/dist/native/p-617d6a09.entry.js +2 -0
  424. package/dist/native/p-617d6a09.entry.js.map +1 -0
  425. package/dist/native/p-6f762ec2.entry.js +2 -0
  426. package/dist/native/p-6f762ec2.entry.js.map +1 -0
  427. package/dist/native/p-71d6aad8.entry.js +2 -0
  428. package/dist/native/p-71d6aad8.entry.js.map +1 -0
  429. package/dist/native/p-7ce1b712.entry.js +2 -0
  430. package/dist/native/p-7ce1b712.entry.js.map +1 -0
  431. package/dist/native/p-80788ddf.js +2 -0
  432. package/dist/native/p-80788ddf.js.map +1 -0
  433. package/dist/native/p-830ec54a.entry.js +2 -0
  434. package/dist/native/p-830ec54a.entry.js.map +1 -0
  435. package/dist/native/p-89accab1.entry.js +2 -0
  436. package/dist/native/p-89accab1.entry.js.map +1 -0
  437. package/dist/native/p-8a1a6e56.js +2 -0
  438. package/dist/native/p-8a1a6e56.js.map +1 -0
  439. package/dist/native/p-8b65b16f.entry.js +2 -0
  440. package/dist/native/p-8b65b16f.entry.js.map +1 -0
  441. package/dist/native/p-a15ddd42.js +2 -0
  442. package/dist/native/p-a15ddd42.js.map +1 -0
  443. package/dist/native/p-a37c2ac2.js +2 -0
  444. package/dist/native/p-a37c2ac2.js.map +1 -0
  445. package/dist/native/p-b5e4a9e7.entry.js +2 -0
  446. package/dist/native/p-b5e4a9e7.entry.js.map +1 -0
  447. package/dist/native/p-b8eb4c31.entry.js +2 -0
  448. package/dist/native/p-b8eb4c31.entry.js.map +1 -0
  449. package/dist/native/p-b99aa075.entry.js +2 -0
  450. package/dist/native/p-b99aa075.entry.js.map +1 -0
  451. package/dist/native/p-d5a8b6c4.entry.js +2 -0
  452. package/dist/native/p-d5a8b6c4.entry.js.map +1 -0
  453. package/dist/native/p-db2a68f3.js +3 -0
  454. package/dist/native/p-db2a68f3.js.map +1 -0
  455. package/dist/native/p-f5acea50.entry.js +2 -0
  456. package/dist/native/p-f5acea50.entry.js.map +1 -0
  457. package/dist/native/p-f5ff676c.js +2 -0
  458. package/dist/native/p-f5ff676c.js.map +1 -0
  459. package/dist/native/p-f9aac71a.entry.js +2 -0
  460. package/dist/native/p-f9aac71a.entry.js.map +1 -0
  461. package/dist/native/p-fb6f42b7.entry.js +2 -0
  462. package/dist/native/p-fb6f42b7.entry.js.map +1 -0
  463. package/dist/types/animations/collapse.animation.d.ts +11 -0
  464. package/dist/types/animations/fade.animation.d.ts +11 -0
  465. package/dist/types/animations/grow.animation.d.ts +15 -0
  466. package/dist/types/animations/index.d.ts +4 -0
  467. package/dist/types/animations/timeline.animation.d.ts +18 -0
  468. package/dist/types/components/nv-alert/nv-alert.d.ts +85 -0
  469. package/dist/types/components/nv-alert/nv-alert.docs.d.ts +4 -0
  470. package/dist/types/components/nv-avatar/nv-avatar.d.ts +75 -0
  471. package/dist/types/components/nv-avatar/nv-avatar.docs.d.ts +4 -0
  472. package/dist/types/components/nv-badge/nv-badge.d.ts +93 -0
  473. package/dist/types/components/nv-badge/nv-badge.docs.d.ts +4 -0
  474. package/dist/types/components/nv-base/nv-base.d.ts +17 -0
  475. package/dist/types/components/nv-base/nv-base.docs.d.ts +5 -0
  476. package/dist/types/components/nv-button/nv-button.d.ts +63 -0
  477. package/dist/types/components/nv-button/nv-button.docs.d.ts +4 -0
  478. package/dist/types/components/nv-col/nv-col.d.ts +18 -0
  479. package/dist/types/components/nv-col/nv-col.docs.d.ts +4 -0
  480. package/dist/types/components/nv-fieldcheckbox/nv-fieldcheckbox.d.ts +119 -0
  481. package/dist/types/components/nv-fieldcheckbox/nv-fieldcheckbox.docs.d.ts +4 -0
  482. package/dist/types/components/nv-fieldnumber/nv-fieldnumber.d.ts +132 -0
  483. package/dist/types/components/nv-fieldnumber/nv-fieldnumber.docs.d.ts +4 -0
  484. package/dist/types/components/nv-fieldpassword/nv-fieldpassword.d.ts +145 -0
  485. package/dist/types/components/nv-fieldpassword/nv-fieldpassword.docs.d.ts +4 -0
  486. package/dist/types/components/nv-fieldradio/nv-fieldradio.d.ts +101 -0
  487. package/dist/types/components/nv-fieldradio/nv-fieldradio.docs.d.ts +4 -0
  488. package/dist/types/components/nv-fieldselect/nv-fieldselect.d.ts +195 -0
  489. package/dist/types/components/nv-fieldselect/nv-fieldselect.docs.d.ts +4 -0
  490. package/dist/types/components/nv-fieldtext/nv-fieldtext.d.ts +162 -0
  491. package/dist/types/components/nv-fieldtext/nv-fieldtext.docs.d.ts +4 -0
  492. package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.d.ts +161 -0
  493. package/dist/types/components/nv-fieldtextarea/nv-fieldtextarea.docs.d.ts +4 -0
  494. package/dist/types/components/nv-fieldtoggle/nv-fieldtoggle.d.ts +73 -0
  495. package/dist/types/components/nv-fieldtoggle/nv-fieldtoggle.docs.d.ts +4 -0
  496. package/dist/types/components/nv-icon/nv-icon.d.ts +51 -0
  497. package/dist/types/components/nv-icon/nv-icon.docs.d.ts +4 -0
  498. package/dist/types/components/nv-icon/nv-icons.d.ts +3 -0
  499. package/dist/types/components/nv-icon/test/nv-icon.test.d.ts +1 -0
  500. package/dist/types/components/nv-iconbutton/nv-iconbutton.d.ts +70 -0
  501. package/dist/types/components/nv-iconbutton/nv-iconbutton.docs.d.ts +4 -0
  502. package/dist/types/components/nv-loader/nv-loader.d.ts +18 -0
  503. package/dist/types/components/nv-loader/nv-loader.docs.d.ts +4 -0
  504. package/dist/types/components/nv-menu/nv-menu.d.ts +60 -0
  505. package/dist/types/components/nv-menu/nv-menu.docs.d.ts +4 -0
  506. package/dist/types/components/nv-menuitem/nv-menuitem.d.ts +31 -0
  507. package/dist/types/components/nv-menuitem/nv-menuitem.docs.d.ts +4 -0
  508. package/dist/types/components/nv-popover/nv-popover.d.ts +114 -0
  509. package/dist/types/components/nv-popover/nv-popover.docs.d.ts +4 -0
  510. package/dist/types/components/nv-row/nv-row.d.ts +7 -0
  511. package/dist/types/components/nv-row/nv-row.docs.d.ts +4 -0
  512. package/dist/types/components/nv-stack/nv-stack.d.ts +36 -0
  513. package/dist/types/components/nv-stack/nv-stack.docs.d.ts +4 -0
  514. package/dist/types/components/nv-tooltip/nv-tooltip.d.ts +32 -0
  515. package/dist/types/components/nv-tooltip/nv-tooltip.docs.d.ts +4 -0
  516. package/dist/types/components.d.ts +2412 -0
  517. package/dist/types/dev/dev-components.d.ts +2 -0
  518. package/dist/types/dev/dev-forms.d.ts +2 -0
  519. package/dist/types/dev/dev-root.d.ts +1 -0
  520. package/dist/types/dev/dev-utils.d.ts +17 -0
  521. package/dist/types/global.d.ts +1 -0
  522. package/dist/types/index.d.ts +15 -0
  523. package/dist/types/nova-docs.d.ts +32 -0
  524. package/dist/types/stencil-public-runtime.d.ts +1678 -0
  525. package/dist/types/utils/class.utils.d.ts +6 -0
  526. package/dist/types/utils/constants.d.ts +112 -0
  527. package/dist/types/utils/events.utils.d.ts +15 -0
  528. package/dist/vscode-data.json +3179 -0
  529. package/hydrate/index.d.ts +242 -0
  530. package/hydrate/index.js +24827 -0
  531. package/hydrate/index.mjs +24819 -0
  532. package/hydrate/package.json +12 -0
  533. package/loader/cdn.js +1 -0
  534. package/loader/index.cjs.js +1 -0
  535. package/loader/index.d.ts +24 -0
  536. package/loader/index.es2017.js +1 -0
  537. package/loader/index.js +2 -0
  538. package/loader/package.json +11 -0
  539. package/package.json +197 -0
  540. package/readme.md +67 -0
@@ -0,0 +1,527 @@
1
+ import { Host, h, } from "@stencil/core";
2
+ import { v4 as uuidv4 } from "uuid";
3
+ import clsx from "clsx";
4
+ /**
5
+ * @slot label - Content to be placed as the label, will override the label prop.
6
+ * @slot description - Content to be placed as the description, will override the description prop.
7
+ * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.
8
+ */
9
+ export class NvFieldtextarea {
10
+ constructor() {
11
+ //#endregion WATCHERS
12
+ /****************************************************************************/
13
+ //#region METHODS
14
+ this.handleTextarea = (event) => {
15
+ const textarea = event.target;
16
+ this.value = textarea.value;
17
+ this.valueChanged.emit(textarea.value);
18
+ if (this.autosize) {
19
+ this.adjustTextareaHeight();
20
+ }
21
+ };
22
+ this.handleTextareaContainerClick = () => {
23
+ this.textareaElement.focus();
24
+ };
25
+ this.message = undefined;
26
+ this.validation = undefined;
27
+ this.textareaId = uuidv4();
28
+ this.label = undefined;
29
+ this.description = undefined;
30
+ this.placeholder = undefined;
31
+ this.name = undefined;
32
+ this.value = undefined;
33
+ this.disabled = false;
34
+ this.readonly = false;
35
+ this.required = false;
36
+ this.error = false;
37
+ this.errorDescription = undefined;
38
+ this.success = false;
39
+ this.maxlength = undefined;
40
+ this.minlength = undefined;
41
+ this.rows = 3;
42
+ this.resize = 'vertical';
43
+ this.autosize = false;
44
+ }
45
+ componentWillRender() {
46
+ if (this.message) {
47
+ this.description = this.message;
48
+ }
49
+ if (this.validation) {
50
+ this.errorDescription = this.validation;
51
+ this.error = true;
52
+ }
53
+ }
54
+ //#endregion EVENTS
55
+ /****************************************************************************/
56
+ //#region WATCHERS
57
+ /**
58
+ * If autosize is true, we need to make sure to update the min-height when
59
+ * the rows change.
60
+ */
61
+ rowsChanged() {
62
+ if (this.autosize) {
63
+ this.adjustTextareaHeight();
64
+ }
65
+ }
66
+ /**
67
+ * If autosize is true, we need to make sure to update the height and
68
+ * min-height, if false, we need to remove the height property.
69
+ */
70
+ autosizeChanged() {
71
+ var _a;
72
+ if (this.autosize) {
73
+ this.adjustTextareaHeight();
74
+ }
75
+ else {
76
+ (_a = this.textareaElement) === null || _a === void 0 ? void 0 : _a.style.removeProperty('height');
77
+ }
78
+ }
79
+ adjustTextareaHeight() {
80
+ if (this.textareaElement && this.autosize) {
81
+ this.textareaElement.style.height = 'auto';
82
+ // Get computed styles
83
+ const computedStyle = window.getComputedStyle(this.textareaElement);
84
+ const lineHeight = parseFloat(computedStyle.lineHeight);
85
+ const paddingTop = parseFloat(computedStyle.paddingTop);
86
+ const paddingBottom = parseFloat(computedStyle.paddingBottom);
87
+ const borderTopWidth = parseFloat(computedStyle.borderTopWidth);
88
+ const borderBottomWidth = parseFloat(computedStyle.borderBottomWidth);
89
+ // Calculate min-height based on rows
90
+ const minHeight = lineHeight * this.rows +
91
+ paddingTop +
92
+ paddingBottom +
93
+ borderTopWidth +
94
+ borderBottomWidth;
95
+ this.textareaElement.style.minHeight = `${minHeight}px`;
96
+ this.textareaElement.style.height =
97
+ this.textareaElement.scrollHeight + 'px';
98
+ }
99
+ }
100
+ /**
101
+ * Class Properties
102
+ * resize-none resize: none;
103
+ * resize-y resize: vertical;
104
+ * resize-x resize: horizontal;
105
+ * resize resize: both;
106
+ * @returns {string} The resize class.
107
+ */
108
+ getResize() {
109
+ if (this.resize === 'none')
110
+ return 'resize-none';
111
+ if (this.resize === 'vertical')
112
+ return 'resize-y';
113
+ if (this.resize === 'horizontal')
114
+ return 'resize-x';
115
+ if (this.resize === 'both')
116
+ return 'resize';
117
+ return 'resize-none';
118
+ }
119
+ //#endregion METHODS
120
+ /****************************************************************************/
121
+ //#region LIFECYCLE
122
+ componentDidLoad() {
123
+ if (this.autosize) {
124
+ this.adjustTextareaHeight();
125
+ }
126
+ }
127
+ //#endregion LIFECYCLE
128
+ /****************************************************************************/
129
+ //#region RENDER
130
+ render() {
131
+ return (h(Host, { key: '05e5be100e389a0d604ef6c6a126a3992c4400d8' }, (this.label || this.el.querySelector('[slot="label"]')) && (h("label", { key: 'f0e8d865770ad7249748d76eafc520733a73df61', htmlFor: this.textareaId }, h("slot", { key: '88dc412644dd9ba26c1c4fd6495257071ea9355f', name: "label" }, this.label))), h("div", { key: 'ed27e42a150bacb526fad21c33167e5daa88fbdb', class: "textarea-wrapper" }, h("div", { key: '12afa52b296240e0b8cb7ee3dd68100619a0aaef', class: "textarea-container", onClick: this.handleTextareaContainerClick }, h("textarea", { key: '9269535072a3df3aff0f4d6093618ef3d0b9aed3', id: this.textareaId, ref: e => (this.textareaElement = e), placeholder: this.placeholder, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, maxlength: this.maxlength, minlength: this.minlength, autocomplete: "off", value: this.value, onInput: this.handleTextarea, rows: this.rows, class: clsx(this.getResize()) }))), (this.description ||
132
+ this.el.querySelector('[slot="description"]')) && (h("div", { key: 'f4cbe287f58bcffa17f9175b5507ffd260652805', class: "description" }, h("slot", { key: 'b3df2bfd379089e489173b0c961ce9bc04080892', name: "description" }, this.description))), (this.errorDescription ||
133
+ this.el.querySelector('[slot="error-description"]')) && (h("div", { key: 'cb194709b15cbe0e4f243161bb34f5e487b2e073', hidden: !this.error, class: "error-description" }, h("slot", { key: 'de80cb7d6b1ad8e9f33bd17a407604df66b8eda1', name: "error-description" }, this.errorDescription)))));
134
+ }
135
+ static get is() { return "nv-fieldtextarea"; }
136
+ static get formAssociated() { return true; }
137
+ static get originalStyleUrls() {
138
+ return {
139
+ "$": ["nv-fieldtextarea.scss"]
140
+ };
141
+ }
142
+ static get styleUrls() {
143
+ return {
144
+ "$": ["nv-fieldtextarea.css"]
145
+ };
146
+ }
147
+ static get properties() {
148
+ return {
149
+ "message": {
150
+ "type": "string",
151
+ "mutable": false,
152
+ "complexType": {
153
+ "original": "string",
154
+ "resolved": "string",
155
+ "references": {}
156
+ },
157
+ "required": false,
158
+ "optional": false,
159
+ "docs": {
160
+ "tags": [{
161
+ "name": "deprecated",
162
+ "text": "use description instead."
163
+ }],
164
+ "text": "Message defines a 'hint ' message for the Text Field."
165
+ },
166
+ "attribute": "message",
167
+ "reflect": false
168
+ },
169
+ "validation": {
170
+ "type": "string",
171
+ "mutable": false,
172
+ "complexType": {
173
+ "original": "string",
174
+ "resolved": "string",
175
+ "references": {}
176
+ },
177
+ "required": false,
178
+ "optional": false,
179
+ "docs": {
180
+ "tags": [{
181
+ "name": "deprecated",
182
+ "text": "use errorDescription and set the error prop instead."
183
+ }],
184
+ "text": "Add the message to the validation state."
185
+ },
186
+ "attribute": "validation",
187
+ "reflect": false
188
+ },
189
+ "textareaId": {
190
+ "type": "string",
191
+ "mutable": false,
192
+ "complexType": {
193
+ "original": "string",
194
+ "resolved": "string",
195
+ "references": {}
196
+ },
197
+ "required": false,
198
+ "optional": false,
199
+ "docs": {
200
+ "tags": [],
201
+ "text": "Sets the ID for the textarea element and the for attribute of the associated\nlabel. If no ID is provided, a random one will be automatically generated\nto ensure unique identification, facilitating proper label association and\naccessibility."
202
+ },
203
+ "attribute": "textarea-id",
204
+ "reflect": true,
205
+ "defaultValue": "uuidv4()"
206
+ },
207
+ "label": {
208
+ "type": "string",
209
+ "mutable": false,
210
+ "complexType": {
211
+ "original": "string",
212
+ "resolved": "string",
213
+ "references": {}
214
+ },
215
+ "required": false,
216
+ "optional": false,
217
+ "docs": {
218
+ "tags": [],
219
+ "text": "Lets you define the text that explains what users should enter in the text\ntextarea field. It\u2019s a crucial element for making forms clear and\nuser-friendly."
220
+ },
221
+ "attribute": "label",
222
+ "reflect": true
223
+ },
224
+ "description": {
225
+ "type": "string",
226
+ "mutable": true,
227
+ "complexType": {
228
+ "original": "string",
229
+ "resolved": "string",
230
+ "references": {}
231
+ },
232
+ "required": false,
233
+ "optional": false,
234
+ "docs": {
235
+ "tags": [],
236
+ "text": "Add helpful hints or extra information under the text textarea field. This is\nwhere you can clarify what users should enter or provide additional\ninstructions, making the form easier to fill out correctly."
237
+ },
238
+ "attribute": "description",
239
+ "reflect": true
240
+ },
241
+ "placeholder": {
242
+ "type": "string",
243
+ "mutable": false,
244
+ "complexType": {
245
+ "original": "string",
246
+ "resolved": "string",
247
+ "references": {}
248
+ },
249
+ "required": false,
250
+ "optional": false,
251
+ "docs": {
252
+ "tags": [],
253
+ "text": "Display temporary text inside the textarea field to give users a hint about\nwhat to type. It\u2019s a great way to provide examples or suggestions directly\nin the field before they start typing."
254
+ },
255
+ "attribute": "placeholder",
256
+ "reflect": true
257
+ },
258
+ "name": {
259
+ "type": "string",
260
+ "mutable": false,
261
+ "complexType": {
262
+ "original": "string",
263
+ "resolved": "string",
264
+ "references": {}
265
+ },
266
+ "required": false,
267
+ "optional": false,
268
+ "docs": {
269
+ "tags": [],
270
+ "text": "Defines the name attribute of the textarea field, which is crucial for form\nsubmission. This value is used as the key in the key-value pair sent to\nthe server, representing the textarea\u2019s data in form submissions. It should be\nunique within the form to avoid conflicts"
271
+ },
272
+ "attribute": "name",
273
+ "reflect": true
274
+ },
275
+ "value": {
276
+ "type": "string",
277
+ "mutable": true,
278
+ "complexType": {
279
+ "original": "string",
280
+ "resolved": "string",
281
+ "references": {}
282
+ },
283
+ "required": false,
284
+ "optional": false,
285
+ "docs": {
286
+ "tags": [],
287
+ "text": "Specifies the value of the textarea field, which determines the text displayed\nwithin the field. This prop is typically used in controlled components\nwhere the textarea\u2019s value is managed by the component\u2019s state."
288
+ },
289
+ "attribute": "value",
290
+ "reflect": true
291
+ },
292
+ "disabled": {
293
+ "type": "boolean",
294
+ "mutable": false,
295
+ "complexType": {
296
+ "original": "boolean",
297
+ "resolved": "boolean",
298
+ "references": {}
299
+ },
300
+ "required": false,
301
+ "optional": false,
302
+ "docs": {
303
+ "tags": [],
304
+ "text": "The disabled prop lets you turn off the textarea field so that users can\u2019t\ntype in it. When disabled, the field is grayed out and won\u2019t respond to#\nclicks or touches."
305
+ },
306
+ "attribute": "disabled",
307
+ "reflect": true,
308
+ "defaultValue": "false"
309
+ },
310
+ "readonly": {
311
+ "type": "boolean",
312
+ "mutable": false,
313
+ "complexType": {
314
+ "original": "boolean",
315
+ "resolved": "boolean",
316
+ "references": {}
317
+ },
318
+ "required": false,
319
+ "optional": false,
320
+ "docs": {
321
+ "tags": [],
322
+ "text": "Display the textarea field\u2019s content without allowing users to change it.\nUsers can still click on it, select, and copy the text, but they won\u2019t be\nable to type or delete anything."
323
+ },
324
+ "attribute": "readonly",
325
+ "reflect": true,
326
+ "defaultValue": "false"
327
+ },
328
+ "required": {
329
+ "type": "boolean",
330
+ "mutable": false,
331
+ "complexType": {
332
+ "original": "boolean",
333
+ "resolved": "boolean",
334
+ "references": {}
335
+ },
336
+ "required": false,
337
+ "optional": false,
338
+ "docs": {
339
+ "tags": [],
340
+ "text": "Marks the textarea field as required, ensuring that the user must fill it out\nbefore submitting the form."
341
+ },
342
+ "attribute": "required",
343
+ "reflect": true,
344
+ "defaultValue": "false"
345
+ },
346
+ "error": {
347
+ "type": "boolean",
348
+ "mutable": true,
349
+ "complexType": {
350
+ "original": "boolean",
351
+ "resolved": "boolean",
352
+ "references": {}
353
+ },
354
+ "required": false,
355
+ "optional": false,
356
+ "docs": {
357
+ "tags": [{
358
+ "name": "validator",
359
+ "text": "error"
360
+ }],
361
+ "text": "Alters the textarea field\u2019s appearance to indicate an error, helping users\nidentify fields that need correction."
362
+ },
363
+ "attribute": "error",
364
+ "reflect": true,
365
+ "defaultValue": "false"
366
+ },
367
+ "errorDescription": {
368
+ "type": "string",
369
+ "mutable": true,
370
+ "complexType": {
371
+ "original": "string",
372
+ "resolved": "string",
373
+ "references": {}
374
+ },
375
+ "required": false,
376
+ "optional": false,
377
+ "docs": {
378
+ "tags": [{
379
+ "name": "validator",
380
+ "text": "message"
381
+ }],
382
+ "text": "Show a helpful message under the textarea field when there\u2019s a problem. It\nexplains what\u2019s wrong and how users can fix it, making the error easier to\nunderstand and resolve."
383
+ },
384
+ "attribute": "error-description",
385
+ "reflect": true
386
+ },
387
+ "success": {
388
+ "type": "boolean",
389
+ "mutable": false,
390
+ "complexType": {
391
+ "original": "boolean",
392
+ "resolved": "boolean",
393
+ "references": {}
394
+ },
395
+ "required": false,
396
+ "optional": false,
397
+ "docs": {
398
+ "tags": [],
399
+ "text": "Changes the textarea field\u2019s appearance to indicate successful textarea or\nvalidation."
400
+ },
401
+ "attribute": "success",
402
+ "reflect": true,
403
+ "defaultValue": "false"
404
+ },
405
+ "maxlength": {
406
+ "type": "number",
407
+ "mutable": false,
408
+ "complexType": {
409
+ "original": "number",
410
+ "resolved": "number",
411
+ "references": {}
412
+ },
413
+ "required": false,
414
+ "optional": false,
415
+ "docs": {
416
+ "tags": [],
417
+ "text": "Limits how many characters users can type into the textarea field. It\u2019s\nhelpful for making sure users don\u2019t enter too much information, keeping\ntheir textarea within the allowed limit."
418
+ },
419
+ "attribute": "maxlength",
420
+ "reflect": true
421
+ },
422
+ "minlength": {
423
+ "type": "number",
424
+ "mutable": false,
425
+ "complexType": {
426
+ "original": "number",
427
+ "resolved": "number",
428
+ "references": {}
429
+ },
430
+ "required": false,
431
+ "optional": false,
432
+ "docs": {
433
+ "tags": [],
434
+ "text": "Ensures that users type at least a certain number of characters into the\ntextarea field. It\u2019s a way to make sure users provide enough information\nbefore moving on."
435
+ },
436
+ "attribute": "minlength",
437
+ "reflect": true
438
+ },
439
+ "rows": {
440
+ "type": "number",
441
+ "mutable": false,
442
+ "complexType": {
443
+ "original": "number",
444
+ "resolved": "number",
445
+ "references": {}
446
+ },
447
+ "required": false,
448
+ "optional": false,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": "The number of visible text lines for the control. The default is 3. This\ncan be useful when you want to limit the size of the textarea field or when\nyou want to make the textarea field smaller to fit a specific layout. The\ntextarea field will expand vertically to fit the text as the user types."
452
+ },
453
+ "attribute": "rows",
454
+ "reflect": true,
455
+ "defaultValue": "3"
456
+ },
457
+ "resize": {
458
+ "type": "string",
459
+ "mutable": false,
460
+ "complexType": {
461
+ "original": "'none' | 'both' | 'horizontal' | 'vertical'",
462
+ "resolved": "\"both\" | \"horizontal\" | \"none\" | \"vertical\"",
463
+ "references": {}
464
+ },
465
+ "required": false,
466
+ "optional": false,
467
+ "docs": {
468
+ "tags": [],
469
+ "text": "Controls the resize property of a textarea. It can be set to none, both,\nhorizontal, or vertical. The default is vertical."
470
+ },
471
+ "attribute": "resize",
472
+ "reflect": true,
473
+ "defaultValue": "'vertical'"
474
+ },
475
+ "autosize": {
476
+ "type": "boolean",
477
+ "mutable": false,
478
+ "complexType": {
479
+ "original": "boolean",
480
+ "resolved": "boolean",
481
+ "references": {}
482
+ },
483
+ "required": false,
484
+ "optional": false,
485
+ "docs": {
486
+ "tags": [],
487
+ "text": "Enable this to make the textarea automatically resize as the user types,\nadjusting the height to fit the content. For the best experience, avoid\nvertical resizing, as it\u2019s controlled by this feature. Horizontal resizing\ncan still be allowed if desired."
488
+ },
489
+ "attribute": "autosize",
490
+ "reflect": true,
491
+ "defaultValue": "false"
492
+ }
493
+ };
494
+ }
495
+ static get events() {
496
+ return [{
497
+ "method": "valueChanged",
498
+ "name": "valueChanged",
499
+ "bubbles": true,
500
+ "cancelable": true,
501
+ "composed": true,
502
+ "docs": {
503
+ "tags": [{
504
+ "name": "bind",
505
+ "text": "value"
506
+ }],
507
+ "text": "Emitted when the textarea value changes."
508
+ },
509
+ "complexType": {
510
+ "original": "string",
511
+ "resolved": "string",
512
+ "references": {}
513
+ }
514
+ }];
515
+ }
516
+ static get elementRef() { return "el"; }
517
+ static get watchers() {
518
+ return [{
519
+ "propName": "rows",
520
+ "methodName": "rowsChanged"
521
+ }, {
522
+ "propName": "autosize",
523
+ "methodName": "autosizeChanged"
524
+ }];
525
+ }
526
+ }
527
+ //# sourceMappingURL=nv-fieldtextarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nv-fieldtextarea.js","sourceRoot":"","sources":["../../../src/components/nv-fieldtextarea/nv-fieldtextarea.tsx"],"names":[],"mappings":"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","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n} from '@stencil/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport clsx from 'clsx';\n\n/**\n * @slot label - Content to be placed as the label, will override the label prop.\n * @slot description - Content to be placed as the description, will override the description prop.\n * @slot error-description - Content to be placed as the error description, will override the errorDescription prop.\n */\n@Component({\n tag: 'nv-fieldtextarea',\n shadow: false,\n formAssociated: true,\n styleUrl: 'nv-fieldtextarea.scss',\n})\nexport class NvFieldtextarea {\n @Element() el: HTMLNvFieldtextareaElement;\n private textareaElement!: HTMLTextAreaElement;\n\n /****************************************************************************/\n //#region DEPRECATED\n\n /**\n * Message defines a 'hint ' message for the Text Field.\n * @deprecated use description instead.\n */\n @Prop()\n readonly message: string;\n\n /**\n * Add the message to the validation state.\n * @deprecated use errorDescription and set the error prop instead.\n */\n @Prop()\n readonly validation: string;\n\n componentWillRender() {\n if (this.message) {\n this.description = this.message;\n }\n\n if (this.validation) {\n this.errorDescription = this.validation;\n this.error = true;\n }\n }\n\n //#endregion DEPRECATED\n /****************************************************************************/\n //#region PROPERTIES\n\n /**\n * Sets the ID for the textarea element and the for attribute of the associated\n * label. If no ID is provided, a random one will be automatically generated\n * to ensure unique identification, facilitating proper label association and\n * accessibility.\n */\n @Prop({ reflect: true })\n readonly textareaId: string = uuidv4();\n\n /**\n * Lets you define the text that explains what users should enter in the text\n * textarea field. It’s a crucial element for making forms clear and\n * user-friendly.\n */\n @Prop({ reflect: true })\n readonly label: string;\n\n /**\n * Add helpful hints or extra information under the text textarea field. This is\n * where you can clarify what users should enter or provide additional\n * instructions, making the form easier to fill out correctly.\n */\n @Prop({ reflect: true, mutable: true })\n description: string;\n\n /**\n * Display temporary text inside the textarea field to give users a hint about\n * what to type. It’s a great way to provide examples or suggestions directly\n * in the field before they start typing.\n */\n @Prop({ reflect: true })\n readonly placeholder: string;\n\n /**\n * Defines the name attribute of the textarea field, which is crucial for form\n * submission. This value is used as the key in the key-value pair sent to\n * the server, representing the textarea’s data in form submissions. It should be\n * unique within the form to avoid conflicts\n */\n @Prop({ reflect: true })\n readonly name: string;\n\n /**\n * Specifies the value of the textarea field, which determines the text displayed\n * within the field. This prop is typically used in controlled components\n * where the textarea’s value is managed by the component’s state.\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n /**\n * The disabled prop lets you turn off the textarea field so that users can’t\n * type in it. When disabled, the field is grayed out and won’t respond to#\n * clicks or touches.\n */\n @Prop({ reflect: true })\n readonly disabled: boolean = false;\n\n /**\n * Display the textarea field’s content without allowing users to change it.\n * Users can still click on it, select, and copy the text, but they won’t be\n * able to type or delete anything.\n */\n @Prop({ reflect: true })\n readonly readonly: boolean = false;\n\n /**\n * Marks the textarea field as required, ensuring that the user must fill it out\n * before submitting the form.\n */\n @Prop({ reflect: true })\n readonly required: boolean = false;\n\n /**\n * Alters the textarea field’s appearance to indicate an error, helping users\n * identify fields that need correction.\n * @validator error\n */\n @Prop({ reflect: true, mutable: true })\n error: boolean = false;\n\n /**\n * Show a helpful message under the textarea field when there’s a problem. It\n * explains what’s wrong and how users can fix it, making the error easier to\n * understand and resolve.\n * @validator message\n */\n @Prop({ reflect: true, mutable: true })\n errorDescription: string;\n\n /**\n * Changes the textarea field’s appearance to indicate successful textarea or\n * validation.\n */\n @Prop({ reflect: true })\n readonly success: boolean = false;\n\n /**\n * Limits how many characters users can type into the textarea field. It’s\n * helpful for making sure users don’t enter too much information, keeping\n * their textarea within the allowed limit.\n */\n @Prop({ reflect: true })\n readonly maxlength: number;\n\n /**\n * Ensures that users type at least a certain number of characters into the\n * textarea field. It’s a way to make sure users provide enough information\n * before moving on.\n */\n @Prop({ reflect: true })\n readonly minlength: number;\n\n /**\n * The number of visible text lines for the control. The default is 3. This\n * can be useful when you want to limit the size of the textarea field or when\n * you want to make the textarea field smaller to fit a specific layout. The\n * textarea field will expand vertically to fit the text as the user types.\n */\n @Prop({ reflect: true })\n readonly rows: number = 3;\n\n /**\n * Controls the resize property of a textarea. It can be set to none, both,\n * horizontal, or vertical. The default is vertical.\n */\n @Prop({ reflect: true })\n readonly resize: 'none' | 'both' | 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Enable this to make the textarea automatically resize as the user types,\n * adjusting the height to fit the content. For the best experience, avoid\n * vertical resizing, as it’s controlled by this feature. Horizontal resizing\n * can still be allowed if desired.\n */\n @Prop({ reflect: true })\n readonly autosize: boolean = false;\n\n //#endregion PROPERTIES\n /****************************************************************************/\n //#region EVENTS\n\n /**\n * Emitted when the textarea value changes.\n * @bind value\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n //#endregion EVENTS\n /****************************************************************************/\n //#region WATCHERS\n\n /**\n * If autosize is true, we need to make sure to update the min-height when\n * the rows change.\n */\n @Watch('rows')\n rowsChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n /**\n * If autosize is true, we need to make sure to update the height and\n * min-height, if false, we need to remove the height property.\n */\n @Watch('autosize')\n autosizeChanged() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n } else {\n this.textareaElement?.style.removeProperty('height');\n }\n }\n\n //#endregion WATCHERS\n /****************************************************************************/\n //#region METHODS\n\n private handleTextarea = (event: Event) => {\n const textarea = event.target as HTMLTextAreaElement;\n this.value = textarea.value;\n this.valueChanged.emit(textarea.value);\n\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n };\n\n private handleTextareaContainerClick = () => {\n this.textareaElement.focus();\n };\n\n private adjustTextareaHeight() {\n if (this.textareaElement && this.autosize) {\n this.textareaElement.style.height = 'auto';\n\n // Get computed styles\n const computedStyle = window.getComputedStyle(this.textareaElement);\n const lineHeight = parseFloat(computedStyle.lineHeight);\n const paddingTop = parseFloat(computedStyle.paddingTop);\n const paddingBottom = parseFloat(computedStyle.paddingBottom);\n const borderTopWidth = parseFloat(computedStyle.borderTopWidth);\n const borderBottomWidth = parseFloat(computedStyle.borderBottomWidth);\n\n // Calculate min-height based on rows\n const minHeight =\n lineHeight * this.rows +\n paddingTop +\n paddingBottom +\n borderTopWidth +\n borderBottomWidth;\n\n this.textareaElement.style.minHeight = `${minHeight}px`;\n this.textareaElement.style.height =\n this.textareaElement.scrollHeight + 'px';\n }\n }\n\n /**\n * Class Properties\n * resize-none\tresize: none;\n * resize-y\t resize: vertical;\n * resize-x\t resize: horizontal;\n * resize\t resize: both;\n * @returns {string} The resize class.\n */\n private getResize() {\n if (this.resize === 'none') return 'resize-none';\n if (this.resize === 'vertical') return 'resize-y';\n if (this.resize === 'horizontal') return 'resize-x';\n if (this.resize === 'both') return 'resize';\n return 'resize-none';\n }\n\n //#endregion METHODS\n /****************************************************************************/\n //#region LIFECYCLE\n\n componentDidLoad() {\n if (this.autosize) {\n this.adjustTextareaHeight();\n }\n }\n\n //#endregion LIFECYCLE\n /****************************************************************************/\n //#region RENDER\n\n render() {\n return (\n <Host>\n {(this.label || this.el.querySelector('[slot=\"label\"]')) && (\n <label htmlFor={this.textareaId}>\n <slot name=\"label\">{this.label}</slot>\n </label>\n )}\n\n <div class=\"textarea-wrapper\">\n <div\n class=\"textarea-container\"\n onClick={this.handleTextareaContainerClick}\n >\n <textarea\n id={this.textareaId}\n ref={e => (this.textareaElement = e)}\n placeholder={this.placeholder}\n name={this.name}\n disabled={this.disabled}\n readOnly={this.readonly}\n required={this.required}\n maxlength={this.maxlength}\n minlength={this.minlength}\n autocomplete=\"off\"\n value={this.value}\n onInput={this.handleTextarea}\n rows={this.rows}\n class={clsx(this.getResize())}\n />\n </div>\n </div>\n\n {(this.description ||\n this.el.querySelector('[slot=\"description\"]')) && (\n <div class=\"description\">\n <slot name=\"description\">{this.description}</slot>\n </div>\n )}\n\n {(this.errorDescription ||\n this.el.querySelector('[slot=\"error-description\"]')) && (\n <div hidden={!this.error} class=\"error-description\">\n <slot name=\"error-description\">{this.errorDescription}</slot>\n </div>\n )}\n </Host>\n );\n }\n\n //#endregion RENDER\n}\n"]}
@@ -0,0 +1,114 @@
1
+ nv-fieldtoggle {
2
+ display: inline-flex;
3
+ align-items: flex-start;
4
+ gap: var(--form-gap-x);
5
+ position: relative;
6
+ }
7
+ nv-fieldtoggle:not([disabled], [readonly]) input,
8
+ nv-fieldtoggle:not([disabled], [readonly]) label {
9
+ cursor: pointer;
10
+ }
11
+ nv-fieldtoggle.label-placement-before {
12
+ flex-direction: row-reverse;
13
+ }
14
+ nv-fieldtoggle[disabled] {
15
+ opacity: 0.5;
16
+ }
17
+ nv-fieldtoggle label {
18
+ align-self: stretch;
19
+ color: var(--components-form-text-label-default);
20
+ font-family: "TT Norms Pro", sans-serif;
21
+ font-size: var(--form-label-font-size);
22
+ font-style: normal;
23
+ font-weight: 500;
24
+ line-height: var(--form-label-line-height);
25
+ }
26
+ nv-fieldtoggle .input-container {
27
+ position: relative;
28
+ color: var(--components-form-shape-foreground-default);
29
+ }
30
+ nv-fieldtoggle .input-container:has(input[type=checkbox]:disabled:not([readonly])) {
31
+ color: var(--components-form-shape-foreground-disabled);
32
+ }
33
+ nv-fieldtoggle .input-container input[type=checkbox] {
34
+ appearance: none;
35
+ position: relative;
36
+ display: flex;
37
+ width: var(--form-toggle-width);
38
+ height: var(--form-toggle-height);
39
+ flex-direction: column;
40
+ align-items: flex-start;
41
+ border-radius: var(--form-toggle-radius);
42
+ border-width: var(--form-toggle-border-width);
43
+ border-style: solid;
44
+ border-color: var(--components-form-field-border-default);
45
+ background: var(--components-form-field-background-default);
46
+ }
47
+ nv-fieldtoggle .input-container input[type=checkbox]::after {
48
+ content: "";
49
+ display: block;
50
+ width: var(--form-toggle-switch-dot-default);
51
+ height: var(--form-toggle-switch-dot-default);
52
+ background-color: var(--components-form-shape-foreground-switch-dot);
53
+ border-radius: var(--radius-rounded-full);
54
+ position: absolute;
55
+ top: 50%;
56
+ left: 25%;
57
+ transform: translate(-50%, -50%);
58
+ }
59
+ nv-fieldtoggle .input-container input[type=checkbox]:hover {
60
+ border-color: var(--components-form-field-border-hover);
61
+ }
62
+ nv-fieldtoggle .input-container input[type=checkbox]:focus {
63
+ border-color: var(--components-form-field-border-default);
64
+ }
65
+ nv-fieldtoggle .input-container input[type=checkbox]:focus, nv-fieldtoggle .input-container input[type=checkbox]:focus-within {
66
+ outline: none;
67
+ }
68
+ nv-fieldtoggle .input-container input[type=checkbox]:focus-visible, nv-fieldtoggle .input-container input[type=checkbox]:has(:focus-visible) {
69
+ outline: var(--focus-outline-stroke) solid var(--color-focus-brand);
70
+ outline-offset: calc(var(--focus-outline-offset) * 1);
71
+ }
72
+ nv-fieldtoggle .input-container input[type=checkbox]:checked {
73
+ background: var(--components-form-field-background-checked);
74
+ border-color: var(--components-form-field-background-checked);
75
+ }
76
+ nv-fieldtoggle .input-container input[type=checkbox]:checked::after {
77
+ content: "";
78
+ display: block;
79
+ width: var(--form-toggle-switch-dot-default);
80
+ height: var(--form-toggle-switch-dot-default);
81
+ background-color: var(--components-form-shape-foreground-default);
82
+ border-radius: var(--radius-rounded-full);
83
+ position: absolute;
84
+ top: 50%;
85
+ left: 75%;
86
+ transform: translate(-50%, -50%);
87
+ }
88
+ nv-fieldtoggle .input-container input[type=checkbox]:checked:focus {
89
+ background: var(--components-form-field-background-checked);
90
+ border-color: var(--components-form-field-border-focus);
91
+ }
92
+ nv-fieldtoggle .input-container input[type=checkbox]:disabled:not([readonly]) {
93
+ box-shadow: unset;
94
+ background: var(--components-form-field-background-disabled);
95
+ border-color: var(--components-form-field-border-default);
96
+ }
97
+ nv-fieldtoggle .input-container input[type=checkbox]:disabled:not([readonly]):checked::after {
98
+ background-color: var(--components-form-shape-foreground-disabled);
99
+ }
100
+ nv-fieldtoggle .description {
101
+ align-self: stretch;
102
+ color: var(--components-form-text-description-default);
103
+ font-family: "TT Norms Pro", sans-serif;
104
+ font-size: var(--form-description-font-size);
105
+ font-style: normal;
106
+ font-weight: 450;
107
+ line-height: var(--form-description-line-height);
108
+ }
109
+ nv-fieldtoggle .text-container {
110
+ display: flex;
111
+ flex-direction: column;
112
+ align-items: flex-start;
113
+ flex: 1 0 0;
114
+ }