@siemens/ix 1.2.1 → 1.3.0-beta.0

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 (319) hide show
  1. package/dist/cjs/alignment-24ae2e63.js +1372 -0
  2. package/dist/cjs/{index-354a8c3d.js → index-17eb8998.js} +4 -3
  3. package/dist/cjs/index.cjs.js +5 -2
  4. package/dist/cjs/ix-animated-tab_2.cjs.entry.js +1 -1
  5. package/dist/cjs/ix-application-header.cjs.entry.js +1 -1
  6. package/dist/cjs/ix-basic-navigation.cjs.entry.js +1 -1
  7. package/dist/cjs/ix-blind.cjs.entry.js +1 -1
  8. package/dist/cjs/ix-breadcrumb_2.cjs.entry.js +1 -1
  9. package/dist/cjs/ix-button.cjs.entry.js +5 -3
  10. package/dist/cjs/ix-category-filter.cjs.entry.js +9 -9
  11. package/dist/cjs/ix-chip.cjs.entry.js +22 -9
  12. package/dist/cjs/ix-counter-pill.cjs.entry.js +2 -2
  13. package/dist/cjs/ix-date-picker_2.cjs.entry.js +1 -1
  14. package/dist/cjs/ix-date-time-card.cjs.entry.js +1 -1
  15. package/dist/cjs/ix-datetime-picker.cjs.entry.js +1 -1
  16. package/dist/cjs/ix-drawer.cjs.entry.js +1 -1
  17. package/dist/cjs/ix-dropdown-button.cjs.entry.js +40 -0
  18. package/dist/cjs/ix-dropdown_2.cjs.entry.js +88 -42
  19. package/dist/cjs/ix-event-list_2.cjs.entry.js +1 -1
  20. package/dist/cjs/ix-expanding-search.cjs.entry.js +3 -3
  21. package/dist/cjs/ix-filter-chip.cjs.entry.js +1 -1
  22. package/dist/cjs/ix-flip-tile_2.cjs.entry.js +1 -1
  23. package/dist/cjs/ix-group-context-menu.cjs.entry.js +1 -1
  24. package/dist/cjs/ix-group_3.cjs.entry.js +1 -1
  25. package/dist/cjs/ix-icon-button.cjs.entry.js +3 -3
  26. package/dist/cjs/ix-icon.cjs.entry.js +1 -1
  27. package/dist/cjs/ix-input-group.cjs.entry.js +1 -1
  28. package/dist/cjs/ix-kpi.cjs.entry.js +1 -1
  29. package/dist/cjs/ix-map-navigation_2.cjs.entry.js +5 -4
  30. package/dist/cjs/ix-menu_9.cjs.entry.js +14 -95
  31. package/dist/cjs/ix-message-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/ix-modal-example.cjs.entry.js +1 -1
  33. package/dist/cjs/ix-modal_2.cjs.entry.js +2 -2
  34. package/dist/cjs/ix-pill.cjs.entry.js +6 -3
  35. package/dist/cjs/ix-select_2.cjs.entry.js +36 -15
  36. package/dist/cjs/ix-spinner.cjs.entry.js +1 -1
  37. package/dist/cjs/ix-split-button_2.cjs.entry.js +7 -36
  38. package/dist/cjs/ix-tab-item.cjs.entry.js +1 -1
  39. package/dist/cjs/ix-tabs.cjs.entry.js +1 -1
  40. package/dist/cjs/ix-tile.cjs.entry.js +1 -1
  41. package/dist/cjs/ix-toast_2.cjs.entry.js +1 -1
  42. package/dist/cjs/ix-toggle.cjs.entry.js +1 -1
  43. package/dist/cjs/ix-tree_2.cjs.entry.js +1 -1
  44. package/dist/cjs/ix-upload.cjs.entry.js +1 -1
  45. package/dist/cjs/ix-validation-tooltip.cjs.entry.js +72 -27
  46. package/dist/cjs/ix-workflow-step_2.cjs.entry.js +1 -1
  47. package/dist/cjs/loader.cjs.js +2 -2
  48. package/dist/cjs/{modal-a5b22d3f.js → modal-dda2f6be.js} +9 -3
  49. package/dist/cjs/my-component.cjs.entry.js +1 -1
  50. package/dist/cjs/siemens-ix.cjs.js +2 -2
  51. package/dist/cjs/theme-switcher-6b45e082.js +92 -0
  52. package/dist/collection/collection-manifest.json +1 -0
  53. package/dist/collection/components/button/button.css +1 -1
  54. package/dist/collection/components/button/button.js +4 -2
  55. package/dist/collection/components/category-filter/category-filter.css +4 -4
  56. package/dist/collection/components/category-filter/category-filter.js +7 -7
  57. package/dist/collection/components/chip/chip.css +20 -0
  58. package/dist/collection/components/chip/chip.js +22 -9
  59. package/dist/collection/components/counter-pill/counter-pill.css +10 -0
  60. package/dist/collection/components/dropdown/alignment.js +9 -0
  61. package/dist/collection/components/dropdown/dropdown.css +1 -0
  62. package/dist/collection/components/dropdown/dropdown.js +113 -50
  63. package/dist/collection/components/dropdown/placement.js +1 -0
  64. package/dist/collection/components/dropdown-button/dropdown-button.css +81 -0
  65. package/dist/collection/components/dropdown-button/dropdown-button.js +191 -0
  66. package/dist/collection/components/expanding-search/expanding-search.css +1 -0
  67. package/dist/collection/components/expanding-search/expanding-search.js +1 -1
  68. package/dist/collection/components/icon-button/icon-button.css +3 -30
  69. package/dist/collection/components/icon-button/icon-button.js +2 -2
  70. package/dist/collection/components/map-navigation/map-navigation.js +3 -2
  71. package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.css +9 -4
  72. package/dist/collection/components/menu/menu.css +1 -1
  73. package/dist/collection/components/menu/menu.js +6 -21
  74. package/dist/collection/components/menu-avatar/menu-avatar.js +4 -30
  75. package/dist/collection/components/modal/modal.css +1 -0
  76. package/dist/collection/components/modal/modal.js +7 -1
  77. package/dist/collection/components/pill/pill.css +10 -0
  78. package/dist/collection/components/pill/pill.js +4 -1
  79. package/dist/collection/components/select/select.css +0 -3
  80. package/dist/collection/components/select/select.js +13 -12
  81. package/dist/collection/components/select-item/events.js +16 -0
  82. package/dist/collection/components/select-item/select-item.js +23 -4
  83. package/dist/collection/components/split-button/split-button.js +7 -36
  84. package/dist/collection/components/tree/tree.js +1 -1
  85. package/dist/collection/components/utils/theme-switcher.js +86 -0
  86. package/dist/collection/components/validation-tooltip/validation-tooltip.css +4 -24
  87. package/dist/collection/components/validation-tooltip/validation-tooltip.js +75 -28
  88. package/dist/collection/exports.js +1 -0
  89. package/dist/components/alignment.js +1363 -0
  90. package/dist/components/button.js +5 -3
  91. package/dist/components/dropdown.js +88 -41
  92. package/dist/components/icon-button.js +3 -3
  93. package/dist/components/index.d.ts +1 -0
  94. package/dist/components/index.js +2 -1
  95. package/dist/components/ix-category-filter.js +18 -12
  96. package/dist/components/ix-chip.js +21 -8
  97. package/dist/components/ix-counter-pill.js +1 -1
  98. package/dist/components/ix-dropdown-button.d.ts +11 -0
  99. package/dist/components/ix-dropdown-button.js +86 -0
  100. package/dist/components/ix-expanding-search.js +2 -2
  101. package/dist/components/ix-map-navigation.js +3 -2
  102. package/dist/components/ix-menu-avatar.js +6 -19
  103. package/dist/components/ix-menu.js +93 -46
  104. package/dist/components/ix-pill.js +5 -2
  105. package/dist/components/ix-select.js +9 -14
  106. package/dist/components/ix-split-button.js +6 -35
  107. package/dist/components/ix-validation-tooltip.js +74 -27
  108. package/dist/components/map-navigation-overlay.js +1 -1
  109. package/dist/components/modal.js +8 -2
  110. package/dist/components/select-item.js +27 -1
  111. package/dist/esm/alignment-f63c1b89.js +1363 -0
  112. package/dist/esm/{index-7746a810.js → index-6f4f3582.js} +5 -3
  113. package/dist/esm/index.js +3 -2
  114. package/dist/esm/ix-animated-tab_2.entry.js +1 -1
  115. package/dist/esm/ix-application-header.entry.js +1 -1
  116. package/dist/esm/ix-basic-navigation.entry.js +1 -1
  117. package/dist/esm/ix-blind.entry.js +1 -1
  118. package/dist/esm/ix-breadcrumb_2.entry.js +1 -1
  119. package/dist/esm/ix-button.entry.js +5 -3
  120. package/dist/esm/ix-category-filter.entry.js +9 -9
  121. package/dist/esm/ix-chip.entry.js +22 -9
  122. package/dist/esm/ix-counter-pill.entry.js +2 -2
  123. package/dist/esm/ix-date-picker_2.entry.js +1 -1
  124. package/dist/esm/ix-date-time-card.entry.js +1 -1
  125. package/dist/esm/ix-datetime-picker.entry.js +1 -1
  126. package/dist/esm/ix-drawer.entry.js +1 -1
  127. package/dist/esm/ix-dropdown-button.entry.js +36 -0
  128. package/dist/esm/ix-dropdown_2.entry.js +88 -42
  129. package/dist/esm/ix-event-list_2.entry.js +1 -1
  130. package/dist/esm/ix-expanding-search.entry.js +3 -3
  131. package/dist/esm/ix-filter-chip.entry.js +1 -1
  132. package/dist/esm/ix-flip-tile_2.entry.js +1 -1
  133. package/dist/esm/ix-group-context-menu.entry.js +1 -1
  134. package/dist/esm/ix-group_3.entry.js +1 -1
  135. package/dist/esm/ix-icon-button.entry.js +3 -3
  136. package/dist/esm/ix-icon.entry.js +1 -1
  137. package/dist/esm/ix-input-group.entry.js +1 -1
  138. package/dist/esm/ix-kpi.entry.js +1 -1
  139. package/dist/esm/ix-map-navigation_2.entry.js +5 -4
  140. package/dist/esm/ix-menu_9.entry.js +14 -95
  141. package/dist/esm/ix-message-bar.entry.js +1 -1
  142. package/dist/esm/ix-modal-example.entry.js +1 -1
  143. package/dist/esm/ix-modal_2.entry.js +2 -2
  144. package/dist/esm/ix-pill.entry.js +6 -3
  145. package/dist/esm/ix-select_2.entry.js +36 -15
  146. package/dist/esm/ix-spinner.entry.js +1 -1
  147. package/dist/esm/ix-split-button_2.entry.js +7 -36
  148. package/dist/esm/ix-tab-item.entry.js +1 -1
  149. package/dist/esm/ix-tabs.entry.js +1 -1
  150. package/dist/esm/ix-tile.entry.js +1 -1
  151. package/dist/esm/ix-toast_2.entry.js +1 -1
  152. package/dist/esm/ix-toggle.entry.js +1 -1
  153. package/dist/esm/ix-tree_2.entry.js +1 -1
  154. package/dist/esm/ix-upload.entry.js +1 -1
  155. package/dist/esm/ix-validation-tooltip.entry.js +72 -27
  156. package/dist/esm/ix-workflow-step_2.entry.js +1 -1
  157. package/dist/esm/loader.js +2 -2
  158. package/dist/esm/{modal-9c9eaf8e.js → modal-df0a62f2.js} +9 -3
  159. package/dist/esm/my-component.entry.js +1 -1
  160. package/dist/esm/siemens-ix.js +2 -2
  161. package/dist/esm/theme-switcher-dce1aaec.js +89 -0
  162. package/dist/siemens-ix/index.esm.js +1 -1
  163. package/dist/siemens-ix/p-03d38416.entry.js +1 -0
  164. package/dist/siemens-ix/{p-5e4c3828.js → p-05c16b94.js} +2 -2
  165. package/dist/siemens-ix/p-0e357d27.entry.js +1 -0
  166. package/dist/siemens-ix/{p-963c5690.entry.js → p-150d7a02.entry.js} +1 -1
  167. package/dist/siemens-ix/p-18d02e6f.entry.js +1 -0
  168. package/dist/siemens-ix/{p-b2ecf415.entry.js → p-23d79e3d.entry.js} +1 -1
  169. package/dist/siemens-ix/{p-91eb1fdd.entry.js → p-2bc72119.entry.js} +1 -1
  170. package/dist/siemens-ix/p-2bd88760.entry.js +1 -0
  171. package/dist/siemens-ix/p-2c5abec1.js +1 -0
  172. package/dist/siemens-ix/{p-dfb5730f.entry.js → p-2e24ae23.entry.js} +1 -1
  173. package/dist/siemens-ix/{p-4d61503b.entry.js → p-33283dbf.entry.js} +1 -1
  174. package/dist/siemens-ix/p-35990ac7.js +1 -0
  175. package/dist/siemens-ix/{p-6e915c70.entry.js → p-3663f989.entry.js} +1 -1
  176. package/dist/siemens-ix/{p-2f3294b8.entry.js → p-418e2d14.entry.js} +1 -1
  177. package/dist/siemens-ix/p-43616759.entry.js +1 -0
  178. package/dist/siemens-ix/{p-03687070.entry.js → p-4b170382.entry.js} +1 -1
  179. package/dist/siemens-ix/p-4fcb5f2b.entry.js +1 -0
  180. package/dist/siemens-ix/p-5631ae88.entry.js +1 -0
  181. package/dist/siemens-ix/{p-5871e480.entry.js → p-5661957c.entry.js} +1 -1
  182. package/dist/siemens-ix/{p-56771b32.entry.js → p-592f1ed3.entry.js} +1 -1
  183. package/dist/siemens-ix/p-5bbe9943.entry.js +1 -0
  184. package/dist/siemens-ix/{p-05f3c48e.entry.js → p-65e61684.entry.js} +1 -1
  185. package/dist/siemens-ix/p-6fe3bb9c.entry.js +1 -0
  186. package/dist/siemens-ix/{p-5e3700c3.entry.js → p-72f851ae.entry.js} +1 -1
  187. package/dist/siemens-ix/{p-e5397173.entry.js → p-7f842cdc.entry.js} +1 -1
  188. package/dist/siemens-ix/{p-412dbb89.entry.js → p-8a7141a6.entry.js} +1 -1
  189. package/dist/siemens-ix/{p-10879145.entry.js → p-8b4e4718.entry.js} +1 -1
  190. package/dist/siemens-ix/{p-ded3a35d.entry.js → p-9b5290d4.entry.js} +1 -1
  191. package/dist/siemens-ix/{p-c885685e.entry.js → p-a5fa7ae5.entry.js} +1 -1
  192. package/dist/siemens-ix/{p-61cb7ab7.entry.js → p-a88618e3.entry.js} +1 -1
  193. package/dist/siemens-ix/p-ab7949ff.entry.js +1 -0
  194. package/dist/siemens-ix/{p-23578bb6.entry.js → p-b242bd39.entry.js} +1 -1
  195. package/dist/siemens-ix/p-b3d00feb.entry.js +1 -0
  196. package/dist/siemens-ix/p-be641020.entry.js +1 -0
  197. package/dist/siemens-ix/{p-19cc942a.entry.js → p-c3e90c06.entry.js} +1 -1
  198. package/dist/siemens-ix/{p-558623ce.entry.js → p-c993560f.entry.js} +1 -1
  199. package/dist/siemens-ix/{p-35d7f18d.entry.js → p-cc0f6f6b.entry.js} +1 -1
  200. package/dist/siemens-ix/{p-f24f1eb7.entry.js → p-d0bb8225.entry.js} +1 -1
  201. package/dist/siemens-ix/p-d20119c1.entry.js +1 -0
  202. package/dist/siemens-ix/p-dec6114f.js +1 -0
  203. package/dist/siemens-ix/{p-91ecd6ac.entry.js → p-e2925222.entry.js} +1 -1
  204. package/dist/siemens-ix/{p-1ba8c910.entry.js → p-e7621b0a.entry.js} +1 -1
  205. package/dist/siemens-ix/{p-494512c0.entry.js → p-ea333007.entry.js} +1 -1
  206. package/dist/siemens-ix/{p-8f6809f1.entry.js → p-eb150313.entry.js} +1 -1
  207. package/dist/siemens-ix/{p-b0c95c22.entry.js → p-eed28e55.entry.js} +1 -1
  208. package/dist/siemens-ix/p-f35ce089.entry.js +1 -0
  209. package/dist/siemens-ix/{p-2995294d.entry.js → p-f7be9635.entry.js} +1 -1
  210. package/dist/siemens-ix/{p-712e8945.entry.js → p-fecf0ade.entry.js} +1 -1
  211. package/dist/siemens-ix/siemens-ix.css +25 -3
  212. package/dist/siemens-ix/siemens-ix.esm.js +1 -1
  213. package/dist/types/components/category-filter/category-filter.d.ts +1 -0
  214. package/dist/types/components/chip/chip.d.ts +2 -1
  215. package/dist/types/components/dropdown/alignment.d.ts +2 -0
  216. package/dist/types/components/dropdown/dropdown.d.ts +19 -6
  217. package/dist/types/components/dropdown/placement.d.ts +8 -0
  218. package/dist/types/components/dropdown-button/dropdown-button.d.ts +37 -0
  219. package/dist/types/components/menu/menu.d.ts +0 -2
  220. package/dist/types/components/menu-avatar/menu-avatar.d.ts +1 -5
  221. package/dist/types/components/modal/modal.d.ts +1 -0
  222. package/dist/types/components/select/select.d.ts +2 -1
  223. package/dist/types/components/select-item/events.d.ts +9 -0
  224. package/dist/types/components/select-item/select-item.d.ts +3 -2
  225. package/dist/types/components/split-button/split-button.d.ts +4 -6
  226. package/dist/types/components/tree/tree.d.ts +1 -1
  227. package/dist/types/components/utils/theme-switcher.d.ts +19 -0
  228. package/dist/types/components/validation-tooltip/validation-tooltip.d.ts +12 -4
  229. package/dist/types/components.d.ts +86 -15
  230. package/dist/types/exports.d.ts +1 -0
  231. package/package.json +5 -6
  232. package/scss/components/_buttons.scss +23 -0
  233. package/scss/components/_dropdown.scss +2 -0
  234. package/dist/cjs/popper-d7a0f999.js +0 -1801
  235. package/dist/collection/components/utils/popover.util.js +0 -33
  236. package/dist/collection/components/utils/toggle-theme.js +0 -24
  237. package/dist/components/popover.util.js +0 -36
  238. package/dist/components/popper.js +0 -1799
  239. package/dist/esm/popper-42db9fbd.js +0 -1799
  240. package/dist/siemens-ix/p-080c00b1.entry.js +0 -1
  241. package/dist/siemens-ix/p-263949b1.js +0 -1
  242. package/dist/siemens-ix/p-2709fafd.entry.js +0 -1
  243. package/dist/siemens-ix/p-2b69b027.entry.js +0 -1
  244. package/dist/siemens-ix/p-6da1e24d.entry.js +0 -1
  245. package/dist/siemens-ix/p-7b103473.entry.js +0 -1
  246. package/dist/siemens-ix/p-80d27c08.entry.js +0 -1
  247. package/dist/siemens-ix/p-842a7652.entry.js +0 -1
  248. package/dist/siemens-ix/p-9a98369e.entry.js +0 -1
  249. package/dist/siemens-ix/p-af8213cc.entry.js +0 -1
  250. package/dist/siemens-ix/p-aff5f463.entry.js +0 -1
  251. package/dist/siemens-ix/p-bf387a1f.entry.js +0 -1
  252. package/dist/siemens-ix/p-f3996fc1.entry.js +0 -1
  253. package/dist/siemens-ix/p-f86fcdf4.js +0 -1
  254. package/dist/siemens-ix/p-fe28a2be.entry.js +0 -1
  255. package/dist/types/components/utils/popover.util.d.ts +0 -9
  256. package/dist/types/components/utils/toggle-theme.d.ts +0 -1
  257. package/src/components/animated-tab/readme.md +0 -24
  258. package/src/components/animated-tabs/readme.md +0 -31
  259. package/src/components/application-header/readme.md +0 -21
  260. package/src/components/basic-navigation/readme.md +0 -22
  261. package/src/components/blind/readme.md +0 -29
  262. package/src/components/breadcrumb/readme.md +0 -33
  263. package/src/components/breadcrumb-item/readme.md +0 -22
  264. package/src/components/button/readme.md +0 -27
  265. package/src/components/category-filter/readme.md +0 -39
  266. package/src/components/chip/readme.md +0 -36
  267. package/src/components/counter-pill/readme.md +0 -25
  268. package/src/components/date-picker/readme.md +0 -53
  269. package/src/components/date-time-card/readme.md +0 -22
  270. package/src/components/datetime-picker/readme.md +0 -45
  271. package/src/components/drawer/readme.md +0 -47
  272. package/src/components/dropdown/readme.md +0 -49
  273. package/src/components/dropdown-item/readme.md +0 -45
  274. package/src/components/event-list/readme.md +0 -24
  275. package/src/components/event-list-item/readme.md +0 -32
  276. package/src/components/expanding-search/readme.md +0 -32
  277. package/src/components/filter-chip/readme.md +0 -30
  278. package/src/components/flip-tile/readme.md +0 -22
  279. package/src/components/flip-tile-content/readme.md +0 -14
  280. package/src/components/group/readme.md +0 -14
  281. package/src/components/group-dropdown-item/readme.md +0 -22
  282. package/src/components/group-item/readme.md +0 -34
  283. package/src/components/icon/readme.md +0 -23
  284. package/src/components/icon-button/readme.md +0 -31
  285. package/src/components/input-group/readme.md +0 -14
  286. package/src/components/kpi/readme.md +0 -27
  287. package/src/components/map-navigation/readme.md +0 -54
  288. package/src/components/map-navigation-overlay/readme.md +0 -30
  289. package/src/components/menu/readme.md +0 -86
  290. package/src/components/menu-about/readme.md +0 -30
  291. package/src/components/menu-about-item/readme.md +0 -21
  292. package/src/components/menu-about-news/readme.md +0 -34
  293. package/src/components/menu-avatar/readme.md +0 -30
  294. package/src/components/menu-avatar-item/readme.md +0 -29
  295. package/src/components/menu-item/readme.md +0 -26
  296. package/src/components/menu-settings/readme.md +0 -30
  297. package/src/components/menu-settings-item/readme.md +0 -21
  298. package/src/components/message-bar/readme.md +0 -31
  299. package/src/components/modal/readme.md +0 -67
  300. package/src/components/modal-container/readme.md +0 -29
  301. package/src/components/my-component/readme.md +0 -16
  302. package/src/components/pill/readme.md +0 -26
  303. package/src/components/select/readme.md +0 -37
  304. package/src/components/select-item/readme.md +0 -44
  305. package/src/components/spinner/readme.md +0 -22
  306. package/src/components/split-button/readme.md +0 -36
  307. package/src/components/split-button-item/readme.md +0 -29
  308. package/src/components/tab-item/readme.md +0 -28
  309. package/src/components/tabs/readme.md +0 -25
  310. package/src/components/tile/readme.md +0 -21
  311. package/src/components/time-picker/readme.md +0 -51
  312. package/src/components/toast/readme.md +0 -36
  313. package/src/components/toggle/readme.md +0 -35
  314. package/src/components/tree/readme.md +0 -32
  315. package/src/components/tree-item/readme.md +0 -31
  316. package/src/components/upload/readme.md +0 -51
  317. package/src/components/validation-tooltip/readme.md +0 -31
  318. package/src/components/workflow-step/readme.md +0 -28
  319. package/src/components/workflow-steps/readme.md +0 -33
