@nuraly/lumenui 0.1.0 → 0.2.2

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 (821) hide show
  1. package/dist/nuralyui.bundle.js +23283 -16875
  2. package/dist/nuralyui.bundle.js.gz +0 -0
  3. package/dist/src/components/alert/alert.component.d.ts +8 -5
  4. package/dist/src/components/alert/alert.component.js +24 -20
  5. package/dist/src/components/alert/alert.style.d.ts +0 -7
  6. package/dist/src/components/alert/alert.style.js +48 -90
  7. package/dist/src/components/alert/bundle.js +82 -108
  8. package/dist/src/components/alert/bundle.js.gz +0 -0
  9. package/dist/src/components/badge/badge.component.d.ts +9 -8
  10. package/dist/src/components/badge/badge.component.js +17 -14
  11. package/dist/src/components/badge/badge.style.d.ts +0 -7
  12. package/dist/src/components/badge/badge.style.js +49 -107
  13. package/dist/src/components/badge/bundle.js +81 -119
  14. package/dist/src/components/badge/bundle.js.gz +0 -0
  15. package/dist/src/components/breadcrumb/breadcrumb.component.d.ts +8 -10
  16. package/dist/src/components/breadcrumb/breadcrumb.component.js +16 -15
  17. package/dist/src/components/breadcrumb/breadcrumb.style.d.ts +0 -7
  18. package/dist/src/components/breadcrumb/breadcrumb.style.js +42 -60
  19. package/dist/src/components/breadcrumb/bundle.js +96 -93
  20. package/dist/src/components/breadcrumb/bundle.js.gz +0 -0
  21. package/dist/src/components/button/bundle.js +221 -470
  22. package/dist/src/components/button/bundle.js.gz +0 -0
  23. package/dist/src/components/button/button.component.d.ts +2 -1
  24. package/dist/src/components/button/button.component.js +6 -6
  25. package/dist/src/components/button/button.style.d.ts +0 -7
  26. package/dist/src/components/button/button.style.js +167 -433
  27. package/dist/src/components/button/controllers/base.controller.d.ts +15 -0
  28. package/dist/src/components/button/controllers/base.controller.js +13 -0
  29. package/dist/src/components/button/controllers/index.d.ts +10 -0
  30. package/dist/src/components/button/controllers/index.js +10 -0
  31. package/dist/src/components/button/controllers/keyboard.controller.d.ts +32 -0
  32. package/dist/src/components/button/controllers/keyboard.controller.js +78 -0
  33. package/dist/src/components/button/controllers/link.controller.d.ts +30 -0
  34. package/dist/src/components/button/controllers/link.controller.js +75 -0
  35. package/dist/src/components/button/controllers/ripple.controller.d.ts +23 -0
  36. package/dist/src/components/button/controllers/ripple.controller.js +69 -0
  37. package/dist/src/components/button/interfaces/base-controller.interface.d.ts +61 -0
  38. package/dist/src/components/button/interfaces/base-controller.interface.js +7 -0
  39. package/dist/src/components/button/interfaces/index.d.ts +2 -0
  40. package/dist/src/components/button/interfaces/index.js +2 -0
  41. package/dist/src/components/button/test/nr-button_test.d.ts +2 -0
  42. package/dist/src/components/button/test/nr-button_test.js +91 -0
  43. package/dist/src/components/canvas/base-canvas.component.d.ts +4 -2
  44. package/dist/src/components/canvas/base-canvas.component.js +7 -0
  45. package/dist/src/components/canvas/bundle.js +17218 -9667
  46. package/dist/src/components/canvas/bundle.js.gz +0 -0
  47. package/dist/src/components/canvas/canvas.constants.d.ts +1 -1
  48. package/dist/src/components/canvas/canvas.constants.js +1 -1
  49. package/dist/src/components/canvas/chatbot-panel.style.js +54 -63
  50. package/dist/src/components/canvas/chatbot-trigger/chatbot-trigger-fields.component.d.ts +115 -0
  51. package/dist/src/components/canvas/chatbot-trigger/chatbot-trigger-fields.component.js +480 -0
  52. package/dist/src/components/canvas/chatbot-trigger/chatbot-trigger-fields.style.d.ts +7 -0
  53. package/dist/src/components/canvas/chatbot-trigger/chatbot-trigger-fields.style.js +323 -0
  54. package/dist/src/components/canvas/chatbot-trigger/chatbot-trigger.types.d.ts +162 -0
  55. package/dist/src/components/canvas/chatbot-trigger/chatbot-trigger.types.js +88 -0
  56. package/dist/src/components/canvas/chatbot-trigger/index.d.ts +9 -0
  57. package/dist/src/components/canvas/chatbot-trigger/index.js +12 -0
  58. package/dist/src/components/canvas/controllers/base.controller.d.ts +53 -0
  59. package/dist/src/components/canvas/controllers/base.controller.js +80 -0
  60. package/dist/src/components/canvas/controllers/clipboard.controller.d.ts +80 -0
  61. package/dist/src/components/canvas/controllers/clipboard.controller.js +300 -0
  62. package/dist/src/components/canvas/controllers/collaboration.controller.d.ts +54 -0
  63. package/dist/src/components/canvas/controllers/collaboration.controller.js +425 -0
  64. package/dist/src/components/canvas/controllers/config.controller.d.ts +61 -0
  65. package/dist/src/components/canvas/controllers/config.controller.js +118 -0
  66. package/dist/src/components/canvas/controllers/connection.controller.d.ts +69 -0
  67. package/dist/src/components/canvas/controllers/connection.controller.js +183 -0
  68. package/dist/src/components/canvas/controllers/drag.controller.d.ts +56 -0
  69. package/dist/src/components/canvas/controllers/drag.controller.js +195 -0
  70. package/dist/src/components/canvas/controllers/frame.controller.d.ts +94 -0
  71. package/dist/src/components/canvas/controllers/frame.controller.js +456 -0
  72. package/dist/src/components/canvas/controllers/index.d.ts +19 -0
  73. package/dist/src/components/canvas/controllers/index.js +32 -0
  74. package/dist/src/components/canvas/controllers/keyboard.controller.d.ts +44 -0
  75. package/dist/src/components/canvas/controllers/keyboard.controller.js +275 -0
  76. package/dist/src/components/canvas/controllers/marquee.controller.d.ts +71 -0
  77. package/dist/src/components/canvas/controllers/marquee.controller.js +128 -0
  78. package/dist/src/components/canvas/controllers/selection.controller.d.ts +85 -0
  79. package/dist/src/components/canvas/controllers/selection.controller.js +202 -0
  80. package/dist/src/components/canvas/controllers/touch.controller.d.ts +55 -0
  81. package/dist/src/components/canvas/controllers/touch.controller.js +299 -0
  82. package/dist/src/components/canvas/controllers/undo.controller.d.ts +100 -0
  83. package/dist/src/components/canvas/controllers/undo.controller.js +218 -0
  84. package/dist/src/components/canvas/controllers/viewport.controller.d.ts +91 -0
  85. package/dist/src/components/canvas/controllers/viewport.controller.js +287 -0
  86. package/dist/src/components/canvas/data-node/data-node-config.component.d.ts +67 -0
  87. package/dist/src/components/canvas/data-node/data-node-config.component.js +496 -0
  88. package/dist/src/components/canvas/data-node/data-node-fields.component.d.ts +198 -0
  89. package/dist/src/components/canvas/data-node/data-node-fields.component.js +931 -0
  90. package/dist/src/components/canvas/data-node/data-node-fields.style.d.ts +7 -0
  91. package/dist/src/components/canvas/data-node/data-node-fields.style.js +448 -0
  92. package/dist/src/components/canvas/data-node/data-node.types.d.ts +245 -0
  93. package/dist/src/components/canvas/data-node/data-node.types.js +158 -0
  94. package/dist/src/components/canvas/data-node/index.d.ts +9 -0
  95. package/dist/src/components/canvas/data-node/index.js +12 -0
  96. package/dist/src/components/canvas/data-node/schema-select.component.d.ts +36 -0
  97. package/dist/src/components/canvas/data-node/schema-select.component.js +196 -0
  98. package/dist/src/components/canvas/data-node/table-select.component.d.ts +38 -0
  99. package/dist/src/components/canvas/data-node/table-select.component.js +199 -0
  100. package/dist/src/components/canvas/index.d.ts +2 -0
  101. package/dist/src/components/canvas/index.js +3 -0
  102. package/dist/src/components/canvas/interfaces/canvas-host.interface.d.ts +91 -0
  103. package/dist/src/components/canvas/interfaces/canvas-host.interface.js +7 -0
  104. package/dist/src/components/canvas/interfaces/collaboration.interface.d.ts +58 -0
  105. package/dist/src/components/canvas/interfaces/collaboration.interface.js +10 -0
  106. package/dist/src/components/canvas/interfaces/index.d.ts +8 -0
  107. package/dist/src/components/canvas/interfaces/index.js +7 -0
  108. package/dist/src/components/canvas/templates/chatbot-panel.template.d.ts +28 -0
  109. package/dist/src/components/canvas/templates/chatbot-panel.template.js +49 -0
  110. package/dist/src/components/canvas/templates/config-panel.template.d.ts +22 -0
  111. package/dist/src/components/canvas/templates/config-panel.template.js +22 -0
  112. package/dist/src/components/canvas/templates/context-menu.template.d.ts +30 -0
  113. package/dist/src/components/canvas/templates/context-menu.template.js +80 -0
  114. package/dist/src/components/canvas/templates/edges.template.d.ts +41 -0
  115. package/dist/src/components/canvas/templates/edges.template.js +243 -0
  116. package/dist/src/components/canvas/templates/empty-state.template.d.ts +17 -0
  117. package/dist/src/components/canvas/templates/empty-state.template.js +25 -0
  118. package/dist/src/components/canvas/templates/frame.template.d.ts +24 -0
  119. package/dist/src/components/canvas/templates/frame.template.js +74 -0
  120. package/dist/src/components/canvas/templates/index.d.ts +18 -0
  121. package/dist/src/components/canvas/templates/index.js +30 -0
  122. package/dist/src/components/canvas/templates/palette.template.d.ts +27 -0
  123. package/dist/src/components/canvas/templates/palette.template.js +110 -0
  124. package/dist/src/components/canvas/templates/presence-bar.template.d.ts +18 -0
  125. package/dist/src/components/canvas/templates/presence-bar.template.js +60 -0
  126. package/dist/src/components/canvas/templates/remote-cursors.template.d.ts +19 -0
  127. package/dist/src/components/canvas/templates/remote-cursors.template.js +43 -0
  128. package/dist/src/components/canvas/templates/toolbar.template.d.ts +52 -0
  129. package/dist/src/components/canvas/templates/toolbar.template.js +118 -0
  130. package/dist/src/components/canvas/templates/wb-floating-toolbar.template.d.ts +30 -0
  131. package/dist/src/components/canvas/templates/wb-floating-toolbar.template.js +219 -0
  132. package/dist/src/components/canvas/templates/wb-sidebar.template.d.ts +23 -0
  133. package/dist/src/components/canvas/templates/wb-sidebar.template.js +152 -0
  134. package/dist/src/components/canvas/utils/variable-resolver.d.ts +71 -0
  135. package/dist/src/components/canvas/utils/variable-resolver.js +280 -0
  136. package/dist/src/components/canvas/whiteboard-canvas.component.d.ts +3 -1
  137. package/dist/src/components/canvas/whiteboard-canvas.component.js +19 -1
  138. package/dist/src/components/canvas/whiteboard-canvas.style.js +159 -138
  139. package/dist/src/components/canvas/whiteboard-node.component.d.ts +2 -1
  140. package/dist/src/components/canvas/whiteboard-node.component.js +2 -1
  141. package/dist/src/components/canvas/whiteboard-node.style.js +44 -44
  142. package/dist/src/components/canvas/workflow-canvas-only.d.ts +4 -0
  143. package/dist/src/components/canvas/workflow-canvas-only.js +5 -0
  144. package/dist/src/components/canvas/workflow-canvas.component.d.ts +3 -1
  145. package/dist/src/components/canvas/workflow-canvas.component.js +30 -2
  146. package/dist/src/components/canvas/workflow-canvas.style.js +794 -675
  147. package/dist/src/components/canvas/workflow-canvas.types.d.ts +113 -4
  148. package/dist/src/components/canvas/workflow-canvas.types.js +646 -3
  149. package/dist/src/components/canvas/workflow-node.component.d.ts +3 -2
  150. package/dist/src/components/canvas/workflow-node.component.js +5 -5
  151. package/dist/src/components/canvas/workflow-node.style.js +183 -181
  152. package/dist/src/components/card/bundle.js +43 -35
  153. package/dist/src/components/card/bundle.js.gz +0 -0
  154. package/dist/src/components/card/card.component.d.ts +6 -1
  155. package/dist/src/components/card/card.component.js +8 -2
  156. package/dist/src/components/card/card.style.js +26 -30
  157. package/dist/src/components/carousel/bundle.js +8 -8
  158. package/dist/src/components/carousel/bundle.js.gz +0 -0
  159. package/dist/src/components/carousel/carousel.component.d.ts +12 -0
  160. package/dist/src/components/carousel/carousel.component.js +16 -4
  161. package/dist/src/components/carousel/demo/carousel-demo.d.ts +6 -0
  162. package/dist/src/components/carousel/demo/carousel-demo.js +68 -0
  163. package/dist/src/components/chatbot/audio-compress.d.ts +26 -0
  164. package/dist/src/components/chatbot/audio-compress.js +84 -0
  165. package/dist/src/components/chatbot/bundle.js +690 -430
  166. package/dist/src/components/chatbot/bundle.js.gz +0 -0
  167. package/dist/src/components/chatbot/chatbot-audio.controller.d.ts +35 -0
  168. package/dist/src/components/chatbot/chatbot-audio.controller.js +160 -0
  169. package/dist/src/components/chatbot/chatbot.component.d.ts +14 -1
  170. package/dist/src/components/chatbot/chatbot.component.js +42 -2
  171. package/dist/src/components/chatbot/chatbot.style.js +418 -277
  172. package/dist/src/components/chatbot/chatbot.types.d.ts +8 -0
  173. package/dist/src/components/chatbot/controllers/index.d.ts +8 -0
  174. package/dist/src/components/chatbot/controllers/index.js +8 -0
  175. package/dist/src/components/chatbot/controllers/scroll.controller.d.ts +34 -0
  176. package/dist/src/components/chatbot/controllers/scroll.controller.js +43 -0
  177. package/dist/src/components/chatbot/core/chatbot-core.controller.d.ts +283 -0
  178. package/dist/src/components/chatbot/core/chatbot-core.controller.js +824 -0
  179. package/dist/src/components/chatbot/core/event-bus.d.ts +54 -0
  180. package/dist/src/components/chatbot/core/event-bus.js +102 -0
  181. package/dist/src/components/chatbot/core/index.d.ts +12 -0
  182. package/dist/src/components/chatbot/core/index.js +15 -0
  183. package/dist/src/components/chatbot/core/types.d.ts +403 -0
  184. package/dist/src/components/chatbot/core/types.js +16 -0
  185. package/dist/src/components/chatbot/locales/locale-codes.d.ts +14 -0
  186. package/dist/src/components/chatbot/locales/locale-codes.js +23 -0
  187. package/dist/src/components/chatbot/plugins/analytics-plugin.d.ts +23 -0
  188. package/dist/src/components/chatbot/plugins/analytics-plugin.js +52 -0
  189. package/dist/src/components/chatbot/plugins/artifact-plugin.d.ts +71 -0
  190. package/dist/src/components/chatbot/plugins/artifact-plugin.js +313 -0
  191. package/dist/src/components/chatbot/plugins/chat-plugin.d.ts +44 -0
  192. package/dist/src/components/chatbot/plugins/chat-plugin.js +58 -0
  193. package/dist/src/components/chatbot/plugins/flight-card-plugin.d.ts +116 -0
  194. package/dist/src/components/chatbot/plugins/flight-card-plugin.js +594 -0
  195. package/dist/src/components/chatbot/plugins/flow-diagram-plugin.d.ts +23 -0
  196. package/dist/src/components/chatbot/plugins/flow-diagram-plugin.js +495 -0
  197. package/dist/src/components/chatbot/plugins/index.d.ts +16 -0
  198. package/dist/src/components/chatbot/plugins/index.js +17 -0
  199. package/dist/src/components/chatbot/plugins/json-graph-renderer-plugin.d.ts +43 -0
  200. package/dist/src/components/chatbot/plugins/json-graph-renderer-plugin.js +166 -0
  201. package/dist/src/components/chatbot/plugins/markdown-plugin.d.ts +26 -0
  202. package/dist/src/components/chatbot/plugins/markdown-plugin.js +68 -0
  203. package/dist/src/components/chatbot/plugins/persistence-plugin.d.ts +30 -0
  204. package/dist/src/components/chatbot/plugins/persistence-plugin.js +91 -0
  205. package/dist/src/components/chatbot/plugins/print-job-card-plugin.d.ts +110 -0
  206. package/dist/src/components/chatbot/plugins/print-job-card-plugin.js +505 -0
  207. package/dist/src/components/chatbot/plugins/selection-card-plugin.d.ts +111 -0
  208. package/dist/src/components/chatbot/plugins/selection-card-plugin.js +318 -0
  209. package/dist/src/components/chatbot/providers/custom-api-provider.d.ts +63 -0
  210. package/dist/src/components/chatbot/providers/custom-api-provider.js +240 -0
  211. package/dist/src/components/chatbot/providers/index.d.ts +16 -0
  212. package/dist/src/components/chatbot/providers/index.js +13 -0
  213. package/dist/src/components/chatbot/providers/mock-provider.d.ts +154 -0
  214. package/dist/src/components/chatbot/providers/mock-provider.js +411 -0
  215. package/dist/src/components/chatbot/providers/native-ws-provider.d.ts +184 -0
  216. package/dist/src/components/chatbot/providers/native-ws-provider.js +544 -0
  217. package/dist/src/components/chatbot/providers/openai-provider.d.ts +32 -0
  218. package/dist/src/components/chatbot/providers/openai-provider.js +246 -0
  219. package/dist/src/components/chatbot/providers/socket-provider.d.ts +159 -0
  220. package/dist/src/components/chatbot/providers/socket-provider.js +390 -0
  221. package/dist/src/components/chatbot/providers/workflow-socket-provider.d.ts +116 -0
  222. package/dist/src/components/chatbot/providers/workflow-socket-provider.js +484 -0
  223. package/dist/src/components/chatbot/storage/index.d.ts +7 -0
  224. package/dist/src/components/chatbot/storage/index.js +8 -0
  225. package/dist/src/components/chatbot/storage/storage-implementations.d.ts +43 -0
  226. package/dist/src/components/chatbot/storage/storage-implementations.js +179 -0
  227. package/dist/src/components/chatbot/templates/artifact-panel.template.d.ts +22 -0
  228. package/dist/src/components/chatbot/templates/artifact-panel.template.js +81 -0
  229. package/dist/src/components/chatbot/templates/chatbot-main.template.d.ts +49 -0
  230. package/dist/src/components/chatbot/templates/chatbot-main.template.js +115 -0
  231. package/dist/src/components/chatbot/templates/file-preview-modal.template.d.ts +19 -0
  232. package/dist/src/components/chatbot/templates/file-preview-modal.template.js +74 -0
  233. package/dist/src/components/chatbot/templates/file-upload-area.template.d.ts +19 -0
  234. package/dist/src/components/chatbot/templates/file-upload-area.template.js +29 -0
  235. package/dist/src/components/chatbot/templates/index.d.ts +15 -0
  236. package/dist/src/components/chatbot/templates/index.js +15 -0
  237. package/dist/src/components/chatbot/templates/input-box.template.d.ts +49 -0
  238. package/dist/src/components/chatbot/templates/input-box.template.js +317 -0
  239. package/dist/src/components/chatbot/templates/message.template.d.ts +31 -0
  240. package/dist/src/components/chatbot/templates/message.template.js +214 -0
  241. package/dist/src/components/chatbot/templates/suggestion.template.d.ts +20 -0
  242. package/dist/src/components/chatbot/templates/suggestion.template.js +40 -0
  243. package/dist/src/components/chatbot/templates/thread-sidebar.template.d.ts +24 -0
  244. package/dist/src/components/chatbot/templates/thread-sidebar.template.js +160 -0
  245. package/dist/src/components/chatbot/templates/url-modal.template.d.ts +25 -0
  246. package/dist/src/components/chatbot/templates/url-modal.template.js +100 -0
  247. package/dist/src/components/chatbot/utils/format.d.ts +23 -0
  248. package/dist/src/components/chatbot/utils/format.js +84 -0
  249. package/dist/src/components/chatbot/utils/index.d.ts +7 -0
  250. package/dist/src/components/chatbot/utils/index.js +7 -0
  251. package/dist/src/components/checkbox/bundle.js +86 -245
  252. package/dist/src/components/checkbox/bundle.js.gz +0 -0
  253. package/dist/src/components/checkbox/checkbox.component.d.ts +5 -2
  254. package/dist/src/components/checkbox/checkbox.component.js +11 -13
  255. package/dist/src/components/checkbox/checkbox.style.js +56 -231
  256. package/dist/src/components/checkbox/mixins/checkbox-event-mixin.d.ts +87 -0
  257. package/dist/src/components/checkbox/mixins/checkbox-event-mixin.js +94 -0
  258. package/dist/src/components/checkbox/mixins/checkbox-focus-mixin.d.ts +55 -0
  259. package/dist/src/components/checkbox/mixins/checkbox-focus-mixin.js +57 -0
  260. package/dist/src/components/checkbox/mixins/index.d.ts +10 -0
  261. package/dist/src/components/checkbox/mixins/index.js +8 -0
  262. package/dist/src/components/checkbox/test/checkbox_test.d.ts +2 -0
  263. package/dist/src/components/checkbox/test/checkbox_test.js +88 -0
  264. package/dist/src/components/code-editor/bundle.js +151 -25
  265. package/dist/src/components/code-editor/bundle.js.gz +0 -0
  266. package/dist/src/components/code-editor/code-editor.component.d.ts +18 -56
  267. package/dist/src/components/code-editor/code-editor.component.js +141 -394
  268. package/dist/src/components/code-editor/code-editor.style.js +139 -15
  269. package/dist/src/components/collapse/bundle.js +97 -84
  270. package/dist/src/components/collapse/bundle.js.gz +0 -0
  271. package/dist/src/components/collapse/collapse.component.d.ts +7 -1
  272. package/dist/src/components/collapse/collapse.component.js +11 -2
  273. package/dist/src/components/collapse/collapse.style.js +60 -60
  274. package/dist/src/components/collapse/controllers/accordion.controller.d.ts +60 -0
  275. package/dist/src/components/collapse/controllers/accordion.controller.js +132 -0
  276. package/dist/src/components/collapse/controllers/animation.controller.d.ts +40 -0
  277. package/dist/src/components/collapse/controllers/animation.controller.js +125 -0
  278. package/dist/src/components/collapse/controllers/base.controller.d.ts +48 -0
  279. package/dist/src/components/collapse/controllers/base.controller.js +69 -0
  280. package/dist/src/components/collapse/controllers/index.d.ts +12 -0
  281. package/dist/src/components/collapse/controllers/index.js +11 -0
  282. package/dist/src/components/collapse/controllers/keyboard.controller.d.ts +73 -0
  283. package/dist/src/components/collapse/controllers/keyboard.controller.js +186 -0
  284. package/dist/src/components/colorpicker/bundle.js +85 -48
  285. package/dist/src/components/colorpicker/bundle.js.gz +0 -0
  286. package/dist/src/components/colorpicker/color-holder.component.d.ts +2 -4
  287. package/dist/src/components/colorpicker/color-holder.component.js +5 -6
  288. package/dist/src/components/colorpicker/color-holder.style.js +11 -11
  289. package/dist/src/components/colorpicker/color-picker.component.d.ts +2 -1
  290. package/dist/src/components/colorpicker/color-picker.component.js +1 -0
  291. package/dist/src/components/colorpicker/color-picker.style.js +12 -12
  292. package/dist/src/components/colorpicker/controllers/base.controller.d.ts +14 -0
  293. package/dist/src/components/colorpicker/controllers/base.controller.js +15 -0
  294. package/dist/src/components/colorpicker/controllers/dropdown.controller.d.ts +60 -0
  295. package/dist/src/components/colorpicker/controllers/dropdown.controller.js +243 -0
  296. package/dist/src/components/colorpicker/controllers/event.controller.d.ts +46 -0
  297. package/dist/src/components/colorpicker/controllers/event.controller.js +130 -0
  298. package/dist/src/components/colorpicker/controllers/index.d.ts +4 -0
  299. package/dist/src/components/colorpicker/controllers/index.js +4 -0
  300. package/dist/src/components/colorpicker/default-color-sets.component.d.ts +2 -2
  301. package/dist/src/components/colorpicker/default-color-sets.component.js +4 -3
  302. package/dist/src/components/colorpicker/default-color-sets.style.js +5 -5
  303. package/dist/src/components/colorpicker/interfaces/index.d.ts +60 -0
  304. package/dist/src/components/colorpicker/interfaces/index.js +2 -0
  305. package/dist/src/components/container/bundle.js +24 -14
  306. package/dist/src/components/container/bundle.js.gz +0 -0
  307. package/dist/src/components/container/container.component.d.ts +4 -1
  308. package/dist/src/components/container/container.component.js +7 -5
  309. package/dist/src/components/container/container.style.js +9 -9
  310. package/dist/src/components/datepicker/bundle.js +193 -177
  311. package/dist/src/components/datepicker/bundle.js.gz +0 -0
  312. package/dist/src/components/datepicker/controllers/calendar.controller.d.ts +78 -0
  313. package/dist/src/components/datepicker/controllers/calendar.controller.js +225 -0
  314. package/dist/src/components/datepicker/controllers/index.d.ts +11 -0
  315. package/dist/src/components/datepicker/controllers/index.js +11 -0
  316. package/dist/src/components/datepicker/controllers/keyboard.controller.d.ts +96 -0
  317. package/dist/src/components/datepicker/controllers/keyboard.controller.js +246 -0
  318. package/dist/src/components/datepicker/controllers/month-year-dropdown.controller.d.ts +48 -0
  319. package/dist/src/components/datepicker/controllers/month-year-dropdown.controller.js +92 -0
  320. package/dist/src/components/datepicker/controllers/positioning.controller.d.ts +82 -0
  321. package/dist/src/components/datepicker/controllers/positioning.controller.js +247 -0
  322. package/dist/src/components/datepicker/controllers/selection.controller.d.ts +92 -0
  323. package/dist/src/components/datepicker/controllers/selection.controller.js +267 -0
  324. package/dist/src/components/datepicker/datepicker.component.d.ts +2 -1
  325. package/dist/src/components/datepicker/datepicker.component.js +1 -0
  326. package/dist/src/components/datepicker/datepicker.style.js +65 -65
  327. package/dist/src/components/datepicker/datepicker.style.variables.js +91 -91
  328. package/dist/src/components/datepicker/interfaces/base-controller.interface.d.ts +40 -0
  329. package/dist/src/components/datepicker/interfaces/base-controller.interface.js +7 -0
  330. package/dist/src/components/datepicker/interfaces/datepicker-controllers.interface.d.ts +112 -0
  331. package/dist/src/components/datepicker/interfaces/datepicker-controllers.interface.js +7 -0
  332. package/dist/src/components/datepicker/interfaces/index.d.ts +8 -0
  333. package/dist/src/components/datepicker/interfaces/index.js +7 -0
  334. package/dist/src/components/datepicker/templates/days.template.d.ts +4 -0
  335. package/dist/src/components/datepicker/templates/days.template.js +40 -0
  336. package/dist/src/components/datepicker/templates/dropdown.template.d.ts +10 -0
  337. package/dist/src/components/datepicker/templates/dropdown.template.js +50 -0
  338. package/dist/src/components/datepicker/templates/headers.template.d.ts +2 -0
  339. package/dist/src/components/datepicker/templates/headers.template.js +5 -0
  340. package/dist/src/components/datepicker/templates/months.template.d.ts +6 -0
  341. package/dist/src/components/datepicker/templates/months.template.js +10 -0
  342. package/dist/src/components/datepicker/templates/years.template.d.ts +6 -0
  343. package/dist/src/components/datepicker/templates/years.template.js +11 -0
  344. package/dist/src/components/datepicker/test/datepicker_test.d.ts +2 -0
  345. package/dist/src/components/datepicker/test/datepicker_test.js +134 -0
  346. package/dist/src/components/datepicker/utils/day.helper.d.ts +5 -0
  347. package/dist/src/components/datepicker/utils/day.helper.js +53 -0
  348. package/dist/src/components/datepicker/utils/formatter.d.ts +2 -0
  349. package/dist/src/components/datepicker/utils/formatter.js +9 -0
  350. package/dist/src/components/datepicker/utils/index.d.ts +11 -0
  351. package/dist/src/components/datepicker/utils/index.js +11 -0
  352. package/dist/src/components/datepicker/utils/locale.helper.d.ts +144 -0
  353. package/dist/src/components/datepicker/utils/locale.helper.js +151 -0
  354. package/dist/src/components/datepicker/utils/month.helper.d.ts +3 -0
  355. package/dist/src/components/datepicker/utils/month.helper.js +24 -0
  356. package/dist/src/components/datepicker/utils/string.helper.d.ts +2 -0
  357. package/dist/src/components/datepicker/utils/string.helper.js +4 -0
  358. package/dist/src/components/db-connection-select/bundle.js +7 -6
  359. package/dist/src/components/db-connection-select/bundle.js.gz +0 -0
  360. package/dist/src/components/db-connection-select/db-connection-select.component.d.ts +3 -0
  361. package/dist/src/components/db-connection-select/db-connection-select.component.js +4 -0
  362. package/dist/src/components/divider/bundle.js +61 -35
  363. package/dist/src/components/divider/bundle.js.gz +0 -0
  364. package/dist/src/components/divider/divider.component.d.ts +4 -6
  365. package/dist/src/components/divider/divider.component.js +10 -14
  366. package/dist/src/components/divider/divider.style.js +41 -31
  367. package/dist/src/components/document/bundle.js +50 -48
  368. package/dist/src/components/document/bundle.js.gz +0 -0
  369. package/dist/src/components/document/demo/document-demo.d.ts +12 -0
  370. package/dist/src/components/document/demo/document-demo.js +40 -0
  371. package/dist/src/components/document/document.component.d.ts +12 -1
  372. package/dist/src/components/document/document.component.js +18 -6
  373. package/dist/src/components/document/document.style.js +21 -36
  374. package/dist/src/components/dropdown/bundle.js +117 -101
  375. package/dist/src/components/dropdown/bundle.js.gz +0 -0
  376. package/dist/src/components/dropdown/controllers/base.controller.d.ts +18 -0
  377. package/dist/src/components/dropdown/controllers/base.controller.js +22 -0
  378. package/dist/src/components/dropdown/controllers/dropdown.controller.d.ts +50 -0
  379. package/dist/src/components/dropdown/controllers/dropdown.controller.js +408 -0
  380. package/dist/src/components/dropdown/controllers/index.d.ts +3 -0
  381. package/dist/src/components/dropdown/controllers/index.js +3 -0
  382. package/dist/src/components/dropdown/dropdown.component.d.ts +2 -1
  383. package/dist/src/components/dropdown/dropdown.component.js +1 -0
  384. package/dist/src/components/dropdown/dropdown.style.js +68 -68
  385. package/dist/src/components/dropdown/interfaces/controller-interfaces.d.ts +79 -0
  386. package/dist/src/components/dropdown/interfaces/controller-interfaces.js +2 -0
  387. package/dist/src/components/dropdown/interfaces/index.d.ts +2 -0
  388. package/dist/src/components/dropdown/interfaces/index.js +2 -0
  389. package/dist/src/components/dropdown/templates/nr-dropdown-item.d.ts +12 -0
  390. package/dist/src/components/dropdown/templates/nr-dropdown-item.js +55 -0
  391. package/dist/src/components/dropdown/templates/nr-dropdown-item.style.d.ts +2 -0
  392. package/dist/src/components/dropdown/templates/nr-dropdown-item.style.js +34 -0
  393. package/dist/src/components/dropdown/templates/nr-dropdown-menu.d.ts +18 -0
  394. package/dist/src/components/dropdown/templates/nr-dropdown-menu.js +70 -0
  395. package/dist/src/components/dropdown/templates/nr-dropdown-menu.style.d.ts +2 -0
  396. package/dist/src/components/dropdown/templates/nr-dropdown-menu.style.js +49 -0
  397. package/dist/src/components/file-upload/bundle.js +82 -76
  398. package/dist/src/components/file-upload/bundle.js.gz +0 -0
  399. package/dist/src/components/file-upload/demo/file-upload-demo.d.ts +18 -0
  400. package/dist/src/components/file-upload/demo/file-upload-demo.js +156 -0
  401. package/dist/src/components/file-upload/file-upload.component.d.ts +2 -1
  402. package/dist/src/components/file-upload/file-upload.component.js +1 -0
  403. package/dist/src/components/file-upload/styles.js +59 -59
  404. package/dist/src/components/flex/bundle.js +18 -8
  405. package/dist/src/components/flex/bundle.js.gz +0 -0
  406. package/dist/src/components/flex/flex.component.d.ts +4 -1
  407. package/dist/src/components/flex/flex.component.js +7 -4
  408. package/dist/src/components/flex/flex.style.js +2 -2
  409. package/dist/src/components/form/bundle.js +22 -10
  410. package/dist/src/components/form/bundle.js.gz +0 -0
  411. package/dist/src/components/form/controllers/submission.controller.d.ts +60 -0
  412. package/dist/src/components/form/controllers/submission.controller.js +220 -0
  413. package/dist/src/components/form/controllers/validation.controller.d.ts +87 -0
  414. package/dist/src/components/form/controllers/validation.controller.js +236 -0
  415. package/dist/src/components/form/form.component.d.ts +4 -1
  416. package/dist/src/components/form/form.component.js +5 -1
  417. package/dist/src/components/form/form.style.js +2 -2
  418. package/dist/src/components/form/interfaces/validation.interface.d.ts +118 -0
  419. package/dist/src/components/form/interfaces/validation.interface.js +7 -0
  420. package/dist/src/components/grid/bundle.js +26 -14
  421. package/dist/src/components/grid/bundle.js.gz +0 -0
  422. package/dist/src/components/grid/col.component.d.ts +4 -1
  423. package/dist/src/components/grid/col.component.js +4 -1
  424. package/dist/src/components/grid/col.style.js +2 -2
  425. package/dist/src/components/grid/row.component.d.ts +4 -1
  426. package/dist/src/components/grid/row.component.js +4 -1
  427. package/dist/src/components/grid/row.style.js +2 -2
  428. package/dist/src/components/icon/bundle.js +78 -252
  429. package/dist/src/components/icon/bundle.js.gz +0 -0
  430. package/dist/src/components/icon/icon-paths.d.ts +2 -0
  431. package/dist/src/components/icon/icon-paths.js +141 -0
  432. package/dist/src/components/icon/icon.component.d.ts +10 -12
  433. package/dist/src/components/icon/icon.component.js +42 -93
  434. package/dist/src/components/icon/icon.style.js +42 -130
  435. package/dist/src/components/icon/icon.variables.js +9 -9
  436. package/dist/src/components/icon/mixins/clickable-mixin.d.ts +57 -0
  437. package/dist/src/components/icon/mixins/clickable-mixin.js +111 -0
  438. package/dist/src/components/icon/mixins/index.d.ts +7 -0
  439. package/dist/src/components/icon/mixins/index.js +7 -0
  440. package/dist/src/components/iconpicker/bundle.js +859 -1511
  441. package/dist/src/components/iconpicker/bundle.js.gz +0 -0
  442. package/dist/src/components/iconpicker/controllers/event.controller.d.ts +38 -0
  443. package/dist/src/components/iconpicker/controllers/event.controller.js +68 -0
  444. package/dist/src/components/iconpicker/controllers/index.d.ts +9 -0
  445. package/dist/src/components/iconpicker/controllers/index.js +9 -0
  446. package/dist/src/components/iconpicker/controllers/search.controller.d.ts +34 -0
  447. package/dist/src/components/iconpicker/controllers/search.controller.js +55 -0
  448. package/dist/src/components/iconpicker/controllers/selection.controller.d.ts +27 -0
  449. package/dist/src/components/iconpicker/controllers/selection.controller.js +39 -0
  450. package/dist/src/components/iconpicker/icon-picker.component.d.ts +2 -1
  451. package/dist/src/components/iconpicker/icon-picker.component.js +1 -0
  452. package/dist/src/components/iconpicker/icon-picker.style.js +13 -13
  453. package/dist/src/components/iconpicker/interfaces/icon-picker.interface.d.ts +13 -0
  454. package/dist/src/components/iconpicker/interfaces/icon-picker.interface.js +7 -0
  455. package/dist/src/components/iconpicker/interfaces/index.d.ts +7 -0
  456. package/dist/src/components/iconpicker/interfaces/index.js +7 -0
  457. package/dist/src/components/iconpicker/utils/icon-filter.utils.d.ts +29 -0
  458. package/dist/src/components/iconpicker/utils/icon-filter.utils.js +96 -0
  459. package/dist/src/components/iconpicker/utils/icon-loader.utils.d.ts +39 -0
  460. package/dist/src/components/iconpicker/utils/icon-loader.utils.js +115 -0
  461. package/dist/src/components/iconpicker/utils/index.d.ts +8 -0
  462. package/dist/src/components/iconpicker/utils/index.js +8 -0
  463. package/dist/src/components/iconpicker/utils/lucide-icons.d.ts +10 -0
  464. package/dist/src/components/iconpicker/utils/lucide-icons.js +1624 -0
  465. package/dist/src/components/image/bundle.js +43 -33
  466. package/dist/src/components/image/bundle.js.gz +0 -0
  467. package/dist/src/components/image/image.component.d.ts +10 -1
  468. package/dist/src/components/image/image.component.js +13 -3
  469. package/dist/src/components/image/image.style.js +19 -26
  470. package/dist/src/components/input/bundle.js +420 -644
  471. package/dist/src/components/input/bundle.js.gz +0 -0
  472. package/dist/src/components/input/controllers/base.controller.d.ts +35 -0
  473. package/dist/src/components/input/controllers/base.controller.js +13 -0
  474. package/dist/src/components/input/controllers/event.controller.d.ts +111 -0
  475. package/dist/src/components/input/controllers/event.controller.js +355 -0
  476. package/dist/src/components/input/controllers/index.d.ts +14 -0
  477. package/dist/src/components/input/controllers/index.js +10 -0
  478. package/dist/src/components/input/controllers/state.controller.d.ts +153 -0
  479. package/dist/src/components/input/controllers/state.controller.js +245 -0
  480. package/dist/src/components/input/controllers/validation.controller.d.ts +205 -0
  481. package/dist/src/components/input/controllers/validation.controller.js +698 -0
  482. package/dist/src/components/input/input.component.d.ts +16 -3
  483. package/dist/src/components/input/input.component.js +43 -27
  484. package/dist/src/components/input/input.style.d.ts +1 -1
  485. package/dist/src/components/input/input.style.js +331 -634
  486. package/dist/src/components/input/mixins/focus-mixin.d.ts +60 -0
  487. package/dist/src/components/input/mixins/focus-mixin.js +65 -0
  488. package/dist/src/components/input/mixins/index.d.ts +12 -0
  489. package/dist/src/components/input/mixins/index.js +9 -0
  490. package/dist/src/components/input/mixins/number-mixin.d.ts +51 -0
  491. package/dist/src/components/input/mixins/number-mixin.js +128 -0
  492. package/dist/src/components/input/mixins/selection-mixin.d.ts +57 -0
  493. package/dist/src/components/input/mixins/selection-mixin.js +80 -0
  494. package/dist/src/components/input/test/nr-input_test.d.ts +2 -0
  495. package/dist/src/components/input/test/nr-input_test.js +159 -0
  496. package/dist/src/components/input/utils/index.d.ts +8 -0
  497. package/dist/src/components/input/utils/index.js +8 -0
  498. package/dist/src/components/input/utils/input-renderers.d.ts +54 -0
  499. package/dist/src/components/input/utils/input-renderers.js +178 -0
  500. package/dist/src/components/input/utils/input-validation.utils.d.ts +26 -0
  501. package/dist/src/components/input/utils/input-validation.utils.js +103 -0
  502. package/dist/src/components/kv-secret-select/bundle.js +2 -1
  503. package/dist/src/components/kv-secret-select/bundle.js.gz +0 -0
  504. package/dist/src/components/kv-secret-select/kv-secret-select.component.d.ts +3 -0
  505. package/dist/src/components/kv-secret-select/kv-secret-select.component.js +4 -0
  506. package/dist/src/components/label/bundle.js +37 -60
  507. package/dist/src/components/label/bundle.js.gz +0 -0
  508. package/dist/src/components/label/label.component.d.ts +8 -4
  509. package/dist/src/components/label/label.component.js +9 -14
  510. package/dist/src/components/label/label.style.js +17 -25
  511. package/dist/src/components/label/label.style.variables.js +18 -18
  512. package/dist/src/components/layout/bundle.js +86 -70
  513. package/dist/src/components/layout/bundle.js.gz +0 -0
  514. package/dist/src/components/layout/content.component.d.ts +2 -1
  515. package/dist/src/components/layout/content.component.js +2 -1
  516. package/dist/src/components/layout/content.style.js +3 -3
  517. package/dist/src/components/layout/footer.component.d.ts +2 -1
  518. package/dist/src/components/layout/footer.component.js +3 -2
  519. package/dist/src/components/layout/footer.style.js +7 -7
  520. package/dist/src/components/layout/header.component.d.ts +2 -1
  521. package/dist/src/components/layout/header.component.js +3 -2
  522. package/dist/src/components/layout/header.style.js +7 -7
  523. package/dist/src/components/layout/layout.component.d.ts +4 -7
  524. package/dist/src/components/layout/layout.component.js +9 -22
  525. package/dist/src/components/layout/layout.style.js +1 -1
  526. package/dist/src/components/layout/sider.component.d.ts +3 -1
  527. package/dist/src/components/layout/sider.component.js +3 -1
  528. package/dist/src/components/layout/sider.style.js +29 -29
  529. package/dist/src/components/menu/bundle.js +135 -125
  530. package/dist/src/components/menu/bundle.js.gz +0 -0
  531. package/dist/src/components/menu/controllers/accessibility.controller.d.ts +86 -0
  532. package/dist/src/components/menu/controllers/accessibility.controller.js +235 -0
  533. package/dist/src/components/menu/controllers/base.controller.d.ts +41 -0
  534. package/dist/src/components/menu/controllers/base.controller.js +61 -0
  535. package/dist/src/components/menu/controllers/index.d.ts +10 -0
  536. package/dist/src/components/menu/controllers/index.js +10 -0
  537. package/dist/src/components/menu/controllers/keyboard.controller.d.ts +84 -0
  538. package/dist/src/components/menu/controllers/keyboard.controller.js +328 -0
  539. package/dist/src/components/menu/controllers/state.controller.d.ts +106 -0
  540. package/dist/src/components/menu/controllers/state.controller.js +249 -0
  541. package/dist/src/components/menu/interfaces/controller.interface.d.ts +51 -0
  542. package/dist/src/components/menu/interfaces/controller.interface.js +7 -0
  543. package/dist/src/components/menu/interfaces/index.d.ts +7 -0
  544. package/dist/src/components/menu/interfaces/index.js +7 -0
  545. package/dist/src/components/menu/menu.component.d.ts +2 -1
  546. package/dist/src/components/menu/menu.component.js +1 -0
  547. package/dist/src/components/menu/menu.style.js +87 -87
  548. package/dist/src/components/modal/bundle.js +105 -96
  549. package/dist/src/components/modal/bundle.js.gz +0 -0
  550. package/dist/src/components/modal/controllers/index.d.ts +8 -0
  551. package/dist/src/components/modal/controllers/index.js +8 -0
  552. package/dist/src/components/modal/controllers/modal-drag-controller.d.ts +39 -0
  553. package/dist/src/components/modal/controllers/modal-drag-controller.js +108 -0
  554. package/dist/src/components/modal/controllers/modal-keyboard-controller.d.ts +36 -0
  555. package/dist/src/components/modal/controllers/modal-keyboard-controller.js +128 -0
  556. package/dist/src/components/modal/modal.component.d.ts +2 -1
  557. package/dist/src/components/modal/modal.component.js +1 -0
  558. package/dist/src/components/modal/modal.style.js +69 -71
  559. package/dist/src/components/panel/bundle.js +190 -391
  560. package/dist/src/components/panel/bundle.js.gz +0 -0
  561. package/dist/src/components/panel/controllers/index.d.ts +8 -0
  562. package/dist/src/components/panel/controllers/index.js +8 -0
  563. package/dist/src/components/panel/controllers/panel-drag-controller.d.ts +40 -0
  564. package/dist/src/components/panel/controllers/panel-drag-controller.js +118 -0
  565. package/dist/src/components/panel/controllers/panel-resize-controller.d.ts +37 -0
  566. package/dist/src/components/panel/controllers/panel-resize-controller.js +124 -0
  567. package/dist/src/components/panel/panel.component.d.ts +2 -1
  568. package/dist/src/components/panel/panel.component.js +1 -0
  569. package/dist/src/components/panel/panel.style.js +65 -65
  570. package/dist/src/components/popconfirm/bundle.js +107 -93
  571. package/dist/src/components/popconfirm/bundle.js.gz +0 -0
  572. package/dist/src/components/popconfirm/popconfirm-manager.component.d.ts +2 -1
  573. package/dist/src/components/popconfirm/popconfirm-manager.component.js +1 -0
  574. package/dist/src/components/popconfirm/popconfirm-manager.style.js +16 -16
  575. package/dist/src/components/popconfirm/popconfirm.component.d.ts +2 -1
  576. package/dist/src/components/popconfirm/popconfirm.component.js +9 -5
  577. package/dist/src/components/popconfirm/popconfirm.style.js +43 -43
  578. package/dist/src/components/presence/bundle.js +528 -0
  579. package/dist/src/components/presence/bundle.js.gz +0 -0
  580. package/dist/src/components/presence/index.d.ts +10 -0
  581. package/dist/src/components/presence/index.js +10 -0
  582. package/dist/src/components/presence/presence-avatars.component.d.ts +40 -0
  583. package/dist/src/components/presence/presence-avatars.component.js +83 -0
  584. package/dist/src/components/presence/presence-avatars.style.d.ts +7 -0
  585. package/dist/src/components/presence/presence-avatars.style.js +105 -0
  586. package/dist/src/components/presence/presence-chat.component.d.ts +53 -0
  587. package/dist/src/components/presence/presence-chat.component.js +228 -0
  588. package/dist/src/components/presence/presence-chat.style.d.ts +7 -0
  589. package/dist/src/components/presence/presence-chat.style.js +248 -0
  590. package/dist/src/components/presence/presence.component.d.ts +71 -0
  591. package/dist/src/components/presence/presence.component.js +263 -0
  592. package/dist/src/components/presence/presence.style.d.ts +7 -0
  593. package/dist/src/components/presence/presence.style.js +12 -0
  594. package/dist/src/components/presence/presence.types.d.ts +31 -0
  595. package/dist/src/components/presence/presence.types.js +7 -0
  596. package/dist/src/components/presence/react.d.ts +24 -0
  597. package/dist/src/components/presence/react.js +41 -0
  598. package/dist/src/components/radio/bundle.js +56 -86
  599. package/dist/src/components/radio/bundle.js.gz +0 -0
  600. package/dist/src/components/radio/radio.component.d.ts +8 -2
  601. package/dist/src/components/radio/radio.component.js +17 -9
  602. package/dist/src/components/radio/radio.style.js +30 -77
  603. package/dist/src/components/radio-group/bundle.js +125 -89
  604. package/dist/src/components/radio-group/bundle.js.gz +0 -0
  605. package/dist/src/components/radio-group/controllers/focus.controller.d.ts +98 -0
  606. package/dist/src/components/radio-group/controllers/focus.controller.js +216 -0
  607. package/dist/src/components/radio-group/controllers/group.controller.d.ts +140 -0
  608. package/dist/src/components/radio-group/controllers/group.controller.js +179 -0
  609. package/dist/src/components/radio-group/controllers/index.d.ts +11 -0
  610. package/dist/src/components/radio-group/controllers/index.js +11 -0
  611. package/dist/src/components/radio-group/controllers/keyboard.controller.d.ts +24 -0
  612. package/dist/src/components/radio-group/controllers/keyboard.controller.js +93 -0
  613. package/dist/src/components/radio-group/controllers/ripple.controller.d.ts +59 -0
  614. package/dist/src/components/radio-group/controllers/ripple.controller.js +208 -0
  615. package/dist/src/components/radio-group/controllers/validation.controller.d.ts +73 -0
  616. package/dist/src/components/radio-group/controllers/validation.controller.js +108 -0
  617. package/dist/src/components/radio-group/interfaces/base-controller.interface.d.ts +75 -0
  618. package/dist/src/components/radio-group/interfaces/base-controller.interface.js +7 -0
  619. package/dist/src/components/radio-group/interfaces/focus-controller.interface.d.ts +40 -0
  620. package/dist/src/components/radio-group/interfaces/focus-controller.interface.js +7 -0
  621. package/dist/src/components/radio-group/interfaces/index.d.ts +11 -0
  622. package/dist/src/components/radio-group/interfaces/index.js +7 -0
  623. package/dist/src/components/radio-group/interfaces/ripple-controller.interface.d.ts +31 -0
  624. package/dist/src/components/radio-group/interfaces/ripple-controller.interface.js +7 -0
  625. package/dist/src/components/radio-group/interfaces/selection-controller.interface.d.ts +45 -0
  626. package/dist/src/components/radio-group/interfaces/selection-controller.interface.js +7 -0
  627. package/dist/src/components/radio-group/interfaces/validation-controller.interface.d.ts +48 -0
  628. package/dist/src/components/radio-group/interfaces/validation-controller.interface.js +7 -0
  629. package/dist/src/components/radio-group/radio-group.component.d.ts +5 -1
  630. package/dist/src/components/radio-group/radio-group.component.js +18 -10
  631. package/dist/src/components/radio-group/radio-group.style.js +44 -44
  632. package/dist/src/components/radio-group/test/radio_test.d.ts +2 -0
  633. package/dist/src/components/radio-group/test/radio_test.js +79 -0
  634. package/dist/src/components/select/bundle.js +260 -367
  635. package/dist/src/components/select/bundle.js.gz +0 -0
  636. package/dist/src/components/select/controllers/base.controller.d.ts +10 -0
  637. package/dist/src/components/select/controllers/base.controller.js +8 -0
  638. package/dist/src/components/select/controllers/dropdown.controller.d.ts +76 -0
  639. package/dist/src/components/select/controllers/dropdown.controller.js +281 -0
  640. package/dist/src/components/select/controllers/event.controller.d.ts +54 -0
  641. package/dist/src/components/select/controllers/event.controller.js +113 -0
  642. package/dist/src/components/select/controllers/focus.controller.d.ts +79 -0
  643. package/dist/src/components/select/controllers/focus.controller.js +230 -0
  644. package/dist/src/components/select/controllers/index.d.ts +9 -0
  645. package/dist/src/components/select/controllers/index.js +9 -0
  646. package/dist/src/components/select/controllers/keyboard.controller.d.ts +75 -0
  647. package/dist/src/components/select/controllers/keyboard.controller.js +369 -0
  648. package/dist/src/components/select/controllers/search.controller.d.ts +71 -0
  649. package/dist/src/components/select/controllers/search.controller.js +167 -0
  650. package/dist/src/components/select/controllers/selection.controller.d.ts +67 -0
  651. package/dist/src/components/select/controllers/selection.controller.js +217 -0
  652. package/dist/src/components/select/controllers/validation.controller.d.ts +66 -0
  653. package/dist/src/components/select/controllers/validation.controller.js +189 -0
  654. package/dist/src/components/select/interfaces/base-controller.interface.d.ts +147 -0
  655. package/dist/src/components/select/interfaces/base-controller.interface.js +2 -0
  656. package/dist/src/components/select/interfaces/controller-interfaces.d.ts +94 -0
  657. package/dist/src/components/select/interfaces/controller-interfaces.js +11 -0
  658. package/dist/src/components/select/interfaces/index.d.ts +3 -0
  659. package/dist/src/components/select/interfaces/index.js +3 -0
  660. package/dist/src/components/select/select.component.d.ts +12 -17
  661. package/dist/src/components/select/select.component.js +35 -35
  662. package/dist/src/components/select/select.style.js +184 -324
  663. package/dist/src/components/skeleton/bundle.js +82 -162
  664. package/dist/src/components/skeleton/bundle.js.gz +0 -0
  665. package/dist/src/components/skeleton/skeleton.component.d.ts +10 -5
  666. package/dist/src/components/skeleton/skeleton.component.js +20 -7
  667. package/dist/src/components/skeleton/skeleton.style.js +34 -133
  668. package/dist/src/components/slider-input/bundle.js +89 -88
  669. package/dist/src/components/slider-input/bundle.js.gz +0 -0
  670. package/dist/src/components/slider-input/slider-input.component.d.ts +11 -0
  671. package/dist/src/components/slider-input/slider-input.component.js +20 -8
  672. package/dist/src/components/slider-input/slider-input.style.js +47 -47
  673. package/dist/src/components/slider-input/slider-input.style.variables.js +32 -32
  674. package/dist/src/components/slider-input/utils/debounce.d.ts +2 -0
  675. package/dist/src/components/slider-input/utils/debounce.js +8 -0
  676. package/dist/src/components/slider-input/utils/index.d.ts +2 -0
  677. package/dist/src/components/slider-input/utils/index.js +2 -0
  678. package/dist/src/components/table/bundle.js +149 -128
  679. package/dist/src/components/table/bundle.js.gz +0 -0
  680. package/dist/src/components/table/controllers/base.controller.d.ts +15 -0
  681. package/dist/src/components/table/controllers/base.controller.js +13 -0
  682. package/dist/src/components/table/controllers/filter.controller.d.ts +48 -0
  683. package/dist/src/components/table/controllers/filter.controller.js +152 -0
  684. package/dist/src/components/table/controllers/index.d.ts +11 -0
  685. package/dist/src/components/table/controllers/index.js +11 -0
  686. package/dist/src/components/table/controllers/pagination.controller.d.ts +36 -0
  687. package/dist/src/components/table/controllers/pagination.controller.js +110 -0
  688. package/dist/src/components/table/controllers/selection.controller.d.ts +40 -0
  689. package/dist/src/components/table/controllers/selection.controller.js +120 -0
  690. package/dist/src/components/table/controllers/sort.controller.d.ts +32 -0
  691. package/dist/src/components/table/controllers/sort.controller.js +102 -0
  692. package/dist/src/components/table/interfaces/index.d.ts +7 -0
  693. package/dist/src/components/table/interfaces/index.js +7 -0
  694. package/dist/src/components/table/interfaces/table-host.interface.d.ts +48 -0
  695. package/dist/src/components/table/interfaces/table-host.interface.js +7 -0
  696. package/dist/src/components/table/table.component.d.ts +2 -1
  697. package/dist/src/components/table/table.component.js +1 -0
  698. package/dist/src/components/table/table.style.js +79 -79
  699. package/dist/src/components/table/templates/actions.template.d.ts +14 -0
  700. package/dist/src/components/table/templates/actions.template.js +15 -0
  701. package/dist/src/components/table/templates/column-filter.template.d.ts +24 -0
  702. package/dist/src/components/table/templates/column-filter.template.js +76 -0
  703. package/dist/src/components/table/templates/content.template.d.ts +37 -0
  704. package/dist/src/components/table/templates/content.template.js +208 -0
  705. package/dist/src/components/table/templates/empty.template.d.ts +8 -0
  706. package/dist/src/components/table/templates/empty.template.js +47 -0
  707. package/dist/src/components/table/templates/filter.template.d.ts +14 -0
  708. package/dist/src/components/table/templates/filter.template.js +28 -0
  709. package/dist/src/components/table/templates/index.d.ts +8 -0
  710. package/dist/src/components/table/templates/index.js +8 -0
  711. package/dist/src/components/table/templates/loading.template.d.ts +21 -0
  712. package/dist/src/components/table/templates/loading.template.js +51 -0
  713. package/dist/src/components/table/templates/pagination.template.d.ts +24 -0
  714. package/dist/src/components/table/templates/pagination.template.js +52 -0
  715. package/dist/src/components/tabs/bundle.js +462 -663
  716. package/dist/src/components/tabs/bundle.js.gz +0 -0
  717. package/dist/src/components/tabs/controllers/base.controller.d.ts +49 -0
  718. package/dist/src/components/tabs/controllers/base.controller.js +26 -0
  719. package/dist/src/components/tabs/controllers/dragdrop.controller.d.ts +84 -0
  720. package/dist/src/components/tabs/controllers/dragdrop.controller.js +202 -0
  721. package/dist/src/components/tabs/controllers/editable.controller.d.ts +100 -0
  722. package/dist/src/components/tabs/controllers/editable.controller.js +242 -0
  723. package/dist/src/components/tabs/controllers/event.controller.d.ts +104 -0
  724. package/dist/src/components/tabs/controllers/event.controller.js +239 -0
  725. package/dist/src/components/tabs/controllers/index.d.ts +12 -0
  726. package/dist/src/components/tabs/controllers/index.js +18 -0
  727. package/dist/src/components/tabs/controllers/keyboard.controller.d.ts +85 -0
  728. package/dist/src/components/tabs/controllers/keyboard.controller.js +233 -0
  729. package/dist/src/components/tabs/controllers/popout.controller.d.ts +96 -0
  730. package/dist/src/components/tabs/controllers/popout.controller.js +441 -0
  731. package/dist/src/components/tabs/tabs.component.d.ts +6 -1
  732. package/dist/src/components/tabs/tabs.component.js +8 -1
  733. package/dist/src/components/tabs/tabs.style.js +200 -201
  734. package/dist/src/components/tag/bundle.js +44 -36
  735. package/dist/src/components/tag/bundle.js.gz +0 -0
  736. package/dist/src/components/tag/tag.component.d.ts +7 -6
  737. package/dist/src/components/tag/tag.component.js +10 -19
  738. package/dist/src/components/tag/tag.style.js +20 -24
  739. package/dist/src/components/textarea/bundle.js +131 -94
  740. package/dist/src/components/textarea/bundle.js.gz +0 -0
  741. package/dist/src/components/textarea/controllers/base.controller.d.ts +43 -0
  742. package/dist/src/components/textarea/controllers/base.controller.js +19 -0
  743. package/dist/src/components/textarea/controllers/event.controller.d.ts +169 -0
  744. package/dist/src/components/textarea/controllers/event.controller.js +408 -0
  745. package/dist/src/components/textarea/controllers/index.d.ts +9 -0
  746. package/dist/src/components/textarea/controllers/index.js +9 -0
  747. package/dist/src/components/textarea/controllers/validation.controller.d.ts +133 -0
  748. package/dist/src/components/textarea/controllers/validation.controller.js +315 -0
  749. package/dist/src/components/textarea/textarea.component.d.ts +7 -1
  750. package/dist/src/components/textarea/textarea.component.js +10 -3
  751. package/dist/src/components/textarea/textarea.style.d.ts +1 -13
  752. package/dist/src/components/textarea/textarea.style.js +79 -91
  753. package/dist/src/components/timeline/bundle.js +71 -134
  754. package/dist/src/components/timeline/bundle.js.gz +0 -0
  755. package/dist/src/components/timeline/timeline.component.d.ts +9 -6
  756. package/dist/src/components/timeline/timeline.component.js +16 -13
  757. package/dist/src/components/timeline/timeline.style.d.ts +0 -7
  758. package/dist/src/components/timeline/timeline.style.js +41 -122
  759. package/dist/src/components/timepicker/bundle.js +196 -166
  760. package/dist/src/components/timepicker/bundle.js.gz +0 -0
  761. package/dist/src/components/timepicker/controllers/formatting.controller.d.ts +93 -0
  762. package/dist/src/components/timepicker/controllers/formatting.controller.js +195 -0
  763. package/dist/src/components/timepicker/controllers/index.d.ts +9 -0
  764. package/dist/src/components/timepicker/controllers/index.js +9 -0
  765. package/dist/src/components/timepicker/controllers/selection.controller.d.ts +72 -0
  766. package/dist/src/components/timepicker/controllers/selection.controller.js +175 -0
  767. package/dist/src/components/timepicker/controllers/validation.controller.d.ts +88 -0
  768. package/dist/src/components/timepicker/controllers/validation.controller.js +200 -0
  769. package/dist/src/components/timepicker/interfaces/timepicker.interface.d.ts +103 -0
  770. package/dist/src/components/timepicker/interfaces/timepicker.interface.js +7 -0
  771. package/dist/src/components/timepicker/test/timepicker_test.d.ts +7 -0
  772. package/dist/src/components/timepicker/test/timepicker_test.js +218 -0
  773. package/dist/src/components/timepicker/timepicker.component.d.ts +2 -1
  774. package/dist/src/components/timepicker/timepicker.component.js +1 -0
  775. package/dist/src/components/timepicker/timepicker.style.js +42 -42
  776. package/dist/src/components/timepicker/timepicker.style.variables.js +91 -91
  777. package/dist/src/components/timepicker/utils/time.utils.d.ts +87 -0
  778. package/dist/src/components/timepicker/utils/time.utils.js +235 -0
  779. package/dist/src/components/toast/bundle.js +97 -81
  780. package/dist/src/components/toast/bundle.js.gz +0 -0
  781. package/dist/src/components/toast/controllers/base.controller.d.ts +20 -0
  782. package/dist/src/components/toast/controllers/base.controller.js +12 -0
  783. package/dist/src/components/toast/controllers/index.d.ts +8 -0
  784. package/dist/src/components/toast/controllers/index.js +7 -0
  785. package/dist/src/components/toast/toast.component.d.ts +2 -1
  786. package/dist/src/components/toast/toast.component.js +1 -0
  787. package/dist/src/components/toast/toast.style.js +62 -62
  788. package/dist/src/components/tooltips/bundle.js +10 -10
  789. package/dist/src/components/tooltips/bundle.js.gz +0 -0
  790. package/dist/src/components/tooltips/demo/tooltips-demo.d.ts +18 -0
  791. package/dist/src/components/tooltips/demo/tooltips-demo.js +132 -0
  792. package/dist/src/components/tooltips/test/tooltips_test.d.ts +2 -0
  793. package/dist/src/components/tooltips/test/tooltips_test.js +145 -0
  794. package/dist/src/components/tooltips/tooltips.component.d.ts +8 -0
  795. package/dist/src/components/tooltips/tooltips.component.js +9 -1
  796. package/dist/src/components/tooltips/tooltips.style.js +6 -6
  797. package/dist/src/components/video/bundle.js +47 -36
  798. package/dist/src/components/video/bundle.js.gz +0 -0
  799. package/dist/src/components/video/video.component.d.ts +12 -1
  800. package/dist/src/components/video/video.component.js +18 -6
  801. package/dist/src/components/video/video.style.js +18 -24
  802. package/package.json +51 -12
  803. package/packages/common/dist/VERSIONS.md +2 -2
  804. package/packages/common/dist/shared/base-mixin.d.ts +21 -19
  805. package/packages/common/dist/shared/base-mixin.d.ts.map +1 -1
  806. package/packages/common/dist/shared/base-mixin.js +102 -18
  807. package/packages/common/dist/shared/base-mixin.js.map +1 -1
  808. package/packages/common/dist/shared/index.d.ts +1 -0
  809. package/packages/common/dist/shared/index.d.ts.map +1 -1
  810. package/packages/common/dist/shared/index.js +2 -0
  811. package/packages/common/dist/shared/index.js.map +1 -1
  812. package/packages/common/dist/shared/style-injector.d.ts +11 -0
  813. package/packages/common/dist/shared/style-injector.d.ts.map +1 -0
  814. package/packages/common/dist/shared/style-injector.js +53 -0
  815. package/packages/common/dist/shared/style-injector.js.map +1 -0
  816. package/packages/common/dist/shared/theme-mixin.d.ts +2 -24
  817. package/packages/common/dist/shared/theme-mixin.d.ts.map +1 -1
  818. package/packages/common/dist/shared/theme-mixin.js +5 -38
  819. package/packages/common/dist/shared/theme-mixin.js.map +1 -1
  820. package/packages/themes/dist/default.css +0 -10
  821. package/packages/themes/dist/package.json +1 -1
