@prolibu-suite/cobalt-core 0.1.1 → 0.2.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 (557) hide show
  1. package/custom-elements.json +15359 -5571
  2. package/dist/cjs/co-accordion.cjs.entry.js +19 -4
  3. package/dist/cjs/co-app-shell.cjs.entry.js +1 -1
  4. package/dist/cjs/co-autocomplete.cjs.entry.js +51 -6
  5. package/dist/cjs/co-avatar.cjs.entry.js +40 -7
  6. package/dist/cjs/co-badge.cjs.entry.js +1 -1
  7. package/dist/cjs/co-button-group.cjs.entry.js +1 -1
  8. package/dist/cjs/co-button.cjs.entry.js +10 -5
  9. package/dist/cjs/co-calendar_3.cjs.entry.js +692 -0
  10. package/dist/cjs/co-card.cjs.entry.js +21 -4
  11. package/dist/cjs/co-checkbox-group.cjs.entry.js +7 -5
  12. package/dist/cjs/co-checkbox.cjs.entry.js +4 -4
  13. package/dist/cjs/co-chip.cjs.entry.js +3 -3
  14. package/dist/cjs/co-color-picker.cjs.entry.js +109 -0
  15. package/dist/cjs/co-column-picker.cjs.entry.js +443 -0
  16. package/dist/cjs/co-combobox.cjs.entry.js +51 -15
  17. package/dist/cjs/co-command-search.cjs.entry.js +14 -7
  18. package/dist/cjs/co-data-table-pagination.cjs.entry.js +5 -5
  19. package/dist/cjs/co-data-table.cjs.entry.js +17 -5
  20. package/dist/cjs/co-date-picker.cjs.entry.js +177 -0
  21. package/dist/cjs/co-date-range-picker.cjs.entry.js +378 -0
  22. package/dist/cjs/co-date-range.cjs.entry.js +13 -259
  23. package/dist/cjs/co-empty-state.cjs.entry.js +2 -2
  24. package/dist/cjs/co-fab.cjs.entry.js +3 -3
  25. package/dist/cjs/co-file-field.cjs.entry.js +498 -0
  26. package/dist/cjs/co-helper-text.cjs.entry.js +3 -3
  27. package/dist/cjs/co-icon-button.cjs.entry.js +4 -4
  28. package/dist/cjs/co-icon.cjs.entry.js +7 -4
  29. package/dist/cjs/co-input.cjs.entry.js +13 -8
  30. package/dist/cjs/co-json-field.cjs.entry.js +109 -0
  31. package/dist/cjs/co-lightbox.cjs.entry.js +344 -0
  32. package/dist/cjs/co-list-item.cjs.entry.js +14 -4
  33. package/dist/cjs/co-loader.cjs.entry.js +1 -1
  34. package/dist/cjs/co-menu-divider.cjs.entry.js +2 -2
  35. package/dist/cjs/co-menu-item.cjs.entry.js +1 -1
  36. package/dist/cjs/co-menu.cjs.entry.js +2 -2
  37. package/dist/cjs/co-modal.cjs.entry.js +13 -3
  38. package/dist/cjs/co-navbar.cjs.entry.js +4 -4
  39. package/dist/cjs/co-number-field.cjs.entry.js +47 -11
  40. package/dist/cjs/co-overlay.cjs.entry.js +2 -2
  41. package/dist/cjs/co-page-header.cjs.entry.js +2 -2
  42. package/dist/cjs/co-phone-field.cjs.entry.js +376 -0
  43. package/dist/cjs/co-popover.cjs.entry.js +5 -5
  44. package/dist/cjs/co-progress-bar.cjs.entry.js +3 -3
  45. package/dist/cjs/co-progress-circle.cjs.entry.js +38 -0
  46. package/dist/cjs/co-radio-group.cjs.entry.js +7 -5
  47. package/dist/cjs/co-radio.cjs.entry.js +4 -4
  48. package/dist/cjs/co-rating.cjs.entry.js +4 -4
  49. package/dist/cjs/co-ref-field.cjs.entry.js +191 -21
  50. package/dist/cjs/co-rich-text-editor.cjs.entry.js +235 -0
  51. package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +184 -0
  52. package/dist/cjs/co-rich-text-viewer.cjs.entry.js +82 -0
  53. package/dist/cjs/co-row.cjs.entry.js +3 -3
  54. package/dist/cjs/co-select.cjs.entry.js +119 -18
  55. package/dist/cjs/co-separator.cjs.entry.js +2 -2
  56. package/dist/cjs/co-sidebar-nav.cjs.entry.js +30 -5
  57. package/dist/cjs/co-sidebar.cjs.entry.js +3 -3
  58. package/dist/cjs/co-slider.cjs.entry.js +3 -3
  59. package/dist/cjs/co-switch.cjs.entry.js +9 -6
  60. package/dist/cjs/co-tab-group.cjs.entry.js +2 -2
  61. package/dist/cjs/co-tab.cjs.entry.js +3 -3
  62. package/dist/cjs/co-tags-field.cjs.entry.js +205 -0
  63. package/dist/cjs/co-textarea.cjs.entry.js +92 -0
  64. package/dist/cjs/co-toast.cjs.entry.js +2 -2
  65. package/dist/cjs/co-toggle-button-group.cjs.entry.js +7 -4
  66. package/dist/cjs/co-toggle-button.cjs.entry.js +4 -4
  67. package/dist/cjs/co-tooltip.cjs.entry.js +12 -6
  68. package/dist/cjs/co-transfer-list.cjs.entry.js +20 -6
  69. package/dist/cjs/cobalt.cjs.js +2 -2
  70. package/dist/cjs/dateI18n-BdiNAl0_.js +106 -0
  71. package/dist/cjs/dates-D8D-aS5d.js +432 -0
  72. package/dist/cjs/index-CaEJnpZe.js +27213 -0
  73. package/dist/cjs/{index-BEovErzl.js → index-DoFnrUVH.js} +79 -11
  74. package/dist/cjs/loader.cjs.js +2 -2
  75. package/dist/cjs/normalizeText-B-v-XPKf.js +96 -0
  76. package/dist/cjs/overlayScroll-ifzDNeyb.js +25 -0
  77. package/dist/cjs/overlayscrollbars-BlBHo2Xx.js +2842 -0
  78. package/dist/cjs/{positioning-DozpXyBd.js → positioning-DwHW399W.js} +40 -25
  79. package/dist/cjs/requiredMark-DA6y-4rp.js +16 -0
  80. package/dist/cjs/sanitizer-CjHZAkOm.js +1883 -0
  81. package/dist/cobalt/cobalt.css +1 -1
  82. package/dist/cobalt/cobalt.esm.js +1 -1
  83. package/dist/cobalt/{p-1021f612.entry.js → p-01fc77c4.entry.js} +1 -1
  84. package/dist/cobalt/p-0a6d8061.entry.js +1 -0
  85. package/dist/cobalt/p-0bf288cd.entry.js +1 -0
  86. package/dist/cobalt/p-136bdbd2.entry.js +1 -0
  87. package/dist/cobalt/{p-1b7d6808.entry.js → p-15708d32.entry.js} +1 -1
  88. package/dist/cobalt/{p-cc93ab05.entry.js → p-1578b019.entry.js} +1 -1
  89. package/dist/cobalt/{p-1b5c723a.entry.js → p-1e0282b8.entry.js} +1 -1
  90. package/dist/cobalt/p-23d48581.entry.js +1 -0
  91. package/dist/cobalt/p-2718ff27.entry.js +1 -0
  92. package/dist/cobalt/p-273afd93.entry.js +1 -0
  93. package/dist/cobalt/{p-c9b0e73f.entry.js → p-2b4d8535.entry.js} +1 -1
  94. package/dist/cobalt/p-3190d715.entry.js +1 -0
  95. package/dist/cobalt/p-3f9b3fcb.entry.js +1 -0
  96. package/dist/cobalt/p-41228dce.entry.js +1 -0
  97. package/dist/cobalt/{p-5a13e3a0.entry.js → p-44672953.entry.js} +1 -1
  98. package/dist/cobalt/{p-4cf6d1f4.entry.js → p-522fcdb7.entry.js} +1 -1
  99. package/dist/cobalt/p-53ce9023.entry.js +1 -0
  100. package/dist/cobalt/{p-4d8ff00a.entry.js → p-54f26e95.entry.js} +1 -1
  101. package/dist/cobalt/p-5d01bd4d.entry.js +1 -0
  102. package/dist/cobalt/p-5e7141aa.entry.js +1 -0
  103. package/dist/cobalt/p-5f905739.entry.js +1 -0
  104. package/dist/cobalt/{p-fb047df8.entry.js → p-6404bd21.entry.js} +1 -1
  105. package/dist/cobalt/p-654bbc2a.entry.js +1 -0
  106. package/dist/cobalt/p-6678ac0a.entry.js +1 -0
  107. package/dist/cobalt/{p-e808916c.entry.js → p-66a912dd.entry.js} +1 -1
  108. package/dist/cobalt/p-6759ee1c.entry.js +1 -0
  109. package/dist/cobalt/p-69a40bfd.entry.js +1 -0
  110. package/dist/cobalt/p-6a6a62cb.entry.js +1 -0
  111. package/dist/cobalt/p-6d43b6cd.entry.js +1 -0
  112. package/dist/cobalt/p-759c3dd0.entry.js +1 -0
  113. package/dist/cobalt/p-782f729f.entry.js +1 -0
  114. package/dist/cobalt/{p-ebd1555e.entry.js → p-7ef766c6.entry.js} +1 -1
  115. package/dist/cobalt/p-7f818368.entry.js +1 -0
  116. package/dist/cobalt/p-83b89bf8.entry.js +1 -0
  117. package/dist/cobalt/p-88dc561a.entry.js +1 -0
  118. package/dist/cobalt/{p-4905b51d.entry.js → p-8c27aff7.entry.js} +1 -1
  119. package/dist/cobalt/{p-a7fa4484.entry.js → p-95d14878.entry.js} +1 -1
  120. package/dist/cobalt/{p-1d7da33f.entry.js → p-97c20011.entry.js} +1 -1
  121. package/dist/cobalt/p-996179f7.entry.js +1 -0
  122. package/dist/cobalt/p-9c533830.entry.js +1 -0
  123. package/dist/cobalt/p-9d89bf47.entry.js +1 -0
  124. package/dist/cobalt/p-BKmfyPZK.js +2 -0
  125. package/dist/cobalt/p-BchB6Hdr.js +1 -0
  126. package/dist/cobalt/p-C1DCLOEl.js +1 -0
  127. package/dist/cobalt/p-C2mZ7x_Y.js +1 -0
  128. package/dist/cobalt/p-CQY6Ul7q.js +1 -0
  129. package/dist/cobalt/p-CyYF8IJE.js +1 -0
  130. package/dist/cobalt/p-DcK0GGZC.js +2 -0
  131. package/dist/cobalt/p-DqyWGweA.js +1 -0
  132. package/dist/cobalt/p-Qqq8fysz.js +1 -0
  133. package/dist/cobalt/p-aa17c70b.entry.js +1 -0
  134. package/dist/cobalt/{p-416bb5ae.entry.js → p-aa63812a.entry.js} +1 -1
  135. package/dist/cobalt/p-ad4c1b41.entry.js +1 -0
  136. package/dist/cobalt/p-ae4d3207.entry.js +1 -0
  137. package/dist/cobalt/p-af64da37.entry.js +1 -0
  138. package/dist/cobalt/p-b758c2e6.entry.js +1 -0
  139. package/dist/cobalt/p-bb07da22.entry.js +1 -0
  140. package/dist/cobalt/p-beb9c11d.entry.js +1 -0
  141. package/dist/cobalt/p-c6a242e4.entry.js +1 -0
  142. package/dist/cobalt/p-c87285b6.entry.js +1 -0
  143. package/dist/cobalt/p-cd57e8b4.entry.js +1 -0
  144. package/dist/cobalt/{p-4ffba5a3.entry.js → p-ce3a535f.entry.js} +1 -1
  145. package/dist/cobalt/p-d17e1444.entry.js +1 -0
  146. package/dist/cobalt/p-d958566a.entry.js +1 -0
  147. package/dist/cobalt/p-dd873bf8.entry.js +1 -0
  148. package/dist/cobalt/p-def448e4.entry.js +1 -0
  149. package/dist/cobalt/p-e4de8865.entry.js +1 -0
  150. package/dist/cobalt/{p-3b2f7959.entry.js → p-e8b58332.entry.js} +1 -1
  151. package/dist/cobalt/p-eba0bf7f.entry.js +1 -0
  152. package/dist/cobalt/p-f0e8fa7d.entry.js +1 -0
  153. package/dist/cobalt/{p-e50c4c6f.entry.js → p-f2c5cb74.entry.js} +1 -1
  154. package/dist/cobalt/p-f8728b21.entry.js +1 -0
  155. package/dist/cobalt/{p-697df797.entry.js → p-f97ad9ad.entry.js} +1 -1
  156. package/dist/cobalt/p-fad3605d.entry.js +1 -0
  157. package/dist/cobalt/{p-319937c3.entry.js → p-fe9e85b6.entry.js} +1 -1
  158. package/dist/cobalt/p-ff2690e5.entry.js +1 -0
  159. package/dist/cobalt/p-ox7HzCZn.js +10 -0
  160. package/dist/collection/collection-manifest.json +17 -1
  161. package/dist/collection/components/co-accordion/co-accordion.css +19 -1
  162. package/dist/collection/components/co-accordion/co-accordion.js +46 -4
  163. package/dist/collection/components/co-autocomplete/co-autocomplete.css +725 -7
  164. package/dist/collection/components/co-autocomplete/co-autocomplete.js +88 -4
  165. package/dist/collection/components/co-avatar/co-avatar.css +7 -0
  166. package/dist/collection/components/co-avatar/co-avatar.js +35 -6
  167. package/dist/collection/components/co-button/co-button.css +8 -5
  168. package/dist/collection/components/co-button/co-button.js +46 -3
  169. package/dist/collection/components/co-calendar/co-calendar.css +236 -0
  170. package/dist/collection/components/co-calendar/co-calendar.js +728 -0
  171. package/dist/collection/components/co-card/co-card.css +28 -5
  172. package/dist/collection/components/co-card/co-card.js +47 -4
  173. package/dist/collection/components/co-checkbox/co-checkbox.js +3 -3
  174. package/dist/collection/components/co-checkbox-group/co-checkbox-group.css +26 -0
  175. package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +25 -3
  176. package/dist/collection/components/co-chip/co-chip.js +2 -2
  177. package/dist/collection/components/co-color-picker/co-color-picker.css +224 -0
  178. package/dist/collection/components/co-color-picker/co-color-picker.js +333 -0
  179. package/dist/collection/components/co-color-picker/presets.js +19 -0
  180. package/dist/collection/components/co-column-picker/co-column-picker.css +490 -0
  181. package/dist/collection/components/co-column-picker/co-column-picker.js +675 -0
  182. package/dist/collection/components/co-column-picker/column-picker-node.js +34 -0
  183. package/dist/collection/components/co-column-picker/utils/column-picker-tree.js +221 -0
  184. package/dist/collection/components/co-combobox/co-combobox.css +789 -22
  185. package/dist/collection/components/co-combobox/co-combobox.js +130 -15
  186. package/dist/collection/components/co-command-search/co-command-search.css +4 -0
  187. package/dist/collection/components/co-command-search/co-command-search.js +12 -5
  188. package/dist/collection/components/co-data-table/co-data-table.css +1 -1
  189. package/dist/collection/components/co-data-table/co-data-table.js +15 -3
  190. package/dist/collection/components/co-data-table-pagination/co-data-table-pagination.js +4 -4
  191. package/dist/collection/components/co-date-field/co-date-field.css +239 -0
  192. package/dist/collection/components/co-date-field/co-date-field.js +746 -0
  193. package/dist/collection/components/co-date-picker/co-date-picker.css +112 -0
  194. package/dist/collection/components/co-date-picker/co-date-picker.js +801 -0
  195. package/dist/collection/components/co-date-range/co-date-range.css +3 -254
  196. package/dist/collection/components/co-date-range/co-date-range.js +29 -433
  197. package/dist/collection/components/co-date-range-picker/co-date-range-picker.css +251 -0
  198. package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +1142 -0
  199. package/dist/collection/components/co-drawer/co-drawer.css +19 -0
  200. package/dist/collection/components/co-drawer/co-drawer.js +46 -2
  201. package/dist/collection/components/co-empty-state/co-empty-state.js +1 -1
  202. package/dist/collection/components/co-fab/co-fab.js +2 -2
  203. package/dist/collection/components/co-file-field/co-file-field.css +389 -0
  204. package/dist/collection/components/co-file-field/co-file-field.js +841 -0
  205. package/dist/collection/components/co-file-field/co-file-field.utils.js +47 -0
  206. package/dist/collection/components/co-helper-text/co-helper-text.js +2 -2
  207. package/dist/collection/components/co-icon/co-icon.js +6 -3
  208. package/dist/collection/components/co-icon-button/co-icon-button.css +10 -0
  209. package/dist/collection/components/co-icon-button/co-icon-button.js +4 -4
  210. package/dist/collection/components/co-input/co-input.css +56 -10
  211. package/dist/collection/components/co-input/co-input.js +34 -9
  212. package/dist/collection/components/co-json-field/co-json-field.css +169 -0
  213. package/dist/collection/components/co-json-field/co-json-field.js +453 -0
  214. package/dist/collection/components/co-lightbox/co-lightbox.css +164 -0
  215. package/dist/collection/components/co-lightbox/co-lightbox.js +451 -0
  216. package/dist/collection/components/co-list-item/co-list-item.css +5 -0
  217. package/dist/collection/components/co-list-item/co-list-item.js +12 -2
  218. package/dist/collection/components/co-menu/co-menu.js +1 -1
  219. package/dist/collection/components/co-menu-divider/co-menu-divider.js +1 -1
  220. package/dist/collection/components/co-modal/co-modal.css +17 -3
  221. package/dist/collection/components/co-modal/co-modal.js +51 -1
  222. package/dist/collection/components/co-navbar/co-navbar.css +1 -1
  223. package/dist/collection/components/co-navbar/co-navbar.js +2 -2
  224. package/dist/collection/components/co-number-field/co-number-field.css +70 -0
  225. package/dist/collection/components/co-number-field/co-number-field.js +143 -13
  226. package/dist/collection/components/co-overlay/co-overlay.js +1 -1
  227. package/dist/collection/components/co-page-header/co-page-header.js +1 -1
  228. package/dist/collection/components/co-phone-field/co-phone-field.css +265 -0
  229. package/dist/collection/components/co-phone-field/co-phone-field.js +392 -0
  230. package/dist/collection/components/co-phone-field/dial-codes.js +208 -0
  231. package/dist/collection/components/co-popover/co-popover.css +1 -1
  232. package/dist/collection/components/co-popover/co-popover.js +2 -2
  233. package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
  234. package/dist/collection/components/co-progress-circle/co-progress-circle.css +50 -0
  235. package/dist/collection/components/co-progress-circle/co-progress-circle.js +148 -0
  236. package/dist/collection/components/co-radio/co-radio.js +3 -3
  237. package/dist/collection/components/co-radio-group/co-radio-group.css +26 -0
  238. package/dist/collection/components/co-radio-group/co-radio-group.js +25 -3
  239. package/dist/collection/components/co-rating/co-rating.js +3 -3
  240. package/dist/collection/components/co-ref-field/co-ref-field.css +816 -54
  241. package/dist/collection/components/co-ref-field/co-ref-field.js +0 -0
  242. package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.css +238 -0
  243. package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +868 -0
  244. package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +55 -0
  245. package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +289 -0
  246. package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +78 -0
  247. package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +232 -0
  248. package/dist/collection/components/co-row/co-row.js +2 -2
  249. package/dist/collection/components/co-select/co-select.css +845 -7
  250. package/dist/collection/components/co-select/co-select.js +240 -17
  251. package/dist/collection/components/co-separator/co-separator.js +1 -1
  252. package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
  253. package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +29 -4
  254. package/dist/collection/components/co-slider/co-slider.js +2 -2
  255. package/dist/collection/components/co-switch/co-switch.css +17 -0
  256. package/dist/collection/components/co-switch/co-switch.js +27 -4
  257. package/dist/collection/components/co-tab/co-tab.js +2 -2
  258. package/dist/collection/components/co-tab-group/co-tab-group.js +1 -1
  259. package/dist/collection/components/co-tags-field/co-tags-field.css +272 -0
  260. package/dist/collection/components/co-tags-field/co-tags-field.js +590 -0
  261. package/dist/collection/components/co-textarea/co-textarea.css +261 -0
  262. package/dist/collection/components/co-textarea/co-textarea.js +484 -0
  263. package/dist/collection/components/co-toast/co-toast.js +1 -1
  264. package/dist/collection/components/co-toggle-button/co-toggle-button.css +6 -4
  265. package/dist/collection/components/co-toggle-button/co-toggle-button.js +2 -2
  266. package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.css +16 -0
  267. package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +25 -2
  268. package/dist/collection/components/co-tooltip/co-tooltip.css +16 -0
  269. package/dist/collection/components/co-tooltip/co-tooltip.js +9 -3
  270. package/dist/collection/components/co-transfer-list/co-transfer-list.css +683 -7
  271. package/dist/collection/components/co-transfer-list/co-transfer-list.js +17 -4
  272. package/dist/collection/utils/dateI18n.js +101 -0
  273. package/dist/collection/utils/fileI18n.js +76 -0
  274. package/dist/collection/utils/icon-config.js +22 -0
  275. package/dist/collection/utils/lightboxI18n.js +42 -0
  276. package/dist/collection/utils/normalizeText.js +94 -0
  277. package/dist/collection/utils/overlayScroll.js +20 -0
  278. package/dist/collection/utils/positioning.js +40 -25
  279. package/dist/collection/utils/requiredMark.js +11 -0
  280. package/dist/components/co-accordion.js +1 -1
  281. package/dist/components/co-autocomplete.js +1 -1
  282. package/dist/components/co-avatar.js +1 -1
  283. package/dist/components/co-button.js +1 -1
  284. package/dist/components/co-calendar.d.ts +11 -0
  285. package/dist/components/co-calendar.js +1 -0
  286. package/dist/components/co-card.js +1 -1
  287. package/dist/components/co-checkbox-group.js +1 -1
  288. package/dist/components/co-checkbox.js +1 -1
  289. package/dist/components/co-chip.js +1 -1
  290. package/dist/components/co-color-picker.d.ts +11 -0
  291. package/dist/components/co-color-picker.js +1 -0
  292. package/dist/components/co-column-picker.d.ts +11 -0
  293. package/dist/components/co-column-picker.js +1 -0
  294. package/dist/components/co-combobox.js +1 -1
  295. package/dist/components/co-command-search.js +1 -1
  296. package/dist/components/co-data-table-pagination.js +1 -1
  297. package/dist/components/co-data-table.js +1 -1
  298. package/dist/components/co-date-field.d.ts +11 -0
  299. package/dist/components/co-date-field.js +1 -0
  300. package/dist/components/co-date-picker.d.ts +11 -0
  301. package/dist/components/co-date-picker.js +1 -0
  302. package/dist/components/co-date-range-picker.d.ts +11 -0
  303. package/dist/components/co-date-range-picker.js +1 -0
  304. package/dist/components/co-date-range.js +1 -1
  305. package/dist/components/co-drawer.js +1 -1
  306. package/dist/components/co-empty-state.js +1 -1
  307. package/dist/components/co-fab.js +1 -1
  308. package/dist/components/co-file-field.d.ts +11 -0
  309. package/dist/components/co-file-field.js +1 -0
  310. package/dist/components/co-helper-text.js +1 -1
  311. package/dist/components/co-icon-button.js +1 -1
  312. package/dist/components/co-icon.js +1 -1
  313. package/dist/components/co-input.js +1 -1
  314. package/dist/components/co-json-field.d.ts +11 -0
  315. package/dist/components/co-json-field.js +1 -0
  316. package/dist/components/co-lightbox.d.ts +11 -0
  317. package/dist/components/co-lightbox.js +1 -0
  318. package/dist/components/co-list-item.js +1 -1
  319. package/dist/components/co-menu-divider.js +1 -1
  320. package/dist/components/co-menu-item.js +1 -1
  321. package/dist/components/co-menu.js +1 -1
  322. package/dist/components/co-modal.js +1 -1
  323. package/dist/components/co-navbar.js +1 -1
  324. package/dist/components/co-number-field.js +1 -1
  325. package/dist/components/co-overlay.js +1 -1
  326. package/dist/components/co-page-header.js +1 -1
  327. package/dist/components/co-phone-field.d.ts +11 -0
  328. package/dist/components/co-phone-field.js +1 -0
  329. package/dist/components/co-popover.js +1 -1
  330. package/dist/components/co-progress-bar.js +1 -1
  331. package/dist/components/co-progress-circle.d.ts +11 -0
  332. package/dist/components/co-progress-circle.js +1 -0
  333. package/dist/components/co-radio-group.js +1 -1
  334. package/dist/components/co-radio.js +1 -1
  335. package/dist/components/co-rating.js +1 -1
  336. package/dist/components/co-ref-field.js +1 -1
  337. package/dist/components/co-rich-text-editor.d.ts +11 -0
  338. package/dist/components/co-rich-text-editor.js +1 -0
  339. package/dist/components/co-rich-text-toolbar.d.ts +11 -0
  340. package/dist/components/co-rich-text-toolbar.js +1 -0
  341. package/dist/components/co-rich-text-viewer.d.ts +11 -0
  342. package/dist/components/co-rich-text-viewer.js +1 -0
  343. package/dist/components/co-row.js +1 -1
  344. package/dist/components/co-select.js +1 -1
  345. package/dist/components/co-separator.js +1 -1
  346. package/dist/components/co-sidebar-nav.js +1 -1
  347. package/dist/components/co-sidebar.js +1 -1
  348. package/dist/components/co-slider.js +1 -1
  349. package/dist/components/co-switch.js +1 -1
  350. package/dist/components/co-tab-group.js +1 -1
  351. package/dist/components/co-tab.js +1 -1
  352. package/dist/components/co-tags-field.d.ts +11 -0
  353. package/dist/components/co-tags-field.js +1 -0
  354. package/dist/components/co-textarea.d.ts +11 -0
  355. package/dist/components/co-textarea.js +1 -0
  356. package/dist/components/co-toast.js +1 -1
  357. package/dist/components/co-toggle-button-group.js +1 -1
  358. package/dist/components/co-toggle-button.js +1 -1
  359. package/dist/components/co-tooltip.js +1 -1
  360. package/dist/components/co-transfer-list.js +1 -1
  361. package/dist/components/index.js +1 -1
  362. package/dist/components/{p-Dv_iMPy0.js → p-BXdfh__-.js} +1 -1
  363. package/dist/components/p-BchB6Hdr.js +1 -0
  364. package/dist/components/p-BeWXpX8I.js +1 -0
  365. package/dist/components/p-BiW0ubLs.js +1 -0
  366. package/dist/components/p-C1DCLOEl.js +1 -0
  367. package/dist/components/p-C2mZ7x_Y.js +1 -0
  368. package/dist/components/p-C9tHLXKS.js +1 -0
  369. package/dist/components/p-CQY6Ul7q.js +1 -0
  370. package/dist/components/p-CWneqh4n.js +1 -0
  371. package/dist/components/{p-B18FTYLq.js → p-CaMgu2_g.js} +1 -1
  372. package/dist/components/p-CyYF8IJE.js +1 -0
  373. package/dist/components/p-DBhNS7JD.js +1 -0
  374. package/dist/components/p-DObrQi5F.js +1 -0
  375. package/dist/components/p-DPi_U-Kl.js +1 -0
  376. package/dist/components/p-DcK0GGZC.js +2 -0
  377. package/dist/components/p-DqyWGweA.js +1 -0
  378. package/dist/components/{p-cpdUXBiS.js → p-MiSJXuBx.js} +1 -1
  379. package/dist/components/p-Sgn-2g8m.js +1 -0
  380. package/dist/components/{p-Cr8Yc0zj.js → p-jDjfGZJp.js} +1 -1
  381. package/dist/components/p-o8hrDIKe.js +1 -0
  382. package/dist/components/p-ox7HzCZn.js +10 -0
  383. package/dist/esm/co-accordion.entry.js +19 -4
  384. package/dist/esm/co-app-shell.entry.js +1 -1
  385. package/dist/esm/co-autocomplete.entry.js +51 -6
  386. package/dist/esm/co-avatar.entry.js +39 -6
  387. package/dist/esm/co-badge.entry.js +1 -1
  388. package/dist/esm/co-button-group.entry.js +1 -1
  389. package/dist/esm/co-button.entry.js +10 -5
  390. package/dist/esm/co-calendar_3.entry.js +688 -0
  391. package/dist/esm/co-card.entry.js +21 -4
  392. package/dist/esm/co-checkbox-group.entry.js +7 -5
  393. package/dist/esm/co-checkbox.entry.js +4 -4
  394. package/dist/esm/co-chip.entry.js +3 -3
  395. package/dist/esm/co-color-picker.entry.js +107 -0
  396. package/dist/esm/co-column-picker.entry.js +441 -0
  397. package/dist/esm/co-combobox.entry.js +51 -15
  398. package/dist/esm/co-command-search.entry.js +14 -7
  399. package/dist/esm/co-data-table-pagination.entry.js +5 -5
  400. package/dist/esm/co-data-table.entry.js +17 -5
  401. package/dist/esm/co-date-picker.entry.js +175 -0
  402. package/dist/esm/co-date-range-picker.entry.js +376 -0
  403. package/dist/esm/co-date-range.entry.js +13 -259
  404. package/dist/esm/co-empty-state.entry.js +2 -2
  405. package/dist/esm/co-fab.entry.js +3 -3
  406. package/dist/esm/co-file-field.entry.js +496 -0
  407. package/dist/esm/co-helper-text.entry.js +3 -3
  408. package/dist/esm/co-icon-button.entry.js +4 -4
  409. package/dist/esm/co-icon.entry.js +7 -4
  410. package/dist/esm/co-input.entry.js +13 -8
  411. package/dist/esm/co-json-field.entry.js +107 -0
  412. package/dist/esm/co-lightbox.entry.js +342 -0
  413. package/dist/esm/co-list-item.entry.js +14 -4
  414. package/dist/esm/co-loader.entry.js +1 -1
  415. package/dist/esm/co-menu-divider.entry.js +2 -2
  416. package/dist/esm/co-menu-item.entry.js +1 -1
  417. package/dist/esm/co-menu.entry.js +2 -2
  418. package/dist/esm/co-modal.entry.js +13 -3
  419. package/dist/esm/co-navbar.entry.js +4 -4
  420. package/dist/esm/co-number-field.entry.js +47 -11
  421. package/dist/esm/co-overlay.entry.js +2 -2
  422. package/dist/esm/co-page-header.entry.js +2 -2
  423. package/dist/esm/co-phone-field.entry.js +374 -0
  424. package/dist/esm/co-popover.entry.js +5 -5
  425. package/dist/esm/co-progress-bar.entry.js +3 -3
  426. package/dist/esm/co-progress-circle.entry.js +36 -0
  427. package/dist/esm/co-radio-group.entry.js +7 -5
  428. package/dist/esm/co-radio.entry.js +4 -4
  429. package/dist/esm/co-rating.entry.js +4 -4
  430. package/dist/esm/co-ref-field.entry.js +191 -21
  431. package/dist/esm/co-rich-text-editor.entry.js +233 -0
  432. package/dist/esm/co-rich-text-toolbar.entry.js +182 -0
  433. package/dist/esm/co-rich-text-viewer.entry.js +80 -0
  434. package/dist/esm/co-row.entry.js +3 -3
  435. package/dist/esm/co-select.entry.js +119 -18
  436. package/dist/esm/co-separator.entry.js +2 -2
  437. package/dist/esm/co-sidebar-nav.entry.js +30 -5
  438. package/dist/esm/co-sidebar.entry.js +3 -3
  439. package/dist/esm/co-slider.entry.js +3 -3
  440. package/dist/esm/co-switch.entry.js +9 -6
  441. package/dist/esm/co-tab-group.entry.js +2 -2
  442. package/dist/esm/co-tab.entry.js +3 -3
  443. package/dist/esm/co-tags-field.entry.js +203 -0
  444. package/dist/esm/co-textarea.entry.js +90 -0
  445. package/dist/esm/co-toast.entry.js +2 -2
  446. package/dist/esm/co-toggle-button-group.entry.js +7 -4
  447. package/dist/esm/co-toggle-button.entry.js +4 -4
  448. package/dist/esm/co-tooltip.entry.js +12 -6
  449. package/dist/esm/co-transfer-list.entry.js +20 -6
  450. package/dist/esm/cobalt.js +3 -3
  451. package/dist/esm/dateI18n-C1DCLOEl.js +103 -0
  452. package/dist/esm/dates-CyYF8IJE.js +416 -0
  453. package/dist/esm/{index-B0lqrhFo.js → index-BKmfyPZK.js} +79 -11
  454. package/dist/esm/index-BjAqSidM.js +27200 -0
  455. package/dist/esm/loader.js +3 -3
  456. package/dist/esm/normalizeText-CQY6Ul7q.js +92 -0
  457. package/dist/esm/overlayScroll-Bpv882_z.js +23 -0
  458. package/dist/esm/overlayscrollbars-ox7HzCZn.js +2840 -0
  459. package/dist/esm/{positioning-Am-OlB8h.js → positioning-C2mZ7x_Y.js} +40 -25
  460. package/dist/esm/requiredMark-DFvtYtkE.js +14 -0
  461. package/dist/esm/sanitizer-DcK0GGZC.js +1880 -0
  462. package/dist/types/components/co-accordion/co-accordion.d.ts +12 -2
  463. package/dist/types/components/co-autocomplete/co-autocomplete.d.ts +11 -0
  464. package/dist/types/components/co-avatar/co-avatar.d.ts +6 -2
  465. package/dist/types/components/co-button/co-button.d.ts +4 -0
  466. package/dist/types/components/co-calendar/co-calendar.d.ts +108 -0
  467. package/dist/types/components/co-card/co-card.d.ts +10 -2
  468. package/dist/types/components/co-checkbox-group/co-checkbox-group.d.ts +2 -0
  469. package/dist/types/components/co-color-picker/co-color-picker.d.ts +48 -0
  470. package/dist/types/components/co-color-picker/presets.d.ts +10 -0
  471. package/dist/types/components/co-column-picker/co-column-picker.d.ts +60 -0
  472. package/dist/types/components/co-column-picker/column-picker-node.d.ts +18 -0
  473. package/dist/types/components/co-column-picker/utils/column-picker-tree.d.ts +37 -0
  474. package/dist/types/components/co-combobox/co-combobox.d.ts +14 -1
  475. package/dist/types/components/co-command-search/co-command-search.d.ts +2 -0
  476. package/dist/types/components/co-data-table/co-data-table.d.ts +1 -0
  477. package/dist/types/components/co-date-field/co-date-field.d.ts +96 -0
  478. package/dist/types/components/co-date-picker/co-date-picker.d.ts +92 -0
  479. package/dist/types/components/co-date-range/co-date-range.d.ts +12 -50
  480. package/dist/types/components/co-date-range-picker/co-date-range-picker.d.ts +112 -0
  481. package/dist/types/components/co-drawer/co-drawer.d.ts +4 -0
  482. package/dist/types/components/co-file-field/co-file-field.d.ts +146 -0
  483. package/dist/types/components/co-file-field/co-file-field.utils.d.ts +18 -0
  484. package/dist/types/components/co-icon-button/co-icon-button.d.ts +1 -1
  485. package/dist/types/components/co-input/co-input.d.ts +4 -1
  486. package/dist/types/components/co-json-field/co-json-field.d.ts +66 -0
  487. package/dist/types/components/co-lightbox/co-lightbox.d.ts +95 -0
  488. package/dist/types/components/co-list-item/co-list-item.d.ts +1 -0
  489. package/dist/types/components/co-modal/co-modal.d.ts +4 -0
  490. package/dist/types/components/co-number-field/co-number-field.d.ts +16 -2
  491. package/dist/types/components/co-phone-field/co-phone-field.d.ts +56 -0
  492. package/dist/types/components/co-phone-field/dial-codes.d.ts +14 -0
  493. package/dist/types/components/co-progress-circle/co-progress-circle.d.ts +16 -0
  494. package/dist/types/components/co-radio-group/co-radio-group.d.ts +2 -0
  495. package/dist/types/components/co-ref-field/co-ref-field.d.ts +54 -1
  496. package/dist/types/components/co-rich-text-editor/co-rich-text-editor.d.ts +94 -0
  497. package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +42 -0
  498. package/dist/types/components/co-rich-text-viewer/co-rich-text-viewer.d.ts +32 -0
  499. package/dist/types/components/co-select/co-select.d.ts +31 -1
  500. package/dist/types/components/co-switch/co-switch.d.ts +2 -0
  501. package/dist/types/components/co-tags-field/co-tags-field.d.ts +82 -0
  502. package/dist/types/components/co-textarea/co-textarea.d.ts +65 -0
  503. package/dist/types/components/co-toggle-button-group/co-toggle-button-group.d.ts +2 -0
  504. package/dist/types/components/co-transfer-list/co-transfer-list.d.ts +4 -0
  505. package/dist/types/components.d.ts +3796 -422
  506. package/dist/types/utils/dateI18n.d.ts +39 -0
  507. package/dist/types/utils/fileI18n.d.ts +34 -0
  508. package/dist/types/utils/icon-config.d.ts +20 -0
  509. package/dist/types/utils/lightboxI18n.d.ts +12 -0
  510. package/dist/types/utils/normalizeText.d.ts +41 -0
  511. package/dist/types/utils/overlayScroll.d.ts +17 -0
  512. package/dist/types/utils/positioning.d.ts +7 -14
  513. package/dist/types/utils/requiredMark.d.ts +13 -0
  514. package/package.json +9 -1
  515. package/dist/cjs/co-drawer.cjs.entry.js +0 -75
  516. package/dist/cjs/color-YhUkm10t.js +0 -32
  517. package/dist/cobalt/p-08afdc51.entry.js +0 -1
  518. package/dist/cobalt/p-1d3338b6.entry.js +0 -1
  519. package/dist/cobalt/p-230a23f3.entry.js +0 -1
  520. package/dist/cobalt/p-31bc842d.entry.js +0 -1
  521. package/dist/cobalt/p-37c1f700.entry.js +0 -1
  522. package/dist/cobalt/p-4ce98a64.entry.js +0 -1
  523. package/dist/cobalt/p-4dd7499c.entry.js +0 -1
  524. package/dist/cobalt/p-4e7ce8ee.entry.js +0 -1
  525. package/dist/cobalt/p-6793c51e.entry.js +0 -1
  526. package/dist/cobalt/p-689e38b3.entry.js +0 -1
  527. package/dist/cobalt/p-7028880b.entry.js +0 -1
  528. package/dist/cobalt/p-72113ec2.entry.js +0 -1
  529. package/dist/cobalt/p-8e54e74d.entry.js +0 -1
  530. package/dist/cobalt/p-92c39eed.entry.js +0 -1
  531. package/dist/cobalt/p-9887b828.entry.js +0 -1
  532. package/dist/cobalt/p-9a5c6600.entry.js +0 -1
  533. package/dist/cobalt/p-Am-OlB8h.js +0 -1
  534. package/dist/cobalt/p-B0lqrhFo.js +0 -2
  535. package/dist/cobalt/p-BG4WRR22.js +0 -1
  536. package/dist/cobalt/p-a1b248ad.entry.js +0 -1
  537. package/dist/cobalt/p-a470b764.entry.js +0 -1
  538. package/dist/cobalt/p-a477d23a.entry.js +0 -1
  539. package/dist/cobalt/p-a4d55b1a.entry.js +0 -1
  540. package/dist/cobalt/p-b6840df4.entry.js +0 -1
  541. package/dist/cobalt/p-b89d54d9.entry.js +0 -1
  542. package/dist/cobalt/p-ba84631a.entry.js +0 -1
  543. package/dist/cobalt/p-c7517f86.entry.js +0 -1
  544. package/dist/cobalt/p-ca41eec2.entry.js +0 -1
  545. package/dist/cobalt/p-d29c77cb.entry.js +0 -1
  546. package/dist/cobalt/p-d9d8b10e.entry.js +0 -1
  547. package/dist/cobalt/p-da55678f.entry.js +0 -1
  548. package/dist/cobalt/p-dc5598d1.entry.js +0 -1
  549. package/dist/cobalt/p-e2c9cb00.entry.js +0 -1
  550. package/dist/cobalt/p-ebd68f56.entry.js +0 -1
  551. package/dist/cobalt/p-f051f44d.entry.js +0 -1
  552. package/dist/cobalt/p-fe1447a3.entry.js +0 -1
  553. package/dist/components/p-Am-OlB8h.js +0 -1
  554. package/dist/components/p-BG4WRR22.js +0 -1
  555. package/dist/components/p-wwWquAtm.js +0 -1
  556. package/dist/esm/co-drawer.entry.js +0 -73
  557. package/dist/esm/color-BG4WRR22.js +0 -30