@@ -6,37 +6,10 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- /*
10
- * SPDX-FileCopyrightText: 2022 Siemens AG
11
- *
12
- * SPDX-License-Identifier: MIT
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
- /* Dimensions */
18
- /* Font sizes */
19
- /* Line heights */
20
- /* Animation timings */
9
+ :host.disabled {
10
+ pointer-events: none;
11
+ }
21
12
  :host .icon-button {
22
13
  padding: 0;
23
14
  overflow: hidden;
24
- }
25
- :host .btn-icon-12 {
26
- height: 1rem;
27
- width: 1rem;
28
- min-width: 1rem;
29
- min-height: 1rem;
30
- }
31
- :host .btn-icon-16 {
32
- height: 1.5rem;
33
- width: 1.5rem;
34
- min-width: 1.5rem;
35
- min-height: 1.5rem;
36
- }
37
- :host .btn-icon-32 {
38
- height: 2rem;
39
- width: 2rem;
40
- min-width: 2rem;
41
- min-height: 2rem;
42
15
  }
@@ -6,7 +6,7 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { h } from '@stencil/core';
9
+ import { h, Host } from '@stencil/core';
10
10
  import { getButtonClasses } from '../button/base-button';
11
11
  export class IconButton {
12
12
  constructor() {
@@ -26,7 +26,7 @@ export class IconButton {
26
26
  return Object.assign(Object.assign({}, getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, true, this.oval, this.selected, this.disabled)), { 'icon-button': true, 'btn-icon-12': this.size === '12', 'btn-icon-16': this.size === '16', 'btn-icon-32': this.size === '32' || this.size === '24' || !this.size });
27
27
  }
28
28
  render() {
29
- return (h("button", { class: this.getIconButtonClasses(), type: this.type }, h("ix-icon", { size: this.size, name: this.icon, color: this.color }), h("div", { style: { display: 'none' } }, h("slot", null))));
29
+ return (h(Host, { class: { disabled: this.disabled } }, h("button", { class: this.getIconButtonClasses(), type: this.type }, h("ix-icon", { size: this.size, name: this.icon, color: this.color }), h("div", { style: { display: 'none' } }, h("slot", null)))));
30
30
  }
31
31
  static get is() { return "ix-icon-button"; }
32
32
  static get encapsulation() { return "scoped"; }
@@ -107,9 +107,10 @@ export class MapNavigation {
107
107
  overlayInstance.setAttribute('color', color);
108
108
  overlayInstance.setAttribute('name', name);
109
109
  overlayInstance.setAttribute('icon', icon);
110
+ overlayInstance.setAttribute('slot', 'overlay');
110
111
  overlayInstance.addEventListener('closeClick', () => this.closeOverlay());
111
112
  overlayInstance.appendChild(component);
112
- this.overlay.appendChild(overlayInstance);
113
+ this.hostElement.appendChild(overlayInstance);
113
114
  }
114
115
  /**
115
116
  * Close current shown overlay
@@ -134,7 +135,7 @@ export class MapNavigation {
134
135
  });
135
136
  }
136
137
  render() {
137
- return (h(Host, null, h("div", { id: "menu-placeholder" }), h("div", { class: "map-nav" }, h("div", { class: "map-nav-sidebar" }, h("div", { class: "map-nav-header" }, h("ix-application-header", { name: this.applicationName, class: "map-nav-header-brand" }, h("slot", { name: "logo" }))), h("div", { class: "map-nav-sidebar-content" }, h("div", { class: "map-nav-sidebar-static-content" }, h("div", { class: "map-nav-title" }, this.navigationTitle), this.hideContextMenu ? ('') : (h("ix-icon-button", { icon: "context-menu", ghost: true, size: "24", variant: "Secondary", onClick: (_) => this.contextMenuClick.emit() }))), h("div", { class: "map-nav-sidebar-user-content" }, h("slot", { name: "sidebar-content" })))), h("div", { class: "content" }, h("div", { class: "map-nav-header-content bg-2" }, h("slot", { name: "content-header" })), h("main", null, h("slot", null))))));
138
+ return (h(Host, null, h("div", { id: "menu-placeholder" }), h("div", { class: "map-nav" }, h("div", { class: "map-nav-sidebar" }, h("div", { class: "map-nav-header" }, h("ix-application-header", { name: this.applicationName, class: "map-nav-header-brand" }, h("slot", { name: "logo" }))), h("div", { class: "map-nav-sidebar-content" }, h("div", { class: "map-nav-sidebar-static-content" }, h("div", { class: "map-nav-title" }, this.navigationTitle), this.hideContextMenu ? ('') : (h("ix-icon-button", { icon: "context-menu", ghost: true, size: "24", variant: "Secondary", onClick: (_) => this.contextMenuClick.emit() }))), h("div", { class: "map-nav-sidebar-user-content" }, h("slot", { name: "sidebar-content" })))), h("div", { class: "content" }, h("div", { class: "map-nav-header-content bg-2" }, h("slot", { name: "content-header" })), h("main", null, h("slot", null), h("slot", { name: "overlay" }))))));
138
139
  }
139
140
  static get is() { return "ix-map-navigation"; }
140
141
  static get encapsulation() { return "scoped"; }
@@ -192,6 +192,7 @@ a {
192
192
  height: 100%;
193
193
  z-index: 2;
194
194
  top: 0;
195
+ left: 0;
195
196
  background-color: var(--theme-overlay--background);
196
197
  }
197
198
  :host .overlay-header {
@@ -208,7 +209,8 @@ a {
208
209
  min-width: 0;
209
210
  }
210
211
  :host .overlay-header-content ix-icon {
211
- margin-left: 1rem;
212
+ -webkit-margin-start: 1rem;
213
+ margin-inline-start: 1rem;
212
214
  color: var(--theme-overlay-header--color);
213
215
  }
214
216
  :host .overlay-header-content .overlay-header-title {
@@ -223,7 +225,8 @@ a {
223
225
  text-overflow: ellipsis;
224
226
  white-space: nowrap;
225
227
  color: var(--theme-overlay-header--color);
226
- margin-left: 1rem;
228
+ -webkit-margin-start: 1rem;
229
+ margin-inline-start: 1rem;
227
230
  }
228
231
  :host .color-indicator {
229
232
  display: inline-block;
@@ -233,6 +236,8 @@ a {
233
236
  background-color: var(--theme-color-neutral);
234
237
  }
235
238
  :host .overlay-close {
236
- margin-left: auto;
237
- margin-right: 1rem;
239
+ -webkit-margin-start: auto;
240
+ margin-inline-start: auto;
241
+ -webkit-margin-end: 1rem;
242
+ margin-inline-end: 1rem;
238
243
  }
@@ -94,7 +94,7 @@ ix-menu .menu-overlay {
94
94
  -webkit-backdrop-filter: blur(1rem);
95
95
  backdrop-filter: blur(1rem);
96
96
  background-color: var(--theme-sidebar-overlay-blur);
97
- transition: all 150ms ease-out;
97
+ transition: all 300ms ease-out;
98
98
  }
99
99
  ix-menu .menu-overlay-invisible {
100
100
  display: none;
@@ -7,9 +7,8 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import { h, Host, } from '@stencil/core';
10
- import { Popover } from '../utils/popover.util';
11
10
  import { convertToRemString } from '../utils/rwd.util';
12
- import { toggleVariant } from '../utils/toggle-theme';
11
+ import { themeSwitcher } from '../utils/theme-switcher';
13
12
  export class Menu {
14
13
  constructor() {
15
14
  this.domObserver = new MutationObserver(this.onDomChange.bind(this));
@@ -131,10 +130,6 @@ export class Menu {
131
130
  }
132
131
  componentDidLoad() {
133
132
  var _a, _b, _c, _d;
134
- const anchor = this.hostElement.querySelector('#more-tab');
135
- this.popoverListener = new Popover(anchor, this.moreItemsDropdown, () => {
136
- this.showMoreItems = false;
137
- });
138
133
  (_a = this.settings) === null || _a === void 0 ? void 0 : _a.addEventListener('close', () => {
139
134
  this.showSettings = false;
140
135
  this.settings.show = this.showSettings;
@@ -163,10 +158,7 @@ export class Menu {
163
158
  subtree: true,
164
159
  });
165
160
  }
166
- disconnectedCallback() {
167
- var _a;
168
- (_a = this.popoverListener) === null || _a === void 0 ? void 0 : _a.destroy();
169
- }
161
+ disconnectedCallback() { }
170
162
  componentWillRender() {
171
163
  this.appendTabs();
172
164
  }
@@ -329,13 +321,6 @@ export class Menu {
329
321
  }
330
322
  return Math.min(visibleCount - 2, this.maxVisibleMenuItems);
331
323
  }
332
- toggleShowMoreDropdown() {
333
- if (this.moreItemsDropdown.querySelectorAll('.appended').length === 0) {
334
- return;
335
- }
336
- this.popoverListener.open();
337
- this.showMoreItems = !this.showMoreItems;
338
- }
339
324
  /**
340
325
  * Toggle map sidebar expand
341
326
  * @param show
@@ -451,7 +436,7 @@ export class Menu {
451
436
  isMenuItemClicked(event) {
452
437
  const path = event.composedPath();
453
438
  const menuItems = path
454
- .filter((element) => element.id !== 'more-tab')
439
+ .filter((element) => element.id !== 'ix-menu-more-tab')
455
440
  .filter((element) => {
456
441
  return element.tagName === 'IX-MENU-ITEM';
457
442
  });
@@ -474,11 +459,11 @@ export class Menu {
474
459
  if (this.isMenuItemClicked(event)) {
475
460
  this.resetOverlay();
476
461
  }
477
- } }, h("div", { class: "tabs-top" }), h("slot", null), h("div", { class: "active-more-tab" }, this.activeTab ? (h("ix-menu-item", { class: "internal-tab", active: true, tabIcon: this.activeTab.tabIcon }, this.activeTab.innerText)) : null), h("ix-menu-item", { id: "more-tab", tabIcon: "more-menu", class: {
462
+ } }, h("div", { class: "tabs-top" }), h("slot", null), h("div", { class: "active-more-tab" }, this.activeTab ? (h("ix-menu-item", { class: "internal-tab", active: true, tabIcon: this.activeTab.tabIcon }, this.activeTab.innerText)) : null), h("ix-menu-item", { id: "ix-menu-more-tab", tabIcon: "more-menu", class: {
478
463
  'internal-tab': true,
479
464
  }, style: {
480
465
  display: this.showMoreButton() ? 'block' : 'none',
481
- }, title: "Show more", notifications: this.countMoreNotifications, onClick: () => this.toggleShowMoreDropdown() }, this.i18nMore, h("ix-dropdown", { show: this.showMoreItems }, this.menuItems
466
+ }, title: "Show more", notifications: this.countMoreNotifications }, this.i18nMore, h("ix-dropdown", { trigger: 'ix-menu-more-tab', positioningStrategy: 'fixed', placement: 'right-start' }, this.menuItems
482
467
  .filter((elm, index) => !this.showTab(index) &&
483
468
  !this.isMenuItemActive(elm) &&
484
469
  this.isVisible(elm))
@@ -492,7 +477,7 @@ export class Menu {
492
477
  'internal-tab': true,
493
478
  'bottom-tab': true,
494
479
  active: this.showAbout,
495
- }, tabIcon: "info", onClick: async () => this.toggleAbout(!this.showAbout) }, this.i18nLegal)) : null, this.enableToggleTheme ? (h("ix-menu-item", { id: "toggleTheme", onClick: () => toggleVariant(), class: "internal-tab bottom-tab", tabIcon: "bulb" }, this.i18nToggleTheme)) : null, this.enableMapExpand ? (h("ix-menu-item", { id: "menu-collapse", onClick: () => this.mapExpandChange.emit(this.mapExpand), class: "internal-tab bottom-tab", tabIcon: `${this.getCollapseIcon()}` }, this.getCollapseText())) : null), h("div", { class: {
480
+ }, tabIcon: "info", onClick: async () => this.toggleAbout(!this.showAbout) }, this.i18nLegal)) : null, this.enableToggleTheme ? (h("ix-menu-item", { id: "toggleTheme", onClick: () => themeSwitcher.toggleMode(), class: "internal-tab bottom-tab", tabIcon: "bulb" }, this.i18nToggleTheme)) : null, this.enableMapExpand ? (h("ix-menu-item", { id: "menu-collapse", onClick: () => this.mapExpandChange.emit(this.mapExpand), class: "internal-tab bottom-tab", tabIcon: `${this.getCollapseIcon()}` }, this.getCollapseText())) : null), h("div", { class: {
496
481
  'menu-overlay': true,
497
482
  expanded: this.expand,
498
483
  'd-block': this.showAbout || this.showSettings,
@@ -7,29 +7,17 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import { h, Host, } from '@stencil/core';
10
- import { Popover } from '../utils/popover.util';
11
10
  export class MenuAvatar {
12
11
  constructor() {
13
- this.displayMenu = undefined;
12
+ this.avatarElementId = 'ix-menu-avatar-id';
14
13
  this.top = undefined;
15
14
  this.bottom = undefined;
16
15
  this.i18nLogout = 'Logout';
17
16
  }
18
- toggleMenu() {
19
- this.outsideListener.open();
20
- this.displayMenu = !this.displayMenu;
21
- }
22
- componentDidLoad() {
23
- this.outsideListener = new Popover(this.hostElement, this.hostElement.querySelector('ix-dropdown'), () => {
24
- this.displayMenu = false;
25
- });
26
- }
27
- disconnectedCallback() {
28
- var _a;
29
- (_a = this.outsideListener) === null || _a === void 0 ? void 0 : _a.destroy();
30
- }
31
17
  render() {
32
- return (h(Host, null, h("li", { class: "nav-item top-item avatar no-hover", title: this.top }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { id: "avatar-path-background", d: "M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163\n 16-16c0-4.243-1.686-8.313-4.686-11.314C24.314 1.686 20.244 0 16 0z" }), h("path", { id: "avatar-path-person", d: "M17.897 17.91c3.8-.018 7.358 1.875 9.485 5.046-2.417 3.999-6.734 6.434-11.382\n 6.42-4.648.014-8.965-2.421-11.382-6.42 2.127-3.171 5.685-5.064\n 9.485-5.045h3.794zM15.821 2.129c3.682 0 6.667 2.984 6.667 6.666 0 3.682-2.985\n 6.667-6.667 6.667s-6.667-2.985-6.667-6.667 2.985-6.666 6.667-6.666z" }))), h("div", { class: "avatar-name" }, h("span", { class: "text-default-single", title: this.top }, this.top), h("span", { class: "text-default-single", title: this.bottom }, this.bottom))), h("ix-dropdown", { show: this.displayMenu }, h("slot", null), h("ix-menu-avatar-item", { label: this.i18nLogout, icon: "log-out", onClick: (e) => {
18
+ return (h(Host, null, h("li", { class: "nav-item top-item avatar no-hover", title: this.top, id: this.avatarElementId }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", viewBox: "0 0 32 32" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { id: "avatar-path-background", d: "M16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163\n 16-16c0-4.243-1.686-8.313-4.686-11.314C24.314 1.686 20.244 0 16 0z" }), h("path", { id: "avatar-path-person", d: "M17.897 17.91c3.8-.018 7.358 1.875 9.485 5.046-2.417 3.999-6.734 6.434-11.382\n 6.42-4.648.014-8.965-2.421-11.382-6.42 2.127-3.171 5.685-5.064\n 9.485-5.045h3.794zM15.821 2.129c3.682 0 6.667 2.984 6.667 6.666 0 3.682-2.985\n 6.667-6.667 6.667s-6.667-2.985-6.667-6.667 2.985-6.666 6.667-6.666z" }))), h("div", { class: "avatar-name" }, h("span", { class: "text-default-single", title: this.top }, this.top), h("span", { class: "text-default-single", title: this.bottom }, this.bottom))), h("ix-dropdown", { trigger: this.avatarElementId, placement: 'right-start', offset: {
19
+ mainAxis: 12,
20
+ } }, h("slot", null), h("ix-menu-avatar-item", { label: this.i18nLogout, icon: "log-out", onClick: (e) => {
33
21
  this.logoutClick.emit(e);
34
22
  } }))));
35
23
  }
@@ -101,11 +89,6 @@ export class MenuAvatar {
101
89
  }
102
90
  };
103
91
  }
104
- static get states() {
105
- return {
106
- "displayMenu": {}
107
- };
108
- }
109
92
  static get events() {
110
93
  return [{
111
94
  "method": "logoutClick",
@@ -125,13 +108,4 @@ export class MenuAvatar {
125
108
  }];
126
109
  }
127
110
  static get elementRef() { return "hostElement"; }
128
- static get listeners() {
129
- return [{
130
- "name": "click",
131
- "method": "toggleMenu",
132
- "target": undefined,
133
- "capture": false,
134
- "passive": true
135
- }];
136
- }
137
111
  }
@@ -55,6 +55,7 @@
55
55
  background-color: var(--theme-modal--background);
56
56
  border: var(--modal--border-thickness) solid var(--theme-modal--border-color);
57
57
  padding: 1.5rem;
58
+ max-height: 100vh;
58
59
  }
59
60
  :host .modal .modal-content .state-icon-container {
60
61
  -webkit-margin-end: 1rem;
@@ -66,9 +66,15 @@ export class Modal {
66
66
  },
67
67
  });
68
68
  }
69
+ onBackdropClick(event) {
70
+ const target = event.target;
71
+ if (target.classList.contains('backdrop')) {
72
+ this.dismiss(event);
73
+ }
74
+ }
69
75
  componentDidLoad() {
70
76
  if (this.backdrop === 'static') {
71
- this.modalBackdrop.addEventListener('click', this.dismiss.bind(this));
77
+ this.modalBackdrop.addEventListener('click', (event) => this.onBackdropClick(event));
72
78
  }
73
79
  if (this.backdropClass) {
74
80
  this.modalBackdrop.classList.add(this.backdropClass);
@@ -36,6 +36,8 @@
36
36
  */
37
37
  :host {
38
38
  display: inline-flex;
39
+ width: -moz-fit-content;
40
+ width: fit-content;
39
41
  position: relative;
40
42
  align-items: center;
41
43
  justify-content: center;
@@ -262,8 +264,16 @@
262
264
  :host[variant=success].outline.active, :host[variant=success].outline:active {
263
265
  background-color: var(--theme-chip-outline--background--active);
264
266
  }
267
+ :host[variant=custom].outline {
268
+ border: solid 1px transparent;
269
+ background-color: transparent;
270
+ }
265
271
  :host .slot {
266
272
  overflow: hidden;
267
273
  text-overflow: ellipsis;
268
274
  white-space: nowrap;
275
+ }
276
+ :host .hidden {
277
+ width: 0px;
278
+ margin-right: 0px;
269
279
  }
@@ -25,7 +25,10 @@ export class Pill {
25
25
  color: this.color,
26
26
  backgroundColor: this.background,
27
27
  }
28
- : {}, title: this.el.textContent }, this.icon ? (h("ix-icon", { class: 'with-icon', name: this.icon, size: '16' })) : null, h("div", { class: "slot" }, h("slot", null))));
28
+ : {}, title: this.el.textContent }, h("ix-icon", { class: {
29
+ 'with-icon': true,
30
+ hidden: this.icon === undefined || this.icon === '',
31
+ }, name: this.icon, size: '16' }), h("div", { class: "slot" }, h("slot", null))));
29
32
  }
