@nuraly/lumenui 0.1.0 → 0.2.1

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 (312) hide show
  1. package/dist/nuralyui.bundle.js +23024 -17355
  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/canvas/base-canvas.component.d.ts +2 -1
  28. package/dist/src/components/canvas/base-canvas.component.js +1 -0
  29. package/dist/src/components/canvas/bundle.js +16919 -9595
  30. package/dist/src/components/canvas/bundle.js.gz +0 -0
  31. package/dist/src/components/canvas/canvas.constants.d.ts +1 -1
  32. package/dist/src/components/canvas/canvas.constants.js +1 -1
  33. package/dist/src/components/canvas/chatbot-panel.style.js +31 -31
  34. package/dist/src/components/canvas/index.d.ts +2 -0
  35. package/dist/src/components/canvas/index.js +3 -0
  36. package/dist/src/components/canvas/whiteboard-canvas.component.d.ts +3 -1
  37. package/dist/src/components/canvas/whiteboard-canvas.component.js +19 -1
  38. package/dist/src/components/canvas/whiteboard-canvas.style.js +159 -138
  39. package/dist/src/components/canvas/whiteboard-node.component.d.ts +2 -1
  40. package/dist/src/components/canvas/whiteboard-node.component.js +2 -1
  41. package/dist/src/components/canvas/whiteboard-node.style.js +44 -44
  42. package/dist/src/components/canvas/workflow-canvas-only.d.ts +4 -0
  43. package/dist/src/components/canvas/workflow-canvas-only.js +5 -0
  44. package/dist/src/components/canvas/workflow-canvas.component.d.ts +3 -1
  45. package/dist/src/components/canvas/workflow-canvas.component.js +24 -2
  46. package/dist/src/components/canvas/workflow-canvas.style.js +776 -648
  47. package/dist/src/components/canvas/workflow-canvas.types.d.ts +113 -4
  48. package/dist/src/components/canvas/workflow-canvas.types.js +646 -3
  49. package/dist/src/components/canvas/workflow-node.component.d.ts +3 -2
  50. package/dist/src/components/canvas/workflow-node.component.js +5 -5
  51. package/dist/src/components/canvas/workflow-node.style.js +183 -181
  52. package/dist/src/components/card/bundle.js +43 -35
  53. package/dist/src/components/card/bundle.js.gz +0 -0
  54. package/dist/src/components/card/card.component.d.ts +6 -1
  55. package/dist/src/components/card/card.component.js +8 -2
  56. package/dist/src/components/card/card.style.js +26 -30
  57. package/dist/src/components/carousel/bundle.js +8 -8
  58. package/dist/src/components/carousel/bundle.js.gz +0 -0
  59. package/dist/src/components/carousel/carousel.component.d.ts +12 -0
  60. package/dist/src/components/carousel/carousel.component.js +16 -4
  61. package/dist/src/components/chatbot/bundle.js +422 -406
  62. package/dist/src/components/chatbot/bundle.js.gz +0 -0
  63. package/dist/src/components/chatbot/chatbot.component.d.ts +2 -1
  64. package/dist/src/components/chatbot/chatbot.component.js +1 -0
  65. package/dist/src/components/chatbot/chatbot.style.js +277 -277
  66. package/dist/src/components/checkbox/bundle.js +86 -245
  67. package/dist/src/components/checkbox/bundle.js.gz +0 -0
  68. package/dist/src/components/checkbox/checkbox.component.d.ts +5 -2
  69. package/dist/src/components/checkbox/checkbox.component.js +11 -13
  70. package/dist/src/components/checkbox/checkbox.style.js +56 -231
  71. package/dist/src/components/code-editor/bundle.js +151 -25
  72. package/dist/src/components/code-editor/bundle.js.gz +0 -0
  73. package/dist/src/components/code-editor/code-editor.component.d.ts +18 -56
  74. package/dist/src/components/code-editor/code-editor.component.js +141 -394
  75. package/dist/src/components/code-editor/code-editor.style.js +139 -15
  76. package/dist/src/components/collapse/bundle.js +97 -84
  77. package/dist/src/components/collapse/bundle.js.gz +0 -0
  78. package/dist/src/components/collapse/collapse.component.d.ts +7 -1
  79. package/dist/src/components/collapse/collapse.component.js +11 -2
  80. package/dist/src/components/collapse/collapse.style.js +60 -60
  81. package/dist/src/components/colorpicker/bundle.js +85 -48
  82. package/dist/src/components/colorpicker/bundle.js.gz +0 -0
  83. package/dist/src/components/colorpicker/color-holder.component.d.ts +2 -4
  84. package/dist/src/components/colorpicker/color-holder.component.js +5 -6
  85. package/dist/src/components/colorpicker/color-holder.style.js +11 -11
  86. package/dist/src/components/colorpicker/color-picker.component.d.ts +2 -1
  87. package/dist/src/components/colorpicker/color-picker.component.js +1 -0
  88. package/dist/src/components/colorpicker/color-picker.style.js +12 -12
  89. package/dist/src/components/colorpicker/default-color-sets.component.d.ts +2 -2
  90. package/dist/src/components/colorpicker/default-color-sets.component.js +4 -3
  91. package/dist/src/components/colorpicker/default-color-sets.style.js +5 -5
  92. package/dist/src/components/container/bundle.js +24 -14
  93. package/dist/src/components/container/bundle.js.gz +0 -0
  94. package/dist/src/components/container/container.component.d.ts +4 -1
  95. package/dist/src/components/container/container.component.js +7 -5
  96. package/dist/src/components/container/container.style.js +9 -9
  97. package/dist/src/components/datepicker/bundle.js +193 -177
  98. package/dist/src/components/datepicker/bundle.js.gz +0 -0
  99. package/dist/src/components/datepicker/datepicker.component.d.ts +2 -1
  100. package/dist/src/components/datepicker/datepicker.component.js +1 -0
  101. package/dist/src/components/datepicker/datepicker.style.js +65 -65
  102. package/dist/src/components/datepicker/datepicker.style.variables.js +91 -91
  103. package/dist/src/components/db-connection-select/bundle.js +7 -6
  104. package/dist/src/components/db-connection-select/bundle.js.gz +0 -0
  105. package/dist/src/components/db-connection-select/db-connection-select.component.d.ts +3 -0
  106. package/dist/src/components/db-connection-select/db-connection-select.component.js +4 -0
  107. package/dist/src/components/divider/bundle.js +61 -35
  108. package/dist/src/components/divider/bundle.js.gz +0 -0
  109. package/dist/src/components/divider/divider.component.d.ts +4 -6
  110. package/dist/src/components/divider/divider.component.js +10 -14
  111. package/dist/src/components/divider/divider.style.js +41 -31
  112. package/dist/src/components/document/bundle.js +50 -48
  113. package/dist/src/components/document/bundle.js.gz +0 -0
  114. package/dist/src/components/document/document.component.d.ts +12 -1
  115. package/dist/src/components/document/document.component.js +18 -6
  116. package/dist/src/components/document/document.style.js +21 -36
  117. package/dist/src/components/dropdown/bundle.js +117 -101
  118. package/dist/src/components/dropdown/bundle.js.gz +0 -0
  119. package/dist/src/components/dropdown/dropdown.component.d.ts +2 -1
  120. package/dist/src/components/dropdown/dropdown.component.js +1 -0
  121. package/dist/src/components/dropdown/dropdown.style.js +68 -68
  122. package/dist/src/components/file-upload/bundle.js +82 -76
  123. package/dist/src/components/file-upload/bundle.js.gz +0 -0
  124. package/dist/src/components/file-upload/file-upload.component.d.ts +2 -1
  125. package/dist/src/components/file-upload/file-upload.component.js +1 -0
  126. package/dist/src/components/file-upload/styles.js +59 -59
  127. package/dist/src/components/flex/bundle.js +18 -8
  128. package/dist/src/components/flex/bundle.js.gz +0 -0
  129. package/dist/src/components/flex/flex.component.d.ts +4 -1
  130. package/dist/src/components/flex/flex.component.js +7 -4
  131. package/dist/src/components/flex/flex.style.js +2 -2
  132. package/dist/src/components/form/bundle.js +22 -10
  133. package/dist/src/components/form/bundle.js.gz +0 -0
  134. package/dist/src/components/form/form.component.d.ts +4 -1
  135. package/dist/src/components/form/form.component.js +5 -1
  136. package/dist/src/components/form/form.style.js +2 -2
  137. package/dist/src/components/grid/bundle.js +26 -14
  138. package/dist/src/components/grid/bundle.js.gz +0 -0
  139. package/dist/src/components/grid/col.component.d.ts +4 -1
  140. package/dist/src/components/grid/col.component.js +4 -1
  141. package/dist/src/components/grid/col.style.js +2 -2
  142. package/dist/src/components/grid/row.component.d.ts +4 -1
  143. package/dist/src/components/grid/row.component.js +4 -1
  144. package/dist/src/components/grid/row.style.js +2 -2
  145. package/dist/src/components/icon/bundle.js +78 -252
  146. package/dist/src/components/icon/bundle.js.gz +0 -0
  147. package/dist/src/components/icon/icon-paths.d.ts +2 -0
  148. package/dist/src/components/icon/icon-paths.js +141 -0
  149. package/dist/src/components/icon/icon.component.d.ts +10 -12
  150. package/dist/src/components/icon/icon.component.js +42 -93
  151. package/dist/src/components/icon/icon.style.js +42 -130
  152. package/dist/src/components/icon/icon.variables.js +9 -9
  153. package/dist/src/components/iconpicker/bundle.js +859 -1511
  154. package/dist/src/components/iconpicker/bundle.js.gz +0 -0
  155. package/dist/src/components/iconpicker/icon-picker.component.d.ts +2 -1
  156. package/dist/src/components/iconpicker/icon-picker.component.js +1 -0
  157. package/dist/src/components/iconpicker/icon-picker.style.js +13 -13
  158. package/dist/src/components/image/bundle.js +43 -33
  159. package/dist/src/components/image/bundle.js.gz +0 -0
  160. package/dist/src/components/image/image.component.d.ts +10 -1
  161. package/dist/src/components/image/image.component.js +13 -3
  162. package/dist/src/components/image/image.style.js +19 -26
  163. package/dist/src/components/input/bundle.js +420 -644
  164. package/dist/src/components/input/bundle.js.gz +0 -0
  165. package/dist/src/components/input/input.component.d.ts +16 -3
  166. package/dist/src/components/input/input.component.js +43 -27
  167. package/dist/src/components/input/input.style.d.ts +1 -1
  168. package/dist/src/components/input/input.style.js +331 -634
  169. package/dist/src/components/kv-secret-select/bundle.js +2 -1
  170. package/dist/src/components/kv-secret-select/bundle.js.gz +0 -0
  171. package/dist/src/components/kv-secret-select/kv-secret-select.component.d.ts +3 -0
  172. package/dist/src/components/kv-secret-select/kv-secret-select.component.js +4 -0
  173. package/dist/src/components/label/bundle.js +37 -60
  174. package/dist/src/components/label/bundle.js.gz +0 -0
  175. package/dist/src/components/label/label.component.d.ts +8 -4
  176. package/dist/src/components/label/label.component.js +9 -14
  177. package/dist/src/components/label/label.style.js +17 -25
  178. package/dist/src/components/label/label.style.variables.js +18 -18
  179. package/dist/src/components/layout/bundle.js +86 -70
  180. package/dist/src/components/layout/bundle.js.gz +0 -0
  181. package/dist/src/components/layout/content.component.d.ts +2 -1
  182. package/dist/src/components/layout/content.component.js +2 -1
  183. package/dist/src/components/layout/content.style.js +3 -3
  184. package/dist/src/components/layout/footer.component.d.ts +2 -1
  185. package/dist/src/components/layout/footer.component.js +3 -2
  186. package/dist/src/components/layout/footer.style.js +7 -7
  187. package/dist/src/components/layout/header.component.d.ts +2 -1
  188. package/dist/src/components/layout/header.component.js +3 -2
  189. package/dist/src/components/layout/header.style.js +7 -7
  190. package/dist/src/components/layout/layout.component.d.ts +4 -7
  191. package/dist/src/components/layout/layout.component.js +9 -22
  192. package/dist/src/components/layout/layout.style.js +1 -1
  193. package/dist/src/components/layout/sider.component.d.ts +3 -1
  194. package/dist/src/components/layout/sider.component.js +3 -1
  195. package/dist/src/components/layout/sider.style.js +29 -29
  196. package/dist/src/components/menu/bundle.js +135 -125
  197. package/dist/src/components/menu/bundle.js.gz +0 -0
  198. package/dist/src/components/menu/menu.component.d.ts +2 -1
  199. package/dist/src/components/menu/menu.component.js +1 -0
  200. package/dist/src/components/menu/menu.style.js +87 -87
  201. package/dist/src/components/modal/bundle.js +105 -96
  202. package/dist/src/components/modal/bundle.js.gz +0 -0
  203. package/dist/src/components/modal/modal.component.d.ts +2 -1
  204. package/dist/src/components/modal/modal.component.js +1 -0
  205. package/dist/src/components/modal/modal.style.js +69 -71
  206. package/dist/src/components/panel/bundle.js +190 -391
  207. package/dist/src/components/panel/bundle.js.gz +0 -0
  208. package/dist/src/components/panel/panel.component.d.ts +2 -1
  209. package/dist/src/components/panel/panel.component.js +1 -0
  210. package/dist/src/components/panel/panel.style.js +65 -65
  211. package/dist/src/components/popconfirm/bundle.js +107 -93
  212. package/dist/src/components/popconfirm/bundle.js.gz +0 -0
  213. package/dist/src/components/popconfirm/popconfirm-manager.component.d.ts +2 -1
  214. package/dist/src/components/popconfirm/popconfirm-manager.component.js +1 -0
  215. package/dist/src/components/popconfirm/popconfirm-manager.style.js +16 -16
  216. package/dist/src/components/popconfirm/popconfirm.component.d.ts +2 -1
  217. package/dist/src/components/popconfirm/popconfirm.component.js +9 -5
  218. package/dist/src/components/popconfirm/popconfirm.style.js +43 -43
  219. package/dist/src/components/radio/bundle.js +56 -86
  220. package/dist/src/components/radio/bundle.js.gz +0 -0
  221. package/dist/src/components/radio/radio.component.d.ts +8 -2
  222. package/dist/src/components/radio/radio.component.js +17 -9
  223. package/dist/src/components/radio/radio.style.js +30 -77
  224. package/dist/src/components/radio-group/bundle.js +125 -89
  225. package/dist/src/components/radio-group/bundle.js.gz +0 -0
  226. package/dist/src/components/radio-group/radio-group.component.d.ts +5 -1
  227. package/dist/src/components/radio-group/radio-group.component.js +18 -10
  228. package/dist/src/components/radio-group/radio-group.style.js +44 -44
  229. package/dist/src/components/select/bundle.js +260 -367
  230. package/dist/src/components/select/bundle.js.gz +0 -0
  231. package/dist/src/components/select/select.component.d.ts +12 -17
  232. package/dist/src/components/select/select.component.js +35 -35
  233. package/dist/src/components/select/select.style.js +184 -324
  234. package/dist/src/components/skeleton/bundle.js +82 -162
  235. package/dist/src/components/skeleton/bundle.js.gz +0 -0
  236. package/dist/src/components/skeleton/skeleton.component.d.ts +10 -5
  237. package/dist/src/components/skeleton/skeleton.component.js +20 -7
  238. package/dist/src/components/skeleton/skeleton.style.js +34 -133
  239. package/dist/src/components/slider-input/bundle.js +89 -88
  240. package/dist/src/components/slider-input/bundle.js.gz +0 -0
  241. package/dist/src/components/slider-input/slider-input.component.d.ts +11 -0
  242. package/dist/src/components/slider-input/slider-input.component.js +20 -8
  243. package/dist/src/components/slider-input/slider-input.style.js +47 -47
  244. package/dist/src/components/slider-input/slider-input.style.variables.js +32 -32
  245. package/dist/src/components/table/bundle.js +149 -128
  246. package/dist/src/components/table/bundle.js.gz +0 -0
  247. package/dist/src/components/table/table.component.d.ts +2 -1
  248. package/dist/src/components/table/table.component.js +1 -0
  249. package/dist/src/components/table/table.style.js +79 -79
  250. package/dist/src/components/tabs/bundle.js +462 -663
  251. package/dist/src/components/tabs/bundle.js.gz +0 -0
  252. package/dist/src/components/tabs/tabs.component.d.ts +6 -1
  253. package/dist/src/components/tabs/tabs.component.js +8 -1
  254. package/dist/src/components/tabs/tabs.style.js +200 -201
  255. package/dist/src/components/tag/bundle.js +44 -36
  256. package/dist/src/components/tag/bundle.js.gz +0 -0
  257. package/dist/src/components/tag/tag.component.d.ts +7 -6
  258. package/dist/src/components/tag/tag.component.js +10 -19
  259. package/dist/src/components/tag/tag.style.js +20 -24
  260. package/dist/src/components/textarea/bundle.js +131 -94
  261. package/dist/src/components/textarea/bundle.js.gz +0 -0
  262. package/dist/src/components/textarea/textarea.component.d.ts +7 -1
  263. package/dist/src/components/textarea/textarea.component.js +10 -3
  264. package/dist/src/components/textarea/textarea.style.d.ts +1 -13
  265. package/dist/src/components/textarea/textarea.style.js +79 -91
  266. package/dist/src/components/timeline/bundle.js +71 -134
  267. package/dist/src/components/timeline/bundle.js.gz +0 -0
  268. package/dist/src/components/timeline/timeline.component.d.ts +9 -6
  269. package/dist/src/components/timeline/timeline.component.js +16 -13
  270. package/dist/src/components/timeline/timeline.style.d.ts +0 -7
  271. package/dist/src/components/timeline/timeline.style.js +41 -122
  272. package/dist/src/components/timepicker/bundle.js +196 -166
  273. package/dist/src/components/timepicker/bundle.js.gz +0 -0
  274. package/dist/src/components/timepicker/timepicker.component.d.ts +2 -1
  275. package/dist/src/components/timepicker/timepicker.component.js +1 -0
  276. package/dist/src/components/timepicker/timepicker.style.js +42 -42
  277. package/dist/src/components/timepicker/timepicker.style.variables.js +91 -91
  278. package/dist/src/components/toast/bundle.js +97 -81
  279. package/dist/src/components/toast/bundle.js.gz +0 -0
  280. package/dist/src/components/toast/toast.component.d.ts +2 -1
  281. package/dist/src/components/toast/toast.component.js +1 -0
  282. package/dist/src/components/toast/toast.style.js +62 -62
  283. package/dist/src/components/tooltips/bundle.js +10 -10
  284. package/dist/src/components/tooltips/bundle.js.gz +0 -0
  285. package/dist/src/components/tooltips/tooltips.component.d.ts +8 -0
  286. package/dist/src/components/tooltips/tooltips.component.js +9 -1
  287. package/dist/src/components/tooltips/tooltips.style.js +6 -6
  288. package/dist/src/components/video/bundle.js +47 -36
  289. package/dist/src/components/video/bundle.js.gz +0 -0
  290. package/dist/src/components/video/video.component.d.ts +12 -1
  291. package/dist/src/components/video/video.component.js +18 -6
  292. package/dist/src/components/video/video.style.js +18 -24
  293. package/package.json +25 -12
  294. package/packages/common/dist/VERSIONS.md +2 -2
  295. package/packages/common/dist/shared/base-mixin.d.ts +21 -19
  296. package/packages/common/dist/shared/base-mixin.d.ts.map +1 -1
  297. package/packages/common/dist/shared/base-mixin.js +102 -18
  298. package/packages/common/dist/shared/base-mixin.js.map +1 -1
  299. package/packages/common/dist/shared/index.d.ts +1 -0
  300. package/packages/common/dist/shared/index.d.ts.map +1 -1
  301. package/packages/common/dist/shared/index.js +2 -0
  302. package/packages/common/dist/shared/index.js.map +1 -1
  303. package/packages/common/dist/shared/style-injector.d.ts +11 -0
  304. package/packages/common/dist/shared/style-injector.d.ts.map +1 -0
  305. package/packages/common/dist/shared/style-injector.js +53 -0
  306. package/packages/common/dist/shared/style-injector.js.map +1 -0
  307. package/packages/common/dist/shared/theme-mixin.d.ts +2 -24
  308. package/packages/common/dist/shared/theme-mixin.d.ts.map +1 -1
  309. package/packages/common/dist/shared/theme-mixin.js +5 -38
  310. package/packages/common/dist/shared/theme-mixin.js.map +1 -1
  311. package/packages/themes/dist/default.css +0 -10
  312. package/packages/themes/dist/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property as e,customElement as r}from"lit/decorators.js";import{classMap as d}from"lit/directives/class-map.js";import{styleMap as s}from"lit/directives/style-map.js";import{unsafeHTML as a}from"lit/directives/unsafe-html.js";import{NuralyUIBaseMixin as l}from"@nuralyui/common/mixins";import{BaseComponentController as p}from"@nuralyui/common/controllers";const h=o`
1
+ import{css as t,html as e,nothing as o,LitElement as i}from"lit";import{property as n,customElement as s}from"lit/decorators.js";import{classMap as r}from"lit/directives/class-map.js";import{styleMap as d}from"lit/directives/style-map.js";import{unsafeHTML as a}from"lit/directives/unsafe-html.js";const l=t`
2
2
  :host {
3
3
  display: inline-block;
4
4
  position: relative;
5
- color: var(--nuraly-color-text);
6
- font-family: var(--nuraly-dropdown-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
5
+ color: #161616;
6
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
7
7
  }
8
8
 
9
9
  .dropdown {
@@ -17,20 +17,20 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
17
17
  }
18
18
 
19
19
  .dropdown__trigger:focus-within {
20
- outline: var(--nuraly-focus-outline, 2px solid #0f62fe);
21
- outline-offset: var(--nuraly-focus-outline-offset, 1px);
20
+ outline: 2px solid #0f62fe;
21
+ outline-offset: 1px;
22
22
  }
23
23
 
24
24
  .dropdown__panel {
25
25
  position: fixed;
26
- z-index: var(--nuraly-dropdown-z-index, 9999);
27
- background: var(--nuraly-color-dropdown-background, #ffffff);
28
- border: var(--nuraly-dropdown-border-width, 1px) solid var(--nuraly-color-dropdown-border, #e0e0e0);
29
- border-radius: var(--nuraly-dropdown-border-radius, 6px);
30
- box-shadow: var(--nuraly-dropdown-shadow, 0 2px 6px rgba(0, 0, 0, 0.15));
31
- min-width: var(--nuraly-dropdown-min-width, 10rem);
32
- max-width: var(--nuraly-dropdown-max-width, 20rem);
33
- max-height: var(--nuraly-dropdown-max-height, 200px);
26
+ z-index: 9999;
27
+ background: #ffffff;
28
+ border: 1px solid #e0e0e0;
29
+ border-radius: 6px;
30
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
31
+ min-width: 10rem;
32
+ max-width: 20rem;
33
+ max-height: 200px;
34
34
  overflow: auto;
35
35
  /* Use display none to fully hide when closed */
36
36
  display: none;
@@ -38,9 +38,9 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
38
38
  opacity: 0;
39
39
  visibility: hidden;
40
40
  transform: translateY(-8px);
41
- transition: opacity var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease),
42
- visibility var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease),
43
- transform var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease);
41
+ transition: opacity 0.15s ease,
42
+ visibility 0.15s ease,
43
+ transform 0.15s ease;
44
44
  /* Ensure proper containment */
45
45
  box-sizing: border-box;
46
46
  /* Create new stacking context to prevent layering issues */
@@ -90,15 +90,15 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
90
90
 
91
91
  /* Size variants */
92
92
  .dropdown__panel--small {
93
- font-size: var(--nuraly-dropdown-small-font-size, 0.75rem);
93
+ font-size: 0.75rem;
94
94
  }
95
95
 
96
96
  .dropdown__panel--medium {
97
- font-size: var(--nuraly-dropdown-font-size, 0.875rem);
97
+ font-size: 0.875rem;
98
98
  }
99
99
 
100
100
  .dropdown__panel--large {
101
- font-size: var(--nuraly-dropdown-large-font-size, 1rem);
101
+ font-size: 1rem;
102
102
  }
103
103
 
104
104
  /* Animation variants */
@@ -122,8 +122,8 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
122
122
 
123
123
  /* Fade animation - opacity only */
124
124
  .dropdown__panel--fade {
125
- transition: opacity var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease),
126
- visibility var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease);
125
+ transition: opacity 0.15s ease,
126
+ visibility 0.15s ease;
127
127
  }