@@ -0,0 +1,451 @@
1
+ import { h } from "@stencil/core";
2
+ import { getLightboxStrings } from "../../utils/lightboxI18n";
3
+ const MIN_SCALE = 1;
4
+ const MAX_SCALE = 8;
5
+ const WHEEL_FACTOR = 1.15;
6
+ const DBLCLICK_SCALE = 2.5;
7
+ /**
8
+ * Fullscreen image viewer — dark scrim, zoom (wheel / buttons / double-click,
9
+ * anchored at the cursor), drag-to-pan while zoomed, and prev/next carousel
10
+ * when more than one image is provided. Keyboard: Escape closes, arrows
11
+ * navigate, +/- zoom, 0 resets.
12
+ *
13
+ * Controlled like co-modal: the host owns `open` and reacts to `coClose`.
14
+ *
15
+ * CAVEAT: the root is `position: fixed`, so an ancestor with `transform`,
16
+ * `filter` or `will-change: transform` (e.g. an OPEN co-drawer) becomes its
17
+ * containing block and traps the overlay. When opening from inside such a
18
+ * context, create the element imperatively on `document.body` instead of
19
+ * rendering it declaratively (this is what co-file-field does).
20
+ *
21
+ * @part overlay - Fullscreen scrim container
22
+ * @part toolbar - Top bar (caption + zoom controls + actions)
23
+ * @part image - The active image element
24
+ * @part prev - Previous-image arrow button
25
+ * @part next - Next-image arrow button
26
+ * @part counter - The "i / n" indicator
27
+ * @part close - The close button
28
+ */
29
+ export class CoLightbox {
30
+ constructor() {
31
+ /** JSON array of {@link LightboxImage} (controlled by the host). */
32
+ this.images = '[]';
33
+ /** Index shown when the viewer opens. */
34
+ this.startIndex = 0;
35
+ /** Whether the viewer is visible. */
36
+ this.open = false;
37
+ this.index = 0;
38
+ this.scale = 1;
39
+ this.tx = 0;
40
+ this.ty = 0;
41
+ this.dragging = false;
42
+ this.lastImagesStr = '';
43
+ this.lastParsed = [];
44
+ this.dragStart = { x: 0, y: 0, tx: 0, ty: 0 };
45
+ /** Focus the close button on the render that follows opening. */
46
+ this.pendingFocus = false;
47
+ this.handleKey = (e) => {
48
+ if (!this.open)
49
+ return;
50
+ switch (e.key) {
51
+ case 'Escape':
52
+ this.requestClose();
53
+ break;
54
+ case 'ArrowLeft':
55
+ this.goTo(-1);
56
+ break;
57
+ case 'ArrowRight':
58
+ this.goTo(1);
59
+ break;
60
+ case '+':
61
+ case '=':
62
+ this.zoomAt(this.scale * WHEEL_FACTOR, 0, 0);
63
+ break;
64
+ case '-':
65
+ this.zoomAt(this.scale / WHEEL_FACTOR, 0, 0);
66
+ break;
67
+ case '0':
68
+ this.resetView();
69
+ break;
70
+ case 'Tab':
71
+ this.trapTab(e);
72
+ return;
73
+ default:
74
+ return; // unhandled keys pass through untouched
75
+ }
76
+ e.preventDefault();
77
+ e.stopPropagation();
78
+ };
79
+ this.requestClose = () => {
80
+ this.coClose.emit();
81
+ };
82
+ this.handleWheel = (e) => {
83
+ e.preventDefault();
84
+ const [px, py] = this.stagePoint(e);
85
+ const factor = e.deltaY < 0 ? WHEEL_FACTOR : 1 / WHEEL_FACTOR;
86
+ this.zoomAt(this.scale * factor, px, py);
87
+ };
88
+ this.handleDblClick = (e) => {
89
+ const [px, py] = this.stagePoint(e);
90
+ this.zoomAt(this.scale > MIN_SCALE ? MIN_SCALE : DBLCLICK_SCALE, px, py);
91
+ };
92
+ this.handlePointerDown = (e) => {
93
+ var _a;
94
+ if (this.scale <= MIN_SCALE)
95
+ return;
96
+ e.preventDefault();
97
+ this.dragging = true;
98
+ this.dragStart = { x: e.clientX, y: e.clientY, tx: this.tx, ty: this.ty };
99
+ (_a = this.imgEl) === null || _a === void 0 ? void 0 : _a.setPointerCapture(e.pointerId);
100
+ };
101
+ this.handlePointerMove = (e) => {
102
+ if (!this.dragging)
103
+ return;
104
+ const tx = this.dragStart.tx + (e.clientX - this.dragStart.x);
105
+ const ty = this.dragStart.ty + (e.clientY - this.dragStart.y);
106
+ [this.tx, this.ty] = this.clampPan(tx, ty, this.scale);
107
+ };
108
+ this.handlePointerUp = (e) => {
109
+ var _a;
110
+ if (!this.dragging)
111
+ return;
112
+ this.dragging = false;
113
+ (_a = this.imgEl) === null || _a === void 0 ? void 0 : _a.releasePointerCapture(e.pointerId);
114
+ };
115
+ this.openOriginal = () => {
116
+ const img = this.parsedImages[this.index];
117
+ if (img === null || img === void 0 ? void 0 : img.src)
118
+ window.open(img.src, '_blank', 'noopener');
119
+ };
120
+ this.stop = (e) => e.stopPropagation();
121
+ }
122
+ get parsedImages() {
123
+ const raw = this.images;
124
+ if (typeof raw !== 'string' || !raw.trim())
125
+ return [];
126
+ if (raw === this.lastImagesStr)
127
+ return this.lastParsed;
128
+ let parsed = [];
129
+ try {
130
+ const p = JSON.parse(raw);
131
+ if (Array.isArray(p))
132
+ parsed = p.filter((i) => i && i.src);
133
+ }
134
+ catch (_a) {
135
+ /* not JSON */
136
+ }
137
+ this.lastImagesStr = raw;
138
+ this.lastParsed = parsed;
139
+ return parsed;
140
+ }
141
+ componentWillLoad() {
142
+ this.index = this.clampIndex(this.startIndex);
143
+ }
144
+ connectedCallback() {
145
+ if (this.open)
146
+ this.attachKeyListener();
147
+ }
148
+ disconnectedCallback() {
149
+ this.detachKeyListener();
150
+ }
151
+ componentDidRender() {
152
+ var _a;
153
+ if (this.pendingFocus) {
154
+ this.pendingFocus = false;
155
+ (_a = this.closeBtnEl) === null || _a === void 0 ? void 0 : _a.focus();
156
+ }
157
+ }
158
+ onOpenChange(open) {
159
+ var _a, _b, _c;
160
+ if (open) {
161
+ this.index = this.clampIndex(this.startIndex);
162
+ this.resetView();
163
+ this.preloadNeighbors();
164
+ this.attachKeyListener();
165
+ // aria-modal dialog: move focus in on open, restore it on close.
166
+ this.previouslyFocused = (_a = document.activeElement) !== null && _a !== void 0 ? _a : undefined;
167
+ this.pendingFocus = true;
168
+ }
169
+ else {
170
+ this.detachKeyListener();
171
+ (_c = (_b = this.previouslyFocused) === null || _b === void 0 ? void 0 : _b.focus) === null || _c === void 0 ? void 0 : _c.call(_b);
172
+ this.previouslyFocused = undefined;
173
+ }
174
+ }
175
+ onStartIndexChange(v) {
176
+ if (this.open) {
177
+ this.index = this.clampIndex(v);
178
+ this.resetView();
179
+ }
180
+ }
181
+ onImagesChange() {
182
+ this.index = this.clampIndex(this.index);
183
+ }
184
+ // Manual capture-phase listener (not @Listen): while the viewer is open it
185
+ // must own the keyboard — an ancestor co-drawer/co-modal also listens for
186
+ // Escape on document, and without capture + stopPropagation one keypress
187
+ // would close both (losing unsaved drawer state). Capture runs first, and
188
+ // preventDefault keeps arrows/+/- from scrolling the page behind the scrim.
189
+ attachKeyListener() {
190
+ window.addEventListener('keydown', this.handleKey, { capture: true });
191
+ }
192
+ detachKeyListener() {
193
+ window.removeEventListener('keydown', this.handleKey, { capture: true });
194
+ }
195
+ /** Minimal focus trap: Tab cycles through the viewer's own buttons. */
196
+ trapTab(e) {
197
+ var _a, _b, _c;
198
+ const focusables = Array.from((_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('button')) !== null && _b !== void 0 ? _b : []);
199
+ if (focusables.length === 0)
200
+ return;
201
+ e.preventDefault();
202
+ e.stopPropagation();
203
+ const active = (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.activeElement;
204
+ const i = focusables.indexOf(active);
205
+ const delta = e.shiftKey ? -1 : 1;
206
+ const next = focusables[(i + delta + focusables.length) % focusables.length];
207
+ next.focus();
208
+ }
209
+ clampIndex(i) {
210
+ const n = this.parsedImages.length;
211
+ if (n === 0)
212
+ return 0;
213
+ return Math.min(Math.max(0, i), n - 1);
214
+ }
215
+ resetView() {
216
+ this.scale = 1;
217
+ this.tx = 0;
218
+ this.ty = 0;
219
+ this.dragging = false;
220
+ }
221
+ goTo(delta) {
222
+ const n = this.parsedImages.length;
223
+ if (n < 2)
224
+ return;
225
+ this.index = (this.index + delta + n) % n;
226
+ this.resetView();
227
+ this.coChange.emit(this.index);
228
+ this.preloadNeighbors();
229
+ }
230
+ preloadNeighbors() {
231
+ const imgs = this.parsedImages;
232
+ if (imgs.length < 2)
233
+ return;
234
+ for (const d of [1, -1]) {
235
+ const neighbor = imgs[(this.index + d + imgs.length) % imgs.length];
236
+ if (neighbor === null || neighbor === void 0 ? void 0 : neighbor.src)
237
+ new Image().src = neighbor.src;
238
+ }
239
+ }
240
+ // ── Zoom / pan ────────────────────────────────────────────────
241
+ /** Pan is clamped so the scaled image can't be dragged fully off-stage. */
242
+ clampPan(tx, ty, scale) {
243
+ const stage = this.stageEl;
244
+ const img = this.imgEl;
245
+ if (!stage || !img)
246
+ return [tx, ty];
247
+ const maxTx = Math.max(0, (img.offsetWidth * scale - stage.clientWidth) / 2);
248
+ const maxTy = Math.max(0, (img.offsetHeight * scale - stage.clientHeight) / 2);
249
+ return [Math.min(Math.max(tx, -maxTx), maxTx), Math.min(Math.max(ty, -maxTy), maxTy)];
250
+ }
251
+ /**
252
+ * Zoom keeping the stage point (px,py — relative to the stage center) fixed:
253
+ * t' = p − (p − t)·(s'/s), with transform-origin at the center.
254
+ */
255
+ zoomAt(nextScale, px, py) {
256
+ const s = this.scale;
257
+ const ns = Math.min(Math.max(nextScale, MIN_SCALE), MAX_SCALE);
258
+ if (ns === s)
259
+ return;
260
+ const ratio = ns / s;
261
+ let tx = px - (px - this.tx) * ratio;
262
+ let ty = py - (py - this.ty) * ratio;
263
+ if (ns === MIN_SCALE) {
264
+ tx = 0;
265
+ ty = 0;
266
+ }
267
+ else {
268
+ [tx, ty] = this.clampPan(tx, ty, ns);
269
+ }
270
+ this.scale = ns;
271
+ this.tx = tx;
272
+ this.ty = ty;
273
+ }
274
+ stagePoint(e) {
275
+ var _a;
276
+ const rect = (_a = this.stageEl) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
277
+ if (!rect)
278
+ return [0, 0];
279
+ return [e.clientX - rect.left - rect.width / 2, e.clientY - rect.top - rect.height / 2];
280
+ }
281
+ render() {
282
+ const s = getLightboxStrings(this.locale);
283
+ const imgs = this.parsedImages;
284
+ const img = imgs[this.index];
285
+ const multi = imgs.length > 1;
286
+ const counter = s.counter
287
+ .replace('{i}', String(this.index + 1))
288
+ .replace('{n}', String(imgs.length));
289
+ return (h("div", { key: '7df4d99f46591697c48d3a069239811d997a4390', class: { 'co-lightbox': true, 'co-lightbox--open': this.open }, part: "overlay", role: "dialog", "aria-modal": "true", "aria-label": img === null || img === void 0 ? void 0 : img.alt, onClick: this.requestClose }, img && (h("div", { key: '2bb47942785b8273f7f3699ab74a67e101ac3eb1', class: "co-lightbox__toolbar", part: "toolbar", onClick: this.stop }, h("span", { key: 'e47844036d53ed71322c8e0cb3b4e926571f1031', class: "co-lightbox__caption", title: img.alt }, img.alt), h("div", { key: 'c7cf53faeb4f303e79316587df60b31964daa549', class: "co-lightbox__zoom" }, h("button", { key: '77b34981937a114d22670414b75d041fdd3d074e', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomOut, title: s.zoomOut, onClick: () => this.zoomAt(this.scale / WHEEL_FACTOR, 0, 0) }, h("co-icon", { key: '16ff12d54c8a3d1cd16342adb79c0baa3ada38a4', name: "minus", size: 16 })), h("button", { key: '66c850302c30966f4ab7d1b0ed1efc41651ebba8', class: "co-lightbox__btn co-lightbox__zoom-value", type: "button", "aria-label": s.zoomReset, title: s.zoomReset, onClick: () => this.resetView() }, Math.round(this.scale * 100), "%"), h("button", { key: 'd9441914db2193d661c3e5a6f1ba65fa70b6f1cf', class: "co-lightbox__btn", type: "button", "aria-label": s.zoomIn, title: s.zoomIn, onClick: () => this.zoomAt(this.scale * WHEEL_FACTOR, 0, 0) }, h("co-icon", { key: 'ace38453321e1a8e0df4bb6ffccff15906e7b8e3', name: "plus", size: 16 }))), h("button", { key: 'bb81d23f14638c2b1a134573ab2a44a848f58abe', class: "co-lightbox__btn", type: "button", "aria-label": s.openOriginal, title: s.openOriginal, onClick: this.openOriginal }, h("co-icon", { key: '42bf9277561388580d2b0797d7d732815629776f', name: "arrow-square-out", size: 16 })), h("button", { key: '500b2af225fd4692fbd472c5b6287a6d3d5f77e9', class: "co-lightbox__btn", part: "close", type: "button", "aria-label": s.close, title: s.close, ref: (el) => (this.closeBtnEl = el), onClick: this.requestClose }, h("co-icon", { key: '7141d31ad2a3e09131dd8084b669c7c3fd13b9e2', name: "x", size: 16 })))), img && (h("div", { key: '47a092023486d0ac585cf0e35a1d0a374c69fd51', class: "co-lightbox__stage", ref: (el) => (this.stageEl = el), onWheel: this.handleWheel }, h("img", { key: '3868a39927e3bfc01201e372c5c30b3dcde73562', class: {
290
+ 'co-lightbox__img': true,
291
+ 'co-lightbox__img--zoomed': this.scale > MIN_SCALE,
292
+ 'co-lightbox__img--dragging': this.dragging,
293
+ }, part: "image", ref: (el) => (this.imgEl = el), src: img.src, alt: img.alt || '', draggable: false, style: { transform: `translate(${this.tx}px, ${this.ty}px) scale(${this.scale})` }, onClick: this.stop, onDblClick: this.handleDblClick, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerUp }))), img && multi && (h("button", { key: 'b3e3dcab9fd5caeb5a56e621febfde4d0da22147', class: "co-lightbox__nav co-lightbox__nav--prev", part: "prev", type: "button", "aria-label": s.prevImage, title: s.prevImage, onClick: (e) => {
294
+ e.stopPropagation();
295
+ this.goTo(-1);
296
+ } }, h("co-icon", { key: '6dcc8cd799b4acfd1bf048600c5d3e9b97dba746', name: "caret-left", size: 24 }))), img && multi && (h("button", { key: 'a47298cf2436b35b95773cf9151e84192056caf5', class: "co-lightbox__nav co-lightbox__nav--next", part: "next", type: "button", "aria-label": s.nextImage, title: s.nextImage, onClick: (e) => {
297
+ e.stopPropagation();
298
+ this.goTo(1);
299
+ } }, h("co-icon", { key: '7efe343ba92c77e2f760bd7ea236caf325a50c1e', name: "caret-right", size: 24 }))), img && multi && (h("div", { key: '008f102eb44447b7f762c0cd4ba8c19e9fed2ee5', class: "co-lightbox__counter", part: "counter", onClick: this.stop }, counter))));
300
+ }
301
+ static get is() { return "co-lightbox"; }
302
+ static get encapsulation() { return "shadow"; }
303
+ static get originalStyleUrls() {
304
+ return {
305
+ "$": ["co-lightbox.css"]
306
+ };
307
+ }
308
+ static get styleUrls() {
309
+ return {
310
+ "$": ["co-lightbox.css"]
311
+ };
312
+ }
313
+ static get properties() {
314
+ return {
315
+ "images": {
316
+ "type": "string",
317
+ "mutable": false,
318
+ "complexType": {
319
+ "original": "string",
320
+ "resolved": "string",
321
+ "references": {}
322
+ },
323
+ "required": false,
324
+ "optional": false,
325
+ "docs": {
326
+ "tags": [],
327
+ "text": "JSON array of {@link LightboxImage} (controlled by the host)."
328
+ },
329
+ "getter": false,
330
+ "setter": false,
331
+ "reflect": false,
332
+ "attribute": "images",
333
+ "defaultValue": "'[]'"
334
+ },
335
+ "startIndex": {
336
+ "type": "number",
337
+ "mutable": false,
338
+ "complexType": {
339
+ "original": "number",
340
+ "resolved": "number",
341
+ "references": {}
342
+ },
343
+ "required": false,
344
+ "optional": false,
345
+ "docs": {
346
+ "tags": [],
347
+ "text": "Index shown when the viewer opens."
348
+ },
349
+ "getter": false,
350
+ "setter": false,
351
+ "reflect": false,
352
+ "attribute": "start-index",
353
+ "defaultValue": "0"
354
+ },
355
+ "open": {
356
+ "type": "boolean",
357
+ "mutable": true,
358
+ "complexType": {
359
+ "original": "boolean",
360
+ "resolved": "boolean",
361
+ "references": {}
362
+ },
363
+ "required": false,
364
+ "optional": false,
365
+ "docs": {
366
+ "tags": [],
367
+ "text": "Whether the viewer is visible."
368
+ },
369
+ "getter": false,
370
+ "setter": false,
371
+ "reflect": true,
372
+ "attribute": "open",
373
+ "defaultValue": "false"
374
+ },
375
+ "locale": {
376
+ "type": "string",
377
+ "mutable": false,
378
+ "complexType": {
379
+ "original": "string",
380
+ "resolved": "string | undefined",
381
+ "references": {}
382
+ },
383
+ "required": false,
384
+ "optional": true,
385
+ "docs": {
386
+ "tags": [],
387
+ "text": "BCP-47 locale for the built-in aria strings (es/en/pt)."
388
+ },
389
+ "getter": false,
390
+ "setter": false,
391
+ "reflect": false,
392
+ "attribute": "locale"
393
+ }
394
+ };
395
+ }
396
+ static get states() {
397
+ return {
398
+ "index": {},
399
+ "scale": {},
400
+ "tx": {},
401
+ "ty": {},
402
+ "dragging": {}
403
+ };
404
+ }
405
+ static get events() {
406
+ return [{
407
+ "method": "coClose",
408
+ "name": "coClose",
409
+ "bubbles": false,
410
+ "cancelable": true,
411
+ "composed": true,
412
+ "docs": {
413
+ "tags": [],
414
+ "text": "Emitted when the viewer requests to close (backdrop, X, Escape)."
415
+ },
416
+ "complexType": {
417
+ "original": "void",
418
+ "resolved": "void",
419
+ "references": {}
420
+ }
421
+ }, {
422
+ "method": "coChange",
423
+ "name": "coChange",
424
+ "bubbles": false,
425
+ "cancelable": true,
426
+ "composed": true,
427
+ "docs": {
428
+ "tags": [],
429
+ "text": "Emitted when the active image changes (prev/next/keyboard)."
430
+ },
431
+ "complexType": {
432
+ "original": "number",
433
+ "resolved": "number",
434
+ "references": {}
435
+ }
436
+ }];
437
+ }
438
+ static get elementRef() { return "el"; }
439
+ static get watchers() {
440
+ return [{
441
+ "propName": "open",
442
+ "methodName": "onOpenChange"
443
+ }, {
444
+ "propName": "startIndex",
445
+ "methodName": "onStartIndexChange"
446
+ }, {
447
+ "propName": "images",
448
+ "methodName": "onImagesChange"
449
+ }];
450
+ }
451
+ }
@@ -30,6 +30,11 @@
30
30
  background: var(--co-semantic-surface-hover);
31
31
  }
