@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
@@ -12,9 +12,9 @@ export const styles = css `
12
12
  .nr-flex {
13
13
  display: flex;
14
14
  box-sizing: border-box;
15
-
15
+
16
16
  /* Theme-aware */
17
- color: var(--nuraly-color-text);
17
+ color: #161616;
18
18
  }
19
19
 
20
20
  /* Inline flex */
@@ -1,9 +1,9 @@
1
- import{css as t,LitElement as i,html as s}from"lit";import{property as e,state as n,customElement as r}from"lit/decorators.js";import{NuralyUIBaseMixin as o}from"@nuralyui/common/mixins";
1
+ import{css as t,html as i,LitElement as e}from"lit";import{property as s,state as n,customElement as r}from"lit/decorators.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2023 Nuraly, Laabidi Aymen
5
5
  * SPDX-License-Identifier: MIT
6
- */const a=t`
6
+ */const o=t`
7
7
  :host {
8
8
  display: block;
9
9
  width: 100%;
@@ -18,7 +18,7 @@ import{css as t,LitElement as i,html as s}from"lit";import{property as e,state a
18
18
  width: 100%;
19
19
  display: flex;
20
20
  flex-direction: column;
21
- gap: var(--nuraly-form-gap, 16px);
21
+ gap: 16px;
22
22
  }
23
23
 
24
24
  .form-wrapper[disabled] {
@@ -60,7 +60,7 @@ import{css as t,LitElement as i,html as s}from"lit";import{property as e,state a
60
60
  /* Responsive design */
61
61
  @media (max-width: 768px) {
62
62
  .form-wrapper {
63
- gap: var(--nuraly-form-gap-mobile, 12px);
63
+ gap: 12px;
64
64
  }
65
65
  }
66
66
  `