128
128
 
129
129
  .dropdown__panel--fade:not(.dropdown__panel--open) {
@@ -140,9 +140,9 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
140
140
 
141
141
  /* Slide animation - slide down/up with opacity */
142
142
  .dropdown__panel--slide {
143
- transition: opacity var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease),
144
- visibility var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease),
145
- transform var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease);
143
+ transition: opacity 0.15s ease,
144
+ visibility 0.15s ease,
145
+ transform 0.15s ease;
146
146
  }
147
147
 
148
148
  .dropdown__panel--slide:not(.dropdown__panel--open) {
@@ -166,9 +166,9 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
166
166
 
167
167
  /* Scale animation - scale and opacity */
168
168
  .dropdown__panel--scale {
169
- transition: opacity var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease),
170
- visibility var(--nuraly-dropdown-animation-duration, 0.15s) var(--nuraly-dropdown-animation-timing, ease),
171
- transform var(--nuraly-dropdown-animation-duration, 0.15s) cubic-bezier(0.25, 0.46, 0.45, 0.94);
169
+ transition: opacity 0.15s ease,
170
+ visibility 0.15s ease,
171
+ transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
172
172
  }
173
173
 
174
174
  .dropdown__panel--scale:not(.dropdown__panel--open) {
@@ -201,9 +201,9 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
201
201
  position: absolute;
202
202
  width: 0;
203
203
  height: 0;
204
- border: var(--nuraly-dropdown-arrow-size) solid transparent;
205
- border-bottom-color: var(--nuraly-dropdown-background);
206
- top: calc(-1 * var(--nuraly-dropdown-arrow-size) * 2);
204
+ border: 5px solid transparent;
205
+ border-bottom-color: #ffffff;
206
+ top: calc(-1 * 5px * 2);
207
207
  left: 50%;
208
208
  transform: translateX(-50%);
209
209
  }
