@mojawork/ui-docs 2.3.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 (263) hide show
  1. package/README.md +22 -0
  2. package/bin/serve.mjs +73 -0
  3. package/catalog/atoms/background.md +130 -0
  4. package/catalog/atoms/barcode.md +285 -0
  5. package/catalog/atoms/buzzer.md +210 -0
  6. package/catalog/atoms/card.md +174 -0
  7. package/catalog/atoms/chart.md +236 -0
  8. package/catalog/atoms/clock.md +252 -0
  9. package/catalog/atoms/copy-value.md +203 -0
  10. package/catalog/atoms/image-grid.md +208 -0
  11. package/catalog/atoms/image-slider.md +216 -0
  12. package/catalog/atoms/lang-selector.md +237 -0
  13. package/catalog/atoms/mosaic.md +366 -0
  14. package/catalog/atoms/placeholder.md +157 -0
  15. package/catalog/atoms/qr-code.md +334 -0
  16. package/catalog/atoms/rating.md +176 -0
  17. package/catalog/atoms/reader-doc.md +404 -0
  18. package/catalog/atoms/text-animate.md +122 -0
  19. package/catalog/atoms/thumb.md +153 -0
  20. package/catalog/atoms/timer.md +111 -0
  21. package/catalog/atoms/typewriter.md +132 -0
  22. package/catalog/cdk/splitter.md +63 -0
  23. package/catalog/cdk/table.md +188 -0
  24. package/catalog/forms/autocomplete.md +304 -0
  25. package/catalog/forms/checkbox.md +218 -0
  26. package/catalog/forms/input.md +193 -0
  27. package/catalog/forms/slider.md +142 -0
  28. package/catalog/forms/switch.md +188 -0
  29. package/catalog/guide.json +1209 -0
  30. package/catalog/layout/header.md +167 -0
  31. package/catalog/layout/main.md +158 -0
  32. package/catalog/layout/media-screen.md +163 -0
  33. package/catalog/layout/nav.md +181 -0
  34. package/catalog/layout/overlay.md +256 -0
  35. package/catalog/layout/spinner.md +94 -0
  36. package/catalog/layout/splitter.md +331 -0
  37. package/catalog/layout/tabs.md +144 -0
  38. package/catalog/layout/top-scroll-bottom.md +98 -0
  39. package/catalog/manifest.json +482 -0
  40. package/catalog/mcp.json +44 -0
  41. package/catalog/molecules/image-editor.md +285 -0
  42. package/catalog/usage.md +137 -0
  43. package/catalog/version.json +4 -0
  44. package/package.json +10 -0
  45. package/storybook/1183.da25800b.iframe.bundle.js +1 -0
  46. package/storybook/1255.2abec879.iframe.bundle.js +2 -0
  47. package/storybook/1255.2abec879.iframe.bundle.js.LICENSE.txt +5 -0
  48. package/storybook/1516.52d2dae7.iframe.bundle.js +2 -0
  49. package/storybook/1516.52d2dae7.iframe.bundle.js.LICENSE.txt +5 -0
  50. package/storybook/2033.c705a7ce.iframe.bundle.js +1 -0
  51. package/storybook/2089.32694489.iframe.bundle.js +1 -0
  52. package/storybook/2096.431fc8f5.iframe.bundle.js +1 -0
  53. package/storybook/2127.29f153d2.iframe.bundle.js +2 -0
  54. package/storybook/2127.29f153d2.iframe.bundle.js.LICENSE.txt +7 -0
  55. package/storybook/2228.77650ef1.iframe.bundle.js +2 -0
  56. package/storybook/2228.77650ef1.iframe.bundle.js.LICENSE.txt +1 -0
  57. package/storybook/2249.6e6782ab.iframe.bundle.js +1 -0
  58. package/storybook/2639.29baa8af.iframe.bundle.js +1 -0
  59. package/storybook/2844.c9f47654.iframe.bundle.js +1 -0
  60. package/storybook/2971.edb202b4.iframe.bundle.js +1 -0
  61. package/storybook/3899.55560628.iframe.bundle.js +2 -0
  62. package/storybook/3899.55560628.iframe.bundle.js.LICENSE.txt +5 -0
  63. package/storybook/3968.69b812e4.iframe.bundle.js +1 -0
  64. package/storybook/4255.eeeaf087.iframe.bundle.js +111 -0
  65. package/storybook/4255.eeeaf087.iframe.bundle.js.LICENSE.txt +49 -0
  66. package/storybook/4255.eeeaf087.iframe.bundle.js.map +1 -0
  67. package/storybook/4425.368129b3.iframe.bundle.js +2 -0
  68. package/storybook/4425.368129b3.iframe.bundle.js.LICENSE.txt +5 -0
  69. package/storybook/4476.f8e4115f.iframe.bundle.js +1 -0
  70. package/storybook/4495.d1c8cc8d.iframe.bundle.js +1 -0
  71. package/storybook/4555.066c242d.iframe.bundle.js +1 -0
  72. package/storybook/4755.e4656207.iframe.bundle.js +23 -0
  73. package/storybook/4755.e4656207.iframe.bundle.js.LICENSE.txt +14 -0
  74. package/storybook/4755.e4656207.iframe.bundle.js.map +1 -0
  75. package/storybook/4935.8959522b.iframe.bundle.js +1 -0
  76. package/storybook/5568.c6172f92.iframe.bundle.js +1 -0
  77. package/storybook/5944.810cb147.iframe.bundle.js +1 -0
  78. package/storybook/6115.7f1470ef.iframe.bundle.js +1 -0
  79. package/storybook/6169.eaeed989.iframe.bundle.js +2 -0
  80. package/storybook/6169.eaeed989.iframe.bundle.js.LICENSE.txt +5 -0
  81. package/storybook/6202.b8ca0e90.iframe.bundle.js +2 -0
  82. package/storybook/6202.b8ca0e90.iframe.bundle.js.LICENSE.txt +5 -0
  83. package/storybook/660.18f0458e.iframe.bundle.js +1 -0
  84. package/storybook/6824.f5eb8bb7.iframe.bundle.js +1 -0
  85. package/storybook/7316.5b024e94.iframe.bundle.js +1 -0
  86. package/storybook/7749.2a853795.iframe.bundle.js +1 -0
  87. package/storybook/8051.719eb790.iframe.bundle.js +1 -0
  88. package/storybook/813.805c1e5f.iframe.bundle.js +1 -0
  89. package/storybook/8448.1baeb046.iframe.bundle.js +1 -0
  90. package/storybook/871.428deceb.iframe.bundle.js +1 -0
  91. package/storybook/8819.220ca21d.iframe.bundle.js +1 -0
  92. package/storybook/9045.a50616e9.iframe.bundle.js +2 -0
  93. package/storybook/9045.a50616e9.iframe.bundle.js.LICENSE.txt +5 -0
  94. package/storybook/9560.668052f3.iframe.bundle.js +7 -0
  95. package/storybook/9560.668052f3.iframe.bundle.js.map +1 -0
  96. package/storybook/973.67f44bb0.iframe.bundle.js +1 -0
  97. package/storybook/9850.28367747.iframe.bundle.js +1 -0
  98. package/storybook/9946.36014b4e.iframe.bundle.js +1 -0
  99. package/storybook/MaterialIcons-Regular.woff2 +0 -0
  100. package/storybook/MaterialIconsOutlined-Regular.woff2 +0 -0
  101. package/storybook/PetMe64.ttf +0 -0
  102. package/storybook/_external-mwork-banner-docs-mdx.0d5549a0.iframe.bundle.js +1 -0
  103. package/storybook/_external-mwork-banner-mwork-banner-stories.d44f6917.iframe.bundle.js +1 -0
  104. package/storybook/_external-mwork-basic-interpreter-docs-mdx.03c6205c.iframe.bundle.js +1 -0
  105. package/storybook/_external-mwork-basic-interpreter-mwork-basic-interpreter-stories.3252a9b8.iframe.bundle.js +1 -0
  106. package/storybook/_external-mwork-music-player-docs-mdx.6f943768.iframe.bundle.js +1 -0
  107. package/storybook/_external-mwork-music-player-mwork-music-player-stories.08fbf651.iframe.bundle.js +1 -0
  108. package/storybook/assets/fonts/PETME64-LICENSE.txt +20 -0
  109. package/storybook/assets/fonts/PetMe64.ttf +0 -0
  110. package/storybook/assets/fonts/icons/MaterialIcons-Regular.woff2 +0 -0
  111. package/storybook/assets/fonts/icons/MaterialIconsOutlined-Regular.woff2 +0 -0
  112. package/storybook/assets/ui/documents/demo.pdf +42 -0
  113. package/storybook/assets/ui/i18n/de-DE.json +1 -0
  114. package/storybook/assets/ui/i18n/en-EN.json +2 -0
  115. package/storybook/assets/ui/i18n/ui/de-DE.json +95 -0
  116. package/storybook/assets/ui/i18n/ui/en-EN.json +95 -0
  117. package/storybook/assets/ui/images/600x600.png +0 -0
  118. package/storybook/assets/ui/images/600x800.png +0 -0
  119. package/storybook/assets/ui/images/800x600.png +0 -0
  120. package/storybook/assets/ui/images/unknown.gif +0 -0
  121. package/storybook/atoms-_electrons-form-error-message-docs-mdx.5b9e78fe.iframe.bundle.js +1 -0
  122. package/storybook/atoms-_electrons-form-error-message-form-error-message-component-stories.7f749acc.iframe.bundle.js +1 -0
  123. package/storybook/atoms-background-background-component-stories.b6b50c0c.iframe.bundle.js +1 -0
  124. package/storybook/atoms-background-docs-mdx.4f102c17.iframe.bundle.js +1 -0
  125. package/storybook/atoms-barcode-barcode-component-stories.dc462559.iframe.bundle.js +1 -0
  126. package/storybook/atoms-barcode-docs-mdx.b74c501b.iframe.bundle.js +1 -0
  127. package/storybook/atoms-buzzer-buzzer-component-stories.13ee130d.iframe.bundle.js +1 -0
  128. package/storybook/atoms-buzzer-docs-mdx.23eb1913.iframe.bundle.js +1 -0
  129. package/storybook/atoms-card-card-component-stories.065b34e9.iframe.bundle.js +1 -0
  130. package/storybook/atoms-card-docs-mdx.7d276114.iframe.bundle.js +1 -0
  131. package/storybook/atoms-chart-chart-component-stories.5247b7cb.iframe.bundle.js +1 -0
  132. package/storybook/atoms-chart-docs-mdx.204609d4.iframe.bundle.js +1 -0
  133. package/storybook/atoms-clock-clock-component-stories.d1464731.iframe.bundle.js +1 -0
  134. package/storybook/atoms-clock-docs-mdx.501e6780.iframe.bundle.js +1 -0
  135. package/storybook/atoms-copy-value-copy-value-component-stories.58d3956a.iframe.bundle.js +1 -0
  136. package/storybook/atoms-copy-value-docs-mdx.f404dcd2.iframe.bundle.js +1 -0
  137. package/storybook/atoms-image-grid-docs-mdx.18b4df2a.iframe.bundle.js +1 -0
  138. package/storybook/atoms-image-grid-image-grid-component-stories.a0a92d9e.iframe.bundle.js +1 -0
  139. package/storybook/atoms-image-slider-docs-mdx.c616bb37.iframe.bundle.js +1 -0
  140. package/storybook/atoms-image-slider-image-slider-component-stories.484b9c41.iframe.bundle.js +1 -0
  141. package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js +2 -0
  142. package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js.LICENSE.txt +5 -0
  143. package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js +2 -0
  144. package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js.LICENSE.txt +5 -0
  145. package/storybook/atoms-mosaic-docs-mdx.1aebfbdf.iframe.bundle.js +1 -0
  146. package/storybook/atoms-mosaic-mosaic-component-stories.0a6bc043.iframe.bundle.js +1 -0
  147. package/storybook/atoms-placeholder-docs-mdx.cd2f3976.iframe.bundle.js +1 -0
  148. package/storybook/atoms-placeholder-placeholder-component-stories.bc221534.iframe.bundle.js +1 -0
  149. package/storybook/atoms-qr-code-docs-mdx.4202568d.iframe.bundle.js +1 -0
  150. package/storybook/atoms-qr-code-qr-code-component-stories.5018e2b0.iframe.bundle.js +1 -0
  151. package/storybook/atoms-rating-docs-mdx.32fa4104.iframe.bundle.js +1 -0
  152. package/storybook/atoms-rating-rating-component-stories.982db47d.iframe.bundle.js +1 -0
  153. package/storybook/atoms-reader-doc-docs-mdx.0688c3b9.iframe.bundle.js +1 -0
  154. package/storybook/atoms-reader-doc-reader-doc-component-stories.a6fec57d.iframe.bundle.js +1 -0
  155. package/storybook/atoms-text-animate-docs-mdx.05e1baf4.iframe.bundle.js +1 -0
  156. package/storybook/atoms-text-animate-text-animate-component-stories.8041c0f1.iframe.bundle.js +1 -0
  157. package/storybook/atoms-thumb-docs-mdx.2143ad01.iframe.bundle.js +1 -0
  158. package/storybook/atoms-thumb-thumb-component-stories.06f51d03.iframe.bundle.js +1 -0
  159. package/storybook/atoms-timer-docs-mdx.6f724cc8.iframe.bundle.js +1 -0
  160. package/storybook/atoms-timer-timer-component-stories.9bee1037.iframe.bundle.js +1 -0
  161. package/storybook/atoms-typewriter-docs-mdx.3b1088c0.iframe.bundle.js +1 -0
  162. package/storybook/atoms-typewriter-typewriter-component-stories.4fefc019.iframe.bundle.js +1 -0
  163. package/storybook/cdk-components-drag-and-drop-splitter-docs-mdx.f12088fd.iframe.bundle.js +1 -0
  164. package/storybook/cdk-components-drag-and-drop-splitter-splitter-component-stories.286b5171.iframe.bundle.js +1 -0
  165. package/storybook/cdk-components-table-docs-mdx.cc2c11e7.iframe.bundle.js +1 -0
  166. package/storybook/cdk-components-table-table-component-stories.db9212fd.iframe.bundle.js +1 -0
  167. package/storybook/examples-burger-menu-stories.0a083a75.iframe.bundle.js +1 -0
  168. package/storybook/examples-docs-mdx.3111f2c6.iframe.bundle.js +1 -0
  169. package/storybook/examples-image-grid-slider-docs-mdx.9e38157e.iframe.bundle.js +1 -0
  170. package/storybook/examples-image-grid-slider-image-grid-slider-stories.028c8c2b.iframe.bundle.js +1 -0
  171. package/storybook/examples-layout-docs-mdx.bbacdfd2.iframe.bundle.js +1 -0
  172. package/storybook/examples-layout-layout-stories.05cd891f.iframe.bundle.js +1 -0
  173. package/storybook/examples-table-edit-focus-docs-mdx.3c0d1611.iframe.bundle.js +1 -0
  174. package/storybook/examples-table-edit-focus-table-edit-focus-stories.c79e214a.iframe.bundle.js +1 -0
  175. package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js +2 -0
  176. package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js.LICENSE.txt +5 -0
  177. package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js +2 -0
  178. package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js.LICENSE.txt +5 -0
  179. package/storybook/favicon-wrapper.svg +46 -0
  180. package/storybook/favicon.svg +1 -0
  181. package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js +2 -0
  182. package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js.LICENSE.txt +5 -0
  183. package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js +2 -0
  184. package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js.LICENSE.txt +5 -0
  185. package/storybook/forms-autofocus-autofocus-stories.2e94d887.iframe.bundle.js +1 -0
  186. package/storybook/forms-autofocus-docs-mdx.39611362.iframe.bundle.js +1 -0
  187. package/storybook/forms-checkbox-checkbox-component-stories.d45b4f0d.iframe.bundle.js +1 -0
  188. package/storybook/forms-checkbox-docs-mdx.74036eb7.iframe.bundle.js +1 -0
  189. package/storybook/forms-input-docs-mdx.72d0e99a.iframe.bundle.js +1 -0
  190. package/storybook/forms-input-input-component-stories.609db3f0.iframe.bundle.js +1 -0
  191. package/storybook/forms-slider-docs-mdx.120cefc6.iframe.bundle.js +1 -0
  192. package/storybook/forms-slider-slider-component-stories.058fb9b1.iframe.bundle.js +1 -0
  193. package/storybook/forms-switch-docs-mdx.9d58a341.iframe.bundle.js +1 -0
  194. package/storybook/forms-switch-switch-component-stories.bf67d7c9.iframe.bundle.js +1 -0
  195. package/storybook/forms-validators-docs-mdx.ebb47a43.iframe.bundle.js +1 -0
  196. package/storybook/forms-validators-validators-component-stories.9525f97b.iframe.bundle.js +1 -0
  197. package/storybook/home-guide-mdx.1a176b15.iframe.bundle.js +1 -0
  198. package/storybook/home-overview-mdx.d0cf448a.iframe.bundle.js +1 -0
  199. package/storybook/home-tips-mdx.26df81d8.iframe.bundle.js +1 -0
  200. package/storybook/home-usage-mdx.7ba89dd0.iframe.bundle.js +1 -0
  201. package/storybook/iframe.html +558 -0
  202. package/storybook/index.html +155 -0
  203. package/storybook/index.json +1 -0
  204. package/storybook/layout-main-docs-mdx.4c9208c5.iframe.bundle.js +1 -0
  205. package/storybook/layout-main-main-component-stories.788c0c54.iframe.bundle.js +1 -0
  206. package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js +2 -0
  207. package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js.LICENSE.txt +5 -0
  208. package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js +2 -0
  209. package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js.LICENSE.txt +5 -0
  210. package/storybook/layout-nav-docs-mdx.cc919f94.iframe.bundle.js +1 -0
  211. package/storybook/layout-nav-nav-component-stories.766738fc.iframe.bundle.js +1 -0
  212. package/storybook/layout-overlay-docs-mdx.823351e0.iframe.bundle.js +1 -0
  213. package/storybook/layout-overlay-header-docs-mdx.394033ca.iframe.bundle.js +1 -0
  214. package/storybook/layout-overlay-header-header-component-stories.5eaef192.iframe.bundle.js +1 -0
  215. package/storybook/layout-overlay-overlay-component-stories.01f6cd84.iframe.bundle.js +1 -0
  216. package/storybook/layout-spinner-docs-mdx.4be572c0.iframe.bundle.js +1 -0
  217. package/storybook/layout-spinner-spinner-component-stories.ab8245c6.iframe.bundle.js +1 -0
  218. package/storybook/layout-splitter-docs-mdx.bf161b39.iframe.bundle.js +1 -0
  219. package/storybook/layout-splitter-splitter-component-stories.46b8b112.iframe.bundle.js +1 -0
  220. package/storybook/layout-tabs-docs-mdx.89d83606.iframe.bundle.js +1 -0
  221. package/storybook/layout-tabs-tabs-component-stories.8602cefa.iframe.bundle.js +1 -0
  222. package/storybook/layout-top-scroll-bottom-docs-mdx.ddc061f8.iframe.bundle.js +1 -0
  223. package/storybook/layout-top-scroll-bottom-top-scroll-bottom-component-stories.9ee7055f.iframe.bundle.js +1 -0
  224. package/storybook/main.2d116a57.iframe.bundle.js +1 -0
  225. package/storybook/main.a402659c6a0734088d14.css +2101 -0
  226. package/storybook/mocker-runtime-injected.js +1 -0
  227. package/storybook/molecules-image-editor-docs-mdx.119ea12a.iframe.bundle.js +1 -0
  228. package/storybook/molecules-image-editor-image-editor-component-stories.56467f17.iframe.bundle.js +1 -0
  229. package/storybook/nunito-sans-bold-italic.woff2 +0 -0
  230. package/storybook/nunito-sans-bold.woff2 +0 -0
  231. package/storybook/nunito-sans-italic.woff2 +0 -0
  232. package/storybook/nunito-sans-regular.woff2 +0 -0
  233. package/storybook/project.json +1 -0
  234. package/storybook/runtime~main.a9b8ab83.iframe.bundle.js +1 -0
  235. package/storybook/sb-addons/docs-1/manager-bundle.js +3 -0
  236. package/storybook/sb-addons/libs-ui-storybook-2/manager-bundle.js +3 -0
  237. package/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +630 -0
  238. package/storybook/sb-common-assets/favicon-wrapper.svg +46 -0
  239. package/storybook/sb-common-assets/favicon.svg +1 -0
  240. package/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  241. package/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  242. package/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  243. package/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  244. package/storybook/sb-manager/globals-runtime.js +76714 -0
  245. package/storybook/sb-manager/globals.js +24 -0
  246. package/storybook/sb-manager/manager-stores.js +23 -0
  247. package/storybook/sb-manager/runtime.js +27451 -0
  248. package/storybook/sb-preview/globals.js +20 -0
  249. package/storybook/sb-preview/runtime.js +35491 -0
  250. package/storybook/styling-colors-colors-component-stories.58031f40.iframe.bundle.js +1 -0
  251. package/storybook/styling-colors-docs-mdx.95c504e4.iframe.bundle.js +1 -0
  252. package/storybook/styling-css-variables-docs-mdx.48afb4f3.iframe.bundle.js +1 -0
  253. package/storybook/styling-forms-docs-mdx.943e72f2.iframe.bundle.js +1 -0
  254. package/storybook/styling-forms-forms-component-stories.8af76278.iframe.bundle.js +1 -0
  255. package/storybook/styling-icons-docs-mdx.e1001dfd.iframe.bundle.js +1 -0
  256. package/storybook/styling-icons-icons-component-stories.2dd8c6f8.iframe.bundle.js +1 -0
  257. package/storybook/styling-layers-docs-mdx.5039dc45.iframe.bundle.js +1 -0
  258. package/storybook/styling-tags-docs-mdx.23ab2316.iframe.bundle.js +1 -0
  259. package/storybook/styling-tags-tags-component-stories.7a64bd20.iframe.bundle.js +1 -0
  260. package/storybook/styling-ui-tags-docs-mdx.8f75631d.iframe.bundle.js +1 -0
  261. package/storybook/styling-ui-tags-ui-tags-component-stories.2ec3109b.iframe.bundle.js +1 -0
  262. package/storybook/version.json +4 -0
  263. package/version.json +4 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3146],{"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/image-grid/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_image_grid_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_image_grid_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-image-grid.json");function _createMdxContent(props){const _components={a:"a",code:"code",em:"em",h3:"h3",h4:"h4",h5:"h5",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_image_grid_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"atoms-image-grid",children:"Atoms: Image Grid"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiImageGridComponent"})," is a versatile and responsive grid-based image display component. It allows for dynamic configuration of columns, gaps, and heights, making it suitable for galleries, portfolios, or any grouped image presentation."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Lays pictures out in a fixed number of columns, with a gap, a height and an\noptional overlay per tile, and reports which tile is selected or clicked. It\nshares an index with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-image-slider"})," (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"setIndex"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"currentIndex"}),") so grid and\nslider can point at the same picture. It opens nothing itself: a click emits\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clickIndex"}),", and what follows — a slider in zoom, a route — is the host's\ndecision. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," must be set; the default ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"0"})," draws no columns."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-image-grid",entry:_guide_ui_image_grid_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"image-grid",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/atoms-image-grid--image-grid",children:"Image Grid"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"features",children:"Features"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Responsive Grid"}),": Automatically adjusts to its container and supports configurable column counts."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Lazy Loading Support"}),": Integrated ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"loaded"})," state to manage image rendering."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Interactive Overlays"}),": Supports different overlay types (e.g., 'default', 'doors') for enhanced user interaction."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Click Area"}),": An ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<ng-template uiImageGridClickArea>"})," projected into the tag is stamped into every tile as the active tile's overlay — with the tile's item and index as context."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Action Mode"}),": Enable interactive selection with event emitting for current and clicked indices."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Dynamic Styling"}),": Configure gap, height, and image scaling per item."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"inputs",children:"Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"@Input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"data"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiImageDisplayItemDataType[] | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Array of image objects containing source, alt text, and scaling info."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"cols"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"0"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Number of columns in the grid. The default ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"0"})," renders no columns — always set it."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"gap"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"0"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Gap between grid items in pixels."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"height"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"undefined"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Height of the grid container. If ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"singleRow"})," is false, this is the total height. If ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"singleRow"})," is true, this value is divided by ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"cols"})," to determine the row height. Falls back to 200px when no height is given."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"singleRow"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["If true, the grid renders as a single row with horizontal scrolling. The row height is calculated as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"height / cols"}),"."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"setIndex"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"0"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Programmatically set the active/scrolled-to image index."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"action"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Enables click interactions and active state highlighting."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"loaded"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Flag to trigger image rendering (useful for deferred loading). While it is false, every tile shows its title instead of its picture — the same branch a tile without a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"src"}),' falls into, see "A tile without a picture".']})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"overlayType"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'default' | 'doors'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'default'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Visual style of the hover/active overlay."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"debug"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Shows internal state information (cols, indices, src) for debugging."})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"a-tile-without-a-picture",children:"A tile without a picture"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A tile without a source draws ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"no image at all"}),": it shows an icon with the\nitem's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"title"})," underneath, gets the modifier class ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"._-no-image"}),", and is left\nout of the click area. Nothing is broken — this is what the component does\nwhen it has nothing to show."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["In the story above, the fourth tile is that case, and it says so: the entry\ncarries the title ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:'"no image on purpose"'}),". Give it whatever wording fits your\ncase — the component supplies the space, never the words."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Two things worth knowing about that state:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["It is the same branch as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"loaded: false"}),"."]})," Turn ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"loaded"})," off and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:"every"}),'\ntile shows its title. The component does not distinguish "not there yet" from\n"not there at all" — both mean "no picture to draw", and both look the same.']}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"The grid pads to a square."})," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"gridColsInternal"})," squares the column count,\nso a data set that does not fill the last row leaves empty tiles behind. With\nthe story's 25 items that is 49 tiles: 24 of them carry no data and render as\nthe same empty state."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"grid-logic",children:"Grid Logic"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The component uses internal computed signals to determine the grid layout and height."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h5,{id:"column-calculation-gridcolsinternal",children:["Column Calculation (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"gridColsInternal"}),")"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The number of columns is determined by the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," input and the total number of items (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"dataCount"}),"):"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["If ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"dataCount / cols > cols"}),', the grid becomes "square-ish" or expands to fit items, calculating columns as ',(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"Math.ceil(dataCount / cols)"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["Otherwise, it uses the fixed ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," value provided."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["With ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," at ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"0"})," (the default) no expansion happens and the grid gets zero columns — a column count is part of using the component."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h5,{id:"height-calculation-scrollerheight",children:["Height Calculation (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"scrollerHeight"}),")"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The height of the grid container is dynamically calculated:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["Standard Mode (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"singleRow"})," is false)"]}),": Uses the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height"})," input value in pixels. Falls back to ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"200px"})," when no ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height"})," is given."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["Single Row Mode (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"singleRow"})," is true)"]}),": The height is calculated as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height / cols"})," (both must be set; otherwise the same ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height"}),"-or-",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"200px"})," fallback applies). This ensures that even in a horizontal scroll scenario, the items maintain a consistent aspect ratio based on the intended column count."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"outputs",children:"Outputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"@Output"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"currentIndex"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"output<number>"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Emitted when a new item becomes active or is clicked."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"clickIndex"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"output<number>"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Emitted when an already active item is clicked (only when a click-area template is projected)."})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"the-click-area",children:"The click area"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The overlay that appears on the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"active"})," tile, and whose second click\nemits ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clickIndex"}),". It is an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<ng-template uiImageGridClickArea>"})," projected\ninto the tag: the grid stamps it into every tile, so everything Angular can\ndo inside a template works here — bindings, pipes, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"(click)"})," handlers — and\nthe template is handed the tile's item (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"let-item"}),") and index\n(",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'let-index="index"'}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A template rather than projected content, because content can be projected\nonce and the grid needs the area in every tile. It used to clone a projected\nelement's innerHTML per tile, which ran the markup through the sanitizer and\nleft a dead copy without events; a stamped template keeps all of that alive."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The marker is the directive ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiImageGridClickAreaDirective"})," — import it next\nto the grid. It is a marker and nothing else, so the grid finds the click\narea by name rather than taking the first template it meets; a caller may\nproject other templates (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"*ngIf"}),", a structural directive of their own)\nwithout one of those ending up in every tile."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-image-grid [data]="myData" [action]="true" (clickIndex)="open($event)">\n <ng-template uiImageGridClickArea let-item let-index="index">\n <div class="my-overlay">{{ index + 1 }}: {{ item.title }}</div>\n </ng-template>\n</ui-image-grid>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"sizing",children:"Sizing"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The host fills its container (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"100%"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"100%"}),") by default. Give it a fixed size\nwithout a cascade fight through the named hooks ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-image-grid-width"})," and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-image-grid-height"}),"."]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[8039],{"./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>UiImageGridClickAreaDirective});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs");let UiImageGridClickAreaDirective=class UiImageGridClickAreaDirective{template=(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.WQX)(_angular_core__WEBPACK_IMPORTED_MODULE_1__.C4Q);static ngTemplateContextGuard(_directive,_context){return!0}};UiImageGridClickAreaDirective=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_1__.WLR)({selector:"ng-template[uiImageGridClickArea]"})],UiImageGridClickAreaDirective)},"./libs/ui/src/lib/atoms/image-grid/image-grid.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>UiImageGridComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_grid_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid.component.css?ngResource"),image_grid_componentngResource_default=__webpack_require__.n(image_grid_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),resize_signal=__webpack_require__("./libs/ui/src/lib/helpers/resize-signal.ts"),image_grid_click_area_directive=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts");let UiImageGridComponent=class UiImageGridComponent{get scrollerHeightValue(){return this.scrollerHeight()}scroller;imageContainer;clickArea=(0,core.contentChild)(image_grid_click_area_directive.u,{read:_debug_node_chunk.C4Q});resizeEvent=(0,resize_signal.H)();data=(0,core.input)(null);dataCount=(0,_resource_chunk.EW)(()=>this.data()?.length??0);dataCountItems=(0,_effect_chunk2.vPA)([0]);debug=(0,core.input)(!1);singleRow=(0,core.input)(!1);gap=(0,core.input)(0);overlayType=(0,core.input)("default");overlayTypeClass=(0,_resource_chunk.EW)(()=>`_-${this.overlayType()}`);cols=(0,core.input)(0);height=(0,core.input)();action=(0,core.input)(!1);loaded=(0,core.input)(!1);setIndex=(0,core.input)(0);currentIndex=(0,core.output)();clickIndex=(0,core.output)();scrollerHeight=(0,_resource_chunk.EW)(()=>{const height=this.height(),cols=this.cols();return this.singleRow()&&height&&cols?height/cols+"px":height?`${height}px`:"200px"});gridColsInternal=(0,_resource_chunk.EW)(()=>{const counter=this.cols();return 0!==counter&&this.dataCount()/counter>counter?Math.ceil(this.dataCount()/counter):counter});active=(0,_effect_chunk2.vPA)(null);hideDisplay=(0,_effect_chunk2.vPA)(!0);clickAreaExist=(0,_resource_chunk.EW)(()=>void 0!==this.clickArea());constructor(){(0,_effect_chunk2.QZP)(()=>{this.gap(),this.height(),this.cols(),this.resizeEvent(),this.updateGrid()}),(0,_effect_chunk2.QZP)(()=>{this.setIndex(),this.scrollToChild(this.setIndex()),this.active.set(this.setIndex())}),(0,_effect_chunk2.QZP)(()=>{this.action(),this.active.set(null)})}ngAfterViewInit(){this.active.set(this.setIndex()),this.updateGrid(),this.fader()}clickAreaContext(index){const item=this.data()?.[index];return item?{$implicit:item,index}:null}updateGrid(){const scroller=this.scroller?.nativeElement;scroller&&(scroller.style.height=this.scrollerHeight());const element=this.imageContainer?.nativeElement;if(element&&this.dataCount()){const gap=this.gap();this.dataCountItems.set(Array.from({length:this.gridColsInternal()*this.gridColsInternal()},(_,index)=>index+1));const repeatCount=this.singleRow()?this.dataCount():this.gridColsInternal();setTimeout(()=>{element.style.display="grid",element.style.gap=`${gap}px`,element.style.gridTemplateColumns=`repeat(${repeatCount}, 1fr)`,this.applyStylesToChildren()},100)}}calculateGridSize(containerSize){const adjustedSize=containerSize/this.cols()-this.gap();return Math.ceil(adjustedSize)}applyStylesToChildren(){const element=this.imageContainer?.nativeElement;if(element){const width=this.calculateGridSize(element.offsetWidth??0),height=this.singleRow()?element.offsetHeight:this.calculateGridSize(element.offsetHeight??0),applyChildStyles=child=>{child.style.height=`${height}px`,child.style.width=`${width}px`};element.childNodes.forEach(child=>{child instanceof HTMLElement&&applyChildStyles(child)})}}fader(){this.hideDisplay.set(!0),setTimeout(()=>{this.hideDisplay.set(!1)},800)}scrollToChild(index){const containerElement=this.imageContainer?.nativeElement;if(!containerElement)return;const targetChild=containerElement.childNodes[index];if(!(targetChild instanceof HTMLElement))return;const scrollOffset=this.calculateScrollOffset(containerElement,targetChild);this.scroller?.nativeElement.scrollTo({left:scrollOffset,top:0})}calculateScrollOffset(container,child){return child.offsetLeft-container.offsetWidth/2+child.offsetWidth/2}useAction(index){this.action()&&this.imageSrc(index)&&(this.clickAreaExist()&&this.active()===index&&this.clickIndex.emit(index),this.currentIndex.emit(index),this.active.set(index),this.scrollToChild(index))}scale(index){const value=this.data()?.[index]?.src.scale;return`transform: scale(${value??1})`}imageSrc(index){return this.data()?.[index]?.src.default}imageAlt(index){return this.data()?.[index]?.alt}imageTitle(index){return this.data()?.[index]?.title}static ctorParameters=()=>[];static propDecorators={scrollerHeightValue:[{type:_debug_node_chunk.g$6,args:["style.height"]}],scroller:[{type:core.ViewChild,args:["scroller"]}],imageContainer:[{type:core.ViewChild,args:["imageContainer"]}],clickArea:[{type:core.ContentChild,args:[image_grid_click_area_directive.u,{read:_debug_node_chunk.C4Q,isSignal:!0}]}],data:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"data",required:!1,transform:void 0}]}],debug:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"debug",required:!1,transform:void 0}]}],singleRow:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"singleRow",required:!1,transform:void 0}]}],gap:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"gap",required:!1,transform:void 0}]}],overlayType:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"overlayType",required:!1,transform:void 0}]}],cols:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"cols",required:!1,transform:void 0}]}],height:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"height",required:!1,transform:void 0}]}],action:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"action",required:!1,transform:void 0}]}],loaded:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"loaded",required:!1,transform:void 0}]}],setIndex:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"setIndex",required:!1,transform:void 0}]}],currentIndex:[{type:_debug_node_chunk.k7i,args:["currentIndex"]}],clickIndex:[{type:_debug_node_chunk.k7i,args:["clickIndex"]}]}};UiImageGridComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-image-grid",template:'@if (data()) {\n <div class="_scroller" #scroller>\n <div\n #imageContainer\n class="_image-container"\n [class._-hide-display]="hideDisplay()"\n >\n @for (item of dataCountItems(); track item; let i = $index) {\n <button\n class="_wrapper"\n [class._-action]="action() && imageSrc(i)"\n [class._-active]="active() === i"\n [class._-no-image]="!imageSrc(i)"\n [class]="overlayTypeClass()"\n (click)="useAction(i)"\n >\n @if (debug()) {\n dataCount: {{ this.dataCount() }} <br />\n internalCounter: {{ this.gridColsInternal() }} <br />\n counter: {{ this.cols() }} <br />\n src: {{ imageSrc(i) }}\n } @else {\n @if (imageSrc(i) && loaded()) {\n <figure>\n <img\n [style]="scale(i)"\n [src]="imageSrc(i)"\n [alt]="imageAlt(i)"\n [title]="imageTitle(i)"\n />\n </figure>\n @if (clickArea(); as template) {\n <div class="_click-area">\n <ng-container\n *ngTemplateOutlet="template; context: clickAreaContext(i)"\n ></ng-container>\n </div>\n }\n } @else {\n \x3c!-- No picture: the same shape the image editor uses — icon\n centred, whatever title the item carries underneath. No\n stand-in text: an empty title is the caller\'s business. --\x3e\n <div class="_empty">\n <span class="ui-icon x3" aria-hidden="true">image</span>\n <strong>{{ imageTitle(i) }}</strong>\n </div>\n }\n }\n </button>\n }\n </div>\n </div>\n}\n',imports:[_common_module_chunk.T3],styles:[image_grid_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiImageGridComponent)},"./libs/ui/src/lib/atoms/image-grid/image-grid.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ImageGrid:()=>ImageGrid,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _angular_forms__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),_storybook_angular__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),_image_mock__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/atoms/image.mock.ts"),_image_grid_click_area_directive__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts"),_image_grid_component__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Atoms/Image Grid",component:_image_grid_component__WEBPACK_IMPORTED_MODULE_5__.p,decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_1__.Iz)({providers:[_angular_forms__WEBPACK_IMPORTED_MODULE_0__.vS],imports:[_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_2__.b,_angular_forms__WEBPACK_IMPORTED_MODULE_0__.YN,_image_grid_component__WEBPACK_IMPORTED_MODULE_5__.p,_image_grid_click_area_directive__WEBPACK_IMPORTED_MODULE_4__.u]})],argTypes:{cols:{control:{type:"range",min:1,max:16,step:1}},gap:{control:{type:"range",min:0,max:64,step:1}},height:{control:{type:"range",min:100,max:1e3,step:10}},setIndex:{control:{type:"range",min:0,max:24,step:1}},action:{control:"boolean"},loaded:{control:"boolean"},singleRow:{control:"boolean"},overlayType:{control:"select",options:["default","doors"]},currentIndex:{table:{disable:!0}},clickIndex:{table:{disable:!0}},data:{control:"object"}},parameters:{docs:{canvas:{sourceState:"none"},source:{code:null}}},args:{cols:4,gap:4,height:520,setIndex:0,action:!0,loaded:!0,singleRow:!1,overlayType:"default",data:(0,_image_mock__WEBPACK_IMPORTED_MODULE_3__.W)()}},ImageGrid={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-image-grid\n [setIndex]="setIndex"\n (currentIndex)="currentIndex=$event"\n (clickIndex)="clickIndex=$event"\n [data]="data"\n [action]="action"\n [height]="height"\n [singleRow]="singleRow"\n [loaded]="loaded"\n [cols]="cols"\n [gap]="gap"\n [overlayType]="overlayType">\n <ng-template uiImageGridClickArea let-item let-index="index">\n <div class="bg-c-background p-2">{{ index + 1 }}: {{ item.title }}</div>\n </ng-template>\n </ui-image-grid>\n </section>\n '})},__namedExportsOrder=["ImageGrid"];ImageGrid.parameters={...ImageGrid.parameters,docs:{...ImageGrid.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-image-grid\n [setIndex]="setIndex"\n (currentIndex)="currentIndex=$event"\n (clickIndex)="clickIndex=$event"\n [data]="data"\n [action]="action"\n [height]="height"\n [singleRow]="singleRow"\n [loaded]="loaded"\n [cols]="cols"\n [gap]="gap"\n [overlayType]="overlayType">\n <ng-template uiImageGridClickArea let-item let-index="index">\n <div class="bg-c-background p-2">{{ index + 1 }}: {{ item.title }}</div>\n </ng-template>\n </ui-image-grid>\n </section>\n `\n };\n }\n}',...ImageGrid.parameters?.docs?.source}}}},"./libs/ui/src/lib/atoms/image-grid/image-grid.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n:host {\n z-index: 0;\n --wrapper-height: 60rem;\n --button-size: 4rem;\n display: flex;\n /* Fills its container by default; the named hooks let a consumer set a fixed\n size without a cascade fight (tickets#241, tickets#251). */\n width: var(--ui-image-grid-width, 100%);\n height: var(--ui-image-grid-height, 100%);\n border-radius: calc(var(--ui-border-width) * 4);\n\n ._scroller {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n width: 100%;\n height: 100%;\n overflow-y: hidden;\n overflow-x: scroll;\n background-color: var(--ui-c-background);\n scroll-behavior: smooth;\n }\n\n ._image-container {\n position: absolute;\n top: 0;\n left: 0;\n display: grid;\n width: 100%;\n height: 100%;\n transition: opacity calc(var(--ui-time) * 0.1) linear;\n\n &._-hide-display {\n opacity: 0;\n }\n\n button._wrapper {\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n gap: calc(var(--ui-spacer) * 0.5);\n align-items: center;\n justify-content: center;\n overflow: hidden;\n transition: scale calc(var(--ui-time) * 0.5) ease-in-out;\n background-color: var(--ui-c-fourthly);\n border: 0;\n\n &._-no-image {\n cursor: default;\n opacity: 0.5;\n }\n\n /* The empty state, same arrangement as the image editor's: icon above,\n title below, both dimmed. */\n ._empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: calc(var(--ui-spacer) * 0.25);\n }\n\n &._-default {\n &:not(._-action) {\n cursor: default;\n }\n\n &._-active {\n border: 0.32rem solid var(--ui-c-focus);\n\n img {\n transform: scale(1.1) !important;\n }\n }\n\n &._-action:hover {\n img {\n transform: scale(1.1) !important;\n }\n }\n }\n\n &._-doors {\n &._-active {\n border: 0.32rem solid var(--ui-c-focus);\n }\n\n &._-action:hover {\n img {\n transform: scale(1.1) !important;\n }\n }\n\n &::after,\n &::before {\n z-index: 1;\n content: '\\00a0';\n position: absolute;\n left: 0;\n display: flex;\n height: 100%;\n width: 100%;\n background-color: var(--ui-c-background);\n transition: var(--ui-time) ease-in-out;\n opacity: 0.6;\n }\n\n &::before {\n top: -50%;\n z-index: 1;\n }\n\n &::after {\n top: 50%;\n }\n\n &._-active::before {\n opacity: 0;\n top: -100%;\n }\n\n &._-active::after {\n opacity: 0;\n top: 100%;\n }\n }\n\n figure {\n position: relative;\n display: flex;\n flex-flow: column;\n justify-content: center;\n align-items: center;\n padding: 0;\n\n img {\n width: auto;\n max-width: initial;\n aspect-ratio: auto;\n transition: transform calc(var(--ui-time) * 0.5) ease-in-out;\n -webkit-user-select: none;\n user-select: none;\n }\n }\n\n ._click-area {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: var(--ui-time) ease-in-out;\n }\n\n &._-active {\n ._click-area {\n opacity: 1;\n }\n }\n }\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[1461,7947],{"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/image-slider/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_image_slider_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/image-slider/image-slider.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_image_slider_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-image-slider.json");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",h5:"h5",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_image_slider_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"molecules-image-slider",children:"Molecules: Image Slider"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiImageSliderComponent"})," is a highly configurable and interactive image slider. It supports various navigation methods (touch, mouse, buttons), dynamic zooming, and responsive height adjustments."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Shows one picture of a set at a time and moves between them — touch swipe with\nnative momentum and snap, mouse drag, buttons, and a zoom mode that closes on a\ndrag down. It reads and writes an index (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"setIndex"})," in, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"currentIndex"})," out) so\nanother component can share the selection. It does not load, sort or describe\nthe pictures, and it is not the overview of a set — that is ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-image-grid"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-image-slider",entry:_guide_ui_image_slider_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"image-slider",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/atoms-image-slider--image-slider",children:"Image Slider"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"features",children:"Features"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Photos-App Gestures"}),": Native touch swipe with finger-follow, momentum and snapping; mouse drag with rubber-banding; swipe-down-to-close in zoom mode."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Dynamic Zoom"}),": Built-in zoom functionality with host-level class application for styling."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Lazy Loading & Preloading"}),": Efficient image handling with preloading support."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Responsive Sizing"}),": Configurable height via CSS variables, adapting to its container."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Full-Screen Capability"}),": Easily integrates with overlays for a full-screen viewing experience."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"gestures",children:"Gestures"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The slider uses the platform scroller (CSS scroll-snap) for touch, so\nfinger-follow, momentum and snapping feel native; a pointer layer adds the\ndesktop and dismiss gestures on top."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"To try them"}),", open the story and switch the browser dev tools to touch\nemulation, then swipe horizontally (finger-follow with snap). On desktop, drag\nwith the mouse — it rubber-bands at the ends, and a flick advances one slide.\nIn zoom mode, drag downwards to close."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Gesture"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Action"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Horizontal swipe"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Touch"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Image follows the finger; native momentum and snap; exactly one slide per\ngesture (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"scroll-snap-stop: always"}),"); rubber-banding at the\nends on iOS."]})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Horizontal drag"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Mouse (primary button)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Image follows the pointer, snapping suspended; past the ends the grid\nrubber-bands with resistance; a flick (> 0.5 px/ms) advances one\nslide, a slow release settles on the nearest slide; the trailing ghost\nclick is swallowed."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Swipe down"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Touch or mouse, zoom mode only"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The view follows the pointer, shrinking and fading; beyond 120 px (or\na quick downward flick) it slides out and closes, otherwise it springs\nback."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Keys"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Keyboard, zoom mode only"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"ArrowLeft"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"ArrowRight"})," navigate, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"Home"}),"\n/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"End"})," jump to the first/last slide, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"Escape"})," closes\nthe zoom."]})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Buttons"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Any"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"First/previous/next/last controls below the slider (hidden in single-item\nmode)."})})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"inputs",children:"Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Everything except ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"data"})," is a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["two-way ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"model()"})]})," — bindable with\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[(...)]"}),", readable and writable from outside. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"data"})," is a plain one-way\ninput."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"data"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiImageDisplayItemDataType[] | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Array of image objects to be displayed in the slider."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"display"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"true"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Controls the visibility of navigation elements."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"height"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'30rem'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Defines the height of the slider images."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"setIndex"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"number | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Programmatically sets the active image index."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"onlyOneItem"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"number | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"If set, restricts the view to a single item and hides navigation."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"zoom"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Enables or disables the zoom mode."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"dataModel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiImageDisplayItemDataType[]"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"[]"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The working copy the slider actually shows, derived from"," ","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"data"})," and possibly narrowed by ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"onlyOneItem"})," —\nusually it is left alone, since setting it directly bypasses the\nfiltering that fills it."]})})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h5,{id:"outputs",children:"Outputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"@Output"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"currentIndex"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"output<number>"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Emitted when the slider moves to a new image."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"currentZoom"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"output<boolean>"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Emitted when the zoom state changes."})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"usage"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-image-slider\n [data]="images"\n [height]="\'400px\'"\n (currentIndex)="onImageChange($event)"\n>\n</ui-image-slider>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"sizing",children:"Sizing"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The host fills its container (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"100%"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"100%"}),") by default. Give it a fixed size\nwithout a cascade fight through the named hooks ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-image-slider-width"})," and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-image-slider-height"}),"."]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/image-slider/image-slider.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ImageSlider:()=>ImageSlider,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),_image_mock__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/src/lib/atoms/image.mock.ts"),_image_slider_component__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/atoms/image-slider/image-slider.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Atoms/Image Slider",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({providers:[],imports:[_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_1__.b,_image_slider_component__WEBPACK_IMPORTED_MODULE_3__.u]})],parameters:{docs:{description:{component:"Horizontal image slider with Photos-app style gestures.\n\n**Touch swipe** — the slides live in a native scroll-snap container: the image\nfollows the finger, momentum and snapping come from the platform (with real\nrubber-banding on iOS) and each gesture advances exactly one slide\n(`scroll-snap-stop: always`).\n\n**Mouse drag** — on desktop the image can be dragged with the primary mouse\nbutton. Snapping is suspended while dragging, the ends rubber-band with\nresistance, and on release a flick (> 0.5 px/ms) advances a slide while a slow\nrelease settles on the nearest one.\n\n**Swipe down to close** — in zoom mode a downward drag (touch or mouse) moves\nthe whole view with the pointer, shrinking and fading it; past 120 px or a\nquick flick it closes, otherwise it springs back.\n\n**Keyboard** (zoom mode) — Arrow keys navigate, Home/End jump, Escape closes."}}},argTypes:{display:{control:"boolean"},height:{control:"text"},setIndex:{control:{type:"range",min:0,max:24,step:1}},onlyOneItem:{control:{type:"range",min:0,max:24,step:1}},zoom:{control:"boolean"},data:{control:"object"}},args:{display:!0,height:"30rem",setIndex:0,onlyOneItem:null,zoom:!1,data:(0,_image_mock__WEBPACK_IMPORTED_MODULE_2__.W)()}},ImageSlider={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="flex w-full h-[40rem]">\n <ui-image-slider\n [data]="data"\n [display]="display"\n [height]="height"\n [setIndex]="setIndex"\n [onlyOneItem]="onlyOneItem"\n [zoom]="zoom"\n (currentIndex)="setIndex=$event"\n (currentZoom)="zoom=$event"\n ></ui-image-slider>\n </section>\n '})},__namedExportsOrder=["ImageSlider"];ImageSlider.parameters={...ImageSlider.parameters,docs:{...ImageSlider.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="flex w-full h-[40rem]">\n <ui-image-slider\n [data]="data"\n [display]="display"\n [height]="height"\n [setIndex]="setIndex"\n [onlyOneItem]="onlyOneItem"\n [zoom]="zoom"\n (currentIndex)="setIndex=$event"\n (currentZoom)="zoom=$event"\n ></ui-image-slider>\n </section>\n `\n };\n }\n}',...ImageSlider.parameters?.docs?.source}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[1461],{"./libs/ui/src/lib/atoms/image-slider/image-slider.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ImageSlider:()=>ImageSlider,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),_image_mock__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/src/lib/atoms/image.mock.ts"),_image_slider_component__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/atoms/image-slider/image-slider.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Atoms/Image Slider",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({providers:[],imports:[_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_1__.b,_image_slider_component__WEBPACK_IMPORTED_MODULE_3__.u]})],parameters:{docs:{description:{component:"Horizontal image slider with Photos-app style gestures.\n\n**Touch swipe** — the slides live in a native scroll-snap container: the image\nfollows the finger, momentum and snapping come from the platform (with real\nrubber-banding on iOS) and each gesture advances exactly one slide\n(`scroll-snap-stop: always`).\n\n**Mouse drag** — on desktop the image can be dragged with the primary mouse\nbutton. Snapping is suspended while dragging, the ends rubber-band with\nresistance, and on release a flick (> 0.5 px/ms) advances a slide while a slow\nrelease settles on the nearest one.\n\n**Swipe down to close** — in zoom mode a downward drag (touch or mouse) moves\nthe whole view with the pointer, shrinking and fading it; past 120 px or a\nquick flick it closes, otherwise it springs back.\n\n**Keyboard** (zoom mode) — Arrow keys navigate, Home/End jump, Escape closes."}}},argTypes:{display:{control:"boolean"},height:{control:"text"},setIndex:{control:{type:"range",min:0,max:24,step:1}},onlyOneItem:{control:{type:"range",min:0,max:24,step:1}},zoom:{control:"boolean"},data:{control:"object"}},args:{display:!0,height:"30rem",setIndex:0,onlyOneItem:null,zoom:!1,data:(0,_image_mock__WEBPACK_IMPORTED_MODULE_2__.W)()}},ImageSlider={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="flex w-full h-[40rem]">\n <ui-image-slider\n [data]="data"\n [display]="display"\n [height]="height"\n [setIndex]="setIndex"\n [onlyOneItem]="onlyOneItem"\n [zoom]="zoom"\n (currentIndex)="setIndex=$event"\n (currentZoom)="zoom=$event"\n ></ui-image-slider>\n </section>\n '})},__namedExportsOrder=["ImageSlider"];ImageSlider.parameters={...ImageSlider.parameters,docs:{...ImageSlider.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="flex w-full h-[40rem]">\n <ui-image-slider\n [data]="data"\n [display]="display"\n [height]="height"\n [setIndex]="setIndex"\n [onlyOneItem]="onlyOneItem"\n [zoom]="zoom"\n (currentIndex)="setIndex=$event"\n (currentZoom)="zoom=$event"\n ></ui-image-slider>\n </section>\n `\n };\n }\n}',...ImageSlider.parameters?.docs?.source}}}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js.LICENSE.txt */