@@ -1,672 +1,478 @@
1
- import{css as t,html as i,nothing as r,LitElement as n}from"lit";import{property as e,state as a,customElement as o}from"lit/decorators.js";import{NuralyUIBaseMixin as s}from"@nuralyui/common/mixins";import{BaseComponentController as l,BaseValidationController as d}from"@nuralyui/common/controllers";const u=[t`
2
- /*
3
- * Host element base styles
4
- * Container for the input component with flexible layout
5
- */
1
+ import{css as t,nothing as i,html as e,LitElement as r}from"lit";import{property as n,state as s,customElement as a}from"lit/decorators.js";const o=t`
2
+ /* ========================================
3
+ * HOST ELEMENT
4
+ * ======================================== */
6
5
  :host {
7
6
  display: flex;
8
7
  flex-direction: column;
9
- font-family: var(--nuraly-font-family-input, 'IBM Plex Sans', ui-sans-serif, system-ui);
8
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
9
+ font-size: 13px;
10
+ line-height: 1.4;
10
11
  }
11
12
 
12
- /*
13
- * Base input wrapper and input element styles
14
- * Background applied to wrapper to cover entire container including addons
15
- * Uses theme CSS custom properties for comprehensive theming support
16
- */
13
+ /* ========================================
14
+ * INPUT WRAPPER
15
+ * ======================================== */
17
16
  .input-wrapper {
18
- background-color: var(--nuraly-color-input-background, var(--nuraly-color-input-background-fallback, #ffffff));
19
- }
20
-
21
-
22
- #input-container > input {
23
- background-color: transparent;
24
- border: var(--nuraly-input-border, none);
25
- outline: var(--nuraly-input-outline, none);
26
- flex: 1;
27
- min-width: 0;
17
+ display: flex;
18
+ align-items: stretch;
28
19
  width: 100%;
29
-
30
- /* Typography from theme */
31
- font-family: var(--nuraly-font-family-input, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto);
32
- font-size: var(--nuraly-font-size-input, 14px);
33
- color: var(--nuraly-color-input-text, var(--nuraly-color-input-text-fallback, rgba(0, 0, 0, 0.88)));
34
-
35
- /* Padding from theme */
36
- padding: var(--nuraly-spacing-input-medium-vertical, 4px) var(--nuraly-spacing-input-medium-horizontal, 11px);
37
- }
38
-
39
- /*
40
- * Disabled state styles for wrapper and input
41
- * Applied when input is disabled - removes interactivity and applies muted colors
42
- */
43
- :host([disabled]) .input-wrapper {
44
- background-color: var(--nuraly-color-input-disabled-background, var(--nuraly-color-input-disabled-background-fallback, #f4f4f4));
45
- }
46
-
47
- :host([disabled]) #input-container > input {
48
20
  background-color: transparent;
49
- cursor: var(--nuraly-cursor-disabled, not-allowed);
50
- color: var(--nuraly-color-input-disabled-text, var(--nuraly-color-input-disabled-text-fallback, rgba(0, 0, 0, 0.25)));
51
- }
52
-
53
- /*
54
- * Icon base styles
55
- * Common styling for all icons within the input component
56
- * Provides comprehensive CSS variable override system
57
- */
58
- nr-icon {
59
- display: flex;
60
- align-items: center;
61
-
62
- /* Global icon color override - applies to all icons in input */
63
- --nuraly-color-icon: var(--nuraly-color-input-icon, var(--nuraly-color-icon, var(--nuraly-color-icon-fallback, #161616)));
64
-
65
- /* Size override for input icons */
66
- --nuraly-icon-size: var(--nuraly-size-input-icon, var(--nuraly-icon-size, var(--nuraly-icon-size-fallback, 18px)));
67
-
68
- /* Interactive state overrides */
69
- --nuraly-color-icon-hover: var(--nuraly-color-input-icon-hover, var(--nuraly-color-icon-hover, var(--nuraly-color-icon-hover-fallback, #0f62fe)));
70
- --nuraly-color-icon-active: var(--nuraly-color-input-icon-active, var(--nuraly-color-icon-active, var(--nuraly-color-icon-active-fallback, #054ada)));
71
- --nuraly-color-icon-disabled: var(--nuraly-color-input-icon-disabled, var(--nuraly-color-icon-disabled, var(--nuraly-color-icon-disabled-fallback, #c6c6c6)));
72
- }
73
-
74
- /*
75
- * Placeholder styling
76
- * Customizable placeholder text appearance
77
- */
78
- ::placeholder {
79
- color: var(--nuraly-color-input-placeholder, var(--nuraly-color-input-placeholder-fallback, #a8a8a8));
80
- font-size: var(--nuraly-font-size-input-placeholder, 14px);
81
- font-family: var(--nuraly-font-family-input, 'IBM Plex Sans', ui-sans-serif, system-ui);
82
- }
83
-
84
- /*
85
- * Disabled placeholder styling
86
- * Applied when input is disabled
87
- */
88
- :host([disabled]) ::placeholder {
89
- color: var(--nuraly-color-input-disabled-placeholder, var(--nuraly-color-input-disabled-placeholder-fallback, #c6c6c6));
90
21
  }
91
22
 
92
23
  /* ========================================
93
- * ICON VARIANTS AND STATES
24
+ * INPUT CONTAINER
94
25
  * ======================================== */
95
-
96
- /* Warning state icon */
97
- #warning-icon {
98
- --nuraly-color-icon: var(--nuraly-color-input-warning-icon, #f1c21b);
99
- }
100
-
101
- /* Error state icon */
102
- #error-icon {
103
- --nuraly-color-icon: var(--nuraly-color-input-error-icon, #da1e28);
104
- }
105
-
106
- /* Calendar input type icon */
107
- #calendar-icon {
108
- --nuraly-color-icon: var(--nuraly-color-input-calendar-icon, #161616);
109
- }
110
-
111
- /* Password toggle icon */
112
- #password-icon {
113
- padding-left: var(--nuraly-input-password-icon-padding-left, var(--nuraly-password-icon-padding-left, 8px));
114
- padding-right: var(--nuraly-input-password-icon-padding-right, var(--nuraly-password-icon-padding-right, 8px));
115
- cursor: var(--nuraly-cursor-interactive, pointer);
116
- --nuraly-color-icon: var(--nuraly-color-input-password-icon, #161616);
117
- }
118
-
119
- /* Copy functionality icon */
120
- #copy-icon {
121
- padding-right: var(--nuraly-input-copy-icon-padding-right, var(--nuraly-copy-icon-padding-right, 8px));
122
- --nuraly-color-icon: var(--nuraly-color-input-copy-icon, #161616);
123
- cursor: var(--nuraly-cursor-interactive, pointer);
124
- }
125
-
126
- /* Clear functionality icon */
127
- #clear-icon {
128
- padding-right: var(--nuraly-input-clear-icon-padding-right, var(--nuraly-clear-icon-padding-right, 8px));
129
- --nuraly-color-icon: var(--nuraly-color-input-clear-icon, #161616);
130
- cursor: var(--nuraly-cursor-interactive, pointer);
131
- }
132
-
133
- /*
134
- * Number input increment/decrement icons container
135
- * Positioned absolutely for overlay on input
136
- */
137
- #number-icons {
26
+ #input-container {
138
27
  display: flex;
139
- justify-content: space-between;
140
28
  align-items: center;
141
- cursor: var(--nuraly-cursor-interactive, pointer);
142
- position: absolute;
143
- right: 0;
144
- top: 0;
145
- height: 100%;
146
- width: var(--nuraly-input-number-icons-container-width, var(--nuraly-number-icons-container-width, 50px));
147
- padding-right: var(--nuraly-input-number-icons-container-padding-right, var(--nuraly-number-icons-container-padding-right, 8px));
148
- }
149
-
150
- /* Individual number icons styling */
151
- #number-icons nr-icon {
152
- --nuraly-color-icon: var(--nuraly-color-input-number-icons, #161616);
153
- padding-left: var(--nuraly-input-number-icons-padding-left, var(--nuraly-number-icons-padding-left, 4px));
154
- padding-right: var(--nuraly-input-number-icons-padding-right, var(--nuraly-number-icons-padding-right, 4px));
155
- width: var(--nuraly-input-number-icons-width, var(--nuraly-number-icons-width, 24px));
156
- height: var(--nuraly-input-number-icons-height, var(--nuraly-number-icons-height, 24px));
157
- }
158
-
159
- /* Number icons separator styling */
160
- #icons-separator {
161
- color: var(--nuraly-input-number-icons-separator-color, var(--nuraly-number-icons-separator-color));
162
- padding-bottom: var(--nuraly-input-number-icons-separator-padding-bottom, var(--nuraly-number-icons-separator-padding-bottom));
163
- padding-left: var(--nuraly-input-number-icons-separator-padding-left, var(--nuraly-number-icons-separator-padding-left));
164
- padding-right: var(--nuraly-input-number-icons-separator-padding-right, var(--nuraly-number-icons-separator-padding-right));
29
+ position: relative;
30
+ flex: 1;
31
+ min-width: 0;
32
+ border: 1px solid var(--nr-border, #d9d9d9);
33
+ border-radius: 8px;
34
+ background-color: var(--nr-bg, #ffffff);
35
+ color: var(--nr-text, rgba(0, 0, 0, 0.88));
36
+ font-family: inherit;
37
+ font-size: 13px;
38
+ overflow: hidden;
39
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
165
40
  }
166
41
 
167
- /*
168
- * Disabled state for all icons
169
- * Applied when input is disabled - reduces opacity and disables interaction
170
- */
171
- :host([disabled]) #password-icon,
172
- :host([disabled]) #error-icon,
173
- :host([disabled]) #warning-icon,
174
- :host([disabled]) #number-icons,
175
- :host([disabled]) #calendar-icon,
176
- :host([disabled]) #copy-icon,
177
- :host([disabled]) #clear-icon {
178
- opacity: var(--nuraly-input-disabled-icon-opacity, var(--nuraly-disabled-icon-opacity));
42
+ :host(:not([disabled])) #input-container:hover {
43
+ border-color: var(--nr-primary, #7c3aed);
179
44
  }
180
45
 
181
- /* Disabled icons cursor override */
182
- :host([disabled]) #password-icon,
183
- :host([disabled]) #number-icons,
184
- :host([disabled]) #copy-icon,
185
- :host([disabled]) #clear-icon {
186
- cursor: not-allowed;
46
+ :host(:not([disabled])) #input-container:focus-within {
47
+ border-color: var(--nr-primary, #7c3aed);
48
+ box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.15);
49
+ outline: none;
187
50
  }
188
51
 
189
52
  /* ========================================
190
- * INPUT CONTAINER STYLES
53
+ * INPUT ELEMENT
191
54
  * ======================================== */
192
-
193
- /*
194
- * Input wrapper - contains addons and input container
195
- * Provides horizontal layout for addon before/after elements
196
- */
197
- .input-wrapper {
198
- display: flex;
199
- align-items: stretch;
55
+ #input-container > input {
56
+ background-color: transparent;
57
+ border: none;
58
+ border-radius: 0;
59
+ outline: none;
60
+ box-shadow: none;
61
+ -webkit-appearance: none;
62
+ appearance: none;
63
+ flex: 1;
64
+ min-width: 0;
200
65
  width: 100%;
66
+ font-family: inherit;
67
+ font-size: 13px;
68
+ color: var(--nr-text, rgba(0, 0, 0, 0.88));
69
+ padding: 6px 10px;
201
70
  }
202
71
 
203
- /*
204
- * Addon before element - content before input (outside borders)
205
- * Styled to visually connect with input
206
- */
207
- .input-addon-before {
208
- background-color: var(--nuraly-input-addon-background-color, var(--nuraly-addon-background-color));
209
- border: var(--nuraly-input-border, var(--nuraly-border));
210
- border-right: none;
211
- border-top-left-radius: var(--nuraly-input-border-radius, var(--nuraly-border-radius));
212
- border-bottom-left-radius: var(--nuraly-input-border-radius, var(--nuraly-border-radius));
213
- padding: var(--nuraly-input-addon-padding, var(--nuraly-addon-padding));
214
- display: flex;
215
- align-items: center;
216
- color: var(--nuraly-input-addon-color, var(--nuraly-addon-color));
217
- font-size: var(--nuraly-input-font-size, var(--nuraly-font-size));
218
- white-space: nowrap;
219
- min-width: 0; /* Allow shrinking */
220
- flex-shrink: 0; /* Prevent shrinking */
72
+ ::placeholder {
73
+ color: var(--nr-placeholder, #a8a8a8);
74
+ font-size: 13px;
75
+ font-family: inherit;
221
76
  }
222
77
 
223
- /*
224
- * Addon after element - content after input (outside borders)
225
- * Styled to visually connect with input
226
- */
227
- .input-addon-after {
228
- background-color: var(--nuraly-input-addon-background-color, var(--nuraly-addon-background-color));
229
- border: var(--nuraly-input-border, var(--nuraly-border));
230
- border-left: none;
231
- border-top-right-radius: var(--nuraly-input-border-radius, var(--nuraly-border-radius));
232
- border-bottom-right-radius: var(--nuraly-input-border-radius, var(--nuraly-border-radius));
233
- padding: var(--nuraly-input-addon-padding, var(--nuraly-addon-padding));
234
- display: flex;
235
- align-items: center;
236
- color: var(--nuraly-input-addon-color, var(--nuraly-addon-color));
237
- font-size: var(--nuraly-input-font-size, var(--nuraly-font-size));
238
- white-space: nowrap;
239
- min-width: 0; /* Allow shrinking */
240
- flex-shrink: 0; /* Prevent shrinking */
78
+ /* Remove default number spinners */
79
+ input::-webkit-outer-spin-button,
80
+ input::-webkit-inner-spin-button {
81
+ -webkit-appearance: none;
241
82
  }
242
-
243
- /*
244
- * Input container border radius adjustments when addons are present
245
- * Removes border radius on sides where addons are attached
246
- */
247
- .input-wrapper:has(.input-addon-before) #input-container {
248
- border-top-left-radius: 0;
249
- border-bottom-left-radius: 0;
250
- border-left: none;
83
+ input[type='number'] {
84
+ -moz-appearance: textfield;
251
85
  }
252
86
 
253
- .input-wrapper:has(.input-addon-after) #input-container {
254
- border-top-right-radius: 0;
255
- border-bottom-right-radius: 0;
256
- border-right: none;
257
- }
87
+ /* ========================================
88
+ * SIZE VARIATIONS
89
+ * ======================================== */
258
90
 
259
- /*
260
- * Main input container element
261
- * Uses theme CSS custom properties for comprehensive border and layout control
262
- */
263
- #input-container {
264
- /* Default outlined style */
265
- border: var(--nuraly-border-width-input, 1px) solid var(--nuraly-color-input-border, #d9d9d9);
266
- border-radius: var(--nuraly-border-radius-input, 6px);
267
-
268
- /* Background and text styling */
269
- background-color: var(--nuraly-color-input-background, #ffffff);
270
- color: var(--nuraly-color-input-text, rgba(0, 0, 0, 0.88));
271
- font-family: var(--nuraly-font-family-input, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto);
272
- font-size: var(--nuraly-font-size-input, 14px);
273
-
274
- /* Layout */
275
- display: flex;
276
- position: relative;
277
- flex: 1; /* Take available space in wrapper */
278
- min-width: 0; /* Allow shrinking below content size */
279
-
280
- /* Transitions for smooth theme changes */
281
- transition: var(--nuraly-transition-input, border-color 0.2s, box-shadow 0.2s);
91
+ /* Small */
92
+ div[data-size='small'] {
93
+ min-height: 28px;
94
+ }
95
+ div[data-size='small'] > input {
96
+ padding: 4px 8px;
97
+ font-size: 12px;
282
98
  }
283
99
 
284
- /* Focus state for input container */
285
- #input-container:focus-within {
286
- border-color: var(--nuraly-color-input-border-focus, #1890ff);
287
- box-shadow: var(--nuraly-shadow-input-focus, 0 0 0 2px rgba(24, 144, 255, 0.2));
288
- outline: none;
100
+ /* Medium (default) */
101
+ div[data-size='medium'] {
102
+ min-height: 32px;
103
+ }
104
+ div[data-size='medium'] > input {
105
+ padding: 6px 10px;
106
+ font-size: 13px;
289
107
  }
290
108
 
291
- /*
292
- * Disabled container styles
293
- * Applied when input is disabled
294
- */
295
- :host([disabled]) #input-container {
296
- background-color: var(--nuraly-color-input-disabled-background, #f5f5f5);
297
- border-color: var(--nuraly-color-input-disabled-border, #d9d9d9);
298
- color: var(--nuraly-color-input-disabled-text, rgba(0, 0, 0, 0.25));
299
- cursor: not-allowed;
109
+ /* Large */
110
+ div[data-size='large'] {
111
+ min-height: 38px;
112
+ }
113
+ div[data-size='large'] > input {
114
+ padding: 8px 12px;
115
+ font-size: 14px;
300
116
  }
301
117
 
302
118
  /* ========================================
303
- * INPUT VARIANT STYLES
119
+ * VARIANT STYLES
304
120
  * ======================================== */
305
121
 
306
- /*
307
- * Outlined variant - full border around input
308
- * Default: light border, focus: blue border
309
- */
122
+ /* Outlined (default) */
310
123
  :host([variant='outlined']) #input-container {
311
- border: var(--nuraly-input-outlined-border, var(--nuraly-outlined-border, 1px solid #d1d5db));
312
- border-radius: var(--nuraly-input-outlined-border-radius, var(--nuraly-outlined-border-radius, var(--nuraly-border-radius-input, 6px)));
313
- background-color: var(--nuraly-input-outlined-background, var(--nuraly-outlined-background, transparent));
124
+ border: 1px solid var(--nr-border, #d1d5db);
125
+ border-radius: 8px;
126
+ background-color: transparent;
314
127
  }
315
-
316
128
  :host([variant='outlined']) .input-wrapper {
317
129
  background-color: transparent;
318
130
  }
319
-
131
+ :host([variant='outlined']:not([state='error']):not([disabled])) #input-container:hover {
132
+ border-color: var(--nr-primary, #7c3aed);
133
+ }
320
134
  :host([variant='outlined']:not([state='error'])) #input-container:focus-within {
321
- border-color: var(--nuraly-color-input-border-focus, #3b82f6);
322
- box-shadow: var(--nuraly-shadow-input-focus, 0 0 0 1px #3b82f6);
135
+ border-color: var(--nr-primary, #7c3aed);
136
+ box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.15);
323
137
  }
324
138
 
325
- /*
326
- * Filled variant - background with bottom border only
327
- * Subtle background with bottom border indication
328
- */
139
+ /* Filled */
329
140
  :host([variant='filled']) #input-container {
330
- background-color: var(--nuraly-input-filled-background, var(--nuraly-filled-background));
331
- border-radius: var(--nuraly-input-filled-border-radius, var(--nuraly-filled-border-radius, var(--nuraly-border-radius-input, 6px)));
332
- border-bottom: var(--nuraly-input-filled-border-bottom, var(--nuraly-filled-border-bottom));
141
+ background-color: var(--nr-bg-subtle, #f5f5f5);
142
+ border-radius: 8px;
143
+ border-bottom: 1px solid var(--nr-border, #d9d9d9);
333
144
  border-top: none;
334
145
  border-left: none;
335
146
  border-right: none;
336
147
  }
337
-
338
148
  :host([variant='filled']) .input-wrapper {
339
149
  background-color: transparent;
340
150
  }
341
-
342
151
  :host([variant='filled']:not([state='error'])) #input-container:focus-within {
343
- border-bottom: var(--nuraly-input-filled-focus-border-bottom, var(--nuraly-filled-focus-border-bottom));
152
+ border-bottom-color: var(--nr-primary, #7c3aed);
344
153
  border-top: none;
345
154
  border-left: none;
346
155
  border-right: none;
347
156
  }
348
157
 
349
- /*
350
- * Borderless variant - no borders, focus with outline
351
- * Clean appearance with focus indication via outline
352
- */
158
+ /* Borderless */
353
159
  :host([variant='borderless']) #input-container {
354
- background-color: var(--nuraly-input-borderless-background, var(--nuraly-borderless-background));
160
+ background-color: transparent;
355
161
  border: none;
356
- border-radius: var(--nuraly-input-borderless-border-radius, var(--nuraly-borderless-border-radius));
162
+ border-radius: 8px;
357
163
  }
358
-
359
164
  :host([variant='borderless']) .input-wrapper {
360
165
  background-color: transparent;
361
166
  }
362
-
363
167
  :host([variant='borderless']:not([state='error'])) #input-container:focus-within {
364
- outline: var(--nuraly-input-borderless-focus-outline, var(--nuraly-borderless-focus-outline));
168
+ outline: 1px solid var(--nr-primary, #7c3aed);
365
169
  border: none;
366
170
  }
367
171
 
368
- /*
369
- * Underlined variant - bottom border only (default/current behavior)
370
- * Maintains existing behavior as default
371
- */
172
+ /* Underlined */
372
173
  :host([variant='underlined']) #input-container {
373
- border-bottom: var(--nuraly-input-underlined-border-bottom, var(--nuraly-underlined-border-bottom));
174
+ border-bottom: 1px solid var(--nr-border, #d9d9d9);
374
175
  border-top: none;
375
176
  border-left: none;
376
177
  border-right: none;
377
- border-radius: var(--nuraly-input-underlined-border-radius, 0);
178
+ border-radius: 0;
378
179
  }
379
-
380
180
  :host([variant='underlined']:not([state='error'])) #input-container:focus-within {
381
- border-bottom: var(--nuraly-input-underlined-focus-border-bottom, var(--nuraly-underlined-focus-border-bottom));
181
+ border-bottom-color: var(--nr-primary, #7c3aed);
382
182
  border-top: none;
383
183
  border-left: none;
384
184
  border-right: none;
385
185
  }
386
186
 
387
- /* ========================================
388
- * INPUT ELEMENT STYLES
389
- * ======================================== */
390
-
391
- /*
392
- * Base input element styling
393
- * Full width with no default borders, using container for styling
394
- */
395
- input {
396
- width: 100%;
397
- border: none;
398
- outline: none;
399
- color: var(--nuraly-input-text-color, var(--nuraly-text-color));
400
- font-family: var(--nuraly-input-font-family, var(--nuraly-font-family));
401
- font-size: var(--nuraly-input-font-size, var(--nuraly-font-size));
402
- }
403
-
404
- /* Remove default number input spinners */
405
- /* Chrome, Safari, Edge, Opera */
406
- input::-webkit-outer-spin-button,
407
- input::-webkit-inner-spin-button {
408
- -webkit-appearance: none;
409
- }
410
-
411
- /* Firefox */
412
- input[type='number'] {
413
- -moz-appearance: textfield;
414
- }
415
-
416
187
  /* ========================================
417
188
  * STATE STYLES
418
189
  * ======================================== */
419
190
 
420
- /*
421
- * Error state styling - works with all variants
422
- * Applied when state='error' and not disabled
423
- */
191
+ /* Error */
424
192
  :host(:not([disabled])[state='error']) #input-container {
425
- border: var(--nuraly-input-error-border, var(--nuraly-error-border)) !important;
426
- outline: none !important;
193
+ border-color: var(--nr-danger, #dc2626) !important;
427
194
  }
428
-
429
- /* Override variant-specific error state styling */
430
- :host([variant='borderless'][state='error']) #input-container {
431
- border: var(--nuraly-input-error-border, var(--nuraly-error-border)) !important;
432
- outline: none !important;
195
+ :host(:not([disabled])[state='error']) #input-container:focus-within {
196
+ border-color: var(--nr-danger, #dc2626) !important;
197
+ box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15) !important;
433
198
  }
434
-
435
199
  :host([variant='underlined'][state='error']) #input-container,
436
200
  :host([variant='filled'][state='error']) #input-container {
437
201
  border-top: none !important;
438
202
  border-left: none !important;
439
203
  border-right: none !important;
440
- border-bottom: var(--nuraly-input-error-border, var(--nuraly-error-border)) !important;
204
+ border-bottom-color: var(--nr-danger, #dc2626) !important;
205
+ }
206
+ :host([variant='borderless'][state='error']) #input-container {
207
+ border: 1px solid var(--nr-danger, #dc2626) !important;
208
+ }
209
+
210
+ /* Warning */
211
+ :host(:not([disabled])[state='warning']) #input-container {
212
+ border-color: var(--nr-warning, #d97706) !important;
213
+ }
214
+ :host(:not([disabled])[state='warning']) #input-container:focus-within {
215
+ border-color: var(--nr-warning, #d97706) !important;
216
+ box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.15) !important;
441
217
  }
442
218
 
443
- /*
444
- * Number input icon positioning adjustments for error/warning states
445
- * When validation states are present, adjust icon positioning
446
- */
219
+ /* Success */
220
+ :host(:not([disabled])[state='success']) #input-container {
221
+ border-color: var(--nr-success, #16a34a) !important;
222
+ }
223
+ :host(:not([disabled])[state='success']) #input-container:focus-within {
224
+ border-color: var(--nr-success, #16a34a) !important;
225
+ box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.15) !important;
226
+ }
227
+
228
+ /* Warning/error — number icon position */
447
229
  :host([state='error']) input[type='number'] ~ #number-icons,
448
230
  :host([state='warning']) input[type='number'] ~ #number-icons {
449
231
  position: static;
450
- padding-left: var(--nuraly-input-number-icons-container-padding-left, var(--nuraly-number-icons-container-padding-left));
232
+ padding-left: 4px;
451
233
  }
452
234
 
453
235
  /* ========================================
454
- * SLOTTED CONTENT STYLES
236
+ * DISABLED
455
237
  * ======================================== */
456
-
457
- /*
458
- * Label slot styling
459
- * Applied to slotted label elements
460
- */
461
- ::slotted([slot='label']) {
462
- color: var(--nuraly-input-label-color, var(--nuraly-label-color));
463
- font-size: var(--nuraly-input-label-font-size, var(--nuraly-label-font-size));
464
- padding-bottom: var(--nuraly-input-label-padding-bottom, var(--nuraly-label-padding-bottom));
238
+ :host([disabled]) {
239
+ opacity: 0.5;
240
+ pointer-events: none;
465
241
  }
466
-
467
- /*
468
- * Helper text slot styling
469
- * Applied to slotted helper text elements
470
- */
471
- ::slotted([slot='helper-text']) {
472
- color: var(--nuraly-input-helper-text-color, var(--nuraly-helper-text-color));
473
- font-size: var(--nuraly-input-helper-text-font-size, var(--nuraly-helper-text-font-size));
474
- padding-top: var(--nuraly-input-helper-text-padding-top, var(--nuraly-helper-text-padding-top));
475
-
476
- /* Prevent text overflow and ensure proper wrapping without affecting parent width */
477
- word-wrap: break-word;
478
- word-break: break-word;
479
- overflow-wrap: break-word;
480
- hyphens: auto;
481
- white-space: normal;
482
- max-width: 100%;
483
- width: 0;
484
- min-width: 100%;
485
- box-sizing: border-box;
486
- line-height: 1.4;
242
+ :host([disabled]) .input-wrapper {
243
+ background-color: #f4f4f4;
244
+ }
245
+ :host([disabled]) #input-container {
246
+ background-color: #f5f5f5;
247
+ border-color: var(--nr-border, #d9d9d9);
248
+ cursor: not-allowed;
249
+ }
250
+ :host([disabled]) #input-container > input {
251
+ background-color: transparent;
252
+ cursor: not-allowed;
253
+ color: var(--nr-disabled, rgba(0, 0, 0, 0.25));
254
+ }
255
+ :host([disabled]) ::placeholder {
256
+ color: var(--nr-disabled, #c6c6c6);
257
+ }
258
+ :host([disabled]) #password-icon,
259
+ :host([disabled]) #error-icon,
260
+ :host([disabled]) #warning-icon,
261
+ :host([disabled]) #number-icons,
262
+ :host([disabled]) #calendar-icon,
263
+ :host([disabled]) #copy-icon,
264
+ :host([disabled]) #clear-icon {
265
+ opacity: 0.5;
266
+ }
267
+ :host([disabled]) #password-icon,
268
+ :host([disabled]) #number-icons,
269
+ :host([disabled]) #copy-icon,
270
+ :host([disabled]) #clear-icon {
271
+ cursor: not-allowed;
487
272
  }
488
273
 
489
- /*
490
- * State-specific helper text colors
491
- * Override helper text color based on validation state
492
- */
493
- :host([state='error']) ::slotted([slot='helper-text']) {
494
- color: var(--nuraly-input-error-helper-text-color, var(--nuraly-error-helper-text-color));
274
+ /* ========================================
275
+ * ICON STYLES
276
+ * ======================================== */
277
+ #input-container nr-icon {
278
+ display: flex;
279
+ align-items: center;
280
+ flex-shrink: 0;
281
+ height: 100%;
282
+ max-height: 100%;
495
283
  }
496
284
 
497
- :host([state='warning']) ::slotted([slot='helper-text']) {
498
- color: var(--nuraly-input-warning-helper-text-color, var(--nuraly-warning-helper-text-color));
285
+ #warning-icon {
286
+ --nuraly-color-icon: var(--nr-warning, #f1c21b);
499
287
  }
288
+ #error-icon {
289
+ --nuraly-color-icon: var(--nr-danger, #da1e28);
290
+ }
291
+ #calendar-icon {
292
+ --nuraly-color-icon: var(--nr-text, #161616);
293
+ }
294
+ #password-icon {
295
+ padding-left: 8px;
296
+ padding-right: 8px;
297
+ cursor: pointer;
298
+ color: var(--nr-text-secondary, #6b7280);
299
+ transition: color 0.15s;
300
+ }
301
+ #password-icon:hover { color: var(--nr-primary, #7c3aed); }
500
302
 
501
- /*
502
- * Disabled state for slotted content
503
- * Applied when input is disabled
504
- */
505
- :host([disabled]) ::slotted([slot='helper-text']) {
506
- color: var(--nuraly-input-disabled-helper-text-color, var(--nuraly-disabled-helper-text-color));
303
+ #copy-icon {
304
+ padding-right: 8px;
305
+ cursor: pointer;
306
+ color: var(--nr-text-secondary, #6b7280);
307
+ transition: color 0.15s;
507
308
  }
309
+ #copy-icon:hover { color: var(--nr-primary, #7c3aed); }
508
310
 
509
- :host([disabled]) ::slotted([slot='label']) {
510
- color: var(--nuraly-input-disabled-label-color, var(--nuraly-disabled-label-color));
311
+ #clear-icon {
312
+ padding-right: 8px;
313
+ cursor: pointer;
314
+ color: var(--nr-text-secondary, #6b7280);
315
+ transition: color 0.15s;
511
316
  }
317
+ #clear-icon:hover { color: var(--nr-danger, #dc2626); }
512
318
 
513
- /*
514
- * Input prefix wrapper styling
515
- * Centers the prefix content vertically and horizontally
516
- */
517
- .input-prefix {
319
+ /* Number icons */
320
+ #number-icons {
518
321
  display: flex;
322
+ justify-content: space-between;
519
323
  align-items: center;
520
- justify-content: center;
324
+ cursor: pointer;
325
+ position: absolute;
326
+ right: 0;
327
+ top: 0;
328
+ height: 100%;
329
+ width: 50px;
330
+ padding-right: 8px;
331
+ }
332
+ #number-icons nr-icon {
333
+ color: var(--nr-text-secondary, #6b7280);
334
+ padding-left: 4px;
335
+ padding-right: 4px;
336
+ width: 24px;
337
+ height: 24px;
338
+ transition: color 0.15s;
339
+ }
340
+ #number-icons nr-icon:hover {
341
+ color: var(--nr-primary, #7c3aed);
342
+ }
343
+ #icons-separator {
344
+ color: var(--nr-border, #d9d9d9);
521
345
  }
522
346
 
523
- /*
524
- * Prefix slot styling
525
- * Applied to slotted prefix content (icons, text, etc.)
526
- */
527
- ::slotted([slot='prefix']) {
347
+ /* ========================================
348
+ * ADDON STYLES
349
+ * ======================================== */
350
+ .input-addon-before {
351
+ background-color: var(--nr-bg-subtle, #fafafa);
352
+ border: 1px solid var(--nr-border, #d9d9d9);
353
+ border-right: none;
354
+ border-top-left-radius: 8px;
355
+ border-bottom-left-radius: 8px;
356
+ padding: 0 10px;
357
+ display: flex;
358
+ align-items: center;
359
+ color: var(--nr-text-secondary, #666);
360
+ font-size: 13px;
361
+ white-space: nowrap;
362
+ flex-shrink: 0;
363
+ }
364
+ .input-addon-after {
365
+ background-color: var(--nr-bg-subtle, #fafafa);
366
+ border: 1px solid var(--nr-border, #d9d9d9);
367
+ border-left: none;
368
+ border-top-right-radius: 8px;
369
+ border-bottom-right-radius: 8px;
370
+ padding: 0 10px;
528
371
  display: flex;
529
372
  align-items: center;
530
- padding-right: var(--nuraly-input-prefix-padding-right, var(--nuraly-prefix-padding-right));
531
- color: var(--nuraly-input-prefix-color, var(--nuraly-prefix-color));
532
- font-size: var(--nuraly-input-prefix-font-size, var(--nuraly-prefix-font-size));
373
+ color: var(--nr-text-secondary, #666);
374
+ font-size: 13px;
375
+ white-space: nowrap;
533
376
  flex-shrink: 0;
534
377
  }
535
378
 
536
- /*
537
- * Input suffix wrapper styling
538
- * Centers the suffix content vertically and horizontally
539
- */
540
- .input-suffix {
379
+ /* Border radius adjustments when addons are present */
380
+ .input-wrapper:has(.input-addon-before) #input-container {
381
+ border-top-left-radius: 0;
382
+ border-bottom-left-radius: 0;
383
+ border-left: none;
384
+ }
385
+ .input-wrapper:has(.input-addon-after) #input-container {
386
+ border-top-right-radius: 0;
387
+ border-bottom-right-radius: 0;
388
+ border-right: none;
389
+ }
390
+
391
+ /* ========================================
392
+ * PREFIX / SUFFIX
393
+ * ======================================== */
394
+ .input-prefix {
541
395
  display: flex;
542
396
  align-items: center;
543
397
  justify-content: center;
544
398
  }
545
-
546
- /*
547
- * Suffix slot styling
548
- * Applied to slotted suffix content (icons, text, etc.)
549
- */
550
- ::slotted([slot='suffix']) {
399
+ .input-suffix {
551
400
  display: flex;
552
401
  align-items: center;
553
- padding-left: var(--nuraly-input-suffix-padding-left, var(--nuraly-suffix-padding-left));
554
- color: var(--nuraly-input-suffix-color, var(--nuraly-suffix-color));
555
- font-size: var(--nuraly-input-suffix-font-size, var(--nuraly-suffix-font-size));
556
- flex-shrink: 0;
402
+ justify-content: center;
557
403
  }
558
404
 
559
- /*
560
- * Disabled state for prefix and suffix slots
561
- * Applied when input is disabled
562
- */
563
- :host([disabled]) ::slotted([slot='prefix']),
564
- :host([disabled]) ::slotted([slot='suffix']) {
565
- opacity: var(--nuraly-input-disabled-icon-opacity, var(--nuraly-disabled-icon-opacity));
566
- color: var(--nuraly-input-disabled-prefix-suffix-color, var(--nuraly-disabled-prefix-suffix-color));
567
- }
568
- `,t`
569
405
  /* ========================================
570
- * SIZE VARIATIONS
406
+ * LABEL STYLES
571
407
  * ======================================== */
572
-
573
- /* Large input size variant */
574
- div[data-size='large'] {
575
- padding-top: var(--nuraly-input-large-padding-top, var(--nuraly-large-padding-top));
576
- padding-bottom: var(--nuraly-input-large-padding-bottom, var(--nuraly-large-padding-bottom));
577
- padding-left: var(--nuraly-input-large-padding-left, var(--nuraly-large-padding-left));
578
- padding-right: var(--nuraly-input-large-padding-right, var(--nuraly-large-padding-right));
408
+ ::slotted([slot='label']) {
409
+ color: var(--nr-text-secondary, #374151);
410
+ font-size: 13px;
411
+ padding-bottom: 4px;
412
+ font-weight: 500;
579
413
  }
580
-
581
- /* Medium input size variant (default) */
582
- div[data-size='medium'] {
583
- padding-top: var(--nuraly-input-medium-padding-top, var(--nuraly-medium-padding-top));
584
- padding-bottom: var(--nuraly-input-medium-padding-bottom, var(--nuraly-medium-padding-bottom));
585
- padding-left: var(--nuraly-input-medium-padding-left, var(--nuraly-medium-padding-left));
586
- padding-right: var(--nuraly-input-medium-padding-right, var(--nuraly-medium-padding-right));
414
+ :host([disabled]) ::slotted([slot='label']) {
415
+ color: var(--nr-disabled, #9ca3af);
587
416
  }
588
417
 
589
- /* Small input size variant */
590
- div[data-size='small'] {
591
- padding-top: var(--nuraly-input-small-padding-top, var(--nuraly-small-padding-top));
592
- padding-bottom: var(--nuraly-input-small-padding-bottom, var(--nuraly-small-padding-bottom));
593
- padding-left: var(--nuraly-input-small-padding-left, var(--nuraly-small-padding-left));
594
- padding-right: var(--nuraly-input-small-padding-right, var(--nuraly-small-padding-right));
418
+ /* ========================================
419
+ * HELPER TEXT STYLES
420
+ * ======================================== */
421
+ ::slotted([slot='helper-text']) {
422
+ color: var(--nr-text-secondary, #6b7280);
423
+ font-size: 12px;
424
+ padding-top: 4px;
425
+ word-wrap: break-word;
426
+ overflow-wrap: break-word;
427
+ line-height: 1.4;
428
+ }
429
+ :host([state='error']) ::slotted([slot='helper-text']) {
430
+ color: var(--nr-danger, #dc2626);
431
+ }
432
+ :host([state='warning']) ::slotted([slot='helper-text']) {
433
+ color: var(--nr-warning, #d97706);
434
+ }
435
+ :host([disabled]) ::slotted([slot='helper-text']) {
436
+ color: var(--nr-disabled, #9ca3af);
595
437
  }
596
438
 
597
- /*
598
- * Character count display
599
- * Shows character count and limit information
600
- */
439
+ /* ========================================
440
+ * CHARACTER COUNT
441
+ * ======================================== */
601
442
  .character-count {
602
- font-size: var(--nuraly-input-character-count-font-size, var(--nuraly-character-count-font-size));
603
- color: var(--nuraly-input-character-count-color, var(--nuraly-character-count-color));
443
+ font-size: 12px;
444
+ color: var(--nr-text-secondary, #6b7280);
604
445
  text-align: right;
605
- margin-top: var(--nuraly-input-character-count-margin-top, var(--nuraly-character-count-margin-top));
606
- font-family: var(--nuraly-input-font-family, var(--nuraly-font-family));
446
+ margin-top: 4px;
447
+ font-family: inherit;
607
448
  }
608
-
609
- /* Character count over limit styling */
610
449
  .character-count[data-over-limit] {
611
- color: var(--nuraly-input-character-count-over-limit-color, var(--nuraly-character-count-over-limit-color));
450
+ color: var(--nr-danger, #dc2626);
612
451
  }
613
452
 
614
453
  /* ========================================
615
454
  * VALIDATION MESSAGE STYLES
616
455
  * ======================================== */
617
-
618
- /*
619
- * Base validation message styling
620
- * Common styles for error and warning messages
621
- */
622
456
  .validation-message {
623
- font-size: var(--nuraly-input-validation-message-font-size, var(--nuraly-validation-message-font-size, 0.875rem));
624
- font-family: var(--nuraly-input-font-family, var(--nuraly-font-family));
625
- margin-top: var(--nuraly-input-validation-message-margin-top, var(--nuraly-validation-message-margin-top, 0.25rem));
626
- padding: var(--nuraly-input-validation-message-padding, var(--nuraly-validation-message-padding, 0));
627
-
628
- /* Prevent text overflow and ensure proper wrapping without affecting parent width */
457
+ font-size: 12px;
458
+ font-family: inherit;
459
+ margin-top: 4px;
460
+ padding: 0;
629
461
  word-wrap: break-word;
630
- word-break: break-word;
631
462
  overflow-wrap: break-word;
632
- hyphens: auto;
633
- white-space: normal;
634
- max-width: 100%;
635
- width: 0;
636
- min-width: 100%;
637
- box-sizing: border-box;
638
- line-height: var(--nuraly-input-validation-message-line-height, var(--nuraly-validation-message-line-height, 1.4));
639
- }
640
-
641
- /*
642
- * Error validation message styling
643
- * Applied when validation message has error class
644
- */
463
+ line-height: 1.4;
464
+ }
645
465
  .validation-message.error {
646
- color: var(--nuraly-input-error-message-color, var(--nuraly-error-message-color, var(--nuraly-input-error-color, var(--nuraly-error-color, #dc2626))));
466
+ color: var(--nr-danger, #dc2626);
647
467
  }
648
-
649
- /*
650
- * Warning validation message styling
651
- * Applied when validation message has warning class
652
- */
653
468
  .validation-message.warning {
654
- color: var(--nuraly-input-warning-message-color, var(--nuraly-warning-message-color, var(--nuraly-input-warning-color, var(--nuraly-warning-color, #d97706))));
469
+ color: var(--nr-warning, #d97706);
655
470
  }
656
-
657
- /*
658
- * Disabled state for validation messages
659
- * Applied when input is disabled
660
- */
661
471
  :host([disabled]) .validation-message {
662
- opacity: var(--nuraly-input-disabled-validation-message-opacity, var(--nuraly-disabled-validation-message-opacity, 0.6));
663
- color: var(--nuraly-input-disabled-validation-message-color, var(--nuraly-disabled-validation-message-color));
472
+ opacity: 0.6;
664
473
  }
665
474
 
666
- /*
667
- * Validation icon styles
668
- * Base styles for validation feedback icons
669
- */
475
+ /* Validation icon */
670
476
  .validation-icon {
671
477
  width: 16px;
672
478
  height: 16px;
@@ -674,166 +480,115 @@ import{css as t,html as i,nothing as r,LitElement as n}from"lit";import{property
674
480
  align-items: center;
675
481
  justify-content: center;
676
482
  }
677
-
678
- /*
679
- * Loading validation icon with hourglass animation
680
- * Applied when async validation is in progress
681
- */
682
483
  .validation-icon.validation-loading {
683
- color: var(--nuraly-input-primary-color, var(--nuraly-primary-color, #3b82f6));
684
- animation: validation-hourglass 2s ease-in-out infinite;
484
+ color: var(--nr-primary, #7c3aed);
485
+ animation: nr-input-hourglass 2s ease-in-out infinite;
685
486
  transform-origin: center;
686
487
  }
687
-
688
- /*
689
- * Error validation icon styling
690
- * Applied when validation fails
691
- */
692
488
  .validation-icon.validation-error {
693
- color: var(--nuraly-input-error-color, var(--nuraly-error-color, #dc2626));
489
+ color: var(--nr-danger, #dc2626);
694
490
  }
695
-
696
- /*
697
- * Warning validation icon styling
698
- * Applied when validation has warnings
699
- */
700
491
  .validation-icon.validation-warning {
701
- color: var(--nuraly-input-warning-color, var(--nuraly-warning-color, #d97706));
492
+ color: var(--nr-warning, #d97706);
702
493
  }
703
-
704
- /*
705
- * Success validation icon styling
706
- * Applied when validation passes
707
- */
708
494
  .validation-icon.validation-success {
709
- color: var(--nuraly-input-success-color, var(--nuraly-success-color, #16a34a));
710
- }
711
-
712
- /*
713
- * Hourglass animation for validation loading
714
- * Gentle pulsing effect without rotation for clean appearance
715
- */
716
- @keyframes validation-hourglass {
717
- 0% {
718
- opacity: 0.7;
719
- transform: scale(1);
720
- }
721
- 25% {
722
- opacity: 1;
723
- transform: scale(1.03);
724
- }
725
- 50% {
726
- opacity: 0.8;
727
- transform: scale(1);
728
- }
729
- 75% {
730
- opacity: 1;
731
- transform: scale(1.03);
732
- }
733
- 100% {
734
- opacity: 0.7;
735
- transform: scale(1);
736
- }
737
- }
738
-
739
- /*
740
- * Alternative pulse animation option
741
- * Uncomment this and change animation above to use pulse instead of hourglass
742
- */
743
- /*
744
- @keyframes validation-pulse {
745
- 0%, 100% {
746
- opacity: 1;
747
- transform: scale(1);
748
- }
749
- 50% {
750
- opacity: 0.7;
751
- transform: scale(1.1);
752
- }
753
- }
754
- */
755
- `],c={EMAIL:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,URL:/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$/,PHONE:/^[\+]?[1-9][\d]{0,15}$/,PASSWORD_STRONG:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,ALPHANUMERIC:/^[a-zA-Z0-9]+$/,NUMERIC:/^\d+$/,ALPHA:/^[a-zA-Z]+$/,USERNAME:/^[a-zA-Z0-9_-]{3,16}$/,HEX_COLOR:/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,IPV4:/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,CREDIT_CARD:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|3[47][0-9]{13}|3[0-9]{13}|6(?:011|5[0-9]{2})[0-9]{12})$/},h=t=>({required:!0,message:t||"This field is required"}),p=t=>({type:"email",pattern:c.EMAIL,message:t||"Please enter a valid email address"}),v=t=>({type:"url",pattern:c.URL,message:t||"Please enter a valid URL"}),g=(t,i)=>({maxLength:t,message:i||`Maximum length is ${t} characters`}),y=(t,i)=>({type:"number",min:t,message:i||`Minimum value is ${t}`}),b=(t,i)=>({type:"number",max:t,message:i||`Maximum value is ${t}`});
495
+ color: var(--nr-success, #16a34a);
496
+ }
497
+
498
+ @keyframes nr-input-hourglass {
499
+ 0% { opacity: 0.7; transform: scale(1); }
500
+ 25% { opacity: 1; transform: scale(1.03); }
501
+ 50% { opacity: 0.8; transform: scale(1); }
502
+ 75% { opacity: 1; transform: scale(1.03); }
503
+ 100% { opacity: 0.7; transform: scale(1); }
504
+ }
505
+ `,d={EMAIL:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,URL:/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$/,PHONE:/^[\+]?[1-9][\d]{0,15}$/,PASSWORD_STRONG:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,ALPHANUMERIC:/^[a-zA-Z0-9]+$/,NUMERIC:/^\d+$/,ALPHA:/^[a-zA-Z]+$/,USERNAME:/^[a-zA-Z0-9_-]{3,16}$/,HEX_COLOR:/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,IPV4:/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,CREDIT_CARD:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|3[47][0-9]{13}|3[0-9]{13}|6(?:011|5[0-9]{2})[0-9]{12})$/},l=t=>({required:!0,message:t||"This field is required"}),h=t=>({type:"email",pattern:d.EMAIL,message:t||"Please enter a valid email address"}),c=t=>({type:"url",pattern:d.URL,message:t||"Please enter a valid URL"}),u=(t,i)=>({maxLength:t,message:i||`Maximum length is ${t} characters`}),p=(t,i)=>({type:"number",min:t,message:i||`Minimum value is ${t}`}),v=(t,i)=>({type:"number",max:t,message:i||`Maximum value is ${t}`}),m=t=>class extends t{constructor(){super(...arguments),this.handleSystemThemeChange=()=>{this.closest("[data-theme]")||document.documentElement.hasAttribute("data-theme")||this.requestUpdate()}}connectedCallback(){super.connectedCallback(),this.setupThemeObserver(),this.setupDesignSystemObserver(),this.setupSystemThemeListener()}disconnectedCallback(){var t,i,e;super.disconnectedCallback(),null===(t=this.themeObserver)||void 0===t||t.disconnect(),null===(i=this.designSystemObserver)||void 0===i||i.disconnect(),null===(e=this.mediaQuery)||void 0===e||e.removeEventListener("change",this.handleSystemThemeChange)}get currentTheme(){var t,i;const e=(null===(t=this.closest("[data-theme]"))||void 0===t?void 0:t.getAttribute("data-theme"))||document.documentElement.getAttribute("data-theme");return e||((null===(i=window.matchMedia)||void 0===i?void 0:i.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light")}get currentDesignSystem(){var t;const i=(null===(t=this.closest("[design-system]"))||void 0===t?void 0:t.getAttribute("design-system"))||document.documentElement.getAttribute("design-system");return"carbon"===i?i:"default"}setupThemeObserver(){this.themeObserver=new MutationObserver(()=>{this.requestUpdate()}),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})}setupDesignSystemObserver(){this.designSystemObserver=new MutationObserver(()=>{this.requestUpdate()}),this.designSystemObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["design-system"]})}setupSystemThemeListener(){window.matchMedia&&(this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.mediaQuery.addEventListener("change",this.handleSystemThemeChange))}},b=()=>{var t;return void 0!==globalThis.litElementVersions||"undefined"!=typeof process&&"development"===(null===(t=process.env)||void 0===t?void 0:t.NODE_ENV)||"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)},g=t=>class extends t{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(b())for(const t of this.requiredComponents)if(!this.isComponentAvailable(t))throw new Error(`Required component "${t}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}. Example: import '@nuralyui/${t}';`)}validateDependenciesWithHandler(t){if(!b())return!0;let i=!0;for(const e of this.requiredComponents)if(!this.isComponentAvailable(e)){i=!1;const r=new Error(`Required component "${e}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(e,r):console.error(r.message)}return i}isComponentAvailable(t){return!!customElements.get(t)}getMissingDependencies(){return this.requiredComponents.filter(t=>!this.isComponentAvailable(t))}areDependenciesAvailable(){return this.requiredComponents.every(t=>this.isComponentAvailable(t))}addRequiredComponent(t){this.requiredComponents.includes(t)||this.requiredComponents.push(t)}removeRequiredComponent(t){const i=this.requiredComponents.indexOf(t);i>-1&&this.requiredComponents.splice(i,1)}},f=t=>class extends t{dispatchCustomEvent(t,i){this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,i){var e;const r=Object.assign(Object.assign({},i),{timestamp:Date.now(),componentName:(null===(e=this.tagName)||void 0===e?void 0:e.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,r)}dispatchInputEvent(t,i){const e=Object.assign({target:i.target||this,value:i.value,originalEvent:i.originalEvent},i);this.dispatchCustomEvent(t,e)}dispatchFocusEvent(t,i){const e=Object.assign({target:i.target||this,value:i.value,focused:i.focused,cursorPosition:i.cursorPosition,selectedText:i.selectedText},i);this.dispatchCustomEvent(t,e)}dispatchValidationEvent(t,i){var e;const r=Object.assign({target:i.target||this,value:i.value,isValid:null!==(e=i.isValid)&&void 0!==e&&e,error:i.error},i);this.dispatchCustomEvent(t,r)}dispatchActionEvent(t,i){const e=Object.assign({target:i.target||this,action:i.action,previousValue:i.previousValue,newValue:i.newValue},i);this.dispatchCustomEvent(t,e)}isReadonlyKeyAllowed(t){if(t.ctrlKey||t.metaKey){return["KeyA","KeyC"].includes(t.code)}return["Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)}isActivationKey(t){return"Enter"===t.key||" "===t.key}},w=new Set,y=new Map;
756
506
  /**
757
507
  * @license
758
- * Copyright 2023 Google Laabidi Aymen
508
+ * Copyright 2023 Nuraly, Laabidi Aymen
759
509
  * SPDX-License-Identifier: MIT
760
510
  */
761
- class m{static validateNumericProperties(t,i,r,n){"number"===t&&(i&&Number.isNaN(Number(i))&&console.warn(`Invalid min value: "${i}" is not a valid number`),r&&Number.isNaN(Number(r))&&console.warn(`Invalid max value: "${r}" is not a valid number`),n&&Number.isNaN(Number(n))&&console.warn(`Invalid step value: "${n}" is not a valid number`),i&&r&&Number(i)>=Number(r)&&console.warn(`Invalid range: min value (${i}) should be less than max value (${r})`))}static preventNonNumericInput(t,i){const r=t.key,n=t.target,e=n.value,a=n.selectionStart||0;if(!(t.ctrlKey||t.metaKey||["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(r)||/^\d$/.test(r))){if("."===r||","===r){if(!(e.includes(".")||e.includes(",")))return}if("-"===r){const t=e.includes("-"),r=!i||Number(i)<0;if(!t&&0===a&&r)return}if("+"===r){if(!e.includes("+")&&0===a)return}t.preventDefault()}}static validateNumericValue(t,i,r){const n=[];if(!t)return{isValid:!0,warnings:n};const e=Number(t);return Number.isNaN(e)?{isValid:!1,warnings:[`Invalid numeric value: "${t}"`]}:(i&&e<Number(i)&&n.push(`Value ${e} is below minimum ${i}`),r&&e>Number(r)&&n.push(`Value ${e} is above maximum ${r}`),{isValid:!0,warnings:n})}}
511
+ const x=t=>{class i extends t{constructor(){super(...arguments),this.t=null}createRenderRoot(){return this.constructor.useShadowDom?super.createRenderRoot():this}connectedCallback(){const t=this.constructor.useShadowDom;if(!t&&null===this.t)for(this.t=[];this.firstChild;)this.t.push(this.removeChild(this.firstChild));if(super.connectedCallback(),!t){const t=this.constructor,i=this.tagName.toLowerCase(),e=t.styles;if(e){const t=V(e);t&&function(t,i,e){var r;if(!y.has(t)){const e=new CSSStyleSheet;e.replaceSync(i),y.set(t,e)}const n=y.get(t),s=`doc:${t}`;if(w.has(s)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,n],w.add(s)),e){let i=e;for(;i;){const e=i.getRootNode();if(!(e instanceof ShadowRoot))break;{const s=`shadow:${((null===(r=e.host)||void 0===r?void 0:r.tagName)||"").toLowerCase()}:${t}`;w.has(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n],w.add(s)),i=e.host}}}}(i,t,this)}}}get lightChildren(){return this.t?this.t.filter(t=>!(t instanceof Element&&t.hasAttribute("slot"))):[]}lightChildrenNamed(t){return this.t?this.t.filter(i=>i instanceof Element&&i.getAttribute("slot")===t):[]}}return i.useShadowDom=!1,i};function V(t){return Array.isArray(t)?t.map(t=>V(t)).filter(Boolean).join("\n"):t&&"string"==typeof t.cssText?t.cssText:"string"==typeof t?t:""}
762
512
  /**
763
513
  * @license
764
514
  * Copyright 2023 Google Laabidi Aymen
765
515
  * SPDX-License-Identifier: MIT
766
- */class f{static renderPrefix(){return i`
516
+ */class E{static validateNumericProperties(t,i,e,r){"number"===t&&(i&&Number.isNaN(Number(i))&&console.warn(`Invalid min value: "${i}" is not a valid number`),e&&Number.isNaN(Number(e))&&console.warn(`Invalid max value: "${e}" is not a valid number`),r&&Number.isNaN(Number(r))&&console.warn(`Invalid step value: "${r}" is not a valid number`),i&&e&&Number(i)>=Number(e)&&console.warn(`Invalid range: min value (${i}) should be less than max value (${e})`))}static preventNonNumericInput(t,i){const e=t.key,r=t.target,n=r.value,s=r.selectionStart||0;if(!(t.ctrlKey||t.metaKey||["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e)||/^\d$/.test(e))){if("."===e||","===e){if(!(n.includes(".")||n.includes(",")))return}if("-"===e){const t=n.includes("-"),e=!i||Number(i)<0;if(!t&&0===s&&e)return}if("+"===e){if(!n.includes("+")&&0===s)return}t.preventDefault()}}static validateNumericValue(t,i,e){const r=[];if(!t)return{isValid:!0,warnings:r};const n=Number(t);return Number.isNaN(n)?{isValid:!1,warnings:[`Invalid numeric value: "${t}"`]}:(i&&n<Number(i)&&r.push(`Value ${n} is below minimum ${i}`),e&&n>Number(e)&&r.push(`Value ${n} is above maximum ${e}`),{isValid:!0,warnings:r})}}
517
+ /**
518
+ * @license
519
+ * Copyright 2023 Google Laabidi Aymen
520
+ * SPDX-License-Identifier: MIT
521
+ */class ${static renderPrefix(t=[]){return 0===t.length?i:e`
767
522
  <div class="input-prefix">
768
- <slot name="prefix"></slot>
523
+ ${t}
769
524
  </div>
770
- `}static renderSuffix(){return i`
525
+ `}static renderSuffix(t=[]){return 0===t.length?i:e`
771
526
  <div class="input-suffix">
772
- <slot name="suffix"></slot>
527
+ ${t}
773
528
  </div>
774
- `}static renderAddonBefore(t,n){return t?i`
529
+ `}static renderAddonBefore(t,r=[]){return t?e`
775
530
  <div class="input-addon-before">
776
- <slot name="addon-before" @slotchange=${n}></slot>
531
+ ${r}
777
532
  </div>
778
- `:r}static renderAddonAfter(t,n){return t?i`
533
+ `:i}static renderAddonAfter(t,r=[]){return t?e`
779
534
  <div class="input-addon-after">
780
- <slot name="addon-after" @slotchange=${n}></slot>
535
+ ${r}
781
536
  </div>
782
- `:r}static renderCopyIcon(t,n,e,a,o){return t?i`<nr-icon
537
+ `:i}static renderCopyIcon(t,r,n,s,a){return t?e`<nr-icon
783
538
  name="copy"
784
539
  type="regular"
785
540
  id="copy-icon"
786
541
  role="button"
787
542
  aria-label="Copy input value"
788
543
  tabindex="0"
789
- @click=${n||e?r:a}
790
- @keydown=${o}
791
- ></nr-icon>`:r}static renderClearIcon(t,n,e,a,o,s){return!t||!n||e||a?r:i`<nr-icon
544
+ @click=${r||n?i:s}
545
+ @keydown=${a}
546
+ ></nr-icon>`:i}static renderClearIcon(t,r,n,s,a,o){return!t||!r||n||s?i:e`<nr-icon
792
547
  name="times-circle"
793
548
  type="regular"
794
549
  id="clear-icon"
795
550
  role="button"
796
551
  aria-label="Clear input value"
797
552
  tabindex="0"
798
- @click=${o}
799
- @keydown=${s}
800
- ></nr-icon>`}static renderStateIcon(t){switch(t){case"warning":return i`<nr-icon name="warning" id="warning-icon"></nr-icon>`;case"error":return i`<nr-icon name="exclamation-circle" id="error-icon"></nr-icon>`;default:return r}}static renderCalendarIcon(t,n){return"default"!==t||"calendar"!==n?r:i`<nr-icon name="calendar" type="regular" id="calendar-icon"></nr-icon>`}static renderPasswordIcon(t,n,e,a,o,s){return"password"!==t?r:"text"===n?i`<nr-icon
553
+ @click=${a}
554
+ @keydown=${o}
555
+ ></nr-icon>`}static renderStateIcon(t){switch(t){case"warning":return e`<nr-icon name="warning" id="warning-icon"></nr-icon>`;case"error":return e`<nr-icon name="exclamation-circle" id="error-icon"></nr-icon>`;default:return i}}static renderCalendarIcon(t,r){return"default"!==t||"calendar"!==r?i:e`<nr-icon name="calendar" type="regular" id="calendar-icon"></nr-icon>`}static renderPasswordIcon(t,r,n,s,a,o){return"password"!==t?i:"text"===r?e`<nr-icon
801
556
  name="eye-slash"
802
557
  type="regular"
803
558
  id="password-icon"
804
559
  role="button"
805
560
  aria-label="Hide password"
806
561
  tabindex="0"
807
- @click=${e||a?r:o}
808
- @keydown=${s}
809
- ></nr-icon>`:i`<nr-icon
562
+ @click=${n||s?i:a}
563
+ @keydown=${o}
564
+ ></nr-icon>`:e`<nr-icon
810
565
  name="eye"
811
566
  type="regular"
812
567
  id="password-icon"
813
568
  role="button"
814
569
  aria-label="Show password"
815
570
  tabindex="0"
816
- @click=${e||a?r:o}
817
- @keydown=${s}
818
- ></nr-icon>`}static renderNumberIcons(t,n,e,a,o,s,l){return"number"!==t?r:i`
571
+ @click=${n||s?i:a}
572
+ @keydown=${o}
573
+ ></nr-icon>`}static renderNumberIcons(t,r,n,s,a,o,d){return"number"!==t?i:e`
819
574
  <div id="number-icons">
820
- ${"default"!==n?i`<span id="icons-separator">|</span>`:r}
821
- <nr-icon
822
- name="minus"
575
+ ${"default"!==r?e`<span id="icons-separator">|</span>`:i}
576
+ <nr-icon
577
+ name="minus"
823
578
  aria-label="Decrease value"
824
579
  role="button"
825
580
  tabindex="0"
826
- @click=${e||a?r:s}
827
- @keydown=${l}
581
+ @click=${n||s?i:o}
582
+ @keydown=${d}
828
583
  ></nr-icon>
829
584
  <span id="icons-separator">|</span>
830
- <nr-icon
831
- name="plus"
585
+ <nr-icon
586
+ name="plus"
832
587
  aria-label="Increase value"
833
588
  role="button"
834
589
  tabindex="0"
835
- @click=${e||a?r:o}
836
- @keydown=${l}
590
+ @click=${n||s?i:a}
591
+ @keydown=${d}
837
592
  ></nr-icon>
838
593
  </div>
839
594
  `}}
@@ -841,7 +596,7 @@ class m{static validateNumericProperties(t,i,r,n){"number"===t&&(i&&Number.isNaN
841
596
  * @license
842
597
  * Copyright 2023 Nuraly, Laabidi Aymen
843
598
  * SPDX-License-Identifier: MIT
844
- */const w=t=>class extends t{get inputElement(){var t;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#input, input, textarea");if(i)return i;const r=this.querySelector("input, textarea");if(!r)throw new Error("SelectionMixin requires an input or textarea element");return r}selectAll(){const t=this.inputElement;t&&t.select()}selectRange(t,i){const r=this.inputElement;r&&r.setSelectionRange&&(r.focus(),r.setSelectionRange(t,i))}getCursorPosition(){const t=this.inputElement;return t&&"number"==typeof t.selectionStart?t.selectionStart:null}setCursorPosition(t){const i=this.inputElement;i&&i.setSelectionRange&&(i.focus(),i.setSelectionRange(t,t))}getSelectedText(){const t=this.inputElement;return t&&null!==t.selectionStart&&null!==t.selectionEnd?t.value.substring(t.selectionStart,t.selectionEnd):""}},x=t=>class extends t{get inputElement(){var t;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#input, input, textarea");if(i)return i;const r=this.querySelector("input, textarea");if(!r)throw new Error("FocusMixin requires an input or textarea element");return r}focus(t={}){const i=this.inputElement;i&&(i.focus({preventScroll:t.preventScroll}),t.selectText&&i.select())}blur(){const t=this.inputElement;t&&t.blur()}isFocused(){const t=this.inputElement;return!!t&&document.activeElement===t}},k=t=>class extends t{get inputElement(){var t;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#input, input");if(i)return i;const r=this.querySelector("input");if(!r)throw new Error("NumberMixin requires an input element");return r}dispatchInputEvent(t,i){"_dispatchInputEvent"in this&&"function"==typeof this._dispatchInputEvent?this._dispatchInputEvent(t,i):this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}increment(){try{const t=this.inputElement;if(!t.value){const i=t.getAttribute("min");t.value=i||"0"}t.stepUp();const i=t.value;this.dispatchInputEvent("nr-input",{value:i,target:t,action:"increment"}),"value"in this&&(this.value=i)}catch(t){console.warn("Failed to increment value:",t),this.dispatchInputEvent("nr-increment-error",{error:t,value:this.inputElement.value,target:this.inputElement})}}decrement(){try{const t=this.inputElement;t.stepDown();const i=t.value;this.dispatchInputEvent("nr-input",{value:i,target:t,action:"decrement"}),"value"in this&&(this.value=i)}catch(t){console.warn("Failed to decrement value:",t),this.dispatchInputEvent("nr-decrement-error",{error:t,value:this.inputElement.value,target:this.inputElement})}}setStep(t){const i=this.inputElement;t&&this.isValidStep(t)?i.setAttribute("step",t):i.removeAttribute("step")}isValidStep(t){if(!t)return!0;const i=Number.parseFloat(t);return!Number.isNaN(i)&&i>0}};
599
+ */const S=t=>class extends t{get inputElement(){var t;const i=this.querySelector("#input, input, textarea");if(i)return i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#input, input, textarea");if(e)return e;throw new Error("SelectionMixin requires an input or textarea element")}selectAll(){const t=this.inputElement;t&&t.select()}selectRange(t,i){const e=this.inputElement;e&&e.setSelectionRange&&(e.focus(),e.setSelectionRange(t,i))}getCursorPosition(){const t=this.inputElement;return t&&"number"==typeof t.selectionStart?t.selectionStart:null}setCursorPosition(t){const i=this.inputElement;i&&i.setSelectionRange&&(i.focus(),i.setSelectionRange(t,t))}getSelectedText(){const t=this.inputElement;return t&&null!==t.selectionStart&&null!==t.selectionEnd?t.value.substring(t.selectionStart,t.selectionEnd):""}},A=t=>class extends t{get inputElement(){var t;const i=this.querySelector("#input, input, textarea");if(i)return i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#input, input, textarea");if(e)return e;throw new Error("FocusMixin requires an input or textarea element")}focus(t={}){const i=this.inputElement;i&&(i.focus({preventScroll:t.preventScroll}),t.selectText&&i.select())}blur(){const t=this.inputElement;t&&t.blur()}isFocused(){const t=this.inputElement;return!!t&&document.activeElement===t}},k=t=>class extends t{get inputElement(){var t;const i=this.querySelector("#input, input");if(i)return i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#input, input");if(e)return e;throw new Error("NumberMixin requires an input element")}dispatchInputEvent(t,i){"_dispatchInputEvent"in this&&"function"==typeof this._dispatchInputEvent?this._dispatchInputEvent(t,i):this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}increment(){try{const t=this.inputElement;if(!t.value){const i=t.getAttribute("min");t.value=i||"0"}t.stepUp();const i=t.value;this.dispatchInputEvent("nr-input",{value:i,target:t,action:"increment"}),"value"in this&&(this.value=i)}catch(t){console.warn("Failed to increment value:",t),this.dispatchInputEvent("nr-increment-error",{error:t,value:this.inputElement.value,target:this.inputElement})}}decrement(){try{const t=this.inputElement;t.stepDown();const i=t.value;this.dispatchInputEvent("nr-input",{value:i,target:t,action:"decrement"}),"value"in this&&(this.value=i)}catch(t){console.warn("Failed to decrement value:",t),this.dispatchInputEvent("nr-decrement-error",{error:t,value:this.inputElement.value,target:this.inputElement})}}setStep(t){const i=this.inputElement;t&&this.isValidStep(t)?i.setAttribute("step",t):i.removeAttribute("step")}isValidStep(t){if(!t)return!0;const i=Number.parseFloat(t);return!Number.isNaN(i)&&i>0}};
845
600
  /**
846
601
  * @license
847
602
  * Copyright 2023 Nuraly, Laabidi Aymen
@@ -852,48 +607,63 @@ class m{static validateNumericProperties(t,i,r,n){"number"===t&&(i&&Number.isNaN
852
607
  * Copyright 2023 Nuraly, Laabidi Aymen
853
608
  * SPDX-License-Identifier: MIT
854
609
  */
855
- class V extends l{}
610
+ class N{constructor(t){this._host=t,t.addController(this)}get host(){return this._host}hostConnected(){}hostDisconnected(){}hostUpdate(){}hostUpdated(){}requestUpdate(){try{this._host.requestUpdate()}catch(t){this.handleError(t,"requestUpdate")}}dispatchEvent(t){try{return this._host.dispatchEvent(t)}catch(t){return this.handleError(t,"dispatchEvent"),!1}}handleError(t,i){console.error(`[${this.constructor.name}] Error in ${i}:`,t);try{this._host.dispatchEvent(new CustomEvent("nr-controller-error",{detail:{error:t.message,context:i,controller:this.constructor.name},bubbles:!0,composed:!0}))}catch(t){}}safeExecute(t,i,e){try{return t()}catch(t){return this.handleError(t,i),e}}debounce(t,i){let e;const r=(...r)=>{void 0!==e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,t.apply(this,r)},i)};return r.cancel=()=>{void 0!==e&&(clearTimeout(e),e=void 0)},r}}
611
+ /**
612
+ * @license
613
+ * Copyright 2023 Nuraly, Laabidi Aymen
614
+ * SPDX-License-Identifier: MIT
615
+ */class R extends N{constructor(){super(...arguments),this._isValid=!0,this._validationMessage="",this._validationState="pristine",this._rules=[]}get isValid(){return this._isValid}get validationMessage(){return this._validationMessage}get validationState(){return this._validationState}addRule(t){this._rules.push(t),this.requestUpdate()}removeRule(t){this._rules=this._rules.filter(i=>!t(i)),this.requestUpdate()}clearRules(){this._rules=[],this.clearValidation()}clearValidation(){this._isValid=!0,this._validationMessage="",this._validationState="pristine",this.requestUpdate(),this.dispatchValidationEvent()}checkValidity(){return this.validate()}reportValidity(){const t=this.checkValidity();return t||this.dispatchValidationEvent(),t}dispatchValidationEvent(){this.dispatchEvent(new CustomEvent("nr-validation",{detail:{isValid:this._isValid,validationMessage:this._validationMessage,validationState:this._validationState},bubbles:!0,composed:!0}))}}
616
+ /**
617
+ * @license
618
+ * Copyright 2023 Nuraly, Laabidi Aymen
619
+ * SPDX-License-Identifier: MIT
620
+ */class T extends N{}
856
621
  /**
857
622
  * @license
858
623
  * Copyright 2023 Nuraly, Laabidi Aymen
859
624
  * SPDX-License-Identifier: MIT
860
- */var S;!function(t){t.Pristine="pristine",t.Pending="pending",t.Valid="valid",t.Invalid="invalid",t.Warning="warning"}(S||(S={}));class A extends V{constructor(){super(...arguments),this._validationState=S.Pristine,this._isValidating=!1,this._isValid=!0,this._validationMessage="",this._validationResult={isValid:!0,errors:[],warnings:[],hasError:!1,hasWarning:!1},this._debounceTimer=null}get stateHost(){return this.host}get validationState(){return this._validationState}get isValidating(){return this._isValidating}get isValid(){return this._isValid}get validationMessage(){return this._validationMessage}get validationResult(){return this._validationResult}setValidationState(t){if(this._validationState!==t){const i=this._validationState;this._validationState=t,this.dispatchStateChangeEvent(i,t),this.requestUpdate()}}setValidationResult(t){this._validationResult=t,this._isValid=t.isValid,this._validationMessage=t.hasError?t.errorMessage||"":t.hasWarning&&t.warningMessage||"";let i=S.Valid;t.hasError?i=S.Invalid:t.hasWarning&&this.stateHost.allowWarnings&&(i=S.Warning),this.setValidationState(i)}setValidating(t){this._isValidating!==t&&(this._isValidating=t,t&&this.setValidationState(S.Pending),this.requestUpdate())}shouldValidateOnChange(){return this.stateHost.validateOnChangeInput&&("change"===this.stateHost.validationTrigger||this._validationState!==S.Pristine)}shouldValidateOnBlur(){return this.stateHost.validateOnBlurInput&&("blur"===this.stateHost.validationTrigger||"change"===this.stateHost.validationTrigger)}clearDebounceTimer(){null!==this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null)}debounceValidation(t){this.clearDebounceTimer();const i=this.stateHost.validationDebounce;i&&i>0?this._debounceTimer=window.setTimeout(()=>{this._debounceTimer=null,t()},i):t()}resetValidationState(){this.clearDebounceTimer(),this._validationState=S.Pristine,this._isValidating=!1,this._isValid=!0,this._validationMessage="",this._validationResult={isValid:!0,errors:[],warnings:[],hasError:!1,hasWarning:!1},this.requestUpdate()}markAsTouched(){this._validationState===S.Pristine&&this.setValidationState(S.Valid)}isPristine(){return this._validationState===S.Pristine}hasError(){return this._validationState===S.Invalid}hasWarning(){return this._validationState===S.Warning}isPending(){return this._validationState===S.Pending}getStateSummary(){return{state:this._validationState,isValidating:this._isValidating,isValid:this._isValid,message:this._validationMessage,result:this._validationResult,isPristine:this.isPristine(),hasError:this.hasError(),hasWarning:this.hasWarning(),shouldValidateOnChange:this.shouldValidateOnChange(),shouldValidateOnBlur:this.shouldValidateOnBlur()}}hostDisconnected(){super.hostDisconnected(),this.clearDebounceTimer()}dispatchStateChangeEvent(t,i){this.dispatchEvent(new CustomEvent("nr-validation-state-change",{detail:{previousState:t,newState:i,isValidating:this._isValidating,isValid:this._isValid,validationResult:this._validationResult},bubbles:!0,composed:!0}))}}
625
+ */var C;!function(t){t.Pristine="pristine",t.Pending="pending",t.Valid="valid",t.Invalid="invalid",t.Warning="warning"}(C||(C={}));class I extends T{constructor(){super(...arguments),this._validationState=C.Pristine,this._isValidating=!1,this._isValid=!0,this._validationMessage="",this._validationResult={isValid:!0,errors:[],warnings:[],hasError:!1,hasWarning:!1},this._debounceTimer=null}get stateHost(){return this.host}get validationState(){return this._validationState}get isValidating(){return this._isValidating}get isValid(){return this._isValid}get validationMessage(){return this._validationMessage}get validationResult(){return this._validationResult}setValidationState(t){if(this._validationState!==t){const i=this._validationState;this._validationState=t,this.dispatchStateChangeEvent(i,t),this.requestUpdate()}}setValidationResult(t){this._validationResult=t,this._isValid=t.isValid,this._validationMessage=t.hasError?t.errorMessage||"":t.hasWarning&&t.warningMessage||"";let i=C.Valid;t.hasError?i=C.Invalid:t.hasWarning&&this.stateHost.allowWarnings&&(i=C.Warning),this.setValidationState(i)}setValidating(t){this._isValidating!==t&&(this._isValidating=t,t&&this.setValidationState(C.Pending),this.requestUpdate())}shouldValidateOnChange(){return this.stateHost.validateOnChangeInput&&("change"===this.stateHost.validationTrigger||this._validationState!==C.Pristine)}shouldValidateOnBlur(){return this.stateHost.validateOnBlurInput&&("blur"===this.stateHost.validationTrigger||"change"===this.stateHost.validationTrigger)}clearDebounceTimer(){null!==this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null)}debounceValidation(t){this.clearDebounceTimer();const i=this.stateHost.validationDebounce;i&&i>0?this._debounceTimer=window.setTimeout(()=>{this._debounceTimer=null,t()},i):t()}resetValidationState(){this.clearDebounceTimer(),this._validationState=C.Pristine,this._isValidating=!1,this._isValid=!0,this._validationMessage="",this._validationResult={isValid:!0,errors:[],warnings:[],hasError:!1,hasWarning:!1},this.requestUpdate()}markAsTouched(){this._validationState===C.Pristine&&this.setValidationState(C.Valid)}isPristine(){return this._validationState===C.Pristine}hasError(){return this._validationState===C.Invalid}hasWarning(){return this._validationState===C.Warning}isPending(){return this._validationState===C.Pending}getStateSummary(){return{state:this._validationState,isValidating:this._isValidating,isValid:this._isValid,message:this._validationMessage,result:this._validationResult,isPristine:this.isPristine(),hasError:this.hasError(),hasWarning:this.hasWarning(),shouldValidateOnChange:this.shouldValidateOnChange(),shouldValidateOnBlur:this.shouldValidateOnBlur()}}hostDisconnected(){super.hostDisconnected(),this.clearDebounceTimer()}dispatchStateChangeEvent(t,i){this.dispatchEvent(new CustomEvent("nr-validation-state-change",{detail:{previousState:t,newState:i,isValidating:this._isValidating,isValid:this._isValid,validationResult:this._validationResult},bubbles:!0,composed:!0}))}}
861
626
  /**
862
627
  * @license
863
628
  * Copyright 2023 Nuraly, Laabidi Aymen
864
629
  * SPDX-License-Identifier: MIT
865
- */var $=function(t,i,r,n){return new(r||(r=Promise))(function(e,a){function o(t){try{l(n.next(t))}catch(t){a(t)}}function s(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r(function(t){t(i)})).then(o,s)}l((n=n.apply(t,i||[])).next())})};class E extends d{constructor(){super(...arguments),this.stateController=new A(this._host)}get validationHost(){return this._host}get isValid(){return this.stateController.isValid}get validationMessage(){return this.stateController.validationMessage}get validationState(){return this.stateController.validationState}get validationResult(){return this.stateController.validationResult}get isValidating(){return this.stateController.isValidating}hostConnected(){this.setupValidationRules()}hostUpdated(){}setupValidationRules(){const t=[],i=this.validationHost;"email"===i.type&&t.push(p()),"url"===i.type&&t.push(v()),i.required&&t.push(h(i.label?`${i.label} is required`:void 0)),i.maxLength&&t.push(g(i.maxLength)),"number"===i.type&&(void 0!==i.min&&t.push(y(Number(i.min))),void 0!==i.max&&t.push(b(Number(i.max))));const r=i.rules||[],n=[...t.filter(t=>!r.some(i=>this.isSameRuleType(t,i))),...r];JSON.stringify(i.rules)!==JSON.stringify(n)&&(i.rules=n,this.requestUpdate())}validate(){try{this.stateController.setValidationState(S.Pending),this.stateController.setValidating(!0),this.dispatchInputValidationEvent();if(this.hasAsyncValidators())return this.performAsyncValidation(this.validationHost.value),!0;const t=this.performDetailedValidation(this.validationHost.value);return this.stateController.setValidationResult(t),t.hasError?this.setValidationResult(!1,this.stateController.validationMessage,S.Invalid):t.hasWarning&&this.validationHost.allowWarnings?this.setValidationResult(!0,this.stateController.validationMessage,S.Warning):this.setValidationResult(!0,"",S.Valid),this.stateController.setValidating(!1),this.updateHostValidationState(),t.isValid}catch(t){return this.handleError(t,"validate"),this.stateController.setValidating(!1),this.setValidationResult(!1,"Validation error occurred",S.Invalid),this.updateHostValidationState(),!1}}validateOnChange(){this.stateController.shouldValidateOnChange()&&this.stateController.debounceValidation(()=>{this.validate()})}validateOnBlur(){this.stateController.shouldValidateOnBlur()&&(this.stateController.clearDebounceTimer(),this.validate())}addInputRule(t){const i=this.validationHost.rules||[];this.validationHost.rules=[...i,t],this.requestUpdate()}removeInputRule(t){const i=this.validationHost.rules||[];this.validationHost.rules=i.filter(i=>!t(i)),this.requestUpdate()}clearInputRules(){this.validationHost.rules=[],this.reset()}hasAsyncValidators(){return(this.validationHost.rules||[]).some(t=>t.asyncValidator||t.validator&&this.isValidatorAsync(t.validator))}isValidatorAsync(t){const i=t.toString();return i.includes("Promise")||i.includes("async")||i.includes("setTimeout")||i.includes("new Promise")}performAsyncValidation(t){return $(this,void 0,void 0,function*(){try{this.stateController.setValidating(!0),this.updateHostValidationState();const i=[],r=[],n=this.validationHost.rules||[];for(const e of n)if(!(e.asyncValidator||e.validator&&this.isValidatorAsync(e.validator))){const n=this.validateRule(e,t);n.isValid||(e.warningOnly&&this.validationHost.allowWarnings?r.push(n.message):i.push(n.message))}if(i.length>0)return this.stateController.setValidationResult({isValid:!1,errors:i,warnings:r,hasError:!0,hasWarning:r.length>0,errorMessage:i[0],warningMessage:r[0]}),this.setValidationResult(!1,this.stateController.validationMessage,S.Invalid),this.stateController.setValidating(!1),void this.updateHostValidationState();for(const e of n)if(e.asyncValidator||e.validator&&this.isValidatorAsync(e.validator))try{yield this.validateAsyncRule(e,t)}catch(t){const n=t.message||e.message||"Validation failed";e.warningOnly&&this.validationHost.allowWarnings?r.push(n):i.push(n)}const e=i.length>0,a=r.length>0;this.stateController.setValidationResult({isValid:!e,errors:i,warnings:r,hasError:e,hasWarning:a,errorMessage:i[0],warningMessage:r[0]}),e?this.setValidationResult(!1,this.stateController.validationMessage,S.Invalid):a&&this.validationHost.allowWarnings?this.setValidationResult(!0,this.stateController.validationMessage,S.Warning):this.setValidationResult(!0,"",S.Valid),this.stateController.setValidating(!1),this.updateHostValidationState()}catch(t){this.handleError(t,"performAsyncValidation"),this.stateController.setValidating(!1),this.setValidationResult(!1,"Async validation error occurred",S.Invalid),this.updateHostValidationState()}})}validateAsyncRule(t,i){return $(this,void 0,void 0,function*(){if(t.asyncValidator)yield t.asyncValidator(t,i);else if(t.validator){const r=t.validator(t,i);r&&"object"==typeof r&&"then"in r&&(yield r)}})}reset(){this.stateController.setValidationResult({isValid:!0,errors:[],warnings:[],hasError:!1,hasWarning:!1}),this.stateController.setValidationState(S.Pristine),this.stateController.setValidating(!1),this.updateHostValidationState(),this.dispatchInputValidationEvent()}getValidationStatus(){return{isValid:this.stateController.validationResult.isValid,isValidating:this.stateController.isValidating,errors:this.stateController.validationResult.errors,warnings:this.stateController.validationResult.warnings,validationResult:this.stateController.validationResult}}setValidationStatus(t){this.stateController.setValidationResult(t),t.hasError?this.setValidationResult(!1,this.stateController.validationMessage,S.Invalid):t.hasWarning?this.setValidationResult(!0,this.stateController.validationMessage,S.Warning):t.isValid?this.setValidationResult(!0,"",S.Valid):this.setValidationResult(!0,"",S.Pristine),this.updateHostValidationState()}performDetailedValidation(t){const i=[],r=[],n=this.validationHost.rules||[];for(const e of n){const n=this.validateRule(e,t);n.isValid||(e.warningOnly&&this.validationHost.allowWarnings?r.push(n.message):i.push(n.message))}const e=i.length>0;return{isValid:!e,errors:i,warnings:r,hasError:e,hasWarning:r.length>0,errorMessage:i[0],warningMessage:r[0]}}validateRule(t,i){if(t.asyncValidator||t.validator&&this.isValidatorAsync(t.validator))return{isValid:!0,message:""};const r=t.transform?t.transform(i):i;if(t.required&&this.isValueEmpty(i))return{isValid:!1,message:t.message||`${this.validationHost.label||"This field"} is required`};if(this.isValueEmpty(i)&&!t.required)return{isValid:!0,message:""};if(t.type){const i=this.validateType(t.type,r);if(!i.isValid)return{isValid:!1,message:t.message||i.message}}if(t.pattern&&!t.pattern.test(r))return{isValid:!1,message:t.message||"Invalid format"};if(void 0!==t.minLength&&r.length<t.minLength)return{isValid:!1,message:t.message||`Minimum length is ${t.minLength} characters`};if(void 0!==t.maxLength&&r.length>t.maxLength)return{isValid:!1,message:t.message||`Maximum length is ${t.maxLength} characters`};if("number"===t.type||"number"===this.validationHost.type){const i=Number(r);if(void 0!==t.min&&i<t.min)return{isValid:!1,message:t.message||`Minimum value is ${t.min}`};if(void 0!==t.max&&i>t.max)return{isValid:!1,message:t.message||`Maximum value is ${t.max}`}}if(t.enum&&!t.enum.includes(r))return{isValid:!1,message:t.message||`Value must be one of: ${t.enum.join(", ")}`};if(t.validator)try{const i=t.validator(t,r);return i&&"object"==typeof i&&"isValid"in i?{isValid:i.isValid,message:i.isValid?"":i.message||t.message||"Validation failed"}:{isValid:!0,message:""}}catch(i){return{isValid:!1,message:t.message||i.message||"Validation failed"}}return{isValid:!0,message:""}}validateType(t,i){switch(t){case"email":return{isValid:c.EMAIL.test(i),message:"Please enter a valid email address"};case"url":return{isValid:c.URL.test(i),message:"Please enter a valid URL"};case"number":case"integer":return{isValid:!Number.isNaN(Number(i))&&("number"===t||Number.isInteger(Number(i))),message:`Please enter a valid ${t}`};case"float":return{isValid:!Number.isNaN(Number.parseFloat(i)),message:"Please enter a valid number"};default:return{isValid:!0,message:""}}}isValueEmpty(t){return null==t||""===t}isSameRuleType(t,i){return t.type===i.type&&t.required===i.required&&!!t.pattern==!!i.pattern}setValidationResult(t,i,r){const n=this.stateController.isValid!==t||this.stateController.validationMessage!==i||this.stateController.validationState!==r;this.stateController.setValidationState(r),this.stateController.setValidationResult({isValid:t,errors:t?[]:[i],warnings:[],hasError:!t,hasWarning:!1,errorMessage:t?"":i,warningMessage:""}),this._isValid=t,this._validationMessage=i,this._validationState=r,n&&this.dispatchInputValidationEvent()}updateHostValidationState(){this.dispatchInputValidationEvent()}dispatchInputValidationEvent(){const t={isValid:this.stateController.isValid,validationMessage:this.stateController.validationMessage,validationState:this.stateController.validationState,errors:this.stateController.validationResult.errors,warnings:this.stateController.validationResult.warnings,validationResult:this.stateController.validationResult};this.dispatchEvent(new CustomEvent("nr-validation",{detail:t,bubbles:!0,composed:!0}))}getValidationClasses(){const t=this.host,i=this.host;return{valid:this.stateController.validationResult.isValid&&!this.stateController.validationResult.hasWarning,invalid:this.stateController.validationResult.hasError,warning:this.stateController.validationResult.hasWarning&&!this.stateController.validationResult.hasError,validating:this.stateController.isValidating,"has-feedback":i.hasFeedback||!1,touched:t.isTouched||!1,dirty:t.isDirty||!1,required:this.host.required||!1}}hasValidationFeedback(){const t=this.host;return!!t.hasFeedback&&(this.stateController.isValidating||this.stateController.validationResult.hasError||this.stateController.validationResult.hasWarning||this.stateController.validationResult.isValid&&t.value&&""!==t.value.trim()&&this.stateController.validationState!==S.Pristine)}renderValidationIcon(){const t=this.host;if(!t.hasFeedback)return"";let r="",n="";return this.stateController.isValidating?(r="hourglass-half",n="validation-loading"):this.stateController.validationResult.hasError?(r="exclamation-circle",n="validation-error"):this.stateController.validationResult.hasWarning?(r="exclamation-triangle",n="validation-warning"):this.stateController.validationResult.isValid&&t.value&&""!==t.value.trim()&&this.stateController.validationState!==S.Pristine&&(r="check-circle",n="validation-success"),r?i`
630
+ */var P=function(t,i,e,r){return new(e||(e=Promise))(function(n,s){function a(t){try{d(r.next(t))}catch(t){s(t)}}function o(t){try{d(r.throw(t))}catch(t){s(t)}}function d(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e(function(t){t(i)})).then(a,o)}d((r=r.apply(t,i||[])).next())})};class O extends R{constructor(){super(...arguments),this.stateController=new I(this._host)}get validationHost(){return this._host}get isValid(){return this.stateController.isValid}get validationMessage(){return this.stateController.validationMessage}get validationState(){return this.stateController.validationState}get validationResult(){return this.stateController.validationResult}get isValidating(){return this.stateController.isValidating}hostConnected(){this.setupValidationRules()}hostUpdated(){}setupValidationRules(){const t=[],i=this.validationHost;"email"===i.type&&t.push(h()),"url"===i.type&&t.push(c()),i.required&&t.push(l(i.label?`${i.label} is required`:void 0)),i.maxLength&&t.push(u(i.maxLength)),"number"===i.type&&(void 0!==i.min&&t.push(p(Number(i.min))),void 0!==i.max&&t.push(v(Number(i.max))));const e=i.rules||[],r=[...t.filter(t=>!e.some(i=>this.isSameRuleType(t,i))),...e];JSON.stringify(i.rules)!==JSON.stringify(r)&&(i.rules=r,this.requestUpdate())}validate(){try{this.stateController.setValidationState(C.Pending),this.stateController.setValidating(!0),this.dispatchInputValidationEvent();if(this.hasAsyncValidators())return this.performAsyncValidation(this.validationHost.value),!0;const t=this.performDetailedValidation(this.validationHost.value);return this.stateController.setValidationResult(t),t.hasError?this.setValidationResult(!1,this.stateController.validationMessage,C.Invalid):t.hasWarning&&this.validationHost.allowWarnings?this.setValidationResult(!0,this.stateController.validationMessage,C.Warning):this.setValidationResult(!0,"",C.Valid),this.stateController.setValidating(!1),this.updateHostValidationState(),t.isValid}catch(t){return this.handleError(t,"validate"),this.stateController.setValidating(!1),this.setValidationResult(!1,"Validation error occurred",C.Invalid),this.updateHostValidationState(),!1}}validateOnChange(){this.stateController.shouldValidateOnChange()&&this.stateController.debounceValidation(()=>{this.validate()})}validateOnBlur(){this.stateController.shouldValidateOnBlur()&&(this.stateController.clearDebounceTimer(),this.validate())}addInputRule(t){const i=this.validationHost.rules||[];this.validationHost.rules=[...i,t],this.requestUpdate()}removeInputRule(t){const i=this.validationHost.rules||[];this.validationHost.rules=i.filter(i=>!t(i)),this.requestUpdate()}clearInputRules(){this.validationHost.rules=[],this.reset()}hasAsyncValidators(){return(this.validationHost.rules||[]).some(t=>t.asyncValidator||t.validator&&this.isValidatorAsync(t.validator))}isValidatorAsync(t){const i=t.toString();return i.includes("Promise")||i.includes("async")||i.includes("setTimeout")||i.includes("new Promise")}performAsyncValidation(t){return P(this,void 0,void 0,function*(){try{this.stateController.setValidating(!0),this.updateHostValidationState();const i=[],e=[],r=this.validationHost.rules||[];for(const n of r)if(!(n.asyncValidator||n.validator&&this.isValidatorAsync(n.validator))){const r=this.validateRule(n,t);r.isValid||(n.warningOnly&&this.validationHost.allowWarnings?e.push(r.message):i.push(r.message))}if(i.length>0)return this.stateController.setValidationResult({isValid:!1,errors:i,warnings:e,hasError:!0,hasWarning:e.length>0,errorMessage:i[0],warningMessage:e[0]}),this.setValidationResult(!1,this.stateController.validationMessage,C.Invalid),this.stateController.setValidating(!1),void this.updateHostValidationState();for(const n of r)if(n.asyncValidator||n.validator&&this.isValidatorAsync(n.validator))try{yield this.validateAsyncRule(n,t)}catch(t){const r=t.message||n.message||"Validation failed";n.warningOnly&&this.validationHost.allowWarnings?e.push(r):i.push(r)}const n=i.length>0,s=e.length>0;this.stateController.setValidationResult({isValid:!n,errors:i,warnings:e,hasError:n,hasWarning:s,errorMessage:i[0],warningMessage:e[0]}),n?this.setValidationResult(!1,this.stateController.validationMessage,C.Invalid):s&&this.validationHost.allowWarnings?this.setValidationResult(!0,this.stateController.validationMessage,C.Warning):this.setValidationResult(!0,"",C.Valid),this.stateController.setValidating(!1),this.updateHostValidationState()}catch(t){this.handleError(t,"performAsyncValidation"),this.stateController.setValidating(!1),this.setValidationResult(!1,"Async validation error occurred",C.Invalid),this.updateHostValidationState()}})}validateAsyncRule(t,i){return P(this,void 0,void 0,function*(){if(t.asyncValidator)yield t.asyncValidator(t,i);else if(t.validator){const e=t.validator(t,i);e&&"object"==typeof e&&"then"in e&&(yield e)}})}reset(){this.stateController.setValidationResult({isValid:!0,errors:[],warnings:[],hasError:!1,hasWarning:!1}),this.stateController.setValidationState(C.Pristine),this.stateController.setValidating(!1),this.updateHostValidationState(),this.dispatchInputValidationEvent()}getValidationStatus(){return{isValid:this.stateController.validationResult.isValid,isValidating:this.stateController.isValidating,errors:this.stateController.validationResult.errors,warnings:this.stateController.validationResult.warnings,validationResult:this.stateController.validationResult}}setValidationStatus(t){this.stateController.setValidationResult(t),t.hasError?this.setValidationResult(!1,this.stateController.validationMessage,C.Invalid):t.hasWarning?this.setValidationResult(!0,this.stateController.validationMessage,C.Warning):t.isValid?this.setValidationResult(!0,"",C.Valid):this.setValidationResult(!0,"",C.Pristine),this.updateHostValidationState()}performDetailedValidation(t){const i=[],e=[],r=this.validationHost.rules||[];for(const n of r){const r=this.validateRule(n,t);r.isValid||(n.warningOnly&&this.validationHost.allowWarnings?e.push(r.message):i.push(r.message))}const n=i.length>0;return{isValid:!n,errors:i,warnings:e,hasError:n,hasWarning:e.length>0,errorMessage:i[0],warningMessage:e[0]}}validateRule(t,i){if(t.asyncValidator||t.validator&&this.isValidatorAsync(t.validator))return{isValid:!0,message:""};const e=t.transform?t.transform(i):i;if(t.required&&this.isValueEmpty(i))return{isValid:!1,message:t.message||`${this.validationHost.label||"This field"} is required`};if(this.isValueEmpty(i)&&!t.required)return{isValid:!0,message:""};if(t.type){const i=this.validateType(t.type,e);if(!i.isValid)return{isValid:!1,message:t.message||i.message}}if(t.pattern&&!t.pattern.test(e))return{isValid:!1,message:t.message||"Invalid format"};if(void 0!==t.minLength&&e.length<t.minLength)return{isValid:!1,message:t.message||`Minimum length is ${t.minLength} characters`};if(void 0!==t.maxLength&&e.length>t.maxLength)return{isValid:!1,message:t.message||`Maximum length is ${t.maxLength} characters`};if("number"===t.type||"number"===this.validationHost.type){const i=Number(e);if(void 0!==t.min&&i<t.min)return{isValid:!1,message:t.message||`Minimum value is ${t.min}`};if(void 0!==t.max&&i>t.max)return{isValid:!1,message:t.message||`Maximum value is ${t.max}`}}if(t.enum&&!t.enum.includes(e))return{isValid:!1,message:t.message||`Value must be one of: ${t.enum.join(", ")}`};if(t.validator)try{const i=t.validator(t,e);return i&&"object"==typeof i&&"isValid"in i?{isValid:i.isValid,message:i.isValid?"":i.message||t.message||"Validation failed"}:{isValid:!0,message:""}}catch(i){return{isValid:!1,message:t.message||i.message||"Validation failed"}}return{isValid:!0,message:""}}validateType(t,i){switch(t){case"email":return{isValid:d.EMAIL.test(i),message:"Please enter a valid email address"};case"url":return{isValid:d.URL.test(i),message:"Please enter a valid URL"};case"number":case"integer":return{isValid:!Number.isNaN(Number(i))&&("number"===t||Number.isInteger(Number(i))),message:`Please enter a valid ${t}`};case"float":return{isValid:!Number.isNaN(Number.parseFloat(i)),message:"Please enter a valid number"};default:return{isValid:!0,message:""}}}isValueEmpty(t){return null==t||""===t}isSameRuleType(t,i){return t.type===i.type&&t.required===i.required&&!!t.pattern==!!i.pattern}setValidationResult(t,i,e){const r=this.stateController.isValid!==t||this.stateController.validationMessage!==i||this.stateController.validationState!==e;this.stateController.setValidationState(e),this.stateController.setValidationResult({isValid:t,errors:t?[]:[i],warnings:[],hasError:!t,hasWarning:!1,errorMessage:t?"":i,warningMessage:""}),this._isValid=t,this._validationMessage=i,this._validationState=e,r&&this.dispatchInputValidationEvent()}updateHostValidationState(){this.dispatchInputValidationEvent()}dispatchInputValidationEvent(){const t={isValid:this.stateController.isValid,validationMessage:this.stateController.validationMessage,validationState:this.stateController.validationState,errors:this.stateController.validationResult.errors,warnings:this.stateController.validationResult.warnings,validationResult:this.stateController.validationResult};this.dispatchEvent(new CustomEvent("nr-validation",{detail:t,bubbles:!0,composed:!0}))}getValidationClasses(){const t=this.host,i=this.host;return{valid:this.stateController.validationResult.isValid&&!this.stateController.validationResult.hasWarning,invalid:this.stateController.validationResult.hasError,warning:this.stateController.validationResult.hasWarning&&!this.stateController.validationResult.hasError,validating:this.stateController.isValidating,"has-feedback":i.hasFeedback||!1,touched:t.isTouched||!1,dirty:t.isDirty||!1,required:this.host.required||!1}}hasValidationFeedback(){const t=this.host;return!!t.hasFeedback&&(this.stateController.isValidating||this.stateController.validationResult.hasError||this.stateController.validationResult.hasWarning||this.stateController.validationResult.isValid&&t.value&&""!==t.value.trim()&&this.stateController.validationState!==C.Pristine)}renderValidationIcon(){const t=this.host;if(!t.hasFeedback)return"";let i="",r="";return this.stateController.isValidating?(i="hourglass-half",r="validation-loading"):this.stateController.validationResult.hasError?(i="exclamation-circle",r="validation-error"):this.stateController.validationResult.hasWarning?(i="exclamation-triangle",r="validation-warning"):this.stateController.validationResult.isValid&&t.value&&""!==t.value.trim()&&this.stateController.validationState!==C.Pristine&&(i="check-circle",r="validation-success"),i?e`
866
631
  <nr-icon
867
- name="${r}"
868
- class="validation-icon ${n}"
632
+ name="${i}"
633
+ class="validation-icon ${r}"
869
634
  part="validation-icon">
870
635
  </nr-icon>
871
- `:""}renderValidationMessage(){const t=this.stateController.validationResult.hasError,r=this.stateController.validationResult.hasWarning&&!t,n=t?this.stateController.validationResult.errorMessage:r?this.stateController.validationResult.warningMessage:"";return n?i`
636
+ `:""}renderValidationMessage(){const t=this.stateController.validationResult.hasError,i=this.stateController.validationResult.hasWarning&&!t,r=t?this.stateController.validationResult.errorMessage:i?this.stateController.validationResult.warningMessage:"";return r?e`
872
637
  <div class="validation-message ${t?"error":"warning"}"
873
638
  part="validation-message"
874
639
  role="alert"
875
640
  aria-live="polite">
876
- ${n}
641
+ ${r}
877
642
  </div>
878
643
  `:""}clearDebounceTimer(){this.stateController.clearDebounceTimer()}getValidationRenderState(){return{classes:this.getValidationClasses(),hasValidationFeedback:this.hasValidationFeedback(),isValidating:this.stateController.isValidating,validationResult:this.stateController.validationResult,validationState:this.stateController.validationState}}}
879
644
  /**
880
645
  * @license
881
646
  * Copyright 2023 Nuraly, Laabidi Aymen
882
647
  * SPDX-License-Identifier: MIT
883
- */var z=function(t,i,r,n){return new(r||(r=Promise))(function(e,a){function o(t){try{l(n.next(t))}catch(t){a(t)}}function s(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r(function(t){t(i)})).then(o,s)}l((n=n.apply(t,i||[])).next())})};class N extends V{constructor(){super(...arguments),this.debounceTimer=null,this.handleKeyDown=t=>{!this.eventHost.readonly||this.isReadonlyKeyAllowed(t)?"Enter"!==t.key?"number"===this.eventHost.type&&this.handleNumericKeyDown(t):this.dispatchEnterEvent(t):t.preventDefault()},this.handleValueChange=t=>{if(this.eventHost.readonly)return void t.preventDefault();const i=t.target,r=i.value;if(this.eventHost.maxLength&&r.length>this.eventHost.maxLength)return void t.preventDefault();"number"===this.eventHost.type&&r&&this.validateNumericValue(r,t),this.eventHost.value=r;const n=this.eventHost;n.validationController&&"function"==typeof n.validationController.validateOnChange&&n.validationController.validateOnChange();const e=this.eventHost.debounce||0;e>0?(this.clearDebounceTimer(),this.debounceTimer=setTimeout(()=>{this.eventHost.dispatchInputEvent("nr-input",{value:this.eventHost.value,target:i,originalEvent:t})},e)):this.eventHost.dispatchInputEvent("nr-input",{value:this.eventHost.value,target:i,originalEvent:t})},this.handleFocus=t=>{var i;this.setFocusState(!0);const r=t.target;this.restoreCursorPosition(r);const n={focused:!0,cursorPosition:null!==(i=this.getCursorPosition())&&void 0!==i?i:void 0,selectedText:this.getSelectedText()};this.eventHost.dispatchFocusEvent("nr-focus",Object.assign({target:t.target,value:this.eventHost.value},n)),this.eventHost.dispatchFocusEvent("nr-focus-change",n)},this.handleBlur=t=>{var i;this.setFocusState(!1);const r={focused:!1,cursorPosition:null!==(i=this.getCursorPosition())&&void 0!==i?i:void 0,selectedText:this.getSelectedText()},n=this.eventHost;n.validationController&&"function"==typeof n.validationController.validateOnBlur&&n.validationController.validateOnBlur(),this.eventHost.dispatchFocusEvent("nr-blur",Object.assign({target:t.target,value:this.eventHost.value},r)),this.eventHost.dispatchFocusEvent("nr-focus-change",r)},this.handleIconKeydown=t=>{if(!this.isActivationKey(t))return;t.preventDefault();const i=t.target;switch(i.id){case"copy-icon":this.handleCopy();break;case"clear-icon":this.handleClear();break;case"password-icon":this.handleTogglePassword();break;default:i.closest("#number-icons")&&this.handleNumberIconAction(i)}},this.handleCopy=()=>z(this,void 0,void 0,function*(){if(this.eventHost.withCopy&&!this.eventHost.disabled)try{const t=this.inputElement;if(!t)return;t.select(),yield navigator.clipboard.writeText(t.value),this.eventHost.dispatchActionEvent("nr-copy-success",{value:t.value,action:"copy"})}catch(t){this.handleError(t,"copy"),this.eventHost.dispatchActionEvent("nr-copy-error",{error:t,action:"copy"})}}),this.handleClear=()=>{if(this.eventHost.disabled||this.eventHost.readonly||!this.eventHost.allowClear)return;const t=this.eventHost.value;this.eventHost.value="";const i=this.inputElement;i&&(i.value="",i.focus()),this.eventHost.dispatchActionEvent("nr-clear",{previousValue:t,newValue:this.eventHost.value,target:i,action:"clear"}),this.eventHost.dispatchInputEvent("nr-input",{value:this.eventHost.value,target:i,action:"clear"})},this.handleTogglePassword=()=>{if("password"!==this.eventHost.type)return;const t="password"===this.eventHost.inputType?"text":"password";this.eventHost.inputType=t,this.requestUpdate(),this.eventHost.dispatchActionEvent("nr-password-toggle",{visible:"text"===t,action:"password-toggle"})},this.handleIncrement=()=>{"number"===this.eventHost.type&&this.eventHost.increment&&this.eventHost.increment()},this.handleDecrement=()=>{"number"===this.eventHost.type&&this.eventHost.decrement&&this.eventHost.decrement()}}get eventHost(){return this.host}get inputElement(){var t;return(null===(t=this.eventHost.shadowRoot)||void 0===t?void 0:t.querySelector("#input"))||null}clearDebounceTimer(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}handleNumericKeyDown(t){["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)||t.ctrlKey||t.metaKey||"."!==t.key&&"-"!==t.key&&(/^\d$/.test(t.key)||t.preventDefault())}handleNumberIconAction(t){const i=t.classList.contains("increment")||t.closest(".increment"),r=t.classList.contains("decrement")||t.closest(".decrement");i?this.handleIncrement():r&&this.handleDecrement()}dispatchEnterEvent(t){this.eventHost.dispatchInputEvent("nr-enter",{value:this.eventHost.value,target:t.target,originalEvent:t})}validateNumericValue(t,i){}restoreCursorPosition(t){if(t.dataset.restoreCursor){const i=Number.parseInt(t.dataset.restoreCursor,10);Number.isNaN(i)||t.setSelectionRange(i,i),delete t.dataset.restoreCursor}}setFocusState(t){this.eventHost.hasOwnProperty("focused")&&(this.eventHost.focused=t,this.requestUpdate())}getCursorPosition(){if(this.eventHost.getCursorPosition)return this.eventHost.getCursorPosition();const t=this.inputElement;return t?t.selectionStart:null}getSelectedText(){if(this.eventHost.getSelectedText)return this.eventHost.getSelectedText();const t=this.inputElement;return t&&null!==t.selectionStart&&null!==t.selectionEnd?t.value.substring(t.selectionStart,t.selectionEnd):""}isReadonlyKeyAllowed(t){if(this.eventHost.isReadonlyKeyAllowed)return this.eventHost.isReadonlyKeyAllowed(t);return t.ctrlKey||t.metaKey?["KeyA","KeyC"].includes(t.code):["Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)}isActivationKey(t){return this.eventHost.isActivationKey?this.eventHost.isActivationKey(t):"Enter"===t.key||" "===t.key}}
648
+ */var M=function(t,i,e,r){return new(e||(e=Promise))(function(n,s){function a(t){try{d(r.next(t))}catch(t){s(t)}}function o(t){try{d(r.throw(t))}catch(t){s(t)}}function d(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e(function(t){t(i)})).then(a,o)}d((r=r.apply(t,i||[])).next())})};class D extends T{constructor(){super(...arguments),this.debounceTimer=null,this.handleKeyDown=t=>{!this.eventHost.readonly||this.isReadonlyKeyAllowed(t)?"Enter"!==t.key?"number"===this.eventHost.type&&this.handleNumericKeyDown(t):this.dispatchEnterEvent(t):t.preventDefault()},this.handleValueChange=t=>{if(this.eventHost.readonly)return void t.preventDefault();const i=t.target,e=i.value;if(this.eventHost.maxLength&&e.length>this.eventHost.maxLength)return void t.preventDefault();"number"===this.eventHost.type&&e&&this.validateNumericValue(e,t),this.eventHost.value=e;const r=this.eventHost;r.validationController&&"function"==typeof r.validationController.validateOnChange&&r.validationController.validateOnChange();const n=this.eventHost.debounce||0;n>0?(this.clearDebounceTimer(),this.debounceTimer=setTimeout(()=>{this.eventHost.dispatchInputEvent("nr-input",{value:this.eventHost.value,target:i,originalEvent:t})},n)):this.eventHost.dispatchInputEvent("nr-input",{value:this.eventHost.value,target:i,originalEvent:t})},this.handleFocus=t=>{var i;this.setFocusState(!0);const e=t.target;this.restoreCursorPosition(e);const r={focused:!0,cursorPosition:null!==(i=this.getCursorPosition())&&void 0!==i?i:void 0,selectedText:this.getSelectedText()};this.eventHost.dispatchFocusEvent("nr-focus",Object.assign({target:t.target,value:this.eventHost.value},r)),this.eventHost.dispatchFocusEvent("nr-focus-change",r)},this.handleBlur=t=>{var i;this.setFocusState(!1);const e={focused:!1,cursorPosition:null!==(i=this.getCursorPosition())&&void 0!==i?i:void 0,selectedText:this.getSelectedText()},r=this.eventHost;r.validationController&&"function"==typeof r.validationController.validateOnBlur&&r.validationController.validateOnBlur(),this.eventHost.dispatchFocusEvent("nr-blur",Object.assign({target:t.target,value:this.eventHost.value},e)),this.eventHost.dispatchFocusEvent("nr-focus-change",e)},this.handleIconKeydown=t=>{if(!this.isActivationKey(t))return;t.preventDefault();const i=t.target;switch(i.id){case"copy-icon":this.handleCopy();break;case"clear-icon":this.handleClear();break;case"password-icon":this.handleTogglePassword();break;default:i.closest("#number-icons")&&this.handleNumberIconAction(i)}},this.handleCopy=()=>M(this,void 0,void 0,function*(){if(this.eventHost.withCopy&&!this.eventHost.disabled)try{const t=this.inputElement;if(!t)return;t.select(),yield navigator.clipboard.writeText(t.value),this.eventHost.dispatchActionEvent("nr-copy-success",{value:t.value,action:"copy"})}catch(t){this.handleError(t,"copy"),this.eventHost.dispatchActionEvent("nr-copy-error",{error:t,action:"copy"})}}),this.handleClear=()=>{if(this.eventHost.disabled||this.eventHost.readonly||!this.eventHost.allowClear)return;const t=this.eventHost.value;this.eventHost.value="";const i=this.inputElement;i&&(i.value="",i.focus()),this.eventHost.dispatchActionEvent("nr-clear",{previousValue:t,newValue:this.eventHost.value,target:i,action:"clear"}),this.eventHost.dispatchInputEvent("nr-input",{value:this.eventHost.value,target:i,action:"clear"})},this.handleTogglePassword=()=>{if("password"!==this.eventHost.type)return;const t="password"===this.eventHost.inputType?"text":"password";this.eventHost.inputType=t,this.requestUpdate(),this.eventHost.dispatchActionEvent("nr-password-toggle",{visible:"text"===t,action:"password-toggle"})},this.handleIncrement=()=>{"number"===this.eventHost.type&&this.eventHost.increment&&this.eventHost.increment()},this.handleDecrement=()=>{"number"===this.eventHost.type&&this.eventHost.decrement&&this.eventHost.decrement()}}get eventHost(){return this.host}get inputElement(){var t,i;return(null===(i=(t=this.eventHost).querySelector)||void 0===i?void 0:i.call(t,"#input"))||null}clearDebounceTimer(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}handleNumericKeyDown(t){["Backspace","Delete","Tab","Escape","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)||t.ctrlKey||t.metaKey||"."!==t.key&&"-"!==t.key&&(/^\d$/.test(t.key)||t.preventDefault())}handleNumberIconAction(t){const i=t.classList.contains("increment")||t.closest(".increment"),e=t.classList.contains("decrement")||t.closest(".decrement");i?this.handleIncrement():e&&this.handleDecrement()}dispatchEnterEvent(t){this.eventHost.dispatchInputEvent("nr-enter",{value:this.eventHost.value,target:t.target,originalEvent:t})}validateNumericValue(t,i){}restoreCursorPosition(t){if(t.dataset.restoreCursor){const i=Number.parseInt(t.dataset.restoreCursor,10);Number.isNaN(i)||t.setSelectionRange(i,i),delete t.dataset.restoreCursor}}setFocusState(t){this.eventHost.hasOwnProperty("focused")&&(this.eventHost.focused=t,this.requestUpdate())}getCursorPosition(){if(this.eventHost.getCursorPosition)return this.eventHost.getCursorPosition();const t=this.inputElement;return t?t.selectionStart:null}getSelectedText(){if(this.eventHost.getSelectedText)return this.eventHost.getSelectedText();const t=this.inputElement;return t&&null!==t.selectionStart&&null!==t.selectionEnd?t.value.substring(t.selectionStart,t.selectionEnd):""}isReadonlyKeyAllowed(t){if(this.eventHost.isReadonlyKeyAllowed)return this.eventHost.isReadonlyKeyAllowed(t);return t.ctrlKey||t.metaKey?["KeyA","KeyC"].includes(t.code):["Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(t.key)}isActivationKey(t){return this.eventHost.isActivationKey?this.eventHost.isActivationKey(t):"Enter"===t.key||" "===t.key}}
884
649
  /**
885
650
  * @license
886
651
  * Copyright 2023 Nuraly, Laabidi Aymen
887
652
  * SPDX-License-Identifier: MIT
888
- */var C=function(t,i,r,n){for(var e,a=arguments.length,o=a<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,r):n,s=t.length-1;s>=0;s--)(e=t[s])&&(o=(a<3?e(o):a>3?e(i,r,o):e(i,r))||o);return a>3&&o&&Object.defineProperty(i,r,o),o},I=function(t,i,r,n){return new(r||(r=Promise))(function(e,a){function o(t){try{l(n.next(t))}catch(t){a(t)}}function s(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r(function(t){t(i)})).then(o,s)}l((n=n.apply(t,i||[])).next())})};let T=class extends(k(x(w(s(n))))){constructor(){super(...arguments),this.validationController=new E(this),this.eventController=new N(this),this.disabled=!1,this.readonly=!1,this.state="default",this.value="",this.size="medium",this.variant="outlined",this.type="text",this.placeholder="",this.autocomplete="off",this.withCopy=!1,this.allowClear=!1,this.showCount=!1,this.rules=[],this.validateOnChangeInput=!0,this.validateOnBlurInput=!0,this.hasFeedback=!1,this.allowWarnings=!1,this.validationTrigger="change",this.debounce=0,this.inputType="",this.hasAddonBefore=!1,this.hasAddonAfter=!1,this.focused=!1,this.requiredComponents=["nr-icon"],this._handleValidationEvent=t=>{const i=t.detail;this.validationMessage=i.validationMessage||"";let r="default";i.validationResult.hasError?r="error":i.validationResult.hasWarning&&this.allowWarnings?r="warning":i.validationResult.isValid&&this.value&&this.hasFeedback&&(r="success"),this.state!==r&&(this.state=r),this.requestUpdate()},this._handleKeyDown=t=>{this.eventController.handleKeyDown(t)},this._valueChange=t=>{this.eventController.handleValueChange(t)},this._focusEvent=t=>{this.eventController.handleFocus(t)},this._blurEvent=t=>{this.eventController.handleBlur(t)},this._handleIconKeydown=t=>{this.eventController.handleIconKeydown(t)}}get _input(){return this.shadowRoot.querySelector("#input")}get characterCountDisplay(){const t=this.value.length;return this.maxLength?`${t}/${this.maxLength}`:`${t}`}get isOverCharacterLimit(){return!!this.maxLength&&this.value.length>this.maxLength}get input(){return this._input}get inputElement(){return this._input}connectedCallback(){super.connectedCallback(),this.addEventListener("nr-validation",this._handleValidationEvent)}disconnectedCallback(){var t,i,r,n;super.disconnectedCallback(),this.removeEventListener("nr-validation",this._handleValidationEvent),null===(i=(t=this.validationController).clearDebounceTimer)||void 0===i||i.call(t),null===(n=(r=this.eventController).clearDebounceTimer)||void 0===n||n.call(r)}willUpdate(t){super.willUpdate(t),!t.has("type")&&this.inputType||(this.inputType=this.type),(t.has("type")||t.has("min"))&&"number"===this.type&&this.min&&!this.value&&(this.value=this.min),(t.has("type")||t.has("min")||t.has("max")||t.has("step"))&&m.validateNumericProperties(this.type,this.min,this.max,this.step),(t.has("type")||t.has("required")||t.has("maxLength")||t.has("min")||t.has("max"))&&this.validationController.setupValidationRules()}updated(t){if(t.has("step")||t.has("min")||t.has("max")||t.has("maxLength")){const t=this.input;t&&(this.setStep(this.step),this.min?t.setAttribute("min",this.min):t.removeAttribute("min"),this.max?t.setAttribute("max",this.max):t.removeAttribute("max"),this.maxLength?t.setAttribute("maxlength",this.maxLength.toString()):t.removeAttribute("maxlength"))}if(t.has("value")){const t=this.input;t&&t.value!==this.value&&(t.value=this.value)}}firstUpdated(){this._checkInitialSlotContent()}_checkInitialSlotContent(){const t=this.querySelectorAll('[slot="addon-before"]');this.hasAddonBefore=t.length>0;const i=this.querySelectorAll('[slot="addon-after"]');this.hasAddonAfter=i.length>0}_handleSlotChange(t){const i=t.target,r=i.name;"addon-before"===r?this.hasAddonBefore=i.assignedElements().length>0:"addon-after"===r&&(this.hasAddonAfter=i.assignedElements().length>0)}_onCopy(){return I(this,void 0,void 0,function*(){yield this.eventController.handleCopy()})}_onClear(){this.eventController.handleClear()}_increment(){this.eventController.handleIncrement()}_decrement(){this.eventController.handleDecrement()}_togglePasswordIcon(){this.eventController.handleTogglePassword()}_getAriaDescribedBy(){var t;const i=[],r=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector('slot[name="helper-text"]');return r&&r.assignedNodes().length>0&&i.push("helper-text"),i.join(" ")||""}validateValue(t){return this.validationController.validate()}addRule(t){this.validationController.addInputRule(t)}removeRule(t){this.validationController.removeInputRule(t)}clearRules(){this.validationController.clearInputRules()}getValidationStatus(){return this.validationController.getValidationStatus()}validateInput(){return I(this,void 0,void 0,function*(){const t=this.validationController.validate();return this.validationController.isValidating?new Promise(t=>{const i=()=>{this.validationController.isValidating?setTimeout(i,50):t(this.validationController.isValid)};i()}):t})}setValidationStatus(t){this.validationController.setValidationStatus(t)}getValidationClasses(){return this.validationController.getValidationClasses()}renderValidationIcon(){return this.validationController.renderValidationIcon()}renderValidationMessage(){return this.validationController.renderValidationMessage()}render(){const t=this.getValidationClasses(),r=this.validationController.getValidationRenderState();return i`
889
- <slot name="label"></slot>
890
- <div class="input-wrapper ${Object.entries(t).filter(([,t])=>t).map(([t])=>t).join(" ")}"
891
- part="input-wrapper"
892
- data-theme="${this.currentTheme}"
893
- ?data-validating="${r.isValidating}">
894
- ${f.renderAddonBefore(this.hasAddonBefore,t=>this._handleSlotChange(t))}
653
+ */var z=function(t,i,e,r){for(var n,s=arguments.length,a=s<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,e):r,o=t.length-1;o>=0;o--)(n=t[o])&&(a=(s<3?n(a):s>3?n(i,e,a):n(i,e))||a);return s>3&&a&&Object.defineProperty(i,e,a),a},L=function(t,i,e,r){return new(e||(e=Promise))(function(n,s){function a(t){try{d(r.next(t))}catch(t){s(t)}}function o(t){try{d(r.throw(t))}catch(t){s(t)}}function d(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e(function(t){t(i)})).then(a,o)}d((r=r.apply(t,i||[])).next())})};let U=class extends(k(A(S((t=>g(m(f(x(t)))))(r))))){constructor(){super(...arguments),this.validationController=new O(this),this.eventController=new D(this),this.disabled=!1,this.readonly=!1,this.state="default",this.value="",this.size="medium",this.variant="outlined",this.type="text",this.placeholder="",this.autocomplete="off",this.withCopy=!1,this.allowClear=!1,this.showCount=!1,this.rules=[],this.validateOnChangeInput=!0,this.validateOnBlurInput=!0,this.hasFeedback=!1,this.allowWarnings=!1,this.validationTrigger="change",this.debounce=0,this.inputType="",this.hasAddonBefore=!1,this.hasAddonAfter=!1,this.focused=!1,this.requiredComponents=["nr-icon"],this._handleValidationEvent=t=>{const i=t.detail;this.validationMessage=i.validationMessage||"";let e="default";i.validationResult.hasError?e="error":i.validationResult.hasWarning&&this.allowWarnings?e="warning":i.validationResult.isValid&&this.value&&this.hasFeedback&&(e="success"),this.state!==e&&(this.state=e),this.requestUpdate()},this._handleKeyDown=t=>{this.eventController.handleKeyDown(t)},this._valueChange=t=>{this.eventController.handleValueChange(t)},this._focusEvent=t=>{this.eventController.handleFocus(t)},this._blurEvent=t=>{this.eventController.handleBlur(t)},this._handleIconKeydown=t=>{this.eventController.handleIconKeydown(t)}}get _input(){return this.renderRoot.querySelector("#input")}get characterCountDisplay(){const t=this.value.length;return this.maxLength?`${t}/${this.maxLength}`:`${t}`}get isOverCharacterLimit(){return!!this.maxLength&&this.value.length>this.maxLength}get input(){return this._input}get inputElement(){return this._input}connectedCallback(){super.connectedCallback(),this.addEventListener("nr-validation",this._handleValidationEvent)}disconnectedCallback(){var t,i,e,r;super.disconnectedCallback(),this.removeEventListener("nr-validation",this._handleValidationEvent),null===(i=(t=this.validationController).clearDebounceTimer)||void 0===i||i.call(t),null===(r=(e=this.eventController).clearDebounceTimer)||void 0===r||r.call(e)}willUpdate(t){super.willUpdate(t),!t.has("type")&&this.inputType||(this.inputType=this.type),(t.has("type")||t.has("min"))&&"number"===this.type&&this.min&&!this.value&&(this.value=this.min),(t.has("type")||t.has("min")||t.has("max")||t.has("step"))&&E.validateNumericProperties(this.type,this.min,this.max,this.step),(t.has("type")||t.has("required")||t.has("maxLength")||t.has("min")||t.has("max"))&&this.validationController.setupValidationRules()}updated(t){if(t.has("step")||t.has("min")||t.has("max")||t.has("maxLength")){const t=this.input;t&&(this.setStep(this.step),this.min?t.setAttribute("min",this.min):t.removeAttribute("min"),this.max?t.setAttribute("max",this.max):t.removeAttribute("max"),this.maxLength?t.setAttribute("maxlength",this.maxLength.toString()):t.removeAttribute("maxlength"))}if(t.has("value")){const t=this.input;t&&t.value!==this.value&&(t.value=this.value)}}firstUpdated(){this._checkInitialSlotContent()}_checkInitialSlotContent(){var t,i;const e=this.renderRoot.querySelector('slot[name="addon-before"]');this.hasAddonBefore=(null!==(t=null==e?void 0:e.assignedElements())&&void 0!==t?t:[]).length>0;const r=this.renderRoot.querySelector('slot[name="addon-after"]');this.hasAddonAfter=(null!==(i=null==r?void 0:r.assignedElements())&&void 0!==i?i:[]).length>0}_onCopy(){return L(this,void 0,void 0,function*(){yield this.eventController.handleCopy()})}_onClear(){this.eventController.handleClear()}_increment(){this.eventController.handleIncrement()}_decrement(){this.eventController.handleDecrement()}_togglePasswordIcon(){this.eventController.handleTogglePassword()}_getAriaDescribedBy(){var t;const i=[],e=this.renderRoot.querySelector('slot[name="helper-text"]');return(null!==(t=null==e?void 0:e.assignedElements())&&void 0!==t?t:[]).length>0&&i.push("helper-text"),i.join(" ")||""}validateValue(t){return this.validationController.validate()}addRule(t){this.validationController.addInputRule(t)}removeRule(t){this.validationController.removeInputRule(t)}clearRules(){this.validationController.clearInputRules()}getValidationStatus(){return this.validationController.getValidationStatus()}validateInput(){return L(this,void 0,void 0,function*(){const t=this.validationController.validate();return this.validationController.isValidating?new Promise(t=>{const i=()=>{this.validationController.isValidating?setTimeout(i,50):t(this.validationController.isValid)};i()}):t})}setValidationStatus(t){this.validationController.setValidationStatus(t)}getValidationClasses(){return this.validationController.getValidationClasses()}renderValidationIcon(){return this.validationController.renderValidationIcon()}renderValidationMessage(){return this.validationController.renderValidationMessage()}render(){const t=this.getValidationClasses(),i=this.validationController.getValidationRenderState();return e`
654
+ <slot name="label" part="label"></slot>
655
+ <div class="input-wrapper ${Object.entries(t).filter(([,t])=>t).map(([t])=>t).join(" ")}"
656
+ part="input-wrapper"
657
+ ?data-validating="${i.isValidating}">
658
+ ${this.hasAddonBefore?e`
659
+ <div class="input-addon-before" part="addon-before">
660
+ <slot name="addon-before"></slot>
661
+ </div>
662
+ `:""}
895
663
  <div data-size=${this.size} id="input-container" part="input-container">
896
- ${f.renderPrefix()}
664
+ <div class="input-prefix" part="prefix" style="display: contents;">
665
+ <slot name="prefix"></slot>
666
+ </div>
897
667
  <input
898
668
  id="input"
899
669
  part="input"
@@ -903,28 +673,34 @@ class V extends l{}
903
673
  .placeholder=${this.placeholder}
904
674
  .type="${this.inputType}"
905
675
  .autocomplete=${this.autocomplete}
906
- aria-invalid=${r.validationResult.hasError?"true":"false"}
676
+ aria-invalid=${i.validationResult.hasError?"true":"false"}
907
677
  aria-describedby=${this._getAriaDescribedBy()}
908
678
  @input=${this._valueChange}
909
679
  @focus=${this._focusEvent}
910
680
  @blur=${this._blurEvent}
911
681
  @keydown=${this._handleKeyDown}
912
682
  />
913
- ${f.renderSuffix()}
914
- ${f.renderCopyIcon(this.withCopy,this.disabled,this.readonly,()=>this._onCopy(),t=>this._handleIconKeydown(t))}
915
- ${f.renderClearIcon(this.allowClear,this.value,this.disabled,this.readonly,()=>this._onClear(),t=>this._handleIconKeydown(t))}
916
- ${r.hasValidationFeedback?this.renderValidationIcon():f.renderStateIcon(this.state)}
917
- ${f.renderCalendarIcon(this.state,this.type)}
918
- ${f.renderPasswordIcon(this.type,this.inputType,this.disabled,this.readonly,()=>this._togglePasswordIcon(),t=>this._handleIconKeydown(t))}
919
- ${f.renderNumberIcons(this.type,this.state,this.disabled,this.readonly,()=>this._increment(),()=>this._decrement(),t=>this._handleIconKeydown(t))}
683
+ <div class="input-suffix" part="suffix" style="display: contents;">
684
+ <slot name="suffix"></slot>
685
+ </div>
686
+ ${$.renderCopyIcon(this.withCopy,this.disabled,this.readonly,()=>this._onCopy(),t=>this._handleIconKeydown(t))}
687
+ ${$.renderClearIcon(this.allowClear,this.value,this.disabled,this.readonly,()=>this._onClear(),t=>this._handleIconKeydown(t))}
688
+ ${i.hasValidationFeedback?this.renderValidationIcon():$.renderStateIcon(this.state)}
689
+ ${$.renderCalendarIcon(this.state,this.type)}
690
+ ${$.renderPasswordIcon(this.type,this.inputType,this.disabled,this.readonly,()=>this._togglePasswordIcon(),t=>this._handleIconKeydown(t))}
691
+ ${$.renderNumberIcons(this.type,this.state,this.disabled,this.readonly,()=>this._increment(),()=>this._decrement(),t=>this._handleIconKeydown(t))}
920
692
  </div>
921
- ${f.renderAddonAfter(this.hasAddonAfter,t=>this._handleSlotChange(t))}
693
+ ${this.hasAddonAfter?e`
694
+ <div class="input-addon-after" part="addon-after">
695
+ <slot name="addon-after"></slot>
696
+ </div>
697
+ `:""}
922
698
  </div>
923
- <slot name="helper-text"></slot>
699
+ <slot name="helper-text" part="helper-text"></slot>
924
700
  ${this.renderValidationMessage()}
925
- ${this.showCount?i`
926
- <div class="character-count" part="character-count" ?data-over-limit=${this.isOverCharacterLimit}>
701
+ ${this.showCount?e`
702
+ <div class="character-count" ?data-over-limit=${this.isOverCharacterLimit}>
927
703
  ${this.characterCountDisplay}
928
704
  </div>
929
705
  `:""}
930
- `}};T.styles=u,C([e({type:Boolean,reflect:!0})],T.prototype,"disabled",void 0),C([e({type:Boolean,reflect:!0})],T.prototype,"readonly",void 0),C([e({type:String,reflect:!0})],T.prototype,"state",void 0),C([e({type:String,reflect:!0})],T.prototype,"value",void 0),C([e({type:String})],T.prototype,"size",void 0),C([e({type:String,reflect:!0})],T.prototype,"variant",void 0),C([e({reflect:!0})],T.prototype,"type",void 0),C([e({type:String})],T.prototype,"step",void 0),C([e({type:String})],T.prototype,"min",void 0),C([e({type:String})],T.prototype,"max",void 0),C([e({type:String})],T.prototype,"placeholder",void 0),C([e({type:String})],T.prototype,"autocomplete",void 0),C([e({type:String})],T.prototype,"name",void 0),C([e({type:Boolean})],T.prototype,"required",void 0),C([e({type:Boolean,reflect:!0})],T.prototype,"withCopy",void 0),C([e({type:Boolean,reflect:!0})],T.prototype,"allowClear",void 0),C([e({type:Boolean,reflect:!0})],T.prototype,"showCount",void 0),C([e({type:Number})],T.prototype,"maxLength",void 0),C([e({type:Array})],T.prototype,"rules",void 0),C([e({type:Boolean,attribute:"validate-on-change"})],T.prototype,"validateOnChangeInput",void 0),C([e({type:Boolean,attribute:"validate-on-blur"})],T.prototype,"validateOnBlurInput",void 0),C([e({type:Boolean,attribute:"has-feedback"})],T.prototype,"hasFeedback",void 0),C([e({type:Boolean,attribute:"allow-warnings"})],T.prototype,"allowWarnings",void 0),C([e({type:String,attribute:"validation-trigger"})],T.prototype,"validationTrigger",void 0),C([e({type:Number,attribute:"validation-debounce"})],T.prototype,"validationDebounce",void 0),C([e({type:String})],T.prototype,"label",void 0),C([e({type:Number})],T.prototype,"debounce",void 0),C([a()],T.prototype,"validationMessage",void 0),C([a()],T.prototype,"inputType",void 0),C([a()],T.prototype,"hasAddonBefore",void 0),C([a()],T.prototype,"hasAddonAfter",void 0),C([a()],T.prototype,"focused",void 0),T=C([o("nr-input")],T);var P=Object.freeze({__proto__:null,PORT:/^(?:[1-9]\d{0,4}|[1-5]\d{5}|6[0-4]\d{4}|65[0-4]\d{3}|655[0-2]\d{2}|6553[0-5])$/,NOT_EMPTY:/^.+$/});export{T as NrInputElement,P as Validations};
706
+ `}};U.styles=o,U.useShadowDom=!0,z([n({type:Boolean,reflect:!0})],U.prototype,"disabled",void 0),z([n({type:Boolean,reflect:!0})],U.prototype,"readonly",void 0),z([n({type:String,reflect:!0})],U.prototype,"state",void 0),z([n({type:String,reflect:!0})],U.prototype,"value",void 0),z([n({type:String})],U.prototype,"size",void 0),z([n({type:String,reflect:!0})],U.prototype,"variant",void 0),z([n({reflect:!0})],U.prototype,"type",void 0),z([n({type:String})],U.prototype,"step",void 0),z([n({type:String})],U.prototype,"min",void 0),z([n({type:String})],U.prototype,"max",void 0),z([n({type:String})],U.prototype,"placeholder",void 0),z([n({type:String})],U.prototype,"autocomplete",void 0),z([n({type:String})],U.prototype,"name",void 0),z([n({type:Boolean})],U.prototype,"required",void 0),z([n({type:Boolean,reflect:!0})],U.prototype,"withCopy",void 0),z([n({type:Boolean,reflect:!0})],U.prototype,"allowClear",void 0),z([n({type:Boolean,reflect:!0})],U.prototype,"showCount",void 0),z([n({type:Number})],U.prototype,"maxLength",void 0),z([n({type:Array})],U.prototype,"rules",void 0),z([n({type:Boolean,attribute:"validate-on-change"})],U.prototype,"validateOnChangeInput",void 0),z([n({type:Boolean,attribute:"validate-on-blur"})],U.prototype,"validateOnBlurInput",void 0),z([n({type:Boolean,attribute:"has-feedback"})],U.prototype,"hasFeedback",void 0),z([n({type:Boolean,attribute:"allow-warnings"})],U.prototype,"allowWarnings",void 0),z([n({type:String,attribute:"validation-trigger"})],U.prototype,"validationTrigger",void 0),z([n({type:Number,attribute:"validation-debounce"})],U.prototype,"validationDebounce",void 0),z([n({type:String})],U.prototype,"label",void 0),z([n({type:Number})],U.prototype,"debounce",void 0),z([s()],U.prototype,"validationMessage",void 0),z([s()],U.prototype,"inputType",void 0),z([s()],U.prototype,"hasAddonBefore",void 0),z([s()],U.prototype,"hasAddonAfter",void 0),z([s()],U.prototype,"focused",void 0),U=z([a("nr-input")],U);var B=Object.freeze({__proto__:null,PORT:/^(?:[1-9]\d{0,4}|[1-5]\d{5}|6[0-4]\d{4}|65[0-4]\d{3}|655[0-2]\d{2}|6553[0-5])$/,NOT_EMPTY:/^.+$/});export{U as NrInputElement,B as Validations};