@@ -213,10 +213,10 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
213
213
  position: absolute;
214
214
  width: 0;
215
215
  height: 0;
216
- border: calc(var(--nuraly-dropdown-arrow-size) + 1px) solid transparent;
217
- border-bottom-color: var(--nuraly-dropdown-border-color);
218
- top: calc(-1 * var(--nuraly-dropdown-arrow-size) - 1px);
219
- left: calc(-1 * var(--nuraly-dropdown-arrow-size) - 1px);
216
+ border: calc(5px + 1px) solid transparent;
217
+ border-bottom-color: #e0e0e0;
218
+ top: calc(-1 * 5px - 1px);
219
+ left: calc(-1 * 5px - 1px);
220
220
  }
221
221
 
222
222
  /* Content areas */
@@ -236,55 +236,55 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
236
236
  .dropdown__item {
237
237
  display: flex;
238
238
  align-items: center;
239
- gap: var(--nuraly-dropdown-item-gap);
240
- padding: var(--nuraly-dropdown-item-padding);
241
- background: var(--nuraly-color-dropdown-item-background);
239
+ gap: 0.5rem;
240
+ padding: 0.5rem 1rem;
241
+ background: transparent;
242
242
  border: none;
243
- color: var(--nuraly-color-dropdown-item-text);
243
+ color: #161616;
244
244
  cursor: pointer;
245
245
  text-align: left;
246
246
  width: 100%;
247
- min-height: var(--nuraly-dropdown-item-min-height);
248
- transition: var(--nuraly-dropdown-item-transition);
247
+ min-height: 2.5rem;
248
+ transition: background-color 0.15s ease;
249
249
  font-size: inherit;
250
250
  font-family: inherit;
251
- line-height: var(--nuraly-dropdown-item-line-height);
251
+ line-height: 1.5;
252
252
  position: relative;
253
253
  }