2
+ (self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[2960,3277],{"./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{br:()=>toObservable,ot:()=>toSignal,pQ:()=>takeUntilDestroyed});var rxjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Observable.js"),rxjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/ReplaySubject.js"),rxjs_operators__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js"),_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs");function takeUntilDestroyed(destroyRef){destroyRef||(ngDevMode&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.Af3)(takeUntilDestroyed),destroyRef=(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.WQX)(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz));const destroyed$=new rxjs__WEBPACK_IMPORTED_MODULE_0__.c(subscriber=>{if(destroyRef.destroyed)return void subscriber.next();return destroyRef.onDestroy(subscriber.next.bind(subscriber))});return source=>source.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.Q)(destroyed$))}function toObservable(source,options){ngDevMode&&!options?.injector&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.Af3)(toObservable);const injector=options?.injector??(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.WQX)(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.zZn),subject=new rxjs__WEBPACK_IMPORTED_MODULE_1__.m(1),watcher=(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.QZP)(()=>{let value;try{value=source()}catch(err){return void(0,_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__.O8)(()=>subject.error(err))}(0,_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__.O8)(()=>subject.next(value))},{injector,manualCleanup:!0});return injector.get(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz).onDestroy(()=>{watcher.destroy(),subject.complete()}),subject.asObservable()}function toSignal(source,options){"undefined"!=typeof ngDevMode&&ngDevMode&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.tdH)(toSignal,"Invoking `toSignal` causes new subscriptions every time. Consider moving `toSignal` outside of the reactive context and read the signal value where needed.");const requiresCleanup=!options?.manualCleanup;ngDevMode&&requiresCleanup&&!options?.injector&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.Af3)(toSignal);const cleanupRef=requiresCleanup?options?.injector?.get(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz)??(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.WQX)(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz):null,equal=function makeToSignalEqual(userEquality=Object.is){return(a,b)=>1===a.kind&&1===b.kind&&userEquality(a.value,b.value)}(options?.equal);let state,destroyUnregisterFn;state=options?.requireSync?(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.vPA)({kind:0},{equal,...ngDevMode?createDebugNameObject(options?.debugName,"state"):void 0}):(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.vPA)({kind:1,value:options?.initialValue},{equal,...ngDevMode?createDebugNameObject(options?.debugName,"state"):void 0});const sub=source.subscribe({next:value=>state.set({kind:1,value}),error:error=>{state.set({kind:2,error}),destroyUnregisterFn?.()},complete:()=>{destroyUnregisterFn?.()}});if(options?.requireSync&&0===state().kind)throw new _effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.buA(601,("undefined"==typeof ngDevMode||ngDevMode)&&"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.");return destroyUnregisterFn=cleanupRef?.onDestroy(sub.unsubscribe.bind(sub)),(0,_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__.EW)(()=>{const current=state();switch(current.kind){case 1:return current.value;case 2:throw current.error;case 0:throw new _effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.buA(601,("undefined"==typeof ngDevMode||ngDevMode)&&"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.")}},{equal:options?.equal,...ngDevMode?createDebugNameObject(options?.debugName,"source"):void 0})}function createDebugNameObject(toSignalDebugName,internalSignalDebugName){return{debugName:`toSignal${toSignalDebugName?"#"+toSignalDebugName:""}.${internalSignalDebugName}`}}},"./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{d:()=>LANG_STORAGE_KEY,R:()=>UiLangSelectorComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var lang_selector_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.css?ngResource"),lang_selector_componentngResource_default=__webpack_require__.n(lang_selector_componentngResource),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs"),ngx_pwa_local_storage=__webpack_require__("./node_modules/@ngx-pwa/local-storage/fesm2022/ngx-pwa-local-storage.mjs");const LANG_STORAGE_KEY="ui-lang";let UiLangSelectorComponent=class UiLangSelectorComponent{translocoService=(0,_effect_chunk2.WQX)(ngneat_transloco.JO);storage=(0,_effect_chunk2.WQX)(ngx_pwa_local_storage.AX);local=(0,core.input)(!1);langChange=(0,core.output)();currentLang=(0,rxjs_interop.ot)(this.translocoService.langChanges$,{initialValue:this.translocoService.getActiveLang()});ngOnInit(){this.storage.get(LANG_STORAGE_KEY).subscribe(value=>{if("en-EN"!==value&&"de-DE"!==value){if(this.local()){const detected=function detectSystemLang(){return(globalThis.navigator?.language??"").toLowerCase().startsWith("de")?"de-DE":"en-EN"}();if(detected===this.currentLang())return;this.translocoService.setActiveLang(detected),this.langChange.emit(detected)}}else this.translocoService.setActiveLang(value)})}setLang(){const next="en-EN"===this.currentLang()?"de-DE":"en-EN";this.translocoService.setActiveLang(next),this.storage.set(LANG_STORAGE_KEY,next).subscribe(),this.langChange.emit(next)}static propDecorators={local:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"local",required:!1,transform:void 0}]}],langChange:[{type:_debug_node_chunk.k7i,args:["langChange"]}]}};UiLangSelectorComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-lang-selector",template:'<button type="button" class="ui-lang-selector ui-none" (click)="setLang()">\n <ng-content>\n <span class="_label">\n {{ \'langSelector.selected\' | transloco }}\n <span class="ui-icon">language</span>\n </span>\n </ng-content>\n</button>\n',imports:[ngneat_transloco.Kj],styles:[lang_selector_componentngResource_default()]})],UiLangSelectorComponent)},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>UiPlaceholderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var placeholder_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"),placeholder_componentngResource_default=__webpack_require__.n(placeholder_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");let UiPlaceholderComponent=class UiPlaceholderComponent{label=(0,core.input)(null);static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiPlaceholderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-placeholder",template:"<span class=\"_label\">{{ label() ?? ('placeholder.label' | transloco) }}</span>\n",encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[placeholder_componentngResource_default()]})],UiPlaceholderComponent)},"./node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>takeUntil});var _util_lift__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),_util_noop__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/noop.js");function takeUntil(notifier){return(0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.N)(function(source,subscriber){(0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__.Tg)(notifier).subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__._)(subscriber,function(){return subscriber.complete()},_util_noop__WEBPACK_IMPORTED_MODULE_3__.l)),!subscriber.closed&&source.subscribe(subscriber)})}},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/lang-selector/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_lang_selector_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.stories.ts"),_lang_selector_component__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_lang_selector_json__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./libs/ui/guide/ui-lang-selector.json");function _createMdxContent(props){const _components={code:"code",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_lang_selector_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"lang-selector",children:"Lang Selector"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"One button that switches the interface language between English and German."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Switching a language is three jobs, and only the first one is interesting to\nlook at. The second is applying the choice to the translation service, the\nthird is remembering it so a reload does not throw the reader back into a\nlanguage they just left. The component does all three, and a host that only\nwants a language switch writes one tag and nothing else — no service call, no\nstorage key, no restore on startup."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_lang_selector_component_stories__WEBPACK_IMPORTED_MODULE_4__.Default}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The placeholder next to it is translated like everything else in the library,\nso it moves along on every click. That is what the button actually does — it\ndoes not switch itself, it switches the page. Reload the story afterwards and\nthe language is still the one you picked, without a line of code on the host\nside."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_6__.Ay,{of:"ui-lang-selector",entry:_guide_ui_lang_selector_json__WEBPACK_IMPORTED_MODULE_7__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"your-own-content",children:"Your own content"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["What the button looks like is deliberately ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"not"})," its decision. Whatever you\nproject replaces the built-in label; project nothing and you get the built-in\none. There is no input for the two cases, because there is nothing to choose:\ncontent is either there or it is not."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_lang_selector_component_stories__WEBPACK_IMPORTED_MODULE_4__.OwnContent}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The same component twice. Left as it comes, right with content of its own —\nand the EN/DE label is gone there, because what you project takes the place of\nthe built-in label ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"and"})," its icon. It is a replacement, not an addition.\nClick either one: both switch the language, they only wear a different face."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Project content, not a control. The component already renders the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<button>"}),",\nso a projected ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<button>"})," sits inside another one: invalid HTML, and two tab\nstops for a single action. Text, an icon, a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<span>"})," — those are what belongs\nin there."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"more-than-one-on-a-page",children:"More than one on a page"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_lang_selector_component_stories__WEBPACK_IMPORTED_MODULE_4__.TwoOfThem}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Click one of them; the other follows in the same moment. Neither keeps a copy\nof the active language — both read it from the translation service — so they\ncannot drift apart, and neither can fall behind a host that switches the\nlanguage on its own."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The failure this rules out is quiet: a remembered language stays right until\nsomething else changes it, and from then on the next click computes from a\nlanguage that is no longer active. The button then appears to do nothing at\nall, once."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"telling-the-host-about-it",children:"Telling the host about it"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The component does not need a host to work — it applies, persists and restores\nthe language by itself. The ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"langChange"})," output exists for the case where the\nhost keeps language state of its own anyway: a store that also drives content\nfetching, for example, which has to reload in the new language. Write it as\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'(langChange)="onLangChange($event)"'}),"; the value is the new language code."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"It fires twice over and stays quiet twice over, and that difference is the\nwhole contract:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"On every toggle by the reader."})," That is a decision, and the host hears it."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["Once during init, when ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"local"})," picked up a system language."]})," The host\nnever asked for that one, so it has to be told."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Not while restoring a persisted language."})," The host asked for it in an\nearlier session and already knows; emitting here would turn every reload into\na user decision and re-trigger whatever hangs off the output."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Not when a detected language matches the active one."})," Nothing changed, so\nnothing is announced — a store reset or a data reload for a non-event is the\nexpensive kind of harmless."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"There is no story for this, and a story would not help: an output has no\nappearance. What it produces is a value inside the host, not something to look\nat. The four cases above are pinned by the component's unit tests instead."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"where-the-first-language-comes-from",children:"Where the first language comes from"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"On startup the selector resolves the language in this order:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ol,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"The persisted choice"})," — always wins, whatever else is set."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"The system language"}),", but only with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'[local]="true"'})," and only when\nnothing is persisted: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"navigator.language"})," starting with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"de"})," becomes\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"de-DE"}),", everything else ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"en-EN"}),". It is applied and announced via\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"langChange"}),", and deliberately ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"not"})," persisted — so the selector keeps\nfollowing the system until the reader actually toggles it. Only a toggle\nwrites to the store."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Nothing"})," — without ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"local"})," the translation service's own default\nlanguage stands, and the selector leaves the startup alone entirely."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"There is no story for this, and there cannot be a useful one: the case only\noccurs while nothing is stored, and one click on any story above stores\nsomething for good. It is covered by the component's unit tests instead."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"notes",children:"Notes"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"It needs the translation service and the local store."})," The component\ninjects ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"TranslocoService"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"StorageMap"})," (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"@ngx-pwa/local-storage"}),") and\nexpects the library's translation files to be loaded alongside the\napplication's own. Without those providers it does not fall back to a plain\nbutton — it throws while being constructed."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"local"})," is read once, during init."]}),' Changing it afterwards has no effect;\nit answers the question "what language do we start in", and that question is\nasked exactly once.']}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["The choice is persisted under ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:_lang_selector_component__WEBPACK_IMPORTED_MODULE_5__.d})]})," in the\nlocal store. This page reads the key from the exported constant rather than\nrestating it, so the two cannot drift apart."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["The button is ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="button"'}),"."]})," Placed inside a form it would otherwise\nsubmit it, because a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<button>"})," without a type is a submit button."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["Styling hook: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:".ui-lang-selector"})]})," on the button. It carries no\nappearance of its own beyond the layout — no surface and no focus ring — so\na header gives it the same treatment as the controls next to it."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"properties",children:"Properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"local"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"false"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Start in the detected system language when nothing is persisted yet.\nRead once during init."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"langChange"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"output<'en-EN' | 'de-DE'>"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"—"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The newly selected language. For hosts that keep language state of\ntheir own — see ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("em",{children:"Telling the host about it"})," above for when it\nfires and when it deliberately does not."]})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"projected content"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"—"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["label + ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"language"})," icon"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Replaces the built-in label and icon. Content, never a control."})})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,OwnContent:()=>OwnContent,TwoOfThem:()=>TwoOfThem,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Atoms/Lang Selector",component:__webpack_require__("./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.ts").R,decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({imports:[_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_1__.F]})],parameters:{controls:{disable:!0}}},Default={render:()=>({template:'\n <section class="flex items-center gap-4">\n <ui-lang-selector></ui-lang-selector>\n <ui-placeholder class="h-16 w-48"></ui-placeholder>\n </section>\n '})},OwnContent={render:()=>({template:'\n <section class="flex items-center gap-12">\n <ui-lang-selector></ui-lang-selector>\n <ui-lang-selector>Your own text</ui-lang-selector>\n </section>\n '})},TwoOfThem={render:()=>({template:'\n <section class="flex items-center gap-8">\n <ui-lang-selector></ui-lang-selector>\n <ui-lang-selector></ui-lang-selector>\n </section>\n '})},__namedExportsOrder=["Default","OwnContent","TwoOfThem"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'{\n render: () => ({\n template: `\n <section class="flex items-center gap-4">\n <ui-lang-selector></ui-lang-selector>\n <ui-placeholder class="h-16 w-48"></ui-placeholder>\n </section>\n `\n })\n}',...Default.parameters?.docs?.source},description:{story:"Click it. The selector's own label flips between EN and DE — and so does the\nplaceholder next to it, which is translated like everything else in the\nlibrary. That second thing is the point: the button does not switch itself,\nit switches the page.\n\nReload afterwards. The language is still the one you chose, without the host\napp storing anything.",...Default.parameters?.docs?.description}}},OwnContent.parameters={...OwnContent.parameters,docs:{...OwnContent.parameters?.docs,source:{originalSource:'{\n render: () => ({\n template: `\n <section class="flex items-center gap-12">\n <ui-lang-selector></ui-lang-selector>\n <ui-lang-selector>Your own text</ui-lang-selector>\n </section>\n `\n })\n}',...OwnContent.parameters?.docs?.source},description:{story:"The same component twice: on the left as it comes, on the right with content\nprojected into it. The left one brings its own label and icon, the right one\nshows only what was put inside — projected content REPLACES the built-in\npair, it does not join it. Both still switch the language; only the face\ndiffers.\n\nThat is why there is no input for the two cases. Note also WHAT is\nprojected: content, not a control. The component already renders the button,\nand a button inside a button is two tab stops for one action.",...OwnContent.parameters?.docs?.description}}},TwoOfThem.parameters={...TwoOfThem.parameters,docs:{...TwoOfThem.parameters?.docs,source:{originalSource:'{\n render: () => ({\n template: `\n <section class="flex items-center gap-8">\n <ui-lang-selector></ui-lang-selector>\n <ui-lang-selector></ui-lang-selector>\n </section>\n `\n })\n}',...TwoOfThem.parameters?.docs?.source},description:{story:"Two of them, and only one gets clicked: the other follows immediately. Each\nselector READS the active language instead of keeping a copy of it, so\nneither can fall behind the other — or behind a host that switches the\nlanguage on its own.\n\nWith a remembered language this is where it would show: the second one would\nstill say what it said before, and its next click would set the language it\nis already on.",...TwoOfThem.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n.ui-lang-selector,\n._label {\n display: flex;\n flex-flow: row;\n align-items: center;\n}\n\n._label {\n color: var(--ui-c-default);\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* A floor, not a size: width and height come from wherever it is used.\n Without one an empty stand-in collapses to a text line and stops being\n the mass it exists to be. The floor is a named hook with a fallback, so a\n consumer who deliberately wants a smaller stand-in can set\n `--ui-placeholder-min-width` / `--ui-placeholder-min-height` without a\n cascade fight — an unlayered host rule otherwise beats a width utility in\n `@layer utilities` (tickets#241, tickets#251, tickets#253). */\n min-width: var(--ui-placeholder-min-width, calc(var(--ui-spacer) * 3));\n min-height: var(--ui-placeholder-min-height, calc(var(--ui-spacer) * 3));\n padding: calc(var(--ui-spacer) * 0.25);\n\n /* The overlay header's pair: filled enough to read as chrome rather than\n content, and theme-aware through the tokens. */\n background-color: var(--ui-c-primary);\n color: var(--ui-c-default);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-radius: var(--ui-border-radius);\n\n /* It is scenery, never the subject: nothing here should invite a click or\n land in a text selection. */\n -webkit-user-select: none;\n user-select: none;\n\n ._label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Angular v21.2.17
3
+ * (c) 2010-2026 Google LLC. https://angular.dev/
4
+ * License: MIT
5
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js.LICENSE.txt */
2
+ (self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3277],{"./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{br:()=>toObservable,ot:()=>toSignal,pQ:()=>takeUntilDestroyed});var rxjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Observable.js"),rxjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/ReplaySubject.js"),rxjs_operators__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js"),_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs");function takeUntilDestroyed(destroyRef){destroyRef||(ngDevMode&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.Af3)(takeUntilDestroyed),destroyRef=(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.WQX)(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz));const destroyed$=new rxjs__WEBPACK_IMPORTED_MODULE_0__.c(subscriber=>{if(destroyRef.destroyed)return void subscriber.next();return destroyRef.onDestroy(subscriber.next.bind(subscriber))});return source=>source.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.Q)(destroyed$))}function toObservable(source,options){ngDevMode&&!options?.injector&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.Af3)(toObservable);const injector=options?.injector??(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.WQX)(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.zZn),subject=new rxjs__WEBPACK_IMPORTED_MODULE_1__.m(1),watcher=(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.QZP)(()=>{let value;try{value=source()}catch(err){return void(0,_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__.O8)(()=>subject.error(err))}(0,_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__.O8)(()=>subject.next(value))},{injector,manualCleanup:!0});return injector.get(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz).onDestroy(()=>{watcher.destroy(),subject.complete()}),subject.asObservable()}function toSignal(source,options){"undefined"!=typeof ngDevMode&&ngDevMode&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.tdH)(toSignal,"Invoking `toSignal` causes new subscriptions every time. Consider moving `toSignal` outside of the reactive context and read the signal value where needed.");const requiresCleanup=!options?.manualCleanup;ngDevMode&&requiresCleanup&&!options?.injector&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.Af3)(toSignal);const cleanupRef=requiresCleanup?options?.injector?.get(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz)??(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.WQX)(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz):null,equal=function makeToSignalEqual(userEquality=Object.is){return(a,b)=>1===a.kind&&1===b.kind&&userEquality(a.value,b.value)}(options?.equal);let state,destroyUnregisterFn;state=options?.requireSync?(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.vPA)({kind:0},{equal,...ngDevMode?createDebugNameObject(options?.debugName,"state"):void 0}):(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.vPA)({kind:1,value:options?.initialValue},{equal,...ngDevMode?createDebugNameObject(options?.debugName,"state"):void 0});const sub=source.subscribe({next:value=>state.set({kind:1,value}),error:error=>{state.set({kind:2,error}),destroyUnregisterFn?.()},complete:()=>{destroyUnregisterFn?.()}});if(options?.requireSync&&0===state().kind)throw new _effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.buA(601,("undefined"==typeof ngDevMode||ngDevMode)&&"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.");return destroyUnregisterFn=cleanupRef?.onDestroy(sub.unsubscribe.bind(sub)),(0,_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__.EW)(()=>{const current=state();switch(current.kind){case 1:return current.value;case 2:throw current.error;case 0:throw new _effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.buA(601,("undefined"==typeof ngDevMode||ngDevMode)&&"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.")}},{equal:options?.equal,...ngDevMode?createDebugNameObject(options?.debugName,"source"):void 0})}function createDebugNameObject(toSignalDebugName,internalSignalDebugName){return{debugName:`toSignal${toSignalDebugName?"#"+toSignalDebugName:""}.${internalSignalDebugName}`}}},"./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{d:()=>LANG_STORAGE_KEY,R:()=>UiLangSelectorComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var lang_selector_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.css?ngResource"),lang_selector_componentngResource_default=__webpack_require__.n(lang_selector_componentngResource),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs"),ngx_pwa_local_storage=__webpack_require__("./node_modules/@ngx-pwa/local-storage/fesm2022/ngx-pwa-local-storage.mjs");const LANG_STORAGE_KEY="ui-lang";let UiLangSelectorComponent=class UiLangSelectorComponent{translocoService=(0,_effect_chunk2.WQX)(ngneat_transloco.JO);storage=(0,_effect_chunk2.WQX)(ngx_pwa_local_storage.AX);local=(0,core.input)(!1);langChange=(0,core.output)();currentLang=(0,rxjs_interop.ot)(this.translocoService.langChanges$,{initialValue:this.translocoService.getActiveLang()});ngOnInit(){this.storage.get(LANG_STORAGE_KEY).subscribe(value=>{if("en-EN"!==value&&"de-DE"!==value){if(this.local()){const detected=function detectSystemLang(){return(globalThis.navigator?.language??"").toLowerCase().startsWith("de")?"de-DE":"en-EN"}();if(detected===this.currentLang())return;this.translocoService.setActiveLang(detected),this.langChange.emit(detected)}}else this.translocoService.setActiveLang(value)})}setLang(){const next="en-EN"===this.currentLang()?"de-DE":"en-EN";this.translocoService.setActiveLang(next),this.storage.set(LANG_STORAGE_KEY,next).subscribe(),this.langChange.emit(next)}static propDecorators={local:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"local",required:!1,transform:void 0}]}],langChange:[{type:_debug_node_chunk.k7i,args:["langChange"]}]}};UiLangSelectorComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-lang-selector",template:'<button type="button" class="ui-lang-selector ui-none" (click)="setLang()">\n <ng-content>\n <span class="_label">\n {{ \'langSelector.selected\' | transloco }}\n <span class="ui-icon">language</span>\n </span>\n </ng-content>\n</button>\n',imports:[ngneat_transloco.Kj],styles:[lang_selector_componentngResource_default()]})],UiLangSelectorComponent)},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>UiPlaceholderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var placeholder_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"),placeholder_componentngResource_default=__webpack_require__.n(placeholder_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");let UiPlaceholderComponent=class UiPlaceholderComponent{label=(0,core.input)(null);static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiPlaceholderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-placeholder",template:"<span class=\"_label\">{{ label() ?? ('placeholder.label' | transloco) }}</span>\n",encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[placeholder_componentngResource_default()]})],UiPlaceholderComponent)},"./node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>takeUntil});var _util_lift__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),_util_noop__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/noop.js");function takeUntil(notifier){return(0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.N)(function(source,subscriber){(0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__.Tg)(notifier).subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__._)(subscriber,function(){return subscriber.complete()},_util_noop__WEBPACK_IMPORTED_MODULE_3__.l)),!subscriber.closed&&source.subscribe(subscriber)})}},"./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,OwnContent:()=>OwnContent,TwoOfThem:()=>TwoOfThem,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Atoms/Lang Selector",component:__webpack_require__("./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.ts").R,decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({imports:[_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_1__.F]})],parameters:{controls:{disable:!0}}},Default={render:()=>({template:'\n <section class="flex items-center gap-4">\n <ui-lang-selector></ui-lang-selector>\n <ui-placeholder class="h-16 w-48"></ui-placeholder>\n </section>\n '})},OwnContent={render:()=>({template:'\n <section class="flex items-center gap-12">\n <ui-lang-selector></ui-lang-selector>\n <ui-lang-selector>Your own text</ui-lang-selector>\n </section>\n '})},TwoOfThem={render:()=>({template:'\n <section class="flex items-center gap-8">\n <ui-lang-selector></ui-lang-selector>\n <ui-lang-selector></ui-lang-selector>\n </section>\n '})},__namedExportsOrder=["Default","OwnContent","TwoOfThem"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'{\n render: () => ({\n template: `\n <section class="flex items-center gap-4">\n <ui-lang-selector></ui-lang-selector>\n <ui-placeholder class="h-16 w-48"></ui-placeholder>\n </section>\n `\n })\n}',...Default.parameters?.docs?.source},description:{story:"Click it. The selector's own label flips between EN and DE — and so does the\nplaceholder next to it, which is translated like everything else in the\nlibrary. That second thing is the point: the button does not switch itself,\nit switches the page.\n\nReload afterwards. The language is still the one you chose, without the host\napp storing anything.",...Default.parameters?.docs?.description}}},OwnContent.parameters={...OwnContent.parameters,docs:{...OwnContent.parameters?.docs,source:{originalSource:'{\n render: () => ({\n template: `\n <section class="flex items-center gap-12">\n <ui-lang-selector></ui-lang-selector>\n <ui-lang-selector>Your own text</ui-lang-selector>\n </section>\n `\n })\n}',...OwnContent.parameters?.docs?.source},description:{story:"The same component twice: on the left as it comes, on the right with content\nprojected into it. The left one brings its own label and icon, the right one\nshows only what was put inside — projected content REPLACES the built-in\npair, it does not join it. Both still switch the language; only the face\ndiffers.\n\nThat is why there is no input for the two cases. Note also WHAT is\nprojected: content, not a control. The component already renders the button,\nand a button inside a button is two tab stops for one action.",...OwnContent.parameters?.docs?.description}}},TwoOfThem.parameters={...TwoOfThem.parameters,docs:{...TwoOfThem.parameters?.docs,source:{originalSource:'{\n render: () => ({\n template: `\n <section class="flex items-center gap-8">\n <ui-lang-selector></ui-lang-selector>\n <ui-lang-selector></ui-lang-selector>\n </section>\n `\n })\n}',...TwoOfThem.parameters?.docs?.source},description:{story:"Two of them, and only one gets clicked: the other follows immediately. Each\nselector READS the active language instead of keeping a copy of it, so\nneither can fall behind the other — or behind a host that switches the\nlanguage on its own.\n\nWith a remembered language this is where it would show: the second one would\nstill say what it said before, and its next click would set the language it\nis already on.",...TwoOfThem.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/lang-selector/lang-selector.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n.ui-lang-selector,\n._label {\n display: flex;\n flex-flow: row;\n align-items: center;\n}\n\n._label {\n color: var(--ui-c-default);\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* A floor, not a size: width and height come from wherever it is used.\n Without one an empty stand-in collapses to a text line and stops being\n the mass it exists to be. The floor is a named hook with a fallback, so a\n consumer who deliberately wants a smaller stand-in can set\n `--ui-placeholder-min-width` / `--ui-placeholder-min-height` without a\n cascade fight — an unlayered host rule otherwise beats a width utility in\n `@layer utilities` (tickets#241, tickets#251, tickets#253). */\n min-width: var(--ui-placeholder-min-width, calc(var(--ui-spacer) * 3));\n min-height: var(--ui-placeholder-min-height, calc(var(--ui-spacer) * 3));\n padding: calc(var(--ui-spacer) * 0.25);\n\n /* The overlay header's pair: filled enough to read as chrome rather than\n content, and theme-aware through the tokens. */\n background-color: var(--ui-c-primary);\n color: var(--ui-c-default);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-radius: var(--ui-border-radius);\n\n /* It is scenery, never the subject: nothing here should invite a click or\n land in a text selection. */\n -webkit-user-select: none;\n user-select: none;\n\n ._label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Angular v21.2.17
3
+ * (c) 2010-2026 Google LLC. https://angular.dev/
4
+ * License: MIT
5
+ */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[1954],{"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/mosaic/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_mosaic_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/mosaic/mosaic.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_mosaic_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-mosaic.json");function _createMdxContent(props){const _components={a:"a",code:"code",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_mosaic_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"atoms-mosaic",children:"Atoms: Mosaic"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A field of 4:3 tiles that fills its box and animates tile by tile. The tiles\ncarry either images or plain colors, the given entries repeat cyclically until\nthe box is covered, and the tile count follows the box on every resize."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"It brings no appearance of its own beyond the tiles — no position, no\nstacking, no size. Where it sits is the caller's decision."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A field of 4:3 tiles that fills its box and animates tile by tile — images or\nplain colours, repeating until the box is covered, recounted on every resize.\nIt brings no appearance beyond the tiles: no position, no stacking, no size.\nIt measures its own box, never the window, so where it sits — behind the page,\nover a picture, in the flow — is the caller's CSS, and it is decoration that\ntakes no clicks."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-mosaic",entry:_guide_ui_mosaic_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"where-it-sits",children:"Where it sits"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The host carries ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"display: block"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"overflow: hidden"})," and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"pointer-events: none"})," — nothing else. It measures ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"its own box"}),", never the\nwindow, so the same component is a page backdrop, a panel over a picture or a\nband in a layout, depending only on how it is placed."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Placement"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"CSS on the tag"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"What it does"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Behind the page"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"position: fixed; inset: 0; z-index: -1"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Fullscreen backdrop behind all content."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Over something"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"position: absolute; inset: 0"})," in a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"position: relative"})," parent, positive z-index"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Covers the parent's content and reveals it as the tiles fall."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"In the flow"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"height"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"An ordinary block that happens to be a mosaic."})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Placed in the flow ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"without"})," a height, it renders nothing: its own height\nwould come from its tiles, and the tile count comes from its height. That is a\nwiring mistake, not a fault of the component — give it a box and it fills it."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"pointer-events: none"})," is the one placement decision it keeps: it is\ndecoration, and decoration never takes a click away from what it lies on."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"behind-the-page",children:"Behind the page"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The three declarations that used to be burned into the component now sit on\nthe tag, where they can be seen and changed."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["These two open in their own window rather than in a frame on this page: a\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"position: fixed"})," box inside the documentation resolves against the doc\ncontainer, not the viewport, and would show a 16px strip claiming to be a\nfullscreen backdrop."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/atoms-mosaic--images",children:"Images"})," — pinned behind the page,\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"position: fixed; inset: 0; z-index: -1"})," on the tag."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/atoms-mosaic--colors",children:"Colors"})," — the same host filled with\nplain colors; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"mode"})," is the only difference."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"over-something",children:"Over something"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Not a background at all: the same tag inside a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"relative"})," box, stacked on top\nof what it covers. Both backdrop inputs are empty in these two, so what the\nfalling tiles reveal is the content underneath rather than a picture the\nmosaic brought along."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_mosaic_component_stories__WEBPACK_IMPORTED_MODULE_4__.OverText}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_mosaic_component_stories__WEBPACK_IMPORTED_MODULE_4__.OverImage}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"features",children:"Features"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["4:3 tiles; images render with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"object-fit: cover"}),", centered. In ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"color"})," mode\nthe tile itself is the surface and carries no child element at all."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"Entries cycle through the given array until the box is filled — in order,\nnever shuffled, so a short array produces a regular pattern."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["Optional backdrop behind the tiles: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"mainImage"})," (cover, centered) in image\nmode, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"mainColor"})," in color mode. Without one, whatever lies under the mosaic\nshows through."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["Fall animation: the full grid rests for one second, then the tiles drop away\none by one in random order, each shrinking centered until invisible.\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"fallDelay"})," of ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"0"})," keeps the grid standing still."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"animationType"})," — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"falldown"})," drops the tiles once; the five endless modes\nkeep the grid full and replay forever (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"infinity"})," pops random tiles from\ntiny to full, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"pulse"})," lets them breathe, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"flip"})," turns them around their Y\naxis, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"fade"})," blinks them out and back, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"wave"})," sweeps a diagonal lift from\ntop-left to bottom-right). Their keyframes live in a separate animations\nstylesheet."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["Column and row count follow the host box via ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ResizeObserver"}),"; a size change\nrestarts the animation."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"Only one timer is ever pending, whatever the tile count: the fall schedules\nitself forward one tile at a time."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"No singleton guard — two mosaics on one page are a normal thing to want."}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"inputs",children:"Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"@Input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"mode"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"UiMosaicModeType"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'image'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Whether the tiles are filled from ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"images"})," or from ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"colors"}),". The grid maths and every animation are identical in both."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"images"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Array<UiMosaicImageType> | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Tile images, repeated cyclically. Read in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"image"})," mode; without them nothing renders."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"colors"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Array<string> | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Tile colors, repeated the same way. Any CSS color string — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"#ff00ff"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"rgb(...)"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"var(--ui-c-primary)"}),". Read in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"color"})," mode."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"mainImage"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"UiMosaicImageType | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Backdrop image behind the tiles, revealed by the fall. Image mode only."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"mainColor"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"string | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Backdrop color behind the tiles — the counterpart of ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"mainImage"}),". Color mode only."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"tileMinWidth"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"120"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:'Minimum tile width in px — the smaller, the more tiles. Nothing is capped; see "What it costs".'})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"fallDelay"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"200"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Pause in ms between two animating tiles; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"0"})," keeps the grid static."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"fallDuration"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"1200"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Duration in ms of a single tile's animation; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"0"})," makes them snap instead of shrink."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"animationType"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"UiMosaicAnimationType"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'falldown'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Which animation plays — see Features."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"border"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Draws a border around every tile."})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"what-it-costs",children:"What it costs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Not a warning and not a limit — the component caps nothing and refuses\nnothing. These are the numbers you are ordering, so you can decide before you\norder them."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["One tile is one DOM element. Shrinking the tile multiplies ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"columns and rows\nat once"}),", so the count grows with the square of the shrinking: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"halving the\ntile width quadruples the tiles."})," On a 4K screen at the default 120px that is\n768 tiles; at 60px it is 3072; at 30px it is 12,288."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Fullscreen at the default tile width:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Viewport"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Columns"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Rows"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Tiles"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"1920 × 1080"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"16"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"12"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"192"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"2560 × 1440"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"21"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"16"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"336"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"3840 × 2160"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"32"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"24"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"768"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"7680 × 4320"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"64"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"48"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"3072"})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Counted, not measured — how much a given count costs depends on the machine,\non the mode (an image tile is heavier than a color tile) and on what else is\non the page. The one value that is refused is a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileMinWidth"})," of zero or\nbelow: that would ask for an infinite number of columns, which throws."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"types-uimosaicmodetype",children:"Types: UiMosaicModeType"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-typescript",children:"type UiMosaicModeType = 'image' | 'color';\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"types-uimosaicanimationtype",children:"Types: UiMosaicAnimationType"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-typescript",children:"type UiMosaicAnimationType =\n | 'falldown'\n | 'infinity'\n | 'pulse'\n | 'flip'\n | 'fade'\n | 'wave';\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"types-uimosaicimagetype",children:"Types: UiMosaicImageType"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-typescript",children:"interface UiMosaicImageType {\n src: string;\n alt: string;\n}\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"usage"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'\x3c!-- Behind the page --\x3e\n<ui-mosaic\n style="position: fixed; inset: 0; z-index: -1"\n [images]="images"\n [mainImage]="mainImage"\n></ui-mosaic>\n\n\x3c!-- Over a picture, revealing it as the tiles fall --\x3e\n<div style="position: relative">\n <img [src]="cover.src" [alt]="cover.alt" />\n @if (loading()) {\n <ui-mosaic\n style="position: absolute; inset: 0; z-index: 1"\n [mode]="\'color\'"\n [colors]="[\'#ff00ff\', \'#00e5ff\', \'#ffe000\']"\n ></ui-mosaic>\n }\n</div>\n'})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[2831],{"./libs/ui/.storybook/demos/header/header.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>UiInternHeaderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var header_componentngResource=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.css?ngResource"),header_componentngResource_default=__webpack_require__.n(header_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ui_config_types=__webpack_require__("./libs/ui/src/config/ui-config.types.ts"),layout_service=__webpack_require__("./libs/ui/src/lib/layout/_service/layout.service.ts");let UiInternHeaderComponent=class UiInternHeaderComponent{layoutService=(0,_effect_chunk2.WQX)(layout_service.u);theme=(0,core.input)(null);display=(0,core.input)(!1,{transform:core.booleanAttribute});onTop=(0,core.input)(!1,{transform:core.booleanAttribute});ngOnInit(){this.layoutService.handleTheme(this.theme(),ui_config_types.Q)}ngOnDestroy(){this.layoutService.handleTheme("theme-light",ui_config_types.Q)}setTheme(){this.layoutService.handleTheme(null,ui_config_types.Q)}static propDecorators={theme:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"theme",required:!1,transform:void 0}]}],display:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"display",required:!1,transform:void 0}]}],onTop:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"onTop",required:!1,transform:void 0}]}]}};UiInternHeaderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-intern-header",template:'@if (display()) {\n <button class="ui" [class._on-top]="onTop()" (click)="setTheme()">\n switch Theme\n </button>\n}\n',encapsulation:_debug_node_chunk.gXe.Emulated,standalone:!0,imports:[_common_module_chunk.MD],styles:[header_componentngResource_default()]})],UiInternHeaderComponent)},"./libs/ui/src/config/ui-config.types.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>uiConfigStorybookCssPrefix,y:()=>uiConfigTypes});const uiConfigStorybookCssPrefix="ui-storybook ",uiConfigTypes={mainID:"ui-main",mainClass:"ui-main",storeName:"ui-layout"}},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>UiPlaceholderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var placeholder_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"),placeholder_componentngResource_default=__webpack_require__.n(placeholder_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");let UiPlaceholderComponent=class UiPlaceholderComponent{label=(0,core.input)(null);static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiPlaceholderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-placeholder",template:"<span class=\"_label\">{{ label() ?? ('placeholder.label' | transloco) }}</span>\n",encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[placeholder_componentngResource_default()]})],UiPlaceholderComponent)},"./libs/ui/src/lib/layout/_service/layout.service.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>UiLayoutService});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@ngx-pwa/local-storage/fesm2022/ngx-pwa-local-storage.mjs"),_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/config/ui-config.types.ts");let UiLayoutService=class UiLayoutService{storage=(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.WQX)(_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__.AX);settings={cssPrefix:"",theme:null,zoom:null,fullscreen:null,direction:"center",layoutSize:null};setStorage(){this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}handleInit(config){this.settings.cssPrefix=config.cssPrefix,this.settings.theme=config.theme,this.settings.zoom=config.zoom?"zoom":"x-zoom",this.settings.fullscreen=config.fullscreen?"fullscreen":"x-fullscreen",this.handleFullScreen(this.settings.fullscreen),this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data),this.setStorage(),this.setTheme(null)})}setTheme(theme){document.body.className=theme?`${this.settings.cssPrefix} ${theme}`:`${this.settings.cssPrefix} ${this.settings.theme}`}getTheme(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.theme}getMainClass(){return`${_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.mainClass} ${this.settings.zoom} ${this.settings.fullscreen}`}handleFullScreen(init){init?this.settings.fullscreen=init:"fullscreen"===this.settings.fullscreen?this.settings.fullscreen="x-fullscreen":this.settings.fullscreen="fullscreen",this.setStorage()}handleZoom(init){init?this.settings.zoom=init:"zoom"===this.settings.zoom?this.settings.zoom="x-zoom":this.settings.zoom="zoom",this.setStorage()}handleTheme(theme,prefix){return prefix&&(this.settings.cssPrefix=prefix),theme?(this.setTheme(theme),this.settings.theme=theme):(this.settings.theme="theme-light"===this.settings.theme?"theme-dark":"theme-light",this.setTheme(null)),this.setStorage(),this.settings.theme}handleDirection(type){this.settings.direction=type,this.setStorage()}setLayoutSize(sizes){this.settings.layoutSize=sizes,this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}getLayoutSize(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.layoutSize}};UiLayoutService=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_1__._qm)({providedIn:"root"})],UiLayoutService)},"./libs/ui/src/lib/atoms/mosaic/mosaic.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Colors:()=>Colors,Images:()=>Images,OverImage:()=>OverImage,OverText:()=>OverText,__namedExportsOrder:()=>__namedExportsOrder,default:()=>mosaic_component_stories});var _effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),placeholder_component=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var mosaic_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/mosaic/mosaic.component.css?ngResource"),mosaic_componentngResource_default=__webpack_require__.n(mosaic_componentngResource),mosaic_animationsngResource=__webpack_require__("./libs/ui/src/lib/atoms/mosaic/mosaic.animations.css?ngResource"),mosaic_animationsngResource_default=__webpack_require__.n(mosaic_animationsngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs");const ANIMATION_CLASS={infinity:"_-grow",pulse:"_-pulse",flip:"_-flip",fade:"_-fade",wave:"_-wave"};let UiMosaicComponent=class UiMosaicComponent{images=(0,core.input)(null);colors=(0,core.input)(null);mainImage=(0,core.input)(null);mainColor=(0,core.input)(null);mode=(0,core.input)("image");tileMinWidth=(0,core.input)(120);fallDelay=(0,core.input)(200);fallDuration=(0,core.input)(1200);animationType=(0,core.input)("falldown");border=(0,core.input)(!1,{transform:core.booleanAttribute});hostSize=(0,_effect_chunk2.vPA)({width:0,height:0});fallen=(0,_effect_chunk2.vPA)(new Set);animating=(0,_effect_chunk2.vPA)(new Set);animationClass=(0,_resource_chunk.EW)(()=>ANIMATION_CLASS[this.animationType()]??null);loadedImages=(0,_effect_chunk2.vPA)(0);onImageSettled(){this.loadedImages.update(count=>count+1)}allTilesSettled=(0,_resource_chunk.EW)(()=>{const tileCount=this.tiles().length;return 0!==tileCount&&("color"===this.mode()||this.loadedImages()>=tileCount)});cols=(0,_resource_chunk.EW)(()=>{const tileWidth=Math.max(1,this.tileMinWidth());return Math.max(1,Math.floor(this.hostSize().width/tileWidth))});tiles=(0,_resource_chunk.EW)(()=>{const source="color"===this.mode()?this.colors():this.images(),{width,height}=this.hostSize();if(!source?.length||width<=0||height<=0)return[];const cols=this.cols(),tileHeight=width/cols*(3/4),rows=Math.max(1,Math.ceil(height/tileHeight));return Array.from({length:cols*rows},(_,index)=>source[index%source.length])});tileImage(tile){return"string"==typeof tile?null:tile}tileColor(tile){return"string"==typeof tile?tile:null}constructor(){const host=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT).nativeElement,observer=new ResizeObserver(entries=>{const box=entries[0]?.contentRect;box&&this.hostSize.set({width:box.width,height:box.height})});observer.observe(host),(0,_effect_chunk2.WQX)(_effect_chunk2.abz).onDestroy(()=>observer.disconnect()),(0,_effect_chunk2.QZP)(onCleanup=>{const tileCount=this.tiles().length,cols=this.cols(),delay=this.fallDelay(),duration=this.fallDuration(),animationType=this.animationType(),ready=this.allTilesSettled();if((0,_resource_chunk.O8)(()=>{this.fallen.set(new Set),this.animating.set(new Set)}),0===tileCount||delay<=0||!ready)return;const timers=new Set,schedule=(handler,ms)=>{const timer=setTimeout(()=>{timers.delete(timer),handler()},ms);timers.add(timer)};if(onCleanup(()=>timers.forEach(timer=>clearTimeout(timer))),"falldown"!==animationType){const waveOrder="wave"===animationType?function diagonalOrder(tileCount,cols){return Array.from({length:tileCount},(_,index)=>index).sort((a,b)=>Math.floor(a/cols)+a%cols-(Math.floor(b/cols)+b%cols)||a%cols-b%cols)}(tileCount,cols):null;let pointer=0;const tick=()=>{const pick=waveOrder?waveOrder[pointer++%waveOrder.length]:Math.floor(Math.random()*tileCount);(0,_resource_chunk.O8)(this.animating).has(pick)||(this.animating.update(animating=>new Set(animating).add(pick)),schedule(()=>{this.animating.update(animating=>{const next=new Set(animating);return next.delete(pick),next})},duration)),schedule(tick,delay)};return void schedule(tick,1e3)}const order=function shuffle(values){for(let i=values.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[values[i],values[j]]=[values[j],values[i]]}return values}(Array.from({length:tileCount},(_,index)=>index)),tick=()=>{const next=order.shift();void 0!==next&&(this.fallen.update(fallen=>new Set(fallen).add(next)),schedule(tick,delay))};schedule(tick,1e3)})}static ctorParameters=()=>[];static propDecorators={images:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"images",required:!1,transform:void 0}]}],colors:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"colors",required:!1,transform:void 0}]}],mainImage:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"mainImage",required:!1,transform:void 0}]}],mainColor:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"mainColor",required:!1,transform:void 0}]}],mode:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"mode",required:!1,transform:void 0}]}],tileMinWidth:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"tileMinWidth",required:!1,transform:void 0}]}],fallDelay:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"fallDelay",required:!1,transform:void 0}]}],fallDuration:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"fallDuration",required:!1,transform:void 0}]}],animationType:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"animationType",required:!1,transform:void 0}]}],border:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"border",required:!1,transform:void 0}]}]}};UiMosaicComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-mosaic",template:'@if (mode() === \'color\') {\n @if (mainColor(); as color) {\n <div class="_main-color" [style.background-color]="color"></div>\n }\n} @else if (mainImage(); as image) {\n <div\n class="_main-image"\n role="img"\n [attr.aria-label]="image.alt"\n [style.background-image]="\'url(\' + image.src + \')\'"\n ></div>\n}\n<div\n class="_grid"\n [style.grid-template-columns]="\'repeat(\' + cols() + \', 1fr)\'"\n>\n @for (tile of tiles(); track $index) {\n <div\n class="_tile"\n [class._-fallen]="fallen().has($index)"\n [class]="\n animationClass() && animating().has($index) ? animationClass() : \'\'\n "\n [style.background-color]="tileColor(tile)"\n >\n @if (tileImage(tile); as image) {\n <img\n [src]="image.src"\n [alt]="image.alt"\n decoding="async"\n (load)="onImageSettled()"\n (error)="onImageSettled()"\n />\n }\n </div>\n }\n</div>\n',encapsulation:_debug_node_chunk.gXe.Emulated,host:{"[style.--ui-mosaic-fall.ms]":"fallDuration()","[class._-border]":"border()"},styles:[mosaic_componentngResource_default(),mosaic_animationsngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiMosaicComponent);const mosaic_component_stories={title:"Atoms/Mosaic",component:UiMosaicComponent,decorators:[(0,dist.Iz)({imports:[header_component.b,placeholder_component.F,UiMosaicComponent]})],argTypes:{animationType:{control:"radio",options:["falldown","infinity","pulse","flip","fade","wave"]},mode:{control:"radio",options:["image","color"]},mainColor:{control:"color"},tileMinWidth:{control:{type:"range",min:8,max:400,step:2}},fallDelay:{control:{type:"range",min:0,max:1e3,step:5}},fallDuration:{control:{type:"range",min:0,max:3e3,step:50}},border:{control:"boolean"},images:{control:"object"},colors:{control:"object"},mainImage:{control:"object"}},args:{animationType:"falldown",border:!1,mode:"image",colors:["#ff00ff","#00e5ff","#ffe000","#7c4dff","#00c853","#ff3d00"],mainColor:"#101014",tileMinWidth:120,fallDelay:200,fallDuration:1200,images:function uiMosaicMock(){return Array.from({length:120},()=>{const number=String(Math.floor(25*Math.random())+1).padStart(2,"0");return{src:`https://moja.work/media/pictures/numbers/25/numbers-0${number}.png`,alt:`number-${number}`}})}(),mainImage:{src:"https://moja.work/media/pictures/numbers/50/numbers-007.png",alt:"number-07"}},parameters:{docs:{canvas:{sourceState:"none"}}}},mosaic=hostClass=>`\n <ui-mosaic\n class="${hostClass}"\n [mode]="mode"\n [images]="images"\n [colors]="colors"\n [mainImage]="mainImage"\n [mainColor]="mainColor"\n [tileMinWidth]="tileMinWidth"\n [fallDelay]="fallDelay"\n [fallDuration]="fallDuration"\n [animationType]="animationType"\n [border]="border"\n ></ui-mosaic>`,replayProps=()=>{const shown=(0,_effect_chunk2.vPA)(!0);return{shown,replay:()=>{shown.set(!1),setTimeout(()=>shown.set(!0),60)}}},replayButton='\n <button class="ui fixed bottom-4 left-4 z-20" type="button" (click)="replay()">replay</button>',Images={render:args=>({props:{...args,...replayProps()},template:`\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n @if (shown()) { ${mosaic("fixed inset-0 -z-10")} }\n ${replayButton}\n </section>`})},Colors={args:{mode:"color",images:[]},render:args=>({props:{...args,...replayProps()},template:`\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n @if (shown()) { ${mosaic("fixed inset-0 -z-10")} }\n ${replayButton}\n </section>`})},OverText={args:{mode:"color",images:[],mainImage:null,mainColor:null,tileMinWidth:48,fallDelay:40},render:args=>({props:{...args,...replayProps()},template:`\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative m-4 w-full max-w-2xl">\n <ui-placeholder class="block h-64 w-full"></ui-placeholder>\n @if (shown()) { ${mosaic("absolute inset-0 z-10")} }\n </section>\n ${replayButton}`})},OverImage={args:{mode:"color",images:[],mainImage:null,mainColor:null,tileMinWidth:48,fallDelay:40},render:args=>({props:{...args,...replayProps()},template:`\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative m-4 h-96 w-[36rem]">\n <img\n class="h-full w-full object-cover"\n src="https://moja.work/media/pictures/numbers/50/numbers-007.png"\n alt="number-07"\n />\n @if (shown()) { ${mosaic("absolute inset-0 z-10")} }\n </section>\n ${replayButton}`})},__namedExportsOrder=["Images","Colors","OverText","OverImage"];Images.parameters={...Images.parameters,docs:{...Images.parameters?.docs,source:{originalSource:'{\n render: args => ({\n props: {\n ...args,\n ...replayProps()\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n @if (shown()) { ${mosaic(\'fixed inset-0 -z-10\')} }\n ${replayButton}\n </section>`\n })\n}',...Images.parameters?.docs?.source},description:{story:"Pinned behind the page, which is what the component used to do on its own.\nThe three declarations that were burned into `:host` now sit on the tag,\nwhere a consumer can see and change them.",...Images.parameters?.docs?.description}}},Colors.parameters={...Colors.parameters,docs:{...Colors.parameters?.docs,source:{originalSource:"{\n args: {\n mode: 'color',\n // Empty on purpose: this story is about the colors, and a control still\n // holding 120 images would suggest they are part of the example.\n images: []\n },\n render: args => ({\n props: {\n ...args,\n ...replayProps()\n },\n template: `\n <ui-intern-header theme=\"theme-light\"></ui-intern-header>\n <section class=\"relative flex flex-col\">\n @if (shown()) { ${mosaic('fixed inset-0 -z-10')} }\n ${replayButton}\n </section>`\n })\n}",...Colors.parameters?.docs?.source},description:{story:"The same host, filled with plain colors instead of images.",...Colors.parameters?.docs?.description}}},OverText.parameters={...OverText.parameters,docs:{...OverText.parameters?.docs,source:{originalSource:'{\n args: {\n mode: \'color\',\n images: [],\n mainImage: null,\n mainColor: null,\n tileMinWidth: 48,\n fallDelay: 40\n },\n render: args => ({\n props: {\n ...args,\n ...replayProps()\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative m-4 w-full max-w-2xl">\n <ui-placeholder class="block h-64 w-full"></ui-placeholder>\n @if (shown()) { ${mosaic(\'absolute inset-0 z-10\')} }\n </section>\n ${replayButton}`\n })\n}',...OverText.parameters?.docs?.source},description:{story:"Not a background at all: the same tag inside a `relative` box, stacked ON\nTOP of what it covers. Both backdrops are empty here on purpose — what the\nfalling tiles reveal is the content underneath, not a picture the mosaic\nbrought along.",...OverText.parameters?.docs?.description}}},OverImage.parameters={...OverImage.parameters,docs:{...OverImage.parameters?.docs,source:{originalSource:'{\n args: {\n mode: \'color\',\n images: [],\n mainImage: null,\n mainColor: null,\n tileMinWidth: 48,\n fallDelay: 40\n },\n render: args => ({\n props: {\n ...args,\n ...replayProps()\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative m-4 h-96 w-[36rem]">\n <img\n class="h-full w-full object-cover"\n src="https://moja.work/media/pictures/numbers/50/numbers-007.png"\n alt="number-07"\n />\n @if (shown()) { ${mosaic(\'absolute inset-0 z-10\')} }\n </section>\n ${replayButton}`\n })\n}',...OverImage.parameters?.docs?.source},description:{story:"The same again over a picture — the host is the only difference.",...OverImage.parameters?.docs?.description}}}},"./libs/ui/.storybook/demos/header/header.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"/* The intern header is reduced to just the theme switch button, pinned to the */\n/* bottom-left corner of the Storybook canvas. */\nbutton {\n position: fixed;\n bottom: calc(var(--ui-spacer) * 0.5);\n left: calc(var(--ui-spacer) * 0.5);\n z-index: 1000;\n\n &._on-top {\n z-index: 10000;\n }\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/atoms/mosaic/mosaic.animations.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Animations of the background grid, separated from the layout styles.\n Each endless mode applies its modifier class to a picked tile and removes\n it after the animation finished (timer-driven), so tiles can replay. */\n\n/* infinity: a randomly picked tile pops from tiny to its full size. */\n._tile._-grow {\n animation: ui-mosaic-grow var(--ui-mosaic-fall, 1200ms)\n ease-out;\n}\n\n@keyframes ui-mosaic-grow {\n from {\n transform: scale(0);\n }\n\n to {\n transform: scale(1);\n }\n}\n\n/* pulse: a randomly picked tile takes a soft breath. */\n._tile._-pulse {\n animation: ui-mosaic-pulse var(--ui-mosaic-fall, 1200ms)\n ease-in-out;\n}\n\n@keyframes ui-mosaic-pulse {\n 0%,\n 100% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(1.12);\n }\n}\n\n/* flip: a randomly picked tile turns once around its Y axis. */\n._tile._-flip {\n animation: ui-mosaic-flip var(--ui-mosaic-fall, 1200ms)\n ease-in-out;\n}\n\n@keyframes ui-mosaic-flip {\n from {\n transform: perspective(60rem) rotateY(0deg);\n }\n\n to {\n transform: perspective(60rem) rotateY(360deg);\n }\n}\n\n/* fade: a randomly picked tile blinks out and back in. */\n._tile._-fade {\n animation: ui-mosaic-fade var(--ui-mosaic-fall, 1200ms)\n ease-in-out;\n}\n\n@keyframes ui-mosaic-fade {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0;\n }\n}\n\n/* wave: tiles lift briefly while a diagonal sweep crosses the grid. */\n._tile._-wave {\n animation: ui-mosaic-wave var(--ui-mosaic-fall, 1200ms)\n ease-in-out;\n}\n\n@keyframes ui-mosaic-wave {\n 0%,\n 100% {\n transform: translateY(0) scale(1);\n }\n\n 50% {\n transform: translateY(-8%) scale(1.06);\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/atoms/mosaic/mosaic.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n:host {\n /* No position, no z-index, no size: WHERE the mosaic sits — pinned behind\n the page, inside a box, over a picture — is the caller's decision, and so\n is how big it is. It fills the box it is given and brings nothing else.\n Given no box, it renders nothing; that is a wiring mistake, not a fault\n of the component. `pointer-events: none` stays: it is decoration, and\n decoration never takes a click away from what it lies on. */\n display: block;\n overflow: hidden;\n pointer-events: none;\n}\n\n._grid {\n /* Positioned so it paints ABOVE the absolutely positioned backdrop —\n unpositioned flow content would be covered by it regardless of DOM\n order. */\n position: relative;\n display: grid;\n width: 100%;\n height: 100%;\n}\n\n/* The backdrop behind the tiles — an image in `image` mode, a plain color in\n `color` mode. Both fill the host; what the falling tiles reveal is whichever\n one is present (and the page itself when neither is). */\n._main-image,\n._main-color {\n position: absolute;\n inset: 0;\n}\n\n._main-image {\n background-size: cover;\n background-position: center center;\n}\n\n/* In `color` mode the tile IS the surface — the color is bound straight onto\n this element, so a colored tile needs no child at all and falls, flips and\n pulses exactly like an image tile. */\n._tile {\n aspect-ratio: 4 / 3;\n overflow: hidden;\n transform-origin: center center;\n}\n\n/* Optional tile border (border input). */\n:host(._-border) ._tile {\n box-sizing: border-box;\n border: var(--ui-border-width) solid var(--ui-c-secondary);\n}\n\n/* A fallen tile: shrunk to nothing around its center, fully transparent —\n it stays gone and reveals the main image behind the grid. The transition\n lives ONLY on the fallen state: shrinking animates, reappearing (state\n resets, infinity rounds) snaps instantly — tiles never grow into view. */\n._tile._-fallen {\n transform: scale(0);\n opacity: 0;\n transition:\n transform var(--ui-mosaic-fall, 1200ms) ease-in,\n opacity var(--ui-mosaic-fall, 1200ms) ease-in;\n}\n\n._tile img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n object-position: center center;\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* A floor, not a size: width and height come from wherever it is used.\n Without one an empty stand-in collapses to a text line and stops being\n the mass it exists to be. The floor is a named hook with a fallback, so a\n consumer who deliberately wants a smaller stand-in can set\n `--ui-placeholder-min-width` / `--ui-placeholder-min-height` without a\n cascade fight — an unlayered host rule otherwise beats a width utility in\n `@layer utilities` (tickets#241, tickets#251, tickets#253). */\n min-width: var(--ui-placeholder-min-width, calc(var(--ui-spacer) * 3));\n min-height: var(--ui-placeholder-min-height, calc(var(--ui-spacer) * 3));\n padding: calc(var(--ui-spacer) * 0.25);\n\n /* The overlay header's pair: filled enough to read as chrome rather than\n content, and theme-aware through the tokens. */\n background-color: var(--ui-c-primary);\n color: var(--ui-c-default);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-radius: var(--ui-border-radius);\n\n /* It is scenery, never the subject: nothing here should invite a click or\n land in a text selection. */\n -webkit-user-select: none;\n user-select: none;\n\n ._label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);