30
33
  static get is() { return "ix-pill"; }
31
34
  static get encapsulation() { return "scoped"; }
@@ -163,7 +163,4 @@
163
163
  height: 2rem;
164
164
  color: var(--theme-select-list-item-hint--color);
165
165
  margin: 0 0.5rem 0 2rem;
166
- }
167
- :host ix-dropdown {
168
- background-color: var(--theme-select-list--background);
169
166
  }
@@ -112,17 +112,12 @@ export class Select {
112
112
  : [this.selectedIndices]);
113
113
  }
114
114
  }
115
- componentDidLoad() {
116
- this.labelMutationObserver = new MutationObserver(() => {
117
- this.selectValue(Array.isArray(this.selectedIndices)
118
- ? this.selectedIndices
119
- : [this.selectedIndices]);
120
- });
121
- this.labelMutationObserver.observe(this.hostElement, {
122
- subtree: true,
123
- attributes: true,
124
- attributeFilter: ['label'],
125
- });
115
+ onLabelChange(event) {
116
+ event.preventDefault();
117
+ event.stopImmediatePropagation();
118
+ this.selectValue(Array.isArray(this.selectedIndices)
119
+ ? this.selectedIndices
120
+ : [this.selectedIndices]);
126
121
  }
127
122
  disconnectedCallback() {
128
123
  if (this.labelMutationObserver) {
@@ -259,7 +254,7 @@ export class Select {
259
254
  'd-none': this.disabled ||
260
255
  this.readonly ||
261
256
  (this.isDropdownEmpty && !this.editable),
262
- }, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom", positioningStrategy: 'fixed', adjustDropdownWidthToReferenceWidth: true }, h("div", { class: "select-list-header", title: this.i18nSelectListHeader }, this.i18nSelectListHeader), h("slot", null), h("div", { ref: (ref) => (this.addItemRef = ref), class: "d-contents" }), this.itemExists(this.inputFilterText) ? ('') : (h("ix-dropdown-item", { "data-testid": "add-item", icon: "plus", class: {
257
+ }, anchor: this.dropdownAnchor, trigger: this.dropdownWrapperRef, onShowChanged: (e) => this.dropdownVisibilityChanged(e), placement: "bottom-start", positioningStrategy: 'absolute' }, h("div", { class: "select-list-header", title: this.i18nSelectListHeader }, this.i18nSelectListHeader), h("slot", null), h("div", { ref: (ref) => (this.addItemRef = ref), class: "d-contents" }), this.itemExists(this.inputFilterText) ? ('') : (h("ix-dropdown-item", { "data-testid": "add-item", icon: "plus", class: {
263
258
  'add-item': true,
264
259
  'd-none': !(this.editable && this.inputFilterText),
265
260
  }, label: this.inputFilterText, onItemClick: (e) => {
@@ -509,6 +504,12 @@ export class Select {
509
504
  "target": undefined,
510
505
  "capture": false,
511
506
  "passive": false
507
+ }, {
508
+ "name": "ix-select-item:labelChange",
509
+ "method": "onLabelChange",
510
+ "target": undefined,
511
+ "capture": false,
512
+ "passive": false
512
513
  }, {
513
514
  "name": "keydown",
514
515
  "method": "onKeyDown",
@@ -0,0 +1,16 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2023 Siemens AG
3
+ *
4
+ * SPDX-License-Identifier: MIT
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ export class IxSelectItemLabelChangeEvent extends CustomEvent {
10
+ constructor(detail) {
11
+ super('ix-select-item:labelChange', {
12
+ bubbles: true,
13
+ detail,
14
+ });
15
+ }
16
+ }
@@ -7,6 +7,7 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import { h, Host, } from '@stencil/core';
10
+ import { IxSelectItemLabelChangeEvent } from './events';
10
11
  export class SelectItem {
11
12
  constructor() {
12
13
  this.label = undefined;
@@ -15,7 +16,7 @@ export class SelectItem {
15
16
  this.hover = false;
16
17
  }
17
18
  /**
18
- * Internal
19
+ * @internal
19
20
  * @param event
20
21
  */
21
22
  async onItemClick(event) {
@@ -28,6 +29,12 @@ export class SelectItem {
28
29
  throw Error('ix-select-item must have a `value` property');
29
30
  }
30
31
  }
32
+ labelChange(newValue, oldValue) {
33
+ this.hostElement.dispatchEvent(new IxSelectItemLabelChangeEvent({
34
+ newValue: newValue,
35
+ oldValue: oldValue,
36
+ }));
37
+ }
31
38
  render() {
32
39
  return (h(Host, null, h("ix-dropdown-item", { checked: this.selected, hover: this.hover, label: this.label ? this.label : this.value, onItemClick: (e) => this.onItemClick(e) })));
33
40
  }
@@ -108,8 +115,11 @@ export class SelectItem {
108
115
  "required": false,
109
116
  "optional": false,
110
117
  "docs": {
111
- "tags": [],
112
- "text": "***Internal***"
118
+ "tags": [{
119
+ "name": "internal",
120
+ "text": undefined
121
+ }],
122
+ "text": ""
113
123
  },
114
124
  "attribute": "hover",
115
125
  "reflect": false,
@@ -161,8 +171,11 @@ export class SelectItem {
161
171
  "return": "Promise<void>"
162
172
  },
163
173
  "docs": {
164
- "text": "Internal",
174
+ "text": "",
165
175
  "tags": [{
176
+ "name": "internal",
177
+ "text": undefined
178
+ }, {
166
179
  "name": "param",
167
180
  "text": "event"
168
181
  }]
@@ -171,4 +184,10 @@ export class SelectItem {
171
184
  };
172
185
  }
173
186
  static get elementRef() { return "hostElement"; }
187
+ static get watchers() {
188
+ return [{
189
+ "propName": "label",
190
+ "methodName": "labelChange"
191
+ }];
192
+ }
174
193
  }
@@ -6,7 +6,6 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { createPopper, } from '@popperjs/core';
10
9
  import { h, Host, } from '@stencil/core';
11
10
  import { getButtonClasses } from '../button/base-button';
12
11
  export class SplitButton {
@@ -25,46 +24,18 @@ export class SplitButton {
25
24
  get splitItems() {
26
25
  return Array.from(this.hostElement.querySelectorAll('ix-split-button-item'));
27
26
  }
28
- clickOutside(e) {
29
- if (!this.hostElement.contains(e.target)) {
30
- this.toggle = false;
27
+ linkTriggerRef() {
28
+ if (this.triggerElement && this.dropdownElement) {
29
+ this.dropdownElement.trigger = this.triggerElement;
31
30
  }
32
31
  }
33
32
  componentDidLoad() {
34
- const element = this.hostElement.querySelector('.anchor');
35
- this.popover = this.hostElement.querySelector('ix-dropdown');
36
- this.popperInstance = createPopper(element, this.popover, {
37
- strategy: 'fixed',
38
- placement: this.placement,
39
- modifiers: [
40
- {
41
- name: 'offset',
42
- options: {
43
- offset: [0, 0],
44
- },
45
- },
46
- {
47
- name: 'flip',
48
- options: {
49
- padding: 8,
50
- },
51
- },
52
- ],
53
- });
54
- window.addEventListener('click', this.clickOutside.bind(this));
55
- }
56
- disconnectedCallback() {
57
- var _a;
58
- (_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
59
- window.removeEventListener('click', this.clickOutside.bind(this));
60
- }
61
- toggleDropdown() {
62
- this.toggle = !this.toggle;
33
+ this.linkTriggerRef();
63
34
  }
64
35
  render() {
65
- return (h(Host, { class: "btn-group" }, h("button", { class: getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, !this.label, false, false, this.disabled), onClick: (e) => this.buttonClick.emit(e) }, this.icon ? h("ix-icon", { name: this.icon }) : null, " ", this.label), h("button", { class: Object.assign(Object.assign({}, getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, true, false, false, this.disabled)), {
36
+ return (h(Host, { class: "btn-group" }, h("button", { class: getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, !this.label, false, false, this.disabled), onClick: (e) => this.buttonClick.emit(e) }, this.icon ? h("ix-icon", { name: this.icon }) : null, " ", this.label), h("button", { ref: (r) => (this.triggerElement = r), class: Object.assign(Object.assign({}, getButtonClasses(this.variant, this.outline, this.ghost || this.invisible, true, false, false, this.disabled)), {
66
37
  anchor: true,
67
- }), onClick: () => this.toggleDropdown() }, h("ix-icon", { name: this.splitIcon }), h("ix-dropdown", { show: this.toggle }, h("slot", null)))));
38
+ }) }, h("ix-icon", { name: this.splitIcon }), h("ix-dropdown", { ref: (r) => (this.dropdownElement = r) }, h("slot", null)))));
68
39
  }
69
40
  static get is() { return "ix-split-button"; }
70
41
  static get encapsulation() { return "scoped"; }
@@ -240,7 +211,7 @@ export class SplitButton {
240
211
  "references": {
241
212
  "Placement": {
242
213
  "location": "import",
243
- "path": "@popperjs/core"
214
+ "path": "../dropdown/placement"
244
215
  }
245
216
  }
246
217
  },
@@ -198,7 +198,7 @@ export class Tree {
198
198
  "optional": false,
199
199
  "docs": {
200
200
  "tags": [],
201
- "text": "Tree modal"
201
+ "text": "Tree model"
202
202
  }
203
203
  },
204
204
  "renderItem": {
@@ -0,0 +1,86 @@
1
+ import { TypedEvent } from './typed-event';
2
+ export class ThemeSwitcher {
3
+ constructor() {
4
+ this.prefixTheme = 'theme-';
5
+ this.suffixLight = '-light';
6
+ this.suffixDark = '-dark';
7
+ this.defaultTheme = 'theme-classic-dark';
8
+ this._themeChanged = new TypedEvent();
9
+ this.registerMutationObserver();
10
+ }
11
+ get themeChanged() {
12
+ return this._themeChanged;
13
+ }
14
+ hasVariantSuffix(className) {
15
+ return (className.endsWith(this.suffixDark) ||
16
+ className.endsWith(this.suffixLight));
17
+ }
18
+ isThemeClass(className) {
19
+ return (className.startsWith(this.prefixTheme) && this.hasVariantSuffix(className));
20
+ }
21
+ setTheme(themeName) {
22
+ if (!this.isThemeClass(themeName)) {
23
+ throw Error(`Provided theme name ${themeName} does not match our naming conventions. (theme-<name>-(dark,light))`);
24
+ }
25
+ const oldThemes = [];
26
+ document.body.classList.forEach((className) => {
27
+ if (this.isThemeClass(className)) {
28
+ oldThemes.push(className);
29
+ }
30
+ });
31
+ document.body.classList.remove(...oldThemes);
32
+ document.body.classList.add(themeName);
33
+ }
34
+ toggleMode() {
35
+ const oldThemes = [];
36
+ document.body.classList.forEach((className) => {
37
+ if (this.isThemeClass(className)) {
38
+ oldThemes.push(className);
39
+ }
40
+ });
41
+ if (oldThemes.length === 0) {
42
+ document.body.classList.add(this.getOppositeMode(this.defaultTheme));
43
+ return;
44
+ }
45
+ oldThemes.forEach((themeName) => {
46
+ document.body.classList.replace(themeName, this.getOppositeMode(themeName));
47
+ });
48
+ }
49
+ getOppositeMode(themeName) {
50
+ if (themeName.endsWith(this.suffixDark)) {
51
+ return themeName.replace(/-dark$/g, this.suffixLight);
52
+ }
53
+ if (themeName.endsWith(this.suffixLight)) {
54
+ return themeName.replace(/-light$/g, this.suffixDark);
55
+ }
56
+ }
57
+ handleMutations(mutations) {
58
+ return mutations.forEach((mutation) => {
59
+ const { target } = mutation;
60
+ target.classList.forEach((className) => {
61
+ var _a;
62
+ if (this.isThemeClass(className) &&
63
+ !((_a = mutation.oldValue) === null || _a === void 0 ? void 0 : _a.includes(className))) {
64
+ this._themeChanged.emit(className);
65
+ }
66
+ });
67
+ });
68
+ }
69
+ registerMutationObserver() {
70
+ if (typeof window === 'undefined') {
71
+ return;
72
+ }
73
+ if (!('MutationOberver' in window)) {
74
+ console.warn('ThemeSwitcher not supported by your browser. Missing MutationObserver API');
75
+ return;
76
+ }
77
+ this.mutationObserver = new MutationObserver((mutations) => {
78
+ this.handleMutations(mutations);
79
+ });
80
+ this.mutationObserver.observe(document.body, {
81
+ attributeFilter: ['class'],
82
+ attributeOldValue: true,
83
+ });
84
+ }
85
+ }
86
+ export const themeSwitcher = new ThemeSwitcher();