254
254
 
255
255
  .dropdown__item:hover:not(.dropdown__item--disabled) {
256
- background: var(--nuraly-color-dropdown-item-background-hover);
257
- color: var(--nuraly-color-dropdown-item-text-hover);
256
+ background: #f4f4f4;
257
+ color: #161616;
258
258
  }
259
259
 
260
260
  .dropdown__item:focus {
261
261
  outline: none;
262
- background: var(--nuraly-color-dropdown-item-background-focus);
263
- color: var(--nuraly-color-dropdown-item-text-focus);
262
+ background: #f4f4f4;
263
+ color: #161616;
264
264
  }
265
265
 
266
266
  .dropdown__item:focus-visible {
267
- outline: 2px solid var(--nuraly-focus-color, #0f62fe);
267
+ outline: 2px solid #0f62fe;
268
268
  outline-offset: -2px;
269
- background: var(--nuraly-color-dropdown-item-background-focus);
270
- color: var(--nuraly-color-dropdown-item-text-focus);
269
+ background: #f4f4f4;
270
+ color: #161616;
271
271
  }
272
272
 
273
273
  .dropdown__item:active:not(.dropdown__item--disabled) {
274
- background: var(--nuraly-color-dropdown-item-background-active);
275
- color: var(--nuraly-color-dropdown-item-text-active);
274
+ background: #f4f4f4;
275
+ color: #161616;
276
276
  }
277
277
 
278
278
  .dropdown__item--disabled {
279
- opacity: var(--nuraly-dropdown-item-disabled-opacity, 0.5);
279
+ opacity: 0.5;
280
280
  cursor: not-allowed;
281
281
  pointer-events: none;
282
282
  }
283
283
 
284
284
  .dropdown__item-icon {
285
285
  flex-shrink: 0;
286
- width: var(--nuraly-dropdown-item-icon-size);
287
- height: var(--nuraly-dropdown-item-icon-size);
286
+ width: 1rem;
287
+ height: 1rem;
288
288
  }
289
289
 
290
290
  .dropdown__item-label {
@@ -296,8 +296,8 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
296
296
 
297
297
  .dropdown__divider {
298
298
  height: 1px;
299
- background: var(--nuraly-dropdown-divider-color);
300
- margin: var(--nuraly-dropdown-divider-margin);
299
+ background: #e0e0e0;
300
+ margin: 0.25rem 0;
301
301
  }
302
302
 
303
303
  /* Cascading dropdown styles */
@@ -340,14 +340,14 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
340
340
  .dropdown__submenu {
341
341
  position: absolute;
342
342
  top: 0;
343
- z-index: calc(var(--nuraly-dropdown-z-index, 9999) + 1);
344
- background: var(--nuraly-color-dropdown-background, #ffffff);
345
- border: var(--nuraly-dropdown-border-width, 1px) solid var(--nuraly-color-dropdown-border, #e0e0e0);
346
- border-radius: var(--nuraly-dropdown-border-radius, 6px);
347
- box-shadow: var(--nuraly-dropdown-shadow, 0 2px 6px rgba(0, 0, 0, 0.15));
348
- min-width: var(--nuraly-dropdown-min-width, 10rem);
349
- max-width: var(--nuraly-dropdown-max-width, 20rem);
350
- max-height: var(--nuraly-dropdown-max-height, auto);
343
+ z-index: calc(9999 + 1);
344
+ background: #ffffff;
345
+ border: 1px solid #e0e0e0;
346
+ border-radius: 6px;
347
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
348
+ min-width: 10rem;
349
+ max-width: 20rem;
350
+ max-height: auto;
351
351
  overflow: auto;
352
352
  box-sizing: border-box;
353
353
  animation: fadeInSubmenu 0.15s ease;
@@ -358,7 +358,7 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
358
358
  }
359
359
 
360
360
  .dropdown__custom-content {
361
- padding: var(--nuraly-dropdown-item-padding, 8px 12px);
361
+ padding: 8px 12px;
362
362
  max-width: 100%;
363
363
  box-sizing: border-box;
364
364
  }
@@ -369,13 +369,13 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
369
369
  margin: 0 0 8px 0;
370
370
  font-size: 0.875rem;
371
371
  font-weight: 600;
372
- color: var(--nuraly-color-text-primary);
372
+ color: #161616;
373
373
  }
374
374
 
375
375
  .dropdown__custom-content p {
376
376
  margin: 0 0 8px 0;
377
377
  font-size: 0.75rem;
378
- color: var(--nuraly-color-text-secondary);
378
+ color: #525252;
379
379
  line-height: 1.4;
380
380
  }
381
381
 
@@ -430,13 +430,13 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
430
430
 
431
431
  /* Focus styles for accessibility */
432
432
  :host(:focus-within) .dropdown__trigger {
433
- outline: var(--nuraly-dropdown-focus-outline);
434
- outline-offset: var(--nuraly-dropdown-focus-offset);
433
+ outline: 2px solid #7c3aed;
434
+ outline-offset: 2px;
435
435
  }
436
436
 
437
437
  /* Disabled state */
438
438
  :host([disabled]) {
439
- opacity: var(--nuraly-dropdown-disabled-opacity, 0.5);
439
+ opacity: 0.5;
440
440
  pointer-events: none;
441
441
  }
442
442
 
@@ -455,66 +455,82 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
455
455
  display: none !important;
456
456
  }
457
457
 
458
- `;class c extends p{findElement(o){var t;return null===(t=this._host.shadowRoot)||void 0===t?void 0:t.querySelector(o)}findElements(o){var t;return null===(t=this._host.shadowRoot)||void 0===t?void 0:t.querySelectorAll(o)}}class u extends c{constructor(o){super(o),this._isOpen=!1,this._position={top:0,left:0,width:0,placement:"bottom"},this._triggerElement=null,this._dropdownElement=null,this._outsideClickHandler=null,this._keydownHandler=null,this._hoverTimer=null,this._triggerClickHandler=null,this._triggerHoverHandler=null,this._triggerLeaveHandler=null,this._triggerFocusHandler=null,this._triggerBlurHandler=null,this._scrollHandler=null,this._resizeHandler=null,this._isOpen=o.open}get isOpen(){return this._isOpen}get position(){return Object.assign({},this._position)}hostConnected(){}hostUpdated(){this._isOpen!==this.host.open&&(this._isOpen=this.host.open),this._triggerElement||this.setupTriggerListeners()}hostDisconnected(){this.cleanup()}open(){try{this._isOpen||this.host.disabled||(this._isOpen=!0,this.host.open=!0,this.requestUpdate(),setTimeout(()=>{this.calculatePosition(),this.setupEventListeners()},10),this.dispatchEvent(new CustomEvent("nr-dropdown-open",{bubbles:!0,composed:!0,detail:{dropdown:this.host}})))}catch(o){this.handleError(o,"open")}}close(){try{this._isOpen&&(this.removeEventListeners(),this._isOpen=!1,this.host.open=!1,this.requestUpdate(),this.dispatchEvent(new CustomEvent("nr-dropdown-close",{bubbles:!0,composed:!0,detail:{dropdown:this.host}})))}catch(o){this.handleError(o,"close")}}toggle(){try{this._isOpen?this.close():this.open()}catch(o){this.handleError(o,"toggle")}}removeTriggerListeners(){this._triggerElement&&(this._triggerClickHandler&&(this._triggerElement.removeEventListener("click",this._triggerClickHandler),this._triggerClickHandler=null),this._triggerHoverHandler&&(this._triggerElement.removeEventListener("mouseenter",this._triggerHoverHandler),this._triggerHoverHandler=null),this._triggerLeaveHandler&&(this._triggerElement.removeEventListener("mouseleave",this._triggerLeaveHandler),this._triggerLeaveHandler=null),this._triggerFocusHandler&&(this._triggerElement.removeEventListener("focusin",this._triggerFocusHandler),this._triggerFocusHandler=null),this._triggerBlurHandler&&(this._triggerElement.removeEventListener("focusout",this._triggerBlurHandler),this._triggerBlurHandler=null))}findDropdownElements(){this._dropdownElement=this.findElement(".dropdown__panel"),this._triggerElement=this.findElement(".dropdown__trigger")}setupTriggerListeners(){if(this.findDropdownElements(),this._triggerElement)switch(this.removeTriggerListeners(),this.host.trigger){case"click":this._triggerClickHandler=this.handleTriggerClick.bind(this),this._triggerElement.addEventListener("click",this._triggerClickHandler);break;case"hover":this._triggerHoverHandler=this.handleTriggerHover.bind(this),this._triggerLeaveHandler=this.handleTriggerLeave.bind(this),this._triggerElement.addEventListener("mouseenter",this._triggerHoverHandler),this._triggerElement.addEventListener("mouseleave",this._triggerLeaveHandler);break;case"focus":this._triggerFocusHandler=this.handleTriggerFocus.bind(this),this._triggerBlurHandler=this.handleTriggerBlur.bind(this),this._triggerElement.addEventListener("focusin",this._triggerFocusHandler),this._triggerElement.addEventListener("focusout",this._triggerBlurHandler)}}setupEventListeners(){this.host.closeOnOutsideClick&&(this._outsideClickHandler=this.handleOutsideClick.bind(this),document.addEventListener("click",this._outsideClickHandler,!0)),this.host.closeOnEscape&&(this._keydownHandler=this.handleKeydown.bind(this),document.addEventListener("keydown",this._keydownHandler)),this._scrollHandler=this.handleScroll.bind(this),this._resizeHandler=this.handleResize.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),window.addEventListener("resize",this._resizeHandler)}removeEventListeners(){this._outsideClickHandler&&(document.removeEventListener("click",this._outsideClickHandler,!0),this._outsideClickHandler=null),this._keydownHandler&&(document.removeEventListener("keydown",this._keydownHandler),this._keydownHandler=null),this._scrollHandler&&(window.removeEventListener("scroll",this._scrollHandler,!0),this._scrollHandler=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null)}handleTriggerClick(){this.host.disabled||this.toggle()}handleTriggerHover(){this.host.disabled||(this._hoverTimer&&clearTimeout(this._hoverTimer),this._hoverTimer=window.setTimeout(()=>{this.open()},this.host.delay))}handleTriggerLeave(){this._hoverTimer&&(clearTimeout(this._hoverTimer),this._hoverTimer=null),setTimeout(()=>{this.isHoveringDropdown()||this.close()},100)}handleTriggerFocus(){this.host.disabled||this.open()}handleTriggerBlur(){setTimeout(()=>{this.isDropdownFocused()||this.close()},100)}handleOutsideClick(o){var t,n,i,e;if(!this.host.closeOnOutsideClick)return;const r=o.target;if(null===(t=this._triggerElement)||void 0===t?void 0:t.contains(r))return;if(null===(n=this._dropdownElement)||void 0===n?void 0:n.contains(r))return;const d=o.composedPath();for(const o of d){if(o===this._dropdownElement)return;if(o instanceof Element&&(null===(i=this._dropdownElement)||void 0===i?void 0:i.contains(o)))return}let s=r;for(;s;){const o=s.getRootNode();if(!(o instanceof ShadowRoot&&o.host))break;if(null===(e=this._dropdownElement)||void 0===e?void 0:e.contains(o.host))return;s=o.host}this.close()}handleKeydown(o){"Escape"===o.key&&this.close()}handleScroll(){this._isOpen&&this.calculatePosition()}handleResize(){this._isOpen&&this.calculatePosition()}calculatePosition(){var o,t;try{if(this._dropdownElement&&this._triggerElement||this.findDropdownElements(),!this._dropdownElement||!this._triggerElement)return;const n=this._triggerElement.getBoundingClientRect(),i=this._dropdownElement.getBoundingClientRect(),e=(null===(o=window.visualViewport)||void 0===o?void 0:o.height)||window.innerHeight,r=(null===(t=window.visualViewport)||void 0===t?void 0:t.width)||window.innerWidth,d=e-n.bottom,s=n.top,a=r-n.right,l=n.left,p=i.height||200,h=i.width||300,c=function(o,t,n){return n>=o?"bottom":t>=o||t>n?"top":"bottom"}(p,s,d),u=this.determineHorizontalPlacement(h,l,a);let w,m;w="bottom"===c?n.bottom+this.host.offset:n.top-p-this.host.offset,m="left"===u?n.right-h:n.left,m=Math.max(8,Math.min(m,r-h-8)),w=Math.max(8,Math.min(w,e-p-8)),this._dropdownElement.style.top=`${w}px`,this._dropdownElement.style.left=`${m}px`,this.applyPlacement(c,u)}catch(o){this.handleError(o,"calculatePosition")}}determineHorizontalPlacement(o,t,n){const i=this.host.placement;if(i.includes("left")||i.includes("right")){if(i.includes("left")&&t>=o)return"left";if(i.includes("right")&&n>=o)return"right"}return n>=o?"right":t>=o?"left":n>t?"right":"left"}applyPlacement(o,t){this._dropdownElement&&(this._dropdownElement.classList.remove("dropdown__panel--top","dropdown__panel--bottom","dropdown__panel--left-aligned","dropdown__panel--right-aligned"),this._dropdownElement.classList.add(`dropdown__panel--${o}`),"left"===t?this._dropdownElement.classList.add("dropdown__panel--right-aligned"):"right"===t&&this._dropdownElement.classList.add("dropdown__panel--left-aligned"),this._position.placement=o)}isHoveringDropdown(){var o;return(null===(o=this._dropdownElement)||void 0===o?void 0:o.matches(":hover"))||!1}isDropdownFocused(){var o;const t=document.activeElement;if(!t)return!1;if(null===(o=this._dropdownElement)||void 0===o?void 0:o.contains(t))return!0;if(t.closest(".dropdown__custom-content"))return!0;if(["INPUT","BUTTON","TEXTAREA","SELECT","A"].includes(t.tagName)){if(t.closest(".dropdown__panel"))return!0}return!1}handleItemClick(o,t){this.dispatchEvent(new CustomEvent("nr-dropdown-item-click",{bubbles:!0,composed:!0,detail:{item:o,dropdown:this.host,originalEvent:t}})),this.host.autoClose&&this.close()}cleanup(){this.removeEventListeners(),this.removeTriggerListeners(),this._hoverTimer&&(clearTimeout(this._hoverTimer),this._hoverTimer=null)}}
458
+ `
459
+ /**
460
+ * @license
461
+ * Copyright 2023 Nuraly, Laabidi Aymen
462
+ * SPDX-License-Identifier: MIT
463
+ */,h=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,e,o;super.disconnectedCallback(),null===(t=this.themeObserver)||void 0===t||t.disconnect(),null===(e=this.designSystemObserver)||void 0===e||e.disconnect(),null===(o=this.mediaQuery)||void 0===o||o.removeEventListener("change",this.handleSystemThemeChange)}get currentTheme(){var t,e;const o=(null===(t=this.closest("[data-theme]"))||void 0===t?void 0:t.getAttribute("data-theme"))||document.documentElement.getAttribute("data-theme");return o||((null===(e=window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light")}get currentDesignSystem(){var t;const e=(null===(t=this.closest("[design-system]"))||void 0===t?void 0:t.getAttribute("design-system"))||document.documentElement.getAttribute("design-system");return"carbon"===e?e:"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))}},p=()=>{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)},c=t=>class extends t{constructor(){super(...arguments),this.requiredComponents=[]}validateDependencies(){if(p())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(!p())return!0;let e=!0;for(const o of this.requiredComponents)if(!this.isComponentAvailable(o)){e=!1;const i=new Error(`Required component "${o}" is not registered. Please import and register the component before using ${this.tagName.toLowerCase()}.`);t?t(o,i):console.error(i.message)}return e}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 e=this.requiredComponents.indexOf(t);e>-1&&this.requiredComponents.splice(e,1)}},u=t=>class extends t{dispatchCustomEvent(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}dispatchEventWithMetadata(t,e){var o;const i=Object.assign(Object.assign({},e),{timestamp:Date.now(),componentName:(null===(o=this.tagName)||void 0===o?void 0:o.toLowerCase())||"unknown"});this.dispatchCustomEvent(t,i)}dispatchInputEvent(t,e){const o=Object.assign({target:e.target||this,value:e.value,originalEvent:e.originalEvent},e);this.dispatchCustomEvent(t,o)}dispatchFocusEvent(t,e){const o=Object.assign({target:e.target||this,value:e.value,focused:e.focused,cursorPosition:e.cursorPosition,selectedText:e.selectedText},e);this.dispatchCustomEvent(t,o)}dispatchValidationEvent(t,e){var o;const i=Object.assign({target:e.target||this,value:e.value,isValid:null!==(o=e.isValid)&&void 0!==o&&o,error:e.error},e);this.dispatchCustomEvent(t,i)}dispatchActionEvent(t,e){const o=Object.assign({target:e.target||this,action:e.action,previousValue:e.previousValue,newValue:e.newValue},e);this.dispatchCustomEvent(t,o)}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,w=new Map;
464
+ /**
465
+ * @license
466
+ * Copyright 2023 Nuraly, Laabidi Aymen
467
+ * SPDX-License-Identifier: MIT
468
+ */
469
+ const _=t=>{class e 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,e=this.tagName.toLowerCase(),o=t.styles;if(o){const t=f(o);t&&function(t,e,o){var i;if(!w.has(t)){const o=new CSSStyleSheet;o.replaceSync(e),w.set(t,o)}const n=w.get(t),s=`doc:${t}`;if(m.has(s)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,n],m.add(s)),o){let e=o;for(;e;){const o=e.getRootNode();if(!(o instanceof ShadowRoot))break;{const s=`shadow:${((null===(i=o.host)||void 0===i?void 0:i.tagName)||"").toLowerCase()}:${t}`;m.has(s)||(o.adoptedStyleSheets=[...o.adoptedStyleSheets,n],m.add(s)),e=o.host}}}}(e,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(e=>e instanceof Element&&e.getAttribute("slot")===t):[]}}return e.useShadowDom=!1,e};function f(t){return Array.isArray(t)?t.map(t=>f(t)).filter(Boolean).join("\n"):t&&"string"==typeof t.cssText?t.cssText:"string"==typeof t?t:""}
470
+ /**
471
+ * @license
472
+ * Copyright 2023 Nuraly, Laabidi Aymen
473
+ * SPDX-License-Identifier: MIT
474
+ */class v{constructor(t){this._host=t,t.addController(this)}get host(){return this._host}hostConnected(){}hostDisconnected(){}hostUpdate(){}hostUpdated(){}requestUpdate(){try{this._host.requestUpdate()}catch(t){this.handleError(t,"requestUpdate")}}dispatchEvent(t){try{return this._host.dispatchEvent(t)}catch(t){return this.handleError(t,"dispatchEvent"),!1}}handleError(t,e){console.error(`[${this.constructor.name}] Error in ${e}:`,t);try{this._host.dispatchEvent(new CustomEvent("nr-controller-error",{detail:{error:t.message,context:e,controller:this.constructor.name},bubbles:!0,composed:!0}))}catch(t){}}safeExecute(t,e,o){try{return t()}catch(t){return this.handleError(t,e),o}}debounce(t,e){let o;const i=(...i)=>{void 0!==o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,i)},e)};return i.cancel=()=>{void 0!==o&&(clearTimeout(o),o=void 0)},i}}class b extends v{findElement(t){var e;return null===(e=this._host.shadowRoot)||void 0===e?void 0:e.querySelector(t)}findElements(t){var e;return null===(e=this._host.shadowRoot)||void 0===e?void 0:e.querySelectorAll(t)}}class g extends b{constructor(t){super(t),this._isOpen=!1,this._position={top:0,left:0,width:0,placement:"bottom"},this._triggerElement=null,this._dropdownElement=null,this._outsideClickHandler=null,this._keydownHandler=null,this._hoverTimer=null,this._triggerClickHandler=null,this._triggerHoverHandler=null,this._triggerLeaveHandler=null,this._triggerFocusHandler=null,this._triggerBlurHandler=null,this._scrollHandler=null,this._resizeHandler=null,this._isOpen=t.open}get isOpen(){return this._isOpen}get position(){return Object.assign({},this._position)}hostConnected(){}hostUpdated(){this._isOpen!==this.host.open&&(this._isOpen=this.host.open),this._triggerElement||this.setupTriggerListeners()}hostDisconnected(){this.cleanup()}open(){try{this._isOpen||this.host.disabled||(this._isOpen=!0,this.host.open=!0,this.requestUpdate(),setTimeout(()=>{this.calculatePosition(),this.setupEventListeners()},10),this.dispatchEvent(new CustomEvent("nr-dropdown-open",{bubbles:!0,composed:!0,detail:{dropdown:this.host}})))}catch(t){this.handleError(t,"open")}}close(){try{this._isOpen&&(this.removeEventListeners(),this._isOpen=!1,this.host.open=!1,this.requestUpdate(),this.dispatchEvent(new CustomEvent("nr-dropdown-close",{bubbles:!0,composed:!0,detail:{dropdown:this.host}})))}catch(t){this.handleError(t,"close")}}toggle(){try{this._isOpen?this.close():this.open()}catch(t){this.handleError(t,"toggle")}}removeTriggerListeners(){this._triggerElement&&(this._triggerClickHandler&&(this._triggerElement.removeEventListener("click",this._triggerClickHandler),this._triggerClickHandler=null),this._triggerHoverHandler&&(this._triggerElement.removeEventListener("mouseenter",this._triggerHoverHandler),this._triggerHoverHandler=null),this._triggerLeaveHandler&&(this._triggerElement.removeEventListener("mouseleave",this._triggerLeaveHandler),this._triggerLeaveHandler=null),this._triggerFocusHandler&&(this._triggerElement.removeEventListener("focusin",this._triggerFocusHandler),this._triggerFocusHandler=null),this._triggerBlurHandler&&(this._triggerElement.removeEventListener("focusout",this._triggerBlurHandler),this._triggerBlurHandler=null))}findDropdownElements(){this._dropdownElement=this.findElement(".dropdown__panel"),this._triggerElement=this.findElement(".dropdown__trigger")}setupTriggerListeners(){if(this.findDropdownElements(),this._triggerElement)switch(this.removeTriggerListeners(),this.host.trigger){case"click":this._triggerClickHandler=this.handleTriggerClick.bind(this),this._triggerElement.addEventListener("click",this._triggerClickHandler);break;case"hover":this._triggerHoverHandler=this.handleTriggerHover.bind(this),this._triggerLeaveHandler=this.handleTriggerLeave.bind(this),this._triggerElement.addEventListener("mouseenter",this._triggerHoverHandler),this._triggerElement.addEventListener("mouseleave",this._triggerLeaveHandler);break;case"focus":this._triggerFocusHandler=this.handleTriggerFocus.bind(this),this._triggerBlurHandler=this.handleTriggerBlur.bind(this),this._triggerElement.addEventListener("focusin",this._triggerFocusHandler),this._triggerElement.addEventListener("focusout",this._triggerBlurHandler)}}setupEventListeners(){this.host.closeOnOutsideClick&&(this._outsideClickHandler=this.handleOutsideClick.bind(this),document.addEventListener("click",this._outsideClickHandler,!0)),this.host.closeOnEscape&&(this._keydownHandler=this.handleKeydown.bind(this),document.addEventListener("keydown",this._keydownHandler)),this._scrollHandler=this.handleScroll.bind(this),this._resizeHandler=this.handleResize.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),window.addEventListener("resize",this._resizeHandler)}removeEventListeners(){this._outsideClickHandler&&(document.removeEventListener("click",this._outsideClickHandler,!0),this._outsideClickHandler=null),this._keydownHandler&&(document.removeEventListener("keydown",this._keydownHandler),this._keydownHandler=null),this._scrollHandler&&(window.removeEventListener("scroll",this._scrollHandler,!0),this._scrollHandler=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null)}handleTriggerClick(){this.host.disabled||this.toggle()}handleTriggerHover(){this.host.disabled||(this._hoverTimer&&clearTimeout(this._hoverTimer),this._hoverTimer=window.setTimeout(()=>{this.open()},this.host.delay))}handleTriggerLeave(){this._hoverTimer&&(clearTimeout(this._hoverTimer),this._hoverTimer=null),setTimeout(()=>{this.isHoveringDropdown()||this.close()},100)}handleTriggerFocus(){this.host.disabled||this.open()}handleTriggerBlur(){setTimeout(()=>{this.isDropdownFocused()||this.close()},100)}handleOutsideClick(t){var e,o,i,n;if(!this.host.closeOnOutsideClick)return;const s=t.target;if(null===(e=this._triggerElement)||void 0===e?void 0:e.contains(s))return;if(null===(o=this._dropdownElement)||void 0===o?void 0:o.contains(s))return;const r=t.composedPath();for(const t of r){if(t===this._dropdownElement)return;if(t instanceof Element&&(null===(i=this._dropdownElement)||void 0===i?void 0:i.contains(t)))return}let d=s;for(;d;){const t=d.getRootNode();if(!(t instanceof ShadowRoot&&t.host))break;if(null===(n=this._dropdownElement)||void 0===n?void 0:n.contains(t.host))return;d=t.host}this.close()}handleKeydown(t){"Escape"===t.key&&this.close()}handleScroll(){this._isOpen&&this.calculatePosition()}handleResize(){this._isOpen&&this.calculatePosition()}calculatePosition(){var t,e;try{if(this._dropdownElement&&this._triggerElement||this.findDropdownElements(),!this._dropdownElement||!this._triggerElement)return;const o=this._triggerElement.getBoundingClientRect(),i=this._dropdownElement.getBoundingClientRect(),n=(null===(t=window.visualViewport)||void 0===t?void 0:t.height)||window.innerHeight,s=(null===(e=window.visualViewport)||void 0===e?void 0:e.width)||window.innerWidth,r=n-o.bottom,d=o.top,a=s-o.right,l=o.left,h=i.height||200,p=i.width||300,c=function(t,e,o){return o>=t?"bottom":e>=t||e>o?"top":"bottom"}(h,d,r),u=this.determineHorizontalPlacement(p,l,a);let m,w;m="bottom"===c?o.bottom+this.host.offset:o.top-h-this.host.offset,w="left"===u?o.right-p:o.left,w=Math.max(8,Math.min(w,s-p-8)),m=Math.max(8,Math.min(m,n-h-8)),this._dropdownElement.style.top=`${m}px`,this._dropdownElement.style.left=`${w}px`,this.applyPlacement(c,u)}catch(t){this.handleError(t,"calculatePosition")}}determineHorizontalPlacement(t,e,o){const i=this.host.placement;if(i.includes("left")||i.includes("right")){if(i.includes("left")&&e>=t)return"left";if(i.includes("right")&&o>=t)return"right"}return o>=t?"right":e>=t?"left":o>e?"right":"left"}applyPlacement(t,e){this._dropdownElement&&(this._dropdownElement.classList.remove("dropdown__panel--top","dropdown__panel--bottom","dropdown__panel--left-aligned","dropdown__panel--right-aligned"),this._dropdownElement.classList.add(`dropdown__panel--${t}`),"left"===e?this._dropdownElement.classList.add("dropdown__panel--right-aligned"):"right"===e&&this._dropdownElement.classList.add("dropdown__panel--left-aligned"),this._position.placement=t)}isHoveringDropdown(){var t;return(null===(t=this._dropdownElement)||void 0===t?void 0:t.matches(":hover"))||!1}isDropdownFocused(){var t;const e=document.activeElement;if(!e)return!1;if(null===(t=this._dropdownElement)||void 0===t?void 0:t.contains(e))return!0;if(e.closest(".dropdown__custom-content"))return!0;if(["INPUT","BUTTON","TEXTAREA","SELECT","A"].includes(e.tagName)){if(e.closest(".dropdown__panel"))return!0}return!1}handleItemClick(t,e){this.dispatchEvent(new CustomEvent("nr-dropdown-item-click",{bubbles:!0,composed:!0,detail:{item:t,dropdown:this.host,originalEvent:e}})),this.host.autoClose&&this.close()}cleanup(){this.removeEventListeners(),this.removeTriggerListeners(),this._hoverTimer&&(clearTimeout(this._hoverTimer),this._hoverTimer=null)}}
459
475
  /**
460
476
  * @license
461
477
  * Copyright 2023 Nuraly, Laabidi Aymen
462
478
  * SPDX-License-Identifier: MIT
463
- */var w=function(o,t,n,i){for(var e,r=arguments.length,d=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i,s=o.length-1;s>=0;s--)(e=o[s])&&(d=(r<3?e(d):r>3?e(t,n,d):e(t,n))||d);return r>3&&d&&Object.defineProperty(t,n,d),d};let m=class extends(l(t)){constructor(){super(...arguments),this.requiredComponents=["nr-icon"],this.items=[],this.open=!1,this.placement="bottom",this.trigger="hover",this.size="medium",this.animation="fade",this.disabled=!1,this.arrow=!1,this.autoClose=!1,this.closeOnOutsideClick=!0,this.closeOnEscape=!0,this.offset=4,this.delay=50,this.maxHeight="300px",this.minWidth="auto",this.cascadeDirection="auto",this.cascadeDelay=50,this.cascadeOnHover=!0,this.allowOverflow=!1,this.dropdownController=new u(this),this.openSubmenus=new Set,this.submenuTimers=new Map,this.handleDropdownPanelClick=o=>{o.stopPropagation()},this.handleItemClick=(o,t)=>{o.disabled||(o.options&&o.options.length>0||o.customContent?this.toggleSubmenu(o.id):this.dropdownController.handleItemClick(o,t))},this.handleItemHover=o=>{var t;if(((null===(t=o.options)||void 0===t?void 0:t.length)||o.customContent)&&(this.clearSubmenuTimer(o.id),this.cascadeOnHover)){const t=window.setTimeout(()=>{this.showSubmenu(o.id)},this.cascadeDelay);this.submenuTimers.set(o.id,t)}},this.handleItemLeave=o=>{var t;if(!(null===(t=o.options)||void 0===t?void 0:t.length)&&!o.customContent)return;this.clearSubmenuTimer(o.id);const n=window.setTimeout(()=>{this.hideSubmenu(o.id)},100);this.submenuTimers.set(`hide-${o.id}`,n)},this.handleSubmenuEnter=o=>{this.clearSubmenuTimer(`hide-${o}`)},this.handleSubmenuLeave=o=>{const t=window.setTimeout(()=>{this.hideSubmenu(o)},100);this.submenuTimers.set(`hide-${o}`,t)}}connectedCallback(){super.connectedCallback(),this.updateCascadingAttribute()}updated(o){super.updated(o),o.has("items")&&this.updateCascadingAttribute()}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){}updateCascadingAttribute(){this.items.some(o=>o.options&&o.options.length>0||!!o.customContent)?this.setAttribute("has-cascading",""):this.removeAttribute("has-cascading")}clearSubmenuTimer(o){const t=this.submenuTimers.get(o);t&&(clearTimeout(t),this.submenuTimers.delete(o))}toggleSubmenu(o){this.openSubmenus.has(o)?this.hideSubmenu(o):this.showSubmenu(o)}showSubmenu(o){this.openSubmenus.add(o),this.requestUpdate()}hideSubmenu(o){this.openSubmenus.delete(o),this.requestUpdate()}show(){this.dropdownController.open()}hide(){this.dropdownController.close()}toggle(){this.dropdownController.toggle()}renderCustomContent(o){return"string"==typeof o.customContent?n`<div>${a(o.customContent)}</div>`:o.customContent}renderSubmenuContent(o){return o.customContent?n`
479
+ */var y=function(t,e,o,i){for(var n,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,d=t.length-1;d>=0;d--)(n=t[d])&&(r=(s<3?n(r):s>3?n(e,o,r):n(e,o))||r);return s>3&&r&&Object.defineProperty(e,o,r),r};let x=class extends((t=>c(h(u(_(t)))))(i)){constructor(){super(...arguments),this.requiredComponents=["nr-icon"],this.items=[],this.open=!1,this.placement="bottom",this.trigger="hover",this.size="medium",this.animation="fade",this.disabled=!1,this.arrow=!1,this.autoClose=!1,this.closeOnOutsideClick=!0,this.closeOnEscape=!0,this.offset=4,this.delay=50,this.maxHeight="300px",this.minWidth="auto",this.cascadeDirection="auto",this.cascadeDelay=50,this.cascadeOnHover=!0,this.allowOverflow=!1,this.dropdownController=new g(this),this.openSubmenus=new Set,this.submenuTimers=new Map,this.handleDropdownPanelClick=t=>{t.stopPropagation()},this.handleItemClick=(t,e)=>{t.disabled||(t.options&&t.options.length>0||t.customContent?this.toggleSubmenu(t.id):this.dropdownController.handleItemClick(t,e))},this.handleItemHover=t=>{var e;if(((null===(e=t.options)||void 0===e?void 0:e.length)||t.customContent)&&(this.clearSubmenuTimer(t.id),this.cascadeOnHover)){const e=window.setTimeout(()=>{this.showSubmenu(t.id)},this.cascadeDelay);this.submenuTimers.set(t.id,e)}},this.handleItemLeave=t=>{var e;if(!(null===(e=t.options)||void 0===e?void 0:e.length)&&!t.customContent)return;this.clearSubmenuTimer(t.id);const o=window.setTimeout(()=>{this.hideSubmenu(t.id)},100);this.submenuTimers.set(`hide-${t.id}`,o)},this.handleSubmenuEnter=t=>{this.clearSubmenuTimer(`hide-${t}`)},this.handleSubmenuLeave=t=>{const e=window.setTimeout(()=>{this.hideSubmenu(t)},100);this.submenuTimers.set(`hide-${t}`,e)}}connectedCallback(){super.connectedCallback(),this.updateCascadingAttribute()}updated(t){super.updated(t),t.has("items")&&this.updateCascadingAttribute()}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){}updateCascadingAttribute(){this.items.some(t=>t.options&&t.options.length>0||!!t.customContent)?this.setAttribute("has-cascading",""):this.removeAttribute("has-cascading")}clearSubmenuTimer(t){const e=this.submenuTimers.get(t);e&&(clearTimeout(e),this.submenuTimers.delete(t))}toggleSubmenu(t){this.openSubmenus.has(t)?this.hideSubmenu(t):this.showSubmenu(t)}showSubmenu(t){this.openSubmenus.add(t),this.requestUpdate()}hideSubmenu(t){this.openSubmenus.delete(t),this.requestUpdate()}show(){this.dropdownController.open()}hide(){this.dropdownController.close()}toggle(){this.dropdownController.toggle()}renderCustomContent(t){return"string"==typeof t.customContent?e`<div>${a(t.customContent)}</div>`:t.customContent}renderSubmenuContent(t){return t.customContent?e`
464
480
  <div class="dropdown__custom-content">
465
- ${this.renderCustomContent(o)}
481
+ ${this.renderCustomContent(t)}
466
482
  </div>
467
- `:n`
483
+ `:e`
468
484
  <div class="dropdown__items">
469
- ${(o.options||[]).map(o=>o.divider?n`<div class="dropdown__divider"></div>`:n`
485
+ ${(t.options||[]).map(t=>t.divider?e`<div class="dropdown__divider"></div>`:e`
470
486
  <button
471
- class="dropdown__item ${d({"dropdown__item--disabled":!!o.disabled})}"
472
- ?disabled="${o.disabled}"
473
- @click="${t=>this.handleItemClick(o,t)}"
487
+ class="dropdown__item ${r({"dropdown__item--disabled":!!t.disabled})}"
488
+ ?disabled="${t.disabled}"
489
+ @click="${e=>this.handleItemClick(t,e)}"
474
490
  >
475
- ${o.icon?n`<nr-icon name="${o.icon}" class="dropdown__item-icon"></nr-icon>`:i}
476
- <span class="dropdown__item-label">${o.label}</span>
491
+ ${t.icon?e`<nr-icon name="${t.icon}" class="dropdown__item-icon"></nr-icon>`:o}
492
+ <span class="dropdown__item-label">${t.label}</span>
477
493
  </button>
478
494
  `)}
479
495
  </div>
480
- `}renderItems(){return this.items.length?n`
496
+ `}renderItems(){return this.items.length?e`
481
497
  <div class="dropdown__items">
482
- ${this.items.map(o=>{if(o.divider)return n`<div class="dropdown__divider"></div>`;const t=!!(o.options&&o.options.length>0)||!!o.customContent,e=t&&this.openSubmenus.has(o.id);return n`
483
- <div class="dropdown__item-container ${d({"dropdown__item-container--has-submenu":t})}">
498
+ ${this.items.map(t=>{if(t.divider)return e`<div class="dropdown__divider"></div>`;const i=!!(t.options&&t.options.length>0)||!!t.customContent,n=i&&this.openSubmenus.has(t.id);return e`
499
+ <div class="dropdown__item-container ${r({"dropdown__item-container--has-submenu":i})}">
484
500
  <button
485
- class="dropdown__item ${d({"dropdown__item--disabled":!!o.disabled,"dropdown__item--has-submenu":t})}"
486
- ?disabled="${o.disabled}"
487
- @click="${t=>this.handleItemClick(o,t)}"
488
- @mouseenter="${()=>t&&this.handleItemHover(o)}"
489
- @mouseleave="${()=>t&&this.handleItemLeave(o)}"
501
+ class="dropdown__item ${r({"dropdown__item--disabled":!!t.disabled,"dropdown__item--has-submenu":i})}"
502
+ ?disabled="${t.disabled}"
503
+ @click="${e=>this.handleItemClick(t,e)}"
504
+ @mouseenter="${()=>i&&this.handleItemHover(t)}"
505
+ @mouseleave="${()=>i&&this.handleItemLeave(t)}"
490
506
  >
491
- ${o.icon?n`<nr-icon name="${o.icon}" class="dropdown__item-icon"></nr-icon>`:i}
492
- <span class="dropdown__item-label">${o.label}</span>
493
- ${t?n`<nr-icon name="chevron-right" class="dropdown__submenu-arrow"></nr-icon>`:i}
507
+ ${t.icon?e`<nr-icon name="${t.icon}" class="dropdown__item-icon"></nr-icon>`:o}
508
+ <span class="dropdown__item-label">${t.label}</span>
509
+ ${i?e`<nr-icon name="chevron-right" class="dropdown__submenu-arrow"></nr-icon>`:o}
494
510
  </button>
495
511
 
496
- ${t&&e?n`
497
- <div class="dropdown__submenu ${d({"dropdown__submenu--right":"right"===this.cascadeDirection||"auto"===this.cascadeDirection,"dropdown__submenu--left":"left"===this.cascadeDirection})}"
498
- @mouseenter="${()=>this.handleSubmenuEnter(o.id)}"
499
- @mouseleave="${()=>this.handleSubmenuLeave(o.id)}">
500
- ${this.renderSubmenuContent(o)}
512
+ ${i&&n?e`
513
+ <div class="dropdown__submenu ${r({"dropdown__submenu--right":"right"===this.cascadeDirection||"auto"===this.cascadeDirection,"dropdown__submenu--left":"left"===this.cascadeDirection})}"
514
+ @mouseenter="${()=>this.handleSubmenuEnter(t.id)}"
515
+ @mouseleave="${()=>this.handleSubmenuLeave(t.id)}">
516
+ ${this.renderSubmenuContent(t)}
501
517
  </div>
502
- `:i}
518
+ `:o}
503
519
  </div>
504
520
  `})}
505
521
  </div>
506
- `:i}render(){const o={dropdown__panel:!0,"dropdown__panel--open":this.open,[`dropdown__panel--${this.size}`]:!0,[`dropdown__panel--${this.animation}`]:!0,[`dropdown__panel--${this.placement}`]:!0,"dropdown__panel--with-arrow":this.arrow},t={maxHeight:this.maxHeight,minWidth:this.minWidth};return n`
522
+ `:o}render(){const t={dropdown__panel:!0,"dropdown__panel--open":this.open,[`dropdown__panel--${this.size}`]:!0,[`dropdown__panel--${this.animation}`]:!0,[`dropdown__panel--${this.placement}`]:!0,"dropdown__panel--with-arrow":this.arrow},i={maxHeight:this.maxHeight,minWidth:this.minWidth};return e`
507
523
  <div class="dropdown">
508
524
  <div class="dropdown__trigger">
509
525
  <slot name="trigger"></slot>
510
526
  </div>
511
527
 
512
528
  <div
513
- class="${d(o)}"
514
- style="${s(t)}"
529
+ class="${r(t)}"
530
+ style="${d(i)}"
515
531
  @click="${this.handleDropdownPanelClick}"
516
532
  >
517
- ${this.arrow?n`<div class="dropdown__arrow"></div>`:i}
533
+ ${this.arrow?e`<div class="dropdown__arrow"></div>`:o}
518
534
 
519
535
  <slot name="header"></slot>
520
536
 
@@ -525,4 +541,4 @@ import{css as o,LitElement as t,html as n,nothing as i}from"lit";import{property
525
541
  <slot name="footer"></slot>
526
542
  </div>
527
543
  </div>
528
- `}};m.styles=h,w([e({type:Array})],m.prototype,"items",void 0),w([e({type:Boolean,reflect:!0})],m.prototype,"open",void 0),w([e({type:String})],m.prototype,"placement",void 0),w([e({type:String})],m.prototype,"trigger",void 0),w([e({type:String})],m.prototype,"size",void 0),w([e({type:String})],m.prototype,"animation",void 0),w([e({type:Boolean})],m.prototype,"disabled",void 0),w([e({type:Boolean})],m.prototype,"arrow",void 0),w([e({type:Boolean,attribute:"auto-close"})],m.prototype,"autoClose",void 0),w([e({type:Boolean,attribute:"close-on-outside-click"})],m.prototype,"closeOnOutsideClick",void 0),w([e({type:Boolean,attribute:"close-on-escape"})],m.prototype,"closeOnEscape",void 0),w([e({type:Number})],m.prototype,"offset",void 0),w([e({type:Number})],m.prototype,"delay",void 0),w([e({type:String,attribute:"max-height"})],m.prototype,"maxHeight",void 0),w([e({type:String,attribute:"min-width"})],m.prototype,"minWidth",void 0),w([e({type:String,attribute:"cascade-direction"})],m.prototype,"cascadeDirection",void 0),w([e({type:Number,attribute:"cascade-delay"})],m.prototype,"cascadeDelay",void 0),w([e({type:Boolean,attribute:"cascade-on-hover"})],m.prototype,"cascadeOnHover",void 0),w([e({type:Boolean,attribute:"allow-overflow"})],m.prototype,"allowOverflow",void 0),m=w([r("nr-dropdown")],m);export{m as NrDropdownElement};
544
+ `}};x.useShadowDom=!0,x.styles=l,y([n({type:Array})],x.prototype,"items",void 0),y([n({type:Boolean,reflect:!0})],x.prototype,"open",void 0),y([n({type:String})],x.prototype,"placement",void 0),y([n({type:String})],x.prototype,"trigger",void 0),y([n({type:String})],x.prototype,"size",void 0),y([n({type:String})],x.prototype,"animation",void 0),y([n({type:Boolean})],x.prototype,"disabled",void 0),y([n({type:Boolean})],x.prototype,"arrow",void 0),y([n({type:Boolean,attribute:"auto-close"})],x.prototype,"autoClose",void 0),y([n({type:Boolean,attribute:"close-on-outside-click"})],x.prototype,"closeOnOutsideClick",void 0),y([n({type:Boolean,attribute:"close-on-escape"})],x.prototype,"closeOnEscape",void 0),y([n({type:Number})],x.prototype,"offset",void 0),y([n({type:Number})],x.prototype,"delay",void 0),y([n({type:String,attribute:"max-height"})],x.prototype,"maxHeight",void 0),y([n({type:String,attribute:"min-width"})],x.prototype,"minWidth",void 0),y([n({type:String,attribute:"cascade-direction"})],x.prototype,"cascadeDirection",void 0),y([n({type:Number,attribute:"cascade-delay"})],x.prototype,"cascadeDelay",void 0),y([n({type:Boolean,attribute:"cascade-on-hover"})],x.prototype,"cascadeOnHover",void 0),y([n({type:Boolean,attribute:"allow-overflow"})],x.prototype,"allowOverflow",void 0),x=y([s("nr-dropdown")],x);export{x as NrDropdownElement};
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { LitElement } from 'lit';
7
7
  import { DropdownPlacement, DropdownTrigger, DropdownSize, DropdownAnimation, DropdownItem } from './dropdown.types.js';
8
- declare const NrDropdownElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & typeof LitElement;
8
+ declare const NrDropdownElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & (new (...args: any[]) => import("packages/common/src/shared/base-mixin").LightDomContent) & typeof LitElement;
9
9
  /**
10
10
  * # Dropdown Component
11
11
  *
@@ -69,6 +69,7 @@ declare const NrDropdownElement_base: (new (...args: any[]) => import("@nuralyui
69
69
  * @cssproperty --dropdown-max-height - Maximum height of dropdown panel
70
70
  */
71
71
  export declare class NrDropdownElement extends NrDropdownElement_base {
72
+ static useShadowDom: boolean;
72
73
  static styles: import("lit").CSSResult;
73
74
  requiredComponents: string[];
74
75
  items: DropdownItem[];
@@ -325,6 +325,7 @@ let NrDropdownElement = class NrDropdownElement extends NuralyUIBaseMixin(LitEle
325
325
  `;
326
326
  }
327
327
  };
328
+ NrDropdownElement.useShadowDom = true;
328
329
  NrDropdownElement.styles = styles;
329
330
  __decorate([
330
331
  property({ type: Array })