@@ -68,23 +68,35 @@ import{css as t,LitElement as i,html as s}from"lit";import{property as e,state a
68
68
  * @license
69
69
  * Copyright 2023 Nuraly, Laabidi Aymen
70
70
  * SPDX-License-Identifier: MIT
71
- */;var d,l;!function(t){t.Pristine="pristine",t.Pending="pending",t.Valid="valid",t.Invalid="invalid",t.Submitted="submitted"}(d||(d={})),function(t){t.Idle="idle",t.Submitting="submitting",t.Success="success",t.Error="error"}(l||(l={}));const h={VALIDATION_CHANGED:"nr-form-validation-changed",FIELD_CHANGED:"nr-form-field-changed",SUBMIT_ATTEMPT:"nr-form-submit-attempt",SUBMIT_SUCCESS:"nr-form-submit-success",SUBMIT_ERROR:"nr-form-submit-error",RESET:"nr-form-reset"};
71
+ */;var a,d;!function(t){t.Pristine="pristine",t.Pending="pending",t.Valid="valid",t.Invalid="invalid",t.Submitted="submitted"}(a||(a={})),function(t){t.Idle="idle",t.Submitting="submitting",t.Success="success",t.Error="error"}(d||(d={}));const h={VALIDATION_CHANGED:"nr-form-validation-changed",FIELD_CHANGED:"nr-form-field-changed",SUBMIT_ATTEMPT:"nr-form-submit-attempt",SUBMIT_SUCCESS:"nr-form-submit-success",SUBMIT_ERROR:"nr-form-submit-error",RESET:"nr-form-reset"},l=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))}},c=()=>{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)},u=t=>class extends t{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(c())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(!c())return!0;let i=!0;for(const e of this.requiredComponents)if(!this.isComponentAvailable(e)){i=!1;const s=new Error(`Required component "${e}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(e,s):console.error(s.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)}},v=t=>class extends t{dispatchCustomEvent(t,i){this.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,i){var e;const s=Object.assign(Object.assign({},i),{timestamp:Date.now(),componentName:(null===(e=this.tagName)||void 0===e?void 0:e.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,s)}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 s=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,s)}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}},m=new Set,f=new Map;
72
72
  /**
73
73
  * @license
74
74
  * Copyright 2023 Nuraly, Laabidi Aymen
75
75
  * SPDX-License-Identifier: MIT
76
- */var u=function(t,i,s,e){return new(s||(s=Promise))(function(n,r){function o(t){try{d(e.next(t))}catch(t){r(t)}}function a(t){try{d(e.throw(t))}catch(t){r(t)}}function d(t){var i;t.done?n(t.value):(i=t.value,i instanceof s?i:new s(function(t){t(i)})).then(o,a)}d((e=e.apply(t,i||[])).next())})};class c{constructor(t){this.host=t,this.fields=new Map,this.validationState=d.Pristine,this.validationPromise=null}registerField(t){var i;const s=t.name||t.getAttribute("name")||`field-${Date.now()}`,e={element:t,name:s,value:t.value,isValid:t.getValidationStatus().isValid,validationMessage:t.validationMessage||"",required:null!==(i=t.required)&&void 0!==i&&i,touched:!1,dirty:!1};this.fields.set(s,e),this.addFieldListeners(t,s)}unregisterField(t){const i=this.fields.get(t);i&&(this.removeFieldListeners(i.element),this.fields.delete(t))}addFieldListeners(t,i){t.addEventListener("nr-validation",t=>this.handleFieldValidation(i,t))}removeFieldListeners(t){}handleFieldValidation(t,i){const s=this.fields.get(t);if(s){if(i&&i.detail)s.isValid=i.detail.isValid||!1,s.validationMessage=i.detail.validationMessage||"";else{const t=s.element.getValidationStatus();s.isValid=t.isValid,s.validationMessage=s.element.validationMessage||""}this.updateFormValidationState()}}updateFormValidationState(){const t=this.getInvalidFields(),i=0===t.length;this.validationState=i?d.Valid:d.Invalid;const s={isValid:i,invalidFields:t,validationErrors:this.buildValidationErrors(),summary:i?"Form is valid":`${t.length} field(s) have errors`};this.dispatchValidationEvent(s)}buildValidationErrors(){const t={};for(const[i,s]of this.fields)!s.isValid&&s.validationMessage&&(t[i]=s.validationMessage);return t}validateForm(){return null!==this.validationPromise||(this.validationState=d.Pending,this.validationPromise=this.performValidation()),this.validationPromise}performValidation(){return u(this,void 0,void 0,function*(){const t=[],i={};for(const[s,e]of this.fields){const n=e.element.getValidationStatus().isValid;e.isValid=n,e.validationMessage=e.element.validationMessage||"",n||(t.push(e),i[s]=e.validationMessage)}const s=0===t.length;this.validationState=s?d.Valid:d.Invalid;const e={isValid:s,invalidFields:t,validationErrors:i,summary:s?"Form is valid":`${t.length} field(s) have errors`};return this.dispatchValidationEvent(e),this.validationPromise=null,e})}getValidationState(){return this.validationState}getFields(){return Array.from(this.fields.values())}getInvalidFields(){return Array.from(this.fields.values()).filter(t=>!t.isValid)}isValid(){return this.validationState===d.Valid&&Array.from(this.fields.values()).every(t=>t.isValid)}focusFirstInvalidField(){const t=Array.from(this.fields.values()).find(t=>!t.isValid);return!(!t||"function"!=typeof t.element.focus)&&(t.element.focus(),!0)}reset(){for(const t of this.fields.values())"clearValidation"in t.element&&"function"==typeof t.element.clearValidation&&t.element.clearValidation(),"value"in t.element&&(t.element.value=""),t.touched=!1,t.dirty=!1,t.isValid=!0,t.validationMessage="";this.validationState=d.Pristine,this.dispatchResetEvent()}dispatchValidationEvent(t){var i,s;null===(s=(i=this.host).dispatchCustomEvent)||void 0===s||s.call(i,h.VALIDATION_CHANGED,{validationResult:t})}dispatchResetEvent(){var t,i;null===(i=(t=this.host).dispatchCustomEvent)||void 0===i||i.call(t,h.RESET,{})}}
76
+ */
77
77
  /**
78
78
  * @license
79
79
  * Copyright 2023 Nuraly, Laabidi Aymen
80
80
  * SPDX-License-Identifier: MIT
81
- */var v=function(t,i,s,e){return new(s||(s=Promise))(function(n,r){function o(t){try{d(e.next(t))}catch(t){r(t)}}function a(t){try{d(e.throw(t))}catch(t){r(t)}}function d(t){var i;t.done?n(t.value):(i=t.value,i instanceof s?i:new s(function(t){t(i)})).then(o,a)}d((e=e.apply(t,i||[])).next())})};class m{constructor(t){this.host=t,this.submissionState=l.Idle,this.lastSubmissionData=null}getSubmissionState(){return this.submissionState}isSubmitting(){return this.submissionState===l.Submitting}collectFormData(){const t=new FormData,i={},s={};return this.getFormFields().forEach(e=>{const n=e.name||e.getAttribute("name");if(!n)return;const r=e.value;null!=r&&t.append(n,String(r)),i[n]=r,s[n]={element:e,value:r,name:n,type:e.tagName.toLowerCase(),required:e.required||!1,disabled:e.disabled||!1}}),{formData:t,jsonData:i,fields:s}}submitForm(t){return v(this,void 0,void 0,function*(){if(this.isSubmitting())throw new Error("Form is already submitting");try{this.setSubmissionState(l.Submitting);const i=this.host.validationController;if(i){const t=yield i.validateForm();if(!t.isValid)throw i.focusFirstInvalidField(),this.dispatchSubmitAttemptEvent(t),new Error(`Form validation failed: ${t.summary}`)}const s=this.collectFormData();return t&&(Object.assign(s.jsonData,t),Object.entries(t).forEach(([t,i])=>{s.formData.append(t,String(i))})),this.lastSubmissionData=s,this.dispatchSubmitSuccessEvent(s),this.setSubmissionState(l.Success),s}catch(t){throw this.setSubmissionState(l.Error),this.dispatchSubmitErrorEvent(t),t}})}resetSubmission(){this.submissionState=l.Idle,this.lastSubmissionData=null}getLastSubmissionData(){return this.lastSubmissionData}getFormFields(){var t;const i=this.host,s=[],e=["nr-input","nr-select","nr-radio","nr-checkbox","nr-textarea","nr-timepicker","nr-datepicker","input","select","textarea"];e.forEach(t=>{i.querySelectorAll(t).forEach(t=>{(t.name||t.getAttribute("name"))&&s.push(t)})});return((null===(t=i.shadowRoot)||void 0===t?void 0:t.querySelectorAll("slot"))||[]).forEach(t=>{t.assignedElements({flatten:!0}).forEach(t=>{e.forEach(i=>{if(t.matches&&t.matches(i)){const i=t;(i.name||i.getAttribute("name"))&&s.push(i)}t.querySelectorAll(i).forEach(t=>{const i=t;(i.name||i.getAttribute("name"))&&s.push(i)})})})}),s}setSubmissionState(t){var i,s;this.submissionState=t,null===(s=(i=this.host).requestUpdate)||void 0===s||s.call(i)}dispatchSubmitAttemptEvent(t){var i,s;null===(s=(i=this.host).dispatchCustomEvent)||void 0===s||s.call(i,h.SUBMIT_ATTEMPT,{validationResult:t})}dispatchSubmitSuccessEvent(t){var i,s;null===(s=(i=this.host).dispatchCustomEvent)||void 0===s||s.call(i,h.SUBMIT_SUCCESS,{formData:t})}dispatchSubmitErrorEvent(t){var i,s;null===(s=(i=this.host).dispatchCustomEvent)||void 0===s||s.call(i,h.SUBMIT_ERROR,{error:t})}}
81
+ */
82
+ const p=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=b(e);t&&function(t,i,e){var s;if(!f.has(t)){const e=new CSSStyleSheet;e.replaceSync(i),f.set(t,e)}const n=f.get(t),r=`doc:${t}`;if(m.has(r)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,n],m.add(r)),e){let i=e;for(;i;){const e=i.getRootNode();if(!(e instanceof ShadowRoot))break;{const r=`shadow:${((null===(s=e.host)||void 0===s?void 0:s.tagName)||"").toLowerCase()}:${t}`;m.has(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,n],m.add(r)),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 b(t){return Array.isArray(t)?t.map(t=>b(t)).filter(Boolean).join("\n"):t&&"string"==typeof t.cssText?t.cssText:"string"==typeof t?t:""}
82
83
  /**
83
84
  * @license
84
85
  * Copyright 2023 Nuraly, Laabidi Aymen
85
86
  * SPDX-License-Identifier: MIT
86
- */var f=function(t,i,s,e){for(var n,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(i,s,o):n(i,s))||o);return r>3&&o&&Object.defineProperty(i,s,o),o},p=function(t,i,s,e){return new(s||(s=Promise))(function(n,r){function o(t){try{d(e.next(t))}catch(t){r(t)}}function a(t){try{d(e.throw(t))}catch(t){r(t)}}function d(t){var i;t.done?n(t.value):(i=t.value,i instanceof s?i:new s(function(t){t(i)})).then(o,a)}d((e=e.apply(t,i||[])).next())})};let b=class extends(o(i)){constructor(){super(...arguments),this.config={validateOnChange:!1,validateOnBlur:!0,showErrorsImmediately:!1,preventInvalidSubmission:!0,resetOnSuccess:!1,validationDelay:300},this.validateOnChange=!1,this.validateOnBlur=!0,this.preventInvalidSubmission=!0,this.resetOnSuccess=!1,this.method="POST",this.enctype="multipart/form-data",this.disabled=!1,this._validationState=d.Pristine,this._submissionState=l.Idle,this.validationController=new c(this),this.submissionController=new m(this),this.handleValidationChanged=t=>{const i=t.detail.validationResult;i&&(this._validationState=i.isValid?d.Valid:d.Invalid)}}get validationState(){return this._validationState}get submissionState(){return this._submissionState}connectedCallback(){super.connectedCallback(),this.setupFormObserver()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupFormObserver()}willUpdate(t){super.willUpdate(t),(t.has("validateOnChange")||t.has("validateOnBlur")||t.has("preventInvalidSubmission")||t.has("resetOnSuccess"))&&(this.config=Object.assign(Object.assign({},this.config),{validateOnChange:this.validateOnChange,validateOnBlur:this.validateOnBlur,preventInvalidSubmission:this.preventInvalidSubmission,resetOnSuccess:this.resetOnSuccess}))}firstUpdated(){this.registerExistingFields(),this.setupFormEvents()}setupFormObserver(){const t=new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t.nodeType===Node.ELEMENT_NODE&&this.registerFieldsInElement(t)})})});t.observe(this,{childList:!0,subtree:!0}),this._formObserver=t}cleanupFormObserver(){const t=this._formObserver;t&&t.disconnect()}registerExistingFields(){this.registerFieldsInElement(this)}registerFieldsInElement(t){["nr-input","nr-select","nr-radio","nr-checkbox","nr-textarea","nr-timepicker","nr-datepicker"].forEach(i=>{t.querySelectorAll(i).forEach(t=>{t.getAttribute("name")&&this.validationController.registerField(t)})})}setupFormEvents(){this.addEventListener("submit",this.handleFormSubmit),this.addEventListener("reset",this.handleFormReset),this.addEventListener(h.VALIDATION_CHANGED,this.handleValidationChanged)}handleFormSubmit(t){return p(this,void 0,void 0,function*(){if(t.preventDefault(),!this.disabled)try{const t=yield this.submissionController.submitForm();this.resetOnSuccess&&this.reset(),this.action&&this.performNativeSubmission(t.formData)}catch(t){console.error("Form submission failed:",t)}})}handleFormReset(t){t.preventDefault(),this.reset()}performNativeSubmission(t){const i=document.createElement("form");i.action=this.action,i.method=this.method,i.enctype=this.enctype,this.target&&(i.target=this.target);for(const[s,e]of t.entries()){const t=document.createElement("input");t.type="hidden",t.name=s,t.value=e,i.appendChild(t)}document.body.appendChild(i),i.submit(),document.body.removeChild(i)}validate(){return p(this,void 0,void 0,function*(){return(yield this.validationController.validateForm()).isValid})}submit(t){return p(this,void 0,void 0,function*(){yield this.submissionController.submitForm(t)})}reset(){this.validationController.reset(),this.submissionController.resetSubmission(),this._validationState=d.Pristine,this._submissionState=l.Idle}get isValid(){return this.validationController.isValid()}get isSubmitting(){return this.submissionController.isSubmitting()}getFormData(){return this.submissionController.collectFormData()}getInvalidFields(){return this.validationController.getInvalidFields()}getFieldsValue(t){const i=this.getFormData().jsonData;if(t&&t.length>0){const s={};return t.forEach(t=>{t in i&&(s[t]=i[t])}),s}return i}getFieldValue(t){return this.getFieldsValue()[t]}setFieldsValue(t){Object.entries(t).forEach(([t,i])=>{this.setFieldValue(t,i)})}setFieldValue(t,i){const s=this.validationController.getFields().find(i=>i.name===t);s&&s.element&&(s.element.value=i,s.value=i,s.element.dispatchEvent(new Event("change",{bubbles:!0})))}validateFields(t){return p(this,void 0,void 0,function*(){const i=yield this.validationController.validateForm();if(t&&t.length>0){const s={};if(t.forEach(t=>{i.validationErrors[t]&&(s[t]=i.validationErrors[t])}),Object.keys(s).length>0)throw new Error(JSON.stringify(s));return this.getFieldsValue(t)}if(!i.isValid)throw new Error(JSON.stringify(i.validationErrors));return this.getFieldsValue()})}resetFields(t){if(!t||0===t.length)return void this.reset();const i=this.validationController.getFields();t.forEach(t=>{const s=i.find(i=>i.name===t);s&&s.element&&(s.element.value="",s.value="",s.touched=!1,s.dirty=!1,s.isValid=!0,s.validationMessage="",s.element.dispatchEvent(new Event("change",{bubbles:!0})))})}getFieldError(t){const i=this.validationController.getFields().find(i=>i.name===t);return i&&!i.isValid?i.validationMessage:null}getFieldsError(t){const i=this.validationController.getFields(),s={};return(t?i.filter(i=>t.includes(i.name)):i).forEach(t=>{s[t.name]=t.isValid?null:t.validationMessage}),s}isFieldTouched(t){const i=this.validationController.getFields().find(i=>i.name===t);return!!i&&i.touched}isFieldsTouched(t){const i=this.validationController.getFields();return(t?i.filter(i=>t.includes(i.name)):i).some(t=>t.touched)}isFieldDirty(t){const i=this.validationController.getFields().find(i=>i.name===t);return!!i&&i.dirty}isFieldsDirty(t){const i=this.validationController.getFields();return(t?i.filter(i=>t.includes(i.name)):i).some(t=>t.dirty)}getFieldInstance(t){const i=this.validationController.getFields().find(i=>i.name===t);return i?i.element:null}scrollToField(t){if(t){const i=this.getFieldInstance(t);return!!i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),"function"==typeof i.focus&&i.focus(),!0)}return this.validationController.focusFirstInvalidField()}finish(){return p(this,void 0,void 0,function*(){try{const t=yield this.validateFields();return yield this.submit(),t}catch(t){throw this.scrollToField(),t}})}getFieldsWithErrors(){return this.validationController.getFields().filter(t=>!t.isValid).map(t=>t.name)}hasErrors(){return this.getFieldsWithErrors().length>0}getFormState(){const t=this.validationController.getFields();return{isValid:this.isValid,isSubmitting:this.isSubmitting,hasErrors:this.hasErrors(),errorCount:this.getFieldsWithErrors().length,fieldCount:t.length,touchedFields:t.filter(t=>t.touched).map(t=>t.name),dirtyFields:t.filter(t=>t.dirty).map(t=>t.name),invalidFields:this.getFieldsWithErrors()}}setLoading(t){this.disabled=t,this.requestUpdate()}render(){return s`
87
- <form
87
+ */var g=function(t,i,e,s){return new(e||(e=Promise))(function(n,r){function o(t){try{d(s.next(t))}catch(t){r(t)}}function a(t){try{d(s.throw(t))}catch(t){r(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(o,a)}d((s=s.apply(t,i||[])).next())})};class y{constructor(t){this.host=t,this.fields=new Map,this.validationState=a.Pristine,this.validationPromise=null}registerField(t){var i;const e=t.name||t.getAttribute("name")||`field-${Date.now()}`,s={element:t,name:e,value:t.value,isValid:t.getValidationStatus().isValid,validationMessage:t.validationMessage||"",required:null!==(i=t.required)&&void 0!==i&&i,touched:!1,dirty:!1};this.fields.set(e,s),this.addFieldListeners(t,e)}unregisterField(t){const i=this.fields.get(t);i&&(this.removeFieldListeners(i.element),this.fields.delete(t))}addFieldListeners(t,i){t.addEventListener("nr-validation",t=>this.handleFieldValidation(i,t))}removeFieldListeners(t){}handleFieldValidation(t,i){const e=this.fields.get(t);if(e){if(i&&i.detail)e.isValid=i.detail.isValid||!1,e.validationMessage=i.detail.validationMessage||"";else{const t=e.element.getValidationStatus();e.isValid=t.isValid,e.validationMessage=e.element.validationMessage||""}this.updateFormValidationState()}}updateFormValidationState(){const t=this.getInvalidFields(),i=0===t.length;this.validationState=i?a.Valid:a.Invalid;const e={isValid:i,invalidFields:t,validationErrors:this.buildValidationErrors(),summary:i?"Form is valid":`${t.length} field(s) have errors`};this.dispatchValidationEvent(e)}buildValidationErrors(){const t={};for(const[i,e]of this.fields)!e.isValid&&e.validationMessage&&(t[i]=e.validationMessage);return t}validateForm(){return null!==this.validationPromise||(this.validationState=a.Pending,this.validationPromise=this.performValidation()),this.validationPromise}performValidation(){return g(this,void 0,void 0,function*(){const t=[],i={};for(const[e,s]of this.fields){const n=s.element.getValidationStatus().isValid;s.isValid=n,s.validationMessage=s.element.validationMessage||"",n||(t.push(s),i[e]=s.validationMessage)}const e=0===t.length;this.validationState=e?a.Valid:a.Invalid;const s={isValid:e,invalidFields:t,validationErrors:i,summary:e?"Form is valid":`${t.length} field(s) have errors`};return this.dispatchValidationEvent(s),this.validationPromise=null,s})}getValidationState(){return this.validationState}getFields(){return Array.from(this.fields.values())}getInvalidFields(){return Array.from(this.fields.values()).filter(t=>!t.isValid)}isValid(){return this.validationState===a.Valid&&Array.from(this.fields.values()).every(t=>t.isValid)}focusFirstInvalidField(){const t=Array.from(this.fields.values()).find(t=>!t.isValid);return!(!t||"function"!=typeof t.element.focus)&&(t.element.focus(),!0)}reset(){for(const t of this.fields.values())"clearValidation"in t.element&&"function"==typeof t.element.clearValidation&&t.element.clearValidation(),"value"in t.element&&(t.element.value=""),t.touched=!1,t.dirty=!1,t.isValid=!0,t.validationMessage="";this.validationState=a.Pristine,this.dispatchResetEvent()}dispatchValidationEvent(t){var i,e;null===(e=(i=this.host).dispatchCustomEvent)||void 0===e||e.call(i,h.VALIDATION_CHANGED,{validationResult:t})}dispatchResetEvent(){var t,i;null===(i=(t=this.host).dispatchCustomEvent)||void 0===i||i.call(t,h.RESET,{})}}
88
+ /**
89
+ * @license
90
+ * Copyright 2023 Nuraly, Laabidi Aymen
91
+ * SPDX-License-Identifier: MIT
92
+ */var w=function(t,i,e,s){return new(e||(e=Promise))(function(n,r){function o(t){try{d(s.next(t))}catch(t){r(t)}}function a(t){try{d(s.throw(t))}catch(t){r(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(o,a)}d((s=s.apply(t,i||[])).next())})};class F{constructor(t){this.host=t,this.submissionState=d.Idle,this.lastSubmissionData=null}getSubmissionState(){return this.submissionState}isSubmitting(){return this.submissionState===d.Submitting}collectFormData(){const t=new FormData,i={},e={};return this.getFormFields().forEach(s=>{const n=s.name||s.getAttribute("name");if(!n)return;const r=s.value;null!=r&&t.append(n,String(r)),i[n]=r,e[n]={element:s,value:r,name:n,type:s.tagName.toLowerCase(),required:s.required||!1,disabled:s.disabled||!1}}),{formData:t,jsonData:i,fields:e}}submitForm(t){return w(this,void 0,void 0,function*(){if(this.isSubmitting())throw new Error("Form is already submitting");try{this.setSubmissionState(d.Submitting);const i=this.host.validationController;if(i){const t=yield i.validateForm();if(!t.isValid)throw i.focusFirstInvalidField(),this.dispatchSubmitAttemptEvent(t),new Error(`Form validation failed: ${t.summary}`)}const e=this.collectFormData();return t&&(Object.assign(e.jsonData,t),Object.entries(t).forEach(([t,i])=>{e.formData.append(t,String(i))})),this.lastSubmissionData=e,this.dispatchSubmitSuccessEvent(e),this.setSubmissionState(d.Success),e}catch(t){throw this.setSubmissionState(d.Error),this.dispatchSubmitErrorEvent(t),t}})}resetSubmission(){this.submissionState=d.Idle,this.lastSubmissionData=null}getLastSubmissionData(){return this.lastSubmissionData}getFormFields(){var t;const i=this.host,e=[],s=["nr-input","nr-select","nr-radio","nr-checkbox","nr-textarea","nr-timepicker","nr-datepicker","input","select","textarea"];s.forEach(t=>{i.querySelectorAll(t).forEach(t=>{(t.name||t.getAttribute("name"))&&e.push(t)})});return((null===(t=i.shadowRoot)||void 0===t?void 0:t.querySelectorAll("slot"))||[]).forEach(t=>{t.assignedElements({flatten:!0}).forEach(t=>{s.forEach(i=>{if(t.matches&&t.matches(i)){const i=t;(i.name||i.getAttribute("name"))&&e.push(i)}t.querySelectorAll(i).forEach(t=>{const i=t;(i.name||i.getAttribute("name"))&&e.push(i)})})})}),e}setSubmissionState(t){var i,e;this.submissionState=t,null===(e=(i=this.host).requestUpdate)||void 0===e||e.call(i)}dispatchSubmitAttemptEvent(t){var i,e;null===(e=(i=this.host).dispatchCustomEvent)||void 0===e||e.call(i,h.SUBMIT_ATTEMPT,{validationResult:t})}dispatchSubmitSuccessEvent(t){var i,e;null===(e=(i=this.host).dispatchCustomEvent)||void 0===e||e.call(i,h.SUBMIT_SUCCESS,{formData:t})}dispatchSubmitErrorEvent(t){var i,e;null===(e=(i=this.host).dispatchCustomEvent)||void 0===e||e.call(i,h.SUBMIT_ERROR,{error:t})}}
93
+ /**
94
+ * @license
95
+ * Copyright 2023 Nuraly, Laabidi Aymen
96
+ * SPDX-License-Identifier: MIT
97
+ */var S=function(t,i,e,s){for(var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o},E=function(t,i,e,s){return new(e||(e=Promise))(function(n,r){function o(t){try{d(s.next(t))}catch(t){r(t)}}function a(t){try{d(s.throw(t))}catch(t){r(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(o,a)}d((s=s.apply(t,i||[])).next())})};let O=class extends((t=>u(l(v(p(t)))))(e)){constructor(){super(...arguments),this.config={validateOnChange:!1,validateOnBlur:!0,showErrorsImmediately:!1,preventInvalidSubmission:!0,resetOnSuccess:!1,validationDelay:300},this.validateOnChange=!1,this.validateOnBlur=!0,this.preventInvalidSubmission=!0,this.resetOnSuccess=!1,this.method="POST",this.enctype="multipart/form-data",this.disabled=!1,this._validationState=a.Pristine,this._submissionState=d.Idle,this.validationController=new y(this),this.submissionController=new F(this),this.handleValidationChanged=t=>{const i=t.detail.validationResult;i&&(this._validationState=i.isValid?a.Valid:a.Invalid)}}get validationState(){return this._validationState}get submissionState(){return this._submissionState}connectedCallback(){super.connectedCallback(),this.setupFormObserver()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupFormObserver()}willUpdate(t){super.willUpdate(t),(t.has("validateOnChange")||t.has("validateOnBlur")||t.has("preventInvalidSubmission")||t.has("resetOnSuccess"))&&(this.config=Object.assign(Object.assign({},this.config),{validateOnChange:this.validateOnChange,validateOnBlur:this.validateOnBlur,preventInvalidSubmission:this.preventInvalidSubmission,resetOnSuccess:this.resetOnSuccess}))}firstUpdated(){this.registerExistingFields(),this.setupFormEvents()}setupFormObserver(){const t=new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t.nodeType===Node.ELEMENT_NODE&&this.registerFieldsInElement(t)})})});t.observe(this,{childList:!0,subtree:!0}),this._formObserver=t}cleanupFormObserver(){const t=this._formObserver;t&&t.disconnect()}registerExistingFields(){this.registerFieldsInElement(this)}registerFieldsInElement(t){["nr-input","nr-select","nr-radio","nr-checkbox","nr-textarea","nr-timepicker","nr-datepicker"].forEach(i=>{t.querySelectorAll(i).forEach(t=>{t.getAttribute("name")&&this.validationController.registerField(t)})})}setupFormEvents(){this.addEventListener("submit",this.handleFormSubmit),this.addEventListener("reset",this.handleFormReset),this.addEventListener(h.VALIDATION_CHANGED,this.handleValidationChanged)}handleFormSubmit(t){return E(this,void 0,void 0,function*(){if(t.preventDefault(),!this.disabled)try{const t=yield this.submissionController.submitForm();this.resetOnSuccess&&this.reset(),this.action&&this.performNativeSubmission(t.formData)}catch(t){console.error("Form submission failed:",t)}})}handleFormReset(t){t.preventDefault(),this.reset()}performNativeSubmission(t){const i=document.createElement("form");i.action=this.action,i.method=this.method,i.enctype=this.enctype,this.target&&(i.target=this.target);for(const[e,s]of t.entries()){const t=document.createElement("input");t.type="hidden",t.name=e,t.value=s,i.appendChild(t)}document.body.appendChild(i),i.submit(),document.body.removeChild(i)}validate(){return E(this,void 0,void 0,function*(){return(yield this.validationController.validateForm()).isValid})}submit(t){return E(this,void 0,void 0,function*(){yield this.submissionController.submitForm(t)})}reset(){this.validationController.reset(),this.submissionController.resetSubmission(),this._validationState=a.Pristine,this._submissionState=d.Idle}get isValid(){return this.validationController.isValid()}get isSubmitting(){return this.submissionController.isSubmitting()}getFormData(){return this.submissionController.collectFormData()}getInvalidFields(){return this.validationController.getInvalidFields()}getFieldsValue(t){const i=this.getFormData().jsonData;if(t&&t.length>0){const e={};return t.forEach(t=>{t in i&&(e[t]=i[t])}),e}return i}getFieldValue(t){return this.getFieldsValue()[t]}setFieldsValue(t){Object.entries(t).forEach(([t,i])=>{this.setFieldValue(t,i)})}setFieldValue(t,i){const e=this.validationController.getFields().find(i=>i.name===t);e&&e.element&&(e.element.value=i,e.value=i,e.element.dispatchEvent(new Event("change",{bubbles:!0})))}validateFields(t){return E(this,void 0,void 0,function*(){const i=yield this.validationController.validateForm();if(t&&t.length>0){const e={};if(t.forEach(t=>{i.validationErrors[t]&&(e[t]=i.validationErrors[t])}),Object.keys(e).length>0)throw new Error(JSON.stringify(e));return this.getFieldsValue(t)}if(!i.isValid)throw new Error(JSON.stringify(i.validationErrors));return this.getFieldsValue()})}resetFields(t){if(!t||0===t.length)return void this.reset();const i=this.validationController.getFields();t.forEach(t=>{const e=i.find(i=>i.name===t);e&&e.element&&(e.element.value="",e.value="",e.touched=!1,e.dirty=!1,e.isValid=!0,e.validationMessage="",e.element.dispatchEvent(new Event("change",{bubbles:!0})))})}getFieldError(t){const i=this.validationController.getFields().find(i=>i.name===t);return i&&!i.isValid?i.validationMessage:null}getFieldsError(t){const i=this.validationController.getFields(),e={};return(t?i.filter(i=>t.includes(i.name)):i).forEach(t=>{e[t.name]=t.isValid?null:t.validationMessage}),e}isFieldTouched(t){const i=this.validationController.getFields().find(i=>i.name===t);return!!i&&i.touched}isFieldsTouched(t){const i=this.validationController.getFields();return(t?i.filter(i=>t.includes(i.name)):i).some(t=>t.touched)}isFieldDirty(t){const i=this.validationController.getFields().find(i=>i.name===t);return!!i&&i.dirty}isFieldsDirty(t){const i=this.validationController.getFields();return(t?i.filter(i=>t.includes(i.name)):i).some(t=>t.dirty)}getFieldInstance(t){const i=this.validationController.getFields().find(i=>i.name===t);return i?i.element:null}scrollToField(t){if(t){const i=this.getFieldInstance(t);return!!i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),"function"==typeof i.focus&&i.focus(),!0)}return this.validationController.focusFirstInvalidField()}finish(){return E(this,void 0,void 0,function*(){try{const t=yield this.validateFields();return yield this.submit(),t}catch(t){throw this.scrollToField(),t}})}getFieldsWithErrors(){return this.validationController.getFields().filter(t=>!t.isValid).map(t=>t.name)}hasErrors(){return this.getFieldsWithErrors().length>0}getFormState(){const t=this.validationController.getFields();return{isValid:this.isValid,isSubmitting:this.isSubmitting,hasErrors:this.hasErrors(),errorCount:this.getFieldsWithErrors().length,fieldCount:t.length,touchedFields:t.filter(t=>t.touched).map(t=>t.name),dirtyFields:t.filter(t=>t.dirty).map(t=>t.name),invalidFields:this.getFieldsWithErrors()}}setLoading(t){this.disabled=t,this.requestUpdate()}render(){return i`
98
+ <form
99
+ part="form"
88
100
  action="${this.action||""}"
89
101
  method="${this.method.toLowerCase()}"
90
102
  enctype="${this.enctype}"
@@ -95,4 +107,4 @@ import{css as t,LitElement as i,html as s}from"lit";import{property as e,state a
95
107
  >
96
108
  <slot></slot>
97
109
  </form>
98
- `}};b.styles=a,f([e({type:Object})],b.prototype,"config",void 0),f([e({type:Boolean,attribute:"validate-on-change"})],b.prototype,"validateOnChange",void 0),f([e({type:Boolean,attribute:"validate-on-blur"})],b.prototype,"validateOnBlur",void 0),f([e({type:Boolean,attribute:"prevent-invalid-submission"})],b.prototype,"preventInvalidSubmission",void 0),f([e({type:Boolean,attribute:"reset-on-success"})],b.prototype,"resetOnSuccess",void 0),f([e({type:String})],b.prototype,"action",void 0),f([e({type:String})],b.prototype,"method",void 0),f([e({type:String,attribute:"enctype"})],b.prototype,"enctype",void 0),f([e({type:String})],b.prototype,"target",void 0),f([e({type:Boolean,reflect:!0})],b.prototype,"disabled",void 0),f([n()],b.prototype,"_validationState",void 0),f([n()],b.prototype,"_submissionState",void 0),b=f([r("nr-form")],b);export{h as FORM_EVENTS,m as FormSubmissionController,l as FormSubmissionState,c as FormValidationController,d as FormValidationState,b as NrFormElement};
110
+ `}};O.useShadowDom=!0,O.styles=o,S([s({type:Object})],O.prototype,"config",void 0),S([s({type:Boolean,attribute:"validate-on-change"})],O.prototype,"validateOnChange",void 0),S([s({type:Boolean,attribute:"validate-on-blur"})],O.prototype,"validateOnBlur",void 0),S([s({type:Boolean,attribute:"prevent-invalid-submission"})],O.prototype,"preventInvalidSubmission",void 0),S([s({type:Boolean,attribute:"reset-on-success"})],O.prototype,"resetOnSuccess",void 0),S([s({type:String})],O.prototype,"action",void 0),S([s({type:String})],O.prototype,"method",void 0),S([s({type:String,attribute:"enctype"})],O.prototype,"enctype",void 0),S([s({type:String})],O.prototype,"target",void 0),S([s({type:Boolean,reflect:!0})],O.prototype,"disabled",void 0),S([n()],O.prototype,"_validationState",void 0),S([n()],O.prototype,"_submissionState",void 0),O=S([r("nr-form")],O);export{h as FORM_EVENTS,F as FormSubmissionController,d as FormSubmissionState,y as FormValidationController,a as FormValidationState,O as NrFormElement};
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ import { FormSubmissionData, FormSubmissionState } from '../form.types.js';
7
+ /**
8
+ * Controller that handles form submission logic
9
+ */
10
+ export declare class FormSubmissionController {
11
+ private host;
12
+ private submissionState;
13
+ private lastSubmissionData;
14
+ constructor(host: any);
15
+ /**
16
+ * Get current submission state
17
+ */
18
+ getSubmissionState(): FormSubmissionState;
19
+ /**
20
+ * Check if form is currently submitting
21
+ */
22
+ isSubmitting(): boolean;
23
+ /**
24
+ * Collect form data from all registered fields
25
+ */
26
+ collectFormData(): FormSubmissionData;
27
+ /**
28
+ * Submit form with validation
29
+ */
30
+ submitForm(customData?: Record<string, any>): Promise<FormSubmissionData>;
31
+ /**
32
+ * Reset submission state
33
+ */
34
+ resetSubmission(): void;
35
+ /**
36
+ * Get last submission data
37
+ */
38
+ getLastSubmissionData(): FormSubmissionData | null;
39
+ /**
40
+ * Get all form field elements from the host
41
+ */
42
+ private getFormFields;
43
+ /**
44
+ * Set submission state and update host
45
+ */
46
+ private setSubmissionState;
47
+ /**
48
+ * Dispatch submit attempt event
49
+ */
50
+ private dispatchSubmitAttemptEvent;
51
+ /**
52
+ * Dispatch submit success event
53
+ */
54
+ private dispatchSubmitSuccessEvent;
55
+ /**
56
+ * Dispatch submit error event
57
+ */
58
+ private dispatchSubmitErrorEvent;
59
+ }
60
+ //# sourceMappingURL=submission.controller.d.ts.map
@@ -0,0 +1,220 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8
+ return new (P || (P = Promise))(function (resolve, reject) {
9
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
10
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
11
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
12
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
13
+ });
14
+ };
15
+ import { FormSubmissionState, FORM_EVENTS } from '../form.types.js';
16
+ /**
17
+ * Controller that handles form submission logic
18
+ */
19
+ export class FormSubmissionController {
20
+ constructor(host) {
21
+ this.host = host;
22
+ this.submissionState = FormSubmissionState.Idle;
23
+ this.lastSubmissionData = null;
24
+ }
25
+ /**
26
+ * Get current submission state
27
+ */
28
+ getSubmissionState() {
29
+ return this.submissionState;
30
+ }
31
+ /**
32
+ * Check if form is currently submitting
33
+ */
34
+ isSubmitting() {
35
+ return this.submissionState === FormSubmissionState.Submitting;
36
+ }
37
+ /**
38
+ * Collect form data from all registered fields
39
+ */
40
+ collectFormData() {
41
+ const formData = new FormData();
42
+ const jsonData = {};
43
+ const fields = {};
44
+ // Get all form field elements
45
+ const formFields = this.getFormFields();
46
+ formFields.forEach(element => {
47
+ const name = element.name || element.getAttribute('name');
48
+ if (!name)
49
+ return;
50
+ const value = element.value;
51
+ // Add to FormData
52
+ if (value !== null && value !== undefined) {
53
+ formData.append(name, String(value));
54
+ }
55
+ // Add to JSON data
56
+ jsonData[name] = value;
57
+ fields[name] = {
58
+ element,
59
+ value,
60
+ name,
61
+ type: element.tagName.toLowerCase(),
62
+ required: element.required || false,
63
+ disabled: element.disabled || false
64
+ };
65
+ });
66
+ return {
67
+ formData,
68
+ jsonData,
69
+ fields
70
+ };
71
+ }
72
+ /**
73
+ * Submit form with validation
74
+ */
75
+ submitForm(customData) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ if (this.isSubmitting()) {
78
+ throw new Error('Form is already submitting');
79
+ }
80
+ try {
81
+ this.setSubmissionState(FormSubmissionState.Submitting);
82
+ // Validate form first
83
+ const validationController = this.host.validationController;
84
+ if (validationController) {
85
+ const validationResult = yield validationController.validateForm();
86
+ if (!validationResult.isValid) {
87
+ // Focus first invalid field
88
+ validationController.focusFirstInvalidField();
89
+ // Dispatch submit attempt event
90
+ this.dispatchSubmitAttemptEvent(validationResult);
91
+ throw new Error(`Form validation failed: ${validationResult.summary}`);
92
+ }
93
+ }
94
+ // Collect form data
95
+ const submissionData = this.collectFormData();
96
+ // Merge custom data if provided
97
+ if (customData) {
98
+ Object.assign(submissionData.jsonData, customData);
99
+ Object.entries(customData).forEach(([key, value]) => {
100
+ submissionData.formData.append(key, String(value));
101
+ });
102
+ }
103
+ this.lastSubmissionData = submissionData;
104
+ // Dispatch submit success event
105
+ this.dispatchSubmitSuccessEvent(submissionData);
106
+ this.setSubmissionState(FormSubmissionState.Success);
107
+ return submissionData;
108
+ }
109
+ catch (error) {
110
+ this.setSubmissionState(FormSubmissionState.Error);
111
+ // Dispatch submit error event
112
+ this.dispatchSubmitErrorEvent(error);
113
+ throw error;
114
+ }
115
+ });
116
+ }
117
+ /**
118
+ * Reset submission state
119
+ */
120
+ resetSubmission() {
121
+ this.submissionState = FormSubmissionState.Idle;
122
+ this.lastSubmissionData = null;
123
+ }
124
+ /**
125
+ * Get last submission data
126
+ */
127
+ getLastSubmissionData() {
128
+ return this.lastSubmissionData;
129
+ }
130
+ /**
131
+ * Get all form field elements from the host
132
+ */
133
+ getFormFields() {
134
+ var _a;
135
+ const host = this.host;
136
+ const fields = [];
137
+ // Query for all potential form field elements
138
+ const selectors = [
139
+ 'nr-input',
140
+ 'nr-select',
141
+ 'nr-radio',
142
+ 'nr-checkbox',
143
+ 'nr-textarea',
144
+ 'nr-timepicker',
145
+ 'nr-datepicker',
146
+ 'input',
147
+ 'select',
148
+ 'textarea'
149
+ ];
150
+ // Search in light DOM
151
+ selectors.forEach(selector => {
152
+ const elements = host.querySelectorAll(selector);
153
+ elements.forEach((element) => {
154
+ if (element.name || element.getAttribute('name')) {
155
+ fields.push(element);
156
+ }
157
+ });
158
+ });
159
+ // Search in slotted content
160
+ const slots = ((_a = host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('slot')) || [];
161
+ slots.forEach((slot) => {
162
+ const assignedElements = slot.assignedElements({ flatten: true });
163
+ assignedElements.forEach(element => {
164
+ selectors.forEach(selector => {
165
+ if (element.matches && element.matches(selector)) {
166
+ const fieldElement = element;
167
+ if (fieldElement.name || fieldElement.getAttribute('name')) {
168
+ fields.push(fieldElement);
169
+ }
170
+ }
171
+ // Also search within the element
172
+ const nestedFields = element.querySelectorAll(selector);
173
+ nestedFields.forEach((nested) => {
174
+ const fieldElement = nested;
175
+ if (fieldElement.name || fieldElement.getAttribute('name')) {
176
+ fields.push(fieldElement);
177
+ }
178
+ });
179
+ });
180
+ });
181
+ });
182
+ return fields;
183
+ }
184
+ /**
185
+ * Set submission state and update host
186
+ */
187
+ setSubmissionState(state) {
188
+ var _a, _b;
189
+ this.submissionState = state;
190
+ (_b = (_a = this.host).requestUpdate) === null || _b === void 0 ? void 0 : _b.call(_a);
191
+ }
192
+ /**
193
+ * Dispatch submit attempt event
194
+ */
195
+ dispatchSubmitAttemptEvent(validationResult) {
196
+ var _a, _b;
197
+ (_b = (_a = this.host).dispatchCustomEvent) === null || _b === void 0 ? void 0 : _b.call(_a, FORM_EVENTS.SUBMIT_ATTEMPT, {
198
+ validationResult
199
+ });
200
+ }
201
+ /**
202
+ * Dispatch submit success event
203
+ */
204
+ dispatchSubmitSuccessEvent(data) {
205
+ var _a, _b;
206
+ (_b = (_a = this.host).dispatchCustomEvent) === null || _b === void 0 ? void 0 : _b.call(_a, FORM_EVENTS.SUBMIT_SUCCESS, {
207
+ formData: data
208
+ });
209
+ }
210
+ /**
211
+ * Dispatch submit error event
212
+ */
213
+ dispatchSubmitErrorEvent(error) {
214
+ var _a, _b;
215
+ (_b = (_a = this.host).dispatchCustomEvent) === null || _b === void 0 ? void 0 : _b.call(_a, FORM_EVENTS.SUBMIT_ERROR, {
216
+ error
217
+ });
218
+ }
219
+ }
220
+ //# sourceMappingURL=submission.controller.js.map
@@ -0,0 +1,87 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ import { FormField, FormValidationResult, FormValidationState } from '../form.types.js';
7
+ import { ValidatableComponent } from '@nuralyui/common/mixins';
8
+ /**
9
+ * Controller that coordinates validation across all form fields
10
+ * This does NOT perform validation - it coordinates existing component validations
11
+ */
12
+ export declare class FormValidationController {
13
+ private host;
14
+ private fields;
15
+ private validationState;
16
+ private validationPromise;
17
+ constructor(host: any);
18
+ /**
19
+ * Register a form field for validation coordination
20
+ */
21
+ registerField(element: HTMLElement & ValidatableComponent): void;
22
+ /**
23
+ * Unregister a form field
24
+ */
25
+ unregisterField(name: string): void;
26
+ /**
27
+ * Add event listeners to a form field
28
+ */
29
+ private addFieldListeners;
30
+ /**
31
+ * Remove event listeners from a form field
32
+ */
33
+ private removeFieldListeners;
34
+ /**
35
+ * Handle field validation event
36
+ */
37
+ private handleFieldValidation;
38
+ /**
39
+ * Update form validation state based on current field states
40
+ */
41
+ private updateFormValidationState;
42
+ /**
43
+ * Build validation errors object from current field states
44
+ */
45
+ private buildValidationErrors;
46
+ /**
47
+ * Validate all form fields (coordinates existing validations)
48
+ */
49
+ validateForm(): Promise<FormValidationResult>;
50
+ /**
51
+ * Perform the actual validation coordination
52
+ */
53
+ private performValidation;
54
+ /**
55
+ * Get current validation state
56
+ */
57
+ getValidationState(): FormValidationState;
58
+ /**
59
+ * Get all registered fields
60
+ */
61
+ getFields(): FormField[];
62
+ /**
63
+ * Get invalid fields
64
+ */
65
+ getInvalidFields(): FormField[];
66
+ /**
67
+ * Check if form is valid
68
+ */
69
+ isValid(): boolean;
70
+ /**
71
+ * Focus first invalid field
72
+ */
73
+ focusFirstInvalidField(): boolean;
74
+ /**
75
+ * Reset all fields
76
+ */
77
+ reset(): void;
78
+ /**
79
+ * Dispatch validation event
80
+ */
81
+ private dispatchValidationEvent;
82
+ /**
83
+ * Dispatch reset event
84
+ */
85
+ private dispatchResetEvent;
86
+ }
87
+ //# sourceMappingURL=validation.controller.d.ts.map