32
32
 
33
+ .co-list-item:focus-visible {
34
+ outline: none;
35
+ box-shadow: 0 0 0 2px var(--co-semantic-border-focus);
36
+ }
37
+
33
38
  .co-list-item--selected {
34
39
  background: var(--co-semantic-surface-muted);
35
40
  }
@@ -19,15 +19,25 @@ export class CoListItem {
19
19
  return;
20
20
  this.coSelect.emit();
21
21
  };
22
+ // Keyboard operable like a native option/button: Enter or Space activates it
23
+ // (Space is prevented so the page doesn't scroll).
24
+ this.handleKeyDown = (event) => {
25
+ if (this.disabled)
26
+ return;
27
+ if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') {
28
+ event.preventDefault();
29
+ this.coSelect.emit();
30
+ }
31
+ };
22
32
  }
23
33
  render() {
24
- return (h("div", { key: 'd33007d04b1c3d85465715cf0d8899f565db8a55', class: {
34
+ return (h("div", { key: 'c20c81d99d5377684e95422ef24edc7349b56d78', class: {
25
35
  'co-list-item': true,
26
36
  'co-list-item--selected': this.selected,
27
37
  'co-list-item--disabled': this.disabled,
28
38
  'co-list-item--dense': this.dense,
29
39
  'co-list-item--has-description': !!this.description,
30
- }, part: "item", role: "option", "aria-selected": this.selected ? 'true' : 'false', onClick: this.handleClick }, h("span", { key: '6c75c653a89cd7a32ec0b942e1960b71e5fa0d8f', class: "co-list-item__prefix" }, this.icon && h("co-icon", { key: 'bcfff961805fe5637a7ae21b9b81f90338a8903f', name: this.icon, size: 18 }), h("slot", { key: '271b3820399dc30e6401b679302e23b4fe02452a', name: "prefix" })), h("div", { key: '0fd1a2012e58309619586e2aaaca0020ed1acf6e', class: "co-list-item__content" }, this.label && h("span", { key: 'a0d4b2f9c0fbdbcd845839dac939bda59c3b100f', class: "co-list-item__label" }, this.label), this.description && h("span", { key: 'f674f27bf5ac21a8cb92843bf80045014d86cf2d', class: "co-list-item__description" }, this.description), h("slot", { key: 'ee35575016ff414f343255dd652d1a1cf5c01a5d' })), h("span", { key: '348369d7f90b489bf098520c5ddc5135dc6b3c37', class: "co-list-item__suffix" }, h("slot", { key: 'bed7564f82ac2198b04459d777019b7f722b22f3', name: "suffix" }))));
40
+ }, part: "item", role: "option", tabindex: this.disabled ? -1 : 0, "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("span", { key: '763f88155a5c3f29a44cfd4d49da29636c590bde', class: "co-list-item__prefix" }, this.icon && h("co-icon", { key: 'da92fc7a6b988eb204a5f3bfd267ebd79fcf1230', name: this.icon, size: 18 }), h("slot", { key: 'e00510cf206ce0f863f993bd0ad57bc6d8af2a0d', name: "prefix" })), h("div", { key: '3b5ad6d35640d57d9019e4a020effeef66b16c32', class: "co-list-item__content" }, this.label && h("span", { key: 'c745840c3b94ef786c8efd34567506eab39e969d', class: "co-list-item__label" }, this.label), this.description && h("span", { key: '0988768cf7fde689ed1e995efaefd4168ca17af0', class: "co-list-item__description" }, this.description), h("slot", { key: 'bf6c9f3d55980b433a4d858c58c799f7c3e2898e' })), h("span", { key: '6fb267f7ac2fae4b57efff3a3b6cd2b5f4161d79', class: "co-list-item__suffix" }, h("slot", { key: '9ed7454c37b83cde16a66ce990cad1cf3368e3d9', name: "suffix" }))));
31
41
  }
32
42
  static get is() { return "co-list-item"; }
33
43
  static get encapsulation() { return "shadow"; }
@@ -111,7 +111,7 @@ export class CoMenu {
111
111
  (_b = (_a = items[next]) === null || _a === void 0 ? void 0 : _a.focusItem) === null || _b === void 0 ? void 0 : _b.call(_a);
112
112
  }
113
113
  render() {
114
- return (h("co-popover", { key: 'b3c7932fb6c4574e66ddb3ccbc139ebcd86cce41', placement: this.placement, offset: this.offset, open: this.open, onCoOpen: this.handlePopoverOpen, onCoClose: this.handlePopoverClose }, h("slot", { key: 'aa6546808d38973f71d12575ac62106a4e4c2c1f', name: "trigger", slot: "trigger" }), h("div", { key: '376d8202add51e08dd9361fa4fd6d4840c1d61ce', class: "co-menu", role: "menu" }, h("slot", { key: '2e1df74c20f44e98dc51474b9009e8dc12f9b403' }))));
114
+ return (h("co-popover", { key: 'dcdcbba45a201fbd121c94fa10cfbfe9c5d3792b', placement: this.placement, offset: this.offset, open: this.open, onCoOpen: this.handlePopoverOpen, onCoClose: this.handlePopoverClose }, h("slot", { key: '44d999a9fad8f6950ded890c97b047733aff4080', name: "trigger", slot: "trigger" }), h("div", { key: 'd4ea139be0a26e84e50207f332c2e4f00126d717', class: "co-menu", role: "menu" }, h("slot", { key: 'c00f197bae58f3e8e0fe56fda4489fe7878fd995' }))));
115
115
  }
116
116
  static get is() { return "co-menu"; }
117
117
  static get encapsulation() { return "shadow"; }
@@ -5,7 +5,7 @@ import { h } from "@stencil/core";
5
5
  */
6
6
  export class CoMenuDivider {
7
7
  render() {
8
- return h("hr", { key: '50dcc97db96c79c6ce7398d627e991750a0f05ac', class: "co-menu-divider", role: "separator" });
8
+ return h("hr", { key: '6e4378c89e42bfa38073213cb7a27dfb3401f663', class: "co-menu-divider", role: "separator" });
9
9
  }
10
10
  static get is() { return "co-menu-divider"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -5,7 +5,7 @@
5
5
  .co-modal {
6
6
  display: flex;
7
7
  flex-direction: column;
8
- background: var(--co-semantic-surface-page);
8
+ background: var(--co-semantic-surface-secondary);
9
9
  border-radius: var(--co-border-radius-xl);
10
10
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
11
11
  max-width: 540px;
@@ -18,8 +18,11 @@
18
18
  transition: transform 0.2s ease, opacity 0.2s ease;
19
19
  }
20
20
 
21
+ .co-modal--sm { max-width: 400px; }
22
+ .co-modal--lg { max-width: 680px; }
23
+
21
24
  .co-modal--open {
22
- transform: translateY(0);
25
+ transform: none;
23
26
  opacity: 1;
24
27
  }
25
28
 
@@ -74,11 +77,12 @@
74
77
 
75
78
  /* ─── Body ──────────────────────────────────────────────────── */
76
79
  .co-modal__body {
77
- padding: var(--co-spacing-md) var(--co-spacing-xl);
80
+ padding: var(--co-spacing-lg) var(--co-spacing-xl);
78
81
  overflow-y: auto;
79
82
  font-size: var(--co-font-size-14);
80
83
  color: var(--co-semantic-text-secondary);
81
84
  line-height: 1.6;
85
+ border-top: 1px solid var(--co-semantic-border-default);
82
86
  }
83
87
 
84
88
  .co-modal__body:empty { display: none; }
@@ -89,6 +93,16 @@
89
93
  justify-content: flex-end;
90
94
  gap: var(--co-spacing-md);
91
95
  padding: var(--co-spacing-lg) var(--co-spacing-xl) var(--co-spacing-xl);
96
+ border-top: 1px solid var(--co-semantic-border-default);
97
+ /* Footer action buttons default to square corners (inherited by slotted
98
+ co-buttons via --co-button-radius). Override per button with shape or by
99
+ resetting --co-button-radius. */
100
+ --co-button-radius: var(--co-border-radius-xs);
92
101
  }
93
102
 
94
103
  .co-modal__footer:empty { display: none; }
104
+
105
+ /* ─── No dividers variant ───────────────────────────────────── */
106
+ .co-modal--no-dividers .co-modal__footer {
107
+ border-top: none;
108
+ }
@@ -13,6 +13,10 @@ export class CoModal {
13
13
  this.closable = true;
14
14
  /** Close when clicking the overlay backdrop */
15
15
  this.closeOnOverlay = true;
16
+ /** Modal width: sm (400px), md (540px), lg (680px) */
17
+ this.size = 'md';
18
+ /** Hide body section and all border dividers (compact confirm dialogs) */
19
+ this.noDividers = false;
16
20
  this.handleOverlayClick = () => {
17
21
  if (this.closeOnOverlay)
18
22
  this.coClose.emit();
@@ -25,7 +29,13 @@ export class CoModal {
25
29
  };
26
30
  }
27
31
  render() {
28
- return (h("co-overlay", { key: '5f3801c0c05b279dc74757dd2d8f716a539d0fb9', open: this.open, onCoClose: this.handleOverlayClick }, h("div", { key: '86805a8d5d51363231a2376ea0a5d5ec303af9fa', class: { 'co-modal': true, 'co-modal--open': this.open }, part: "modal", role: "dialog", "aria-modal": "true", "aria-labelledby": "modal-heading", onClick: this.stopPropagation }, h("div", { key: '360a11aeb0681a2b8b5a58b0b1e4cbd0e1238d4b', class: "co-modal__header", part: "header" }, h("div", { key: 'a0f9d269b62015c03e24aca95be8897aa7694cf9', class: "co-modal__header-text" }, h("h2", { key: 'd33d895a09c3653200ac2cedb914360707438d12', class: "co-modal__heading", id: "modal-heading" }, this.heading), this.description && (h("p", { key: '10ec973d66bd6d28c994eb98b444dded32cdddc2', class: "co-modal__description" }, this.description))), this.closable && (h("button", { key: '9005317d5e6a0611b2e30455ad04450393015a0d', class: "co-modal__close", type: "button", "aria-label": "Close", onClick: this.handleCloseClick }, h("co-icon", { key: '13d2f893a2d34cec9fd7dd04d61c17230af88339', name: "x", size: 20 })))), h("div", { key: 'b482deada782191e1c1c156256f18427147f87dc', class: "co-modal__body", part: "body" }, h("slot", { key: '0e33f4340bbf6ab3334b7f5034eae1394ae07871' })), h("div", { key: 'a5ab52491c22c8a5c51e00fbcafb6286e0be2b12', class: "co-modal__footer", part: "footer" }, h("slot", { key: '5f3fa7189cea7a8ff246ecd2129a79f35adee6b9', name: "footer" })))));
32
+ return (h("co-overlay", { key: '8b8d87da7d6d0cc1f8758dc85d536901c1b8e559', open: this.open, onCoClose: this.handleOverlayClick }, h("div", { key: '21406763f2a69fbb8d6deca46d06e5d470aa3238', class: {
33
+ 'co-modal': true,
34
+ 'co-modal--open': this.open,
35
+ 'co-modal--sm': this.size === 'sm',
36
+ 'co-modal--lg': this.size === 'lg',
37
+ 'co-modal--no-dividers': this.noDividers,
38
+ }, part: "modal", role: "dialog", "aria-modal": "true", "aria-labelledby": "modal-heading", onClick: this.stopPropagation }, h("div", { key: 'e0cbf1b770a791d94185500e98550de7428cf61d', class: "co-modal__header", part: "header" }, h("div", { key: '493aaaed168299eb167514dae238e218ce53b78e', class: "co-modal__header-text" }, h("h2", { key: 'de76fdc6f85420119170425b7166807c2c81df0f', class: "co-modal__heading", id: "modal-heading" }, this.heading), this.description && (h("p", { key: 'c5c0ec7113a1715c4db372b6641fcac2989ff113', class: "co-modal__description" }, this.description))), this.closable && (h("button", { key: '64bae9c3dcac4e036671d36863f419eb051a986c', class: "co-modal__close", type: "button", "aria-label": "Close", onClick: this.handleCloseClick }, h("co-icon", { key: '74fffda310bb8c09812239218f6ee0ca413be44a', name: "x", size: 20 })))), !this.noDividers && (h("div", { key: '448b9b55b2bf70b57d478938ab9bb3704d3bcf10', class: "co-modal__body", part: "body" }, h("slot", { key: '77ac168d42a68fac4dd240f2b8dfa5f2ff2ce2bc' }))), h("div", { key: 'd72a9dfdb6a8b1f5f182746eb2df3551bb27f884', class: "co-modal__footer", part: "footer" }, h("slot", { key: '97b3f2d7f2838388f80817d123a9970b159c9223', name: "footer" })))));
29
39
  }
30
40
  static get is() { return "co-modal"; }
31
41
  static get encapsulation() { return "shadow"; }
@@ -139,6 +149,46 @@ export class CoModal {
139
149
  "reflect": false,
140
150
  "attribute": "close-on-overlay",
141
151
  "defaultValue": "true"
152
+ },
153
+ "size": {
154
+ "type": "string",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "'sm' | 'md' | 'lg'",
158
+ "resolved": "\"lg\" | \"md\" | \"sm\"",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": false,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": "Modal width: sm (400px), md (540px), lg (680px)"
166
+ },
167
+ "getter": false,
168
+ "setter": false,
169
+ "reflect": true,
170
+ "attribute": "size",
171
+ "defaultValue": "'md'"
172
+ },
173
+ "noDividers": {
174
+ "type": "boolean",
175
+ "mutable": false,
176
+ "complexType": {
177
+ "original": "boolean",
178
+ "resolved": "boolean",
179
+ "references": {}
180
+ },
181
+ "required": false,
182
+ "optional": false,
183
+ "docs": {
184
+ "tags": [],
185
+ "text": "Hide body section and all border dividers (compact confirm dialogs)"
186
+ },
187
+ "getter": false,
188
+ "setter": false,
189
+ "reflect": true,
190
+ "attribute": "no-dividers",
191
+ "defaultValue": "false"
142
192
  }
143
193
  };
144
194
  }
@@ -30,7 +30,7 @@
30
30
  }
31
31
 
32
32
  .co-navbar--dark {
33
- --co-navbar-bg: var(--co-theme-navbar-bg, var(--co-color-opacity-negro-80, rgba(31,28,27,0.8)));
33
+ --co-navbar-bg: var(--co-theme-navbar-bg, var(--co-color-base-negro, #1F1C1B));
34
34
  --co-navbar-color: var(--co-theme-on-navbar, #fff);
35
35
  backdrop-filter: blur(40px);
36
36
  -webkit-backdrop-filter: blur(40px);