@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([[6252,6922],{"./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/forms/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"),_slider_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/slider/slider.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_slider_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-slider.json");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(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:_slider_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"slider",children:"Slider"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A form wrapper around one or two native ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'<input type="range">'})," elements, with a label,\na live value read-out and a highlighted track fill."]}),"\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:["A wrapper around one or two native ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'<input type="range">'})," elements: label,\nlive value read-out and a filled track, in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"single"})," or ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"range"})," mode where two\nthumbs cannot cross. Value binding stays native on the projected input. It has\nno validation or error state, because a range input always holds a value inside\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[min, max]"})," — there is nothing to be invalid."]}),"\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-slider",entry:_guide_ui_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:"overview",children:"Overview"}),"\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:"UiSliderComponent"})," styles the native range input(s) via ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"var(--ui-*)"})," design tokens.\nValue binding stays native: place ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[(ngModel)]"})," directly on the projected\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'<input type="range">'}),". In ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"range"})," mode two inputs (first = low, second = high) form a\nmin–max span; the component keeps them from crossing. A range input always holds a value\ninside ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[min, max]"}),", so the slider has no validation/error state."]}),"\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",{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:"Property"}),(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:"label"})}),(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:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Text label above the slider, tied to the (first) projected input: it keeps its own ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"id"})," or is handed one, and the label points at it."]})]}),(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:"sliderType"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'single' | 'range'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'single'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"One thumb (single value) or two thumbs (min–max span)."})]}),(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:"showValue"})}),(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:"true"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Whether the current numeric value is rendered next to the slider."})]})]})]}),"\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:"single-value",children:"Single value"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The default story holds the whole panel — switch ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"sliderType"})," to see the\nsecond thumb arrive:"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_slider_component_stories__WEBPACK_IMPORTED_MODULE_4__.Slider}),"\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-slider [label]="\'Volume\'">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" min="0" max="100" step="1" />\n</ui-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:"range-two-thumbs",children:"Range (two thumbs)"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The first projected input is the low bound, the second is the high bound. The component\nkeeps ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"low ≤ high"})," by clamping whichever thumb crosses the other, and the read-out shows\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"low – high"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-slider--range",children:"Open story: Range"})}),"\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-slider [label]="\'Price\'" sliderType="range">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" min="0" max="100" step="1" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" min="0" max="100" step="1" />\n</ui-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:"steps",children:"Steps"}),"\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:"min"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"step"})," are set on the projected native input."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-slider--with-steps",children:"Open story: Steps"})}),"\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:"without-value-read-out",children:"Without value read-out"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-slider--value-hidden",children:"Open story: Without value read-out"})}),"\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-slider [label]="\'Volume\'" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" min="0" max="100" step="1" />\n</ui-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:"disabled",children:"Disabled"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-slider--disabled",children:"Open story: Disabled"})})]})}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/forms/slider/slider.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Disabled:()=>Disabled,Range:()=>Range,Slider:()=>Slider,ValueHidden:()=>ValueHidden,WithSteps:()=>WithSteps,__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"),_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),_slider_component__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/slider/slider.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Forms/Slider",component:_slider_component__WEBPACK_IMPORTED_MODULE_4__.H,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,_slider_component__WEBPACK_IMPORTED_MODULE_4__.H,_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_3__.o]})],argTypes:{label:{control:"text"},sliderType:{control:"select",options:["single","range"]},showValue:{control:"boolean"},value:{control:{type:"range",min:0,max:100,step:1}},low:{control:{type:"range",min:0,max:100,step:1}},high:{control:{type:"range",min:0,max:100,step:1}},min:{control:{type:"range",min:0,max:100,step:1}},max:{control:{type:"range",min:0,max:100,step:1}},step:{control:{type:"range",min:1,max:25,step:1}}},args:{label:"Volume",sliderType:"single",showValue:!0,value:40,low:25,high:75,min:0,max:100,step:1},parameters:{docs:{canvas:{sourceState:"none"}}}},hide=(...names)=>Object.fromEntries(names.map(n=>[n,{table:{disable:!0}}])),Slider={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n @if (sliderType === \'range\') {\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n } @else {\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n }\n </section>\n '})},Range={argTypes:hide("label","sliderType","showValue","value"),args:{label:"Price",sliderType:"range"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},WithSteps={argTypes:hide("label","sliderType","showValue","low","high"),args:{label:"Rating",value:6,min:0,max:10,step:2},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},ValueHidden={parameters:{controls:{disable:!0}},args:{showValue:!1},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},Disabled={parameters:{controls:{disable:!0}},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" disabled />\n </ui-slider>\n </section>\n '})},__namedExportsOrder=["Slider","Range","WithSteps","ValueHidden","Disabled"];Slider.parameters={...Slider.parameters,docs:{...Slider.parameters?.docs,source:{originalSource:'{\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n @if (sliderType === \'range\') {\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n } @else {\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n }\n </section>\n `\n })\n}',...Slider.parameters?.docs?.source},description:{story:"The whole panel: `sliderType` switches between one thumb and two, so\n`value` drives the single slider and `low`/`high` the range — every row\nmoves something in one of the two modes. One `ui-slider` per branch, not\nan `@if` around the projected inputs: a control-flow block with two root\nnodes is projected into the default slot, and the slider has none — the\nthumbs would be bound and invisible.",...Slider.parameters?.docs?.description}}},Range.parameters={...Range.parameters,docs:{...Range.parameters?.docs,source:{originalSource:'{\n argTypes: hide(\'label\', \'sliderType\', \'showValue\', \'value\'),\n args: {\n label: \'Price\',\n sliderType: \'range\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...Range.parameters?.docs?.source}}},WithSteps.parameters={...WithSteps.parameters,docs:{...WithSteps.parameters?.docs,source:{originalSource:'{\n argTypes: hide(\'label\', \'sliderType\', \'showValue\', \'low\', \'high\'),\n args: {\n label: \'Rating\',\n value: 6,\n min: 0,\n max: 10,\n step: 2\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...WithSteps.parameters?.docs?.source}}},ValueHidden.parameters={...ValueHidden.parameters,docs:{...ValueHidden.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n args: {\n showValue: false\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...ValueHidden.parameters?.docs?.source}}},Disabled.parameters={...Disabled.parameters,docs:{...Disabled.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" disabled />\n </ui-slider>\n </section>\n `\n })\n}',...Disabled.parameters?.docs?.source}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[6922],{"./libs/ui/src/lib/forms/slider/slider.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Disabled:()=>Disabled,Range:()=>Range,Slider:()=>Slider,ValueHidden:()=>ValueHidden,WithSteps:()=>WithSteps,__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"),_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),_slider_component__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/slider/slider.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Forms/Slider",component:_slider_component__WEBPACK_IMPORTED_MODULE_4__.H,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,_slider_component__WEBPACK_IMPORTED_MODULE_4__.H,_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_3__.o]})],argTypes:{label:{control:"text"},sliderType:{control:"select",options:["single","range"]},showValue:{control:"boolean"},value:{control:{type:"range",min:0,max:100,step:1}},low:{control:{type:"range",min:0,max:100,step:1}},high:{control:{type:"range",min:0,max:100,step:1}},min:{control:{type:"range",min:0,max:100,step:1}},max:{control:{type:"range",min:0,max:100,step:1}},step:{control:{type:"range",min:1,max:25,step:1}}},args:{label:"Volume",sliderType:"single",showValue:!0,value:40,low:25,high:75,min:0,max:100,step:1},parameters:{docs:{canvas:{sourceState:"none"}}}},hide=(...names)=>Object.fromEntries(names.map(n=>[n,{table:{disable:!0}}])),Slider={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n @if (sliderType === \'range\') {\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n } @else {\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n }\n </section>\n '})},Range={argTypes:hide("label","sliderType","showValue","value"),args:{label:"Price",sliderType:"range"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},WithSteps={argTypes:hide("label","sliderType","showValue","low","high"),args:{label:"Rating",value:6,min:0,max:10,step:2},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},ValueHidden={parameters:{controls:{disable:!0}},args:{showValue:!1},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},Disabled={parameters:{controls:{disable:!0}},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" disabled />\n </ui-slider>\n </section>\n '})},__namedExportsOrder=["Slider","Range","WithSteps","ValueHidden","Disabled"];Slider.parameters={...Slider.parameters,docs:{...Slider.parameters?.docs,source:{originalSource:'{\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n @if (sliderType === \'range\') {\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n } @else {\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n }\n </section>\n `\n })\n}',...Slider.parameters?.docs?.source},description:{story:"The whole panel: `sliderType` switches between one thumb and two, so\n`value` drives the single slider and `low`/`high` the range — every row\nmoves something in one of the two modes. One `ui-slider` per branch, not\nan `@if` around the projected inputs: a control-flow block with two root\nnodes is projected into the default slot, and the slider has none — the\nthumbs would be bound and invisible.",...Slider.parameters?.docs?.description}}},Range.parameters={...Range.parameters,docs:{...Range.parameters?.docs,source:{originalSource:'{\n argTypes: hide(\'label\', \'sliderType\', \'showValue\', \'value\'),\n args: {\n label: \'Price\',\n sliderType: \'range\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...Range.parameters?.docs?.source}}},WithSteps.parameters={...WithSteps.parameters,docs:{...WithSteps.parameters?.docs,source:{originalSource:'{\n argTypes: hide(\'label\', \'sliderType\', \'showValue\', \'low\', \'high\'),\n args: {\n label: \'Rating\',\n value: 6,\n min: 0,\n max: 10,\n step: 2\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...WithSteps.parameters?.docs?.source}}},ValueHidden.parameters={...ValueHidden.parameters,docs:{...ValueHidden.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n args: {\n showValue: false\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...ValueHidden.parameters?.docs?.source}}},Disabled.parameters={...Disabled.parameters,docs:{...Disabled.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" disabled />\n </ui-slider>\n </section>\n `\n })\n}',...Disabled.parameters?.docs?.source}}}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[977,3048],{"./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/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/.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/forms/switch/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"),_switch_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/switch/switch.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_switch_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-switch.json");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",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:_switch_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"switch",children:"Switch"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A toggle switch built on a native checkbox."}),"\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:["A switch represents a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"deliberate user decision"}),": both states are always\nvalid and the change takes effect immediately. There is no invalid state,\ntherefore the component has ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"no validation support"})," — no error input, no\nerror icon, no error overlay. If you need to enforce a choice (e.g. a required\nconsent), use ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-checkbox"})," with validation instead."]}),"\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-switch",entry:_guide_ui_switch_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:"overview",children:"Overview"}),"\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:"UiSwitchComponent"})," wraps a projected native checkbox (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-tag"}),") and styles\nit as a track-and-knob toggle switch — purely with CSS on the input itself, so\nsemantics, keyboard handling and form integration come from the real checkbox.\nIt follows the same anatomy as the other form components: control on the left,\nlabel alongside. The track matches the rendered height of ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-checkbox"}),", so\nmixed forms keep an even rhythm."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Give the projected input ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'role="switch"'})," so assistive technology announces a\nswitch instead of a checkbox."]}),"\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)(_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.code,{children:"label"}),": (Input) The text label next to the switch. It is tied to the\nswitch: the projected input keeps its own ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"id"})," if it has one, otherwise the\ncomponent hands it one and points the label at it — a click on the label\nflips the switch, a screen reader names it."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Colours are CSS custom properties, not inputs — see below. The knob carries\nthe position, so a coloured track says something about the switch itself (one\nthat guards data, for instance), not about whether it is on."}),"\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:"basic-example",children:"Basic Example"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The story binds the label to the model, so it reads the current state\n(",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"on"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"off"}),"):"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_switch_component_stories__WEBPACK_IMPORTED_MODULE_4__.Switch}),"\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-switch [label]="on ? \'on\' : \'off\'">\n <input class="ui" ui-tag type="checkbox" role="switch" [(ngModel)]="on" />\n</ui-switch>\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:"custom-knob-color",children:"Custom knob color"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:['In the "on" state the knob takes ',(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--switch-knob-on-color"}),"; the track itself\nstays neutral:"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-switch--custom-knob-color",children:"Open story: Custom knob color"})}),"\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-switch [label]="\'Pink\'" [style.--switch-knob-on-color]="\'#e91e63\'">\n <input class="ui" ui-tag type="checkbox" role="switch" [(ngModel)]="on" />\n</ui-switch>\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:"flat",children:"Flat"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The projected input carries ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-flat"})," instead of ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui"}),": the rim disappears\ninto the track and the knob drops its lift, leaving two plain surfaces. Focus\nis the one moment the rim returns — as a focus-colored border, never a glow,\nbecause flat controls in this house do not use shadows."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-switch--flat",children:"Open story: Flat"})}),"\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-switch [label]="\'Locked\'" [style.--switch-knob-on-color]="\'#f5a623\'">\n <input class="ui-flat" ui-tag type="checkbox" role="switch" [(ngModel)]="on" />\n</ui-switch>\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:"custom-properties",children:"Custom properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:'Every surface the switch paints is a hook, so an app can dress it without\nout-specifying the component\'s rules. Set them on the element or anywhere\nabove it — they inherit: the component declares none of them on its own\nhost, it only reads them with a token fallback, so a value set on a\ncontainer reaches every switch below. (It used to declare them on the host,\nwhich beat anything inherited and made "set it once above" a claim the page\nmade and the component broke.)'}),"\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:"Name"}),(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:"--switch-track-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"var(--ui-c-fourthly)"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The track, in both states."})]}),(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:"--switch-rim-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"var(--switch-track-color)"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The track's border — follows the track by default, so the rim is\ninvisible unless it is given a color of its own."})})]}),(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:"--switch-knob-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"var(--ui-c-background)"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:'The knob in the "off" state.'})]}),(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:"--switch-knob-on-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"#2196f3"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:'The knob in the "on" state.'})]}),(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:"--switch-focus-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"var(--ui-c-focus)"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Border and glow while focused. The focus itself stays the library's\nbusiness — apps recolor it, they do not rebuild it."})})]})]})]}),"\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:"animation",children:"Animation"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The knob squashes in travel direction while pressed (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:":active"}),") and settles\nwith a small overshoot on release (a springy ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cubic-bezier"})," on the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"translate"}),"\ntransition); its color cross-fades to ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--switch-knob-on-color"}),". All of it is plain CSS\ntimed in quarters of the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-time"})," token. With ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"prefers-reduced-motion"})," the\nknob slides plainly without squash or overshoot."]})]})}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/forms/switch/switch.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CustomKnobColor:()=>CustomKnobColor,Flat:()=>Flat,Switch:()=>Switch,__namedExportsOrder:()=>__namedExportsOrder,default:()=>switch_component_stories});var fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),transloco_storybook_module=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var switch_componentngResource=__webpack_require__("./libs/ui/src/lib/forms/switch/switch.component.css?ngResource"),switch_componentngResource_default=__webpack_require__.n(switch_componentngResource),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let nextId=0,UiSwitchComponent=class UiSwitchComponent{host=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);label=(0,core.input)(null);fieldId=(0,_effect_chunk2.vPA)(null);ngAfterContentInit(){const el=this.host.nativeElement.querySelector("[ui-tag]");el&&(el.id||(el.id="ui-switch-"+nextId++),this.fieldId.set(el.id))}static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiSwitchComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-switch",template:'<ng-content select="[ui-tag]"></ng-content>\n\n@if (label()) {\n <label class="ui-ellipsis" [attr.for]="fieldId()">{{ label() }}</label>\n}\n',encapsulation:_debug_node_chunk.gXe.None,styles:[switch_componentngResource_default()]})],UiSwitchComponent);const switch_component_stories={title:"Forms/Switch",component:UiSwitchComponent,decorators:[(0,dist.Iz)({imports:[header_component.b,fesm2022_forms.YN,UiSwitchComponent,transloco_storybook_module.o]})],argTypes:{knobColor:{control:"select",options:["","var(--ui-c-focus)","var(--ui-c-success)","var(--ui-c-warn)","var(--ui-c-error)"],description:'Knob color in the "on" state; empty keeps the stylesheet default.'},trackColor:{control:"select",options:["","var(--ui-c-fourthly)","var(--ui-c-secondary)","var(--ui-c-warn)","var(--ui-c-primary)"],description:"Track color in both states; empty keeps the neutral surface."},on:{control:"boolean"}},args:{knobColor:"",trackColor:"",on:!1},parameters:{docs:{canvas:{sourceState:"none"}}}},Switch={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n '})},Flat={argTypes:{on:{table:{disable:!0}}},args:{knobColor:"#f5a623",trackColor:"#e8e8e8",on:!0},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col gap-6">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui-flat"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n '})},CustomKnobColor={argTypes:{on:{table:{disable:!0}},trackColor:{table:{disable:!0}}},args:{knobColor:"#e91e63",on:!0},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n '})},__namedExportsOrder=["Switch","Flat","CustomKnobColor"];Switch.parameters={...Switch.parameters,docs:{...Switch.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n `\n };\n }\n}',...Switch.parameters?.docs?.source}}},Flat.parameters={...Flat.parameters,docs:{...Flat.parameters?.docs,source:{originalSource:'{\n argTypes: {\n on: {\n table: {\n disable: true\n }\n }\n },\n args: {\n // the colors ARE the example: a colored knob on a colored track\n knobColor: \'#f5a623\',\n trackColor: \'#e8e8e8\',\n on: true\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col gap-6">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui-flat"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n `\n };\n }\n}',...Flat.parameters?.docs?.source}}},CustomKnobColor.parameters={...CustomKnobColor.parameters,docs:{...CustomKnobColor.parameters?.docs,source:{originalSource:'{\n argTypes: {\n on: {\n table: {\n disable: true\n }\n },\n trackColor: {\n table: {\n disable: true\n }\n }\n },\n args: {\n // the color IS the example here: a custom "on" knob color\n knobColor: \'#e91e63\',\n on: true\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n `\n };\n }\n}',...CustomKnobColor.parameters?.docs?.source}}}},"./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/forms/switch/switch.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 {\nui-switch {\n /* scope only for component - encapsulation is set to ViewEncapsulation.None */\n position: relative;\n display: grid;\n grid-template-columns: auto 1fr;\n grid-gap: calc(var(--ui-spacer) * 0.4);\n\n /* Without a label there is no second column to reserve — otherwise the\n empty track keeps its share and the switch drags invisible space around\n with it wherever it is placed. */\n &:not(:has(label)) {\n grid-template-columns: auto;\n grid-gap: 0;\n }\n max-width: 100%;\n align-items: center;\n\n /* derived sizes — a touch above the rendered checkbox height (spacer 4rem → 2rem) */\n --switch-height: calc(var(--ui-spacer) * 0.5);\n --switch-width: calc(var(--switch-height) * 1.9);\n --switch-pad: calc(var(--ui-border-width) * 2);\n --switch-knob: calc(var(--switch-height) - (var(--switch-pad) * 2) - (var(--ui-border-width) * 2));\n --switch-travel: calc(\n var(--switch-width) - var(--switch-knob) - (var(--switch-pad) * 2) - (var(--ui-border-width) * 2)\n );\n /* --ui-time is 1s — the knob works in quarters of it */\n --switch-time: calc(var(--ui-time) * 0.25);\n\n /* Color hooks (tickets#146): every surface the switch paints reads a\n custom property with a token default, so an app dresses it by setting\n these — on the tag or on any container above, they inherit. The\n hooks are deliberately NOT declared on the host: a declaration here\n would beat anything inherited from above, and \"set it once on a\n container\" would be a lie (it was, measured: a value set on the\n parent changed nothing). Only the derived, internal sizes above are\n declared. */\n\n input[type='checkbox']:is(.ui, .ui-flat) {\n /* neutralise the global checkbox look (scale/translate from forms.css) */\n appearance: none;\n transform: none;\n position: relative;\n display: inline-flex;\n width: var(--switch-width);\n height: var(--switch-height);\n margin: 0;\n padding: 0;\n flex: 0 0 auto;\n border: var(--ui-border-width) solid\n var(--switch-rim-color, var(--switch-track-color, var(--ui-c-fourthly)));\n border-radius: var(--switch-height);\n background-color: var(--switch-track-color, var(--ui-c-fourthly));\n cursor: pointer;\n\n &::before {\n content: '';\n position: absolute;\n top: var(--switch-pad);\n left: var(--switch-pad);\n width: var(--switch-knob);\n height: var(--switch-knob);\n border-radius: 50%;\n background-color: var(--switch-knob-color, var(--ui-c-background));\n translate: 0 0;\n scale: 1;\n /* springy settle: the back-out bezier overshoots and pops in */\n transition:\n translate var(--switch-time) cubic-bezier(0.34, 1.56, 0.64, 1),\n scale calc(var(--switch-time) * 0.5) ease-out,\n background-color var(--switch-time) ease;\n }\n\n /* squash while pressing — stretches in travel direction, then releases */\n &:active:not(:disabled)::before {\n scale: 1.2 0.9;\n }\n\n &:checked::before {\n translate: var(--switch-travel) 0;\n background-color: var(--switch-knob-on-color, #2196f3);\n }\n\n &:focus-visible {\n outline: none;\n border-color: var(--switch-focus-color, var(--ui-c-focus));\n box-shadow: 0 0 calc(var(--ui-button-shadow) * 2) 0\n var(--switch-focus-color, var(--ui-c-focus));\n }\n\n &:disabled {\n cursor: default;\n }\n }\n\n /* Flat variant — active when the projected input carries `ui-flat`. Track\n and knob are pure surfaces: the rim disappears into the track and the\n knob drops its lift, so only the two areas speak. Focus is the one place\n the rim comes back — as a plain focus-colored border, never a glow;\n flat controls do not use shadows (see forms.css). */\n input[type='checkbox'].ui-flat {\n border-color: transparent;\n\n &::before {\n box-shadow: none;\n }\n\n /* The global flat rule (forms.css) answers focus with an 8% surface —\n right for a text field, wrong here: the track carries a color of its\n own. Keep it, and let the border do the talking. `:focus` (not just\n `:focus-visible`) because that is the selector being overridden. */\n &:focus {\n border-color: var(--switch-focus-color, var(--ui-c-focus));\n box-shadow: none;\n background-color: var(--switch-track-color, var(--ui-c-fourthly));\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n input[type='checkbox']:is(.ui, .ui-flat) {\n &::before {\n transition:\n translate var(--switch-time) ease,\n background-color var(--switch-time) ease;\n }\n\n &:active:not(:disabled)::before {\n scale: 1;\n }\n }\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3048],{"./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/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/forms/switch/switch.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CustomKnobColor:()=>CustomKnobColor,Flat:()=>Flat,Switch:()=>Switch,__namedExportsOrder:()=>__namedExportsOrder,default:()=>switch_component_stories});var fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),transloco_storybook_module=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var switch_componentngResource=__webpack_require__("./libs/ui/src/lib/forms/switch/switch.component.css?ngResource"),switch_componentngResource_default=__webpack_require__.n(switch_componentngResource),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let nextId=0,UiSwitchComponent=class UiSwitchComponent{host=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);label=(0,core.input)(null);fieldId=(0,_effect_chunk2.vPA)(null);ngAfterContentInit(){const el=this.host.nativeElement.querySelector("[ui-tag]");el&&(el.id||(el.id="ui-switch-"+nextId++),this.fieldId.set(el.id))}static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiSwitchComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-switch",template:'<ng-content select="[ui-tag]"></ng-content>\n\n@if (label()) {\n <label class="ui-ellipsis" [attr.for]="fieldId()">{{ label() }}</label>\n}\n',encapsulation:_debug_node_chunk.gXe.None,styles:[switch_componentngResource_default()]})],UiSwitchComponent);const switch_component_stories={title:"Forms/Switch",component:UiSwitchComponent,decorators:[(0,dist.Iz)({imports:[header_component.b,fesm2022_forms.YN,UiSwitchComponent,transloco_storybook_module.o]})],argTypes:{knobColor:{control:"select",options:["","var(--ui-c-focus)","var(--ui-c-success)","var(--ui-c-warn)","var(--ui-c-error)"],description:'Knob color in the "on" state; empty keeps the stylesheet default.'},trackColor:{control:"select",options:["","var(--ui-c-fourthly)","var(--ui-c-secondary)","var(--ui-c-warn)","var(--ui-c-primary)"],description:"Track color in both states; empty keeps the neutral surface."},on:{control:"boolean"}},args:{knobColor:"",trackColor:"",on:!1},parameters:{docs:{canvas:{sourceState:"none"}}}},Switch={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n '})},Flat={argTypes:{on:{table:{disable:!0}}},args:{knobColor:"#f5a623",trackColor:"#e8e8e8",on:!0},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col gap-6">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui-flat"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n '})},CustomKnobColor={argTypes:{on:{table:{disable:!0}},trackColor:{table:{disable:!0}}},args:{knobColor:"#e91e63",on:!0},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n '})},__namedExportsOrder=["Switch","Flat","CustomKnobColor"];Switch.parameters={...Switch.parameters,docs:{...Switch.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n `\n };\n }\n}',...Switch.parameters?.docs?.source}}},Flat.parameters={...Flat.parameters,docs:{...Flat.parameters?.docs,source:{originalSource:'{\n argTypes: {\n on: {\n table: {\n disable: true\n }\n }\n },\n args: {\n // the colors ARE the example: a colored knob on a colored track\n knobColor: \'#f5a623\',\n trackColor: \'#e8e8e8\',\n on: true\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col gap-6">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui-flat"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n `\n };\n }\n}',...Flat.parameters?.docs?.source}}},CustomKnobColor.parameters={...CustomKnobColor.parameters,docs:{...CustomKnobColor.parameters?.docs,source:{originalSource:'{\n argTypes: {\n on: {\n table: {\n disable: true\n }\n },\n trackColor: {\n table: {\n disable: true\n }\n }\n },\n args: {\n // the color IS the example here: a custom "on" knob color\n knobColor: \'#e91e63\',\n on: true\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n `\n };\n }\n}',...CustomKnobColor.parameters?.docs?.source}}}},"./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/forms/switch/switch.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 {\nui-switch {\n /* scope only for component - encapsulation is set to ViewEncapsulation.None */\n position: relative;\n display: grid;\n grid-template-columns: auto 1fr;\n grid-gap: calc(var(--ui-spacer) * 0.4);\n\n /* Without a label there is no second column to reserve — otherwise the\n empty track keeps its share and the switch drags invisible space around\n with it wherever it is placed. */\n &:not(:has(label)) {\n grid-template-columns: auto;\n grid-gap: 0;\n }\n max-width: 100%;\n align-items: center;\n\n /* derived sizes — a touch above the rendered checkbox height (spacer 4rem → 2rem) */\n --switch-height: calc(var(--ui-spacer) * 0.5);\n --switch-width: calc(var(--switch-height) * 1.9);\n --switch-pad: calc(var(--ui-border-width) * 2);\n --switch-knob: calc(var(--switch-height) - (var(--switch-pad) * 2) - (var(--ui-border-width) * 2));\n --switch-travel: calc(\n var(--switch-width) - var(--switch-knob) - (var(--switch-pad) * 2) - (var(--ui-border-width) * 2)\n );\n /* --ui-time is 1s — the knob works in quarters of it */\n --switch-time: calc(var(--ui-time) * 0.25);\n\n /* Color hooks (tickets#146): every surface the switch paints reads a\n custom property with a token default, so an app dresses it by setting\n these — on the tag or on any container above, they inherit. The\n hooks are deliberately NOT declared on the host: a declaration here\n would beat anything inherited from above, and \"set it once on a\n container\" would be a lie (it was, measured: a value set on the\n parent changed nothing). Only the derived, internal sizes above are\n declared. */\n\n input[type='checkbox']:is(.ui, .ui-flat) {\n /* neutralise the global checkbox look (scale/translate from forms.css) */\n appearance: none;\n transform: none;\n position: relative;\n display: inline-flex;\n width: var(--switch-width);\n height: var(--switch-height);\n margin: 0;\n padding: 0;\n flex: 0 0 auto;\n border: var(--ui-border-width) solid\n var(--switch-rim-color, var(--switch-track-color, var(--ui-c-fourthly)));\n border-radius: var(--switch-height);\n background-color: var(--switch-track-color, var(--ui-c-fourthly));\n cursor: pointer;\n\n &::before {\n content: '';\n position: absolute;\n top: var(--switch-pad);\n left: var(--switch-pad);\n width: var(--switch-knob);\n height: var(--switch-knob);\n border-radius: 50%;\n background-color: var(--switch-knob-color, var(--ui-c-background));\n translate: 0 0;\n scale: 1;\n /* springy settle: the back-out bezier overshoots and pops in */\n transition:\n translate var(--switch-time) cubic-bezier(0.34, 1.56, 0.64, 1),\n scale calc(var(--switch-time) * 0.5) ease-out,\n background-color var(--switch-time) ease;\n }\n\n /* squash while pressing — stretches in travel direction, then releases */\n &:active:not(:disabled)::before {\n scale: 1.2 0.9;\n }\n\n &:checked::before {\n translate: var(--switch-travel) 0;\n background-color: var(--switch-knob-on-color, #2196f3);\n }\n\n &:focus-visible {\n outline: none;\n border-color: var(--switch-focus-color, var(--ui-c-focus));\n box-shadow: 0 0 calc(var(--ui-button-shadow) * 2) 0\n var(--switch-focus-color, var(--ui-c-focus));\n }\n\n &:disabled {\n cursor: default;\n }\n }\n\n /* Flat variant — active when the projected input carries `ui-flat`. Track\n and knob are pure surfaces: the rim disappears into the track and the\n knob drops its lift, so only the two areas speak. Focus is the one place\n the rim comes back — as a plain focus-colored border, never a glow;\n flat controls do not use shadows (see forms.css). */\n input[type='checkbox'].ui-flat {\n border-color: transparent;\n\n &::before {\n box-shadow: none;\n }\n\n /* The global flat rule (forms.css) answers focus with an 8% surface —\n right for a text field, wrong here: the track carries a color of its\n own. Keep it, and let the border do the talking. `:focus` (not just\n `:focus-visible`) because that is the selector being overridden. */\n &:focus {\n border-color: var(--switch-focus-color, var(--ui-c-focus));\n box-shadow: none;\n background-color: var(--switch-track-color, var(--ui-c-fourthly));\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n input[type='checkbox']:is(.ui, .ui-flat) {\n &::before {\n transition:\n translate var(--switch-time) ease,\n background-color var(--switch-time) ease;\n }\n\n &:active:not(:disabled)::before {\n scale: 1;\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([[6354,7586],{"./libs/ui/src/lib/forms/validators/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"),_validators_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/validators/validators.component.stories.ts");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",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:_validators_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"validators",children:"Validators"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["These directives provide common validation logic for input fields, integrating seamlessly with Angular's template-driven forms (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ngModel"}),")."]}),"\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:"overview",children:"Overview"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The following validator directives are available:"}),"\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.code,{children:"uiInputIsNumber"}),": Validates that the input is a valid number."]}),"\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:"uiInputIsHex"}),": Validates that the input is a valid hexadecimal string (3, 6, or 8 characters, optional #)."]}),"\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:"uiInputUrl"}),": Validates that the input is a valid URL."]}),"\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:"uiInputForbiddenName"}),": Validates that the input is NOT equal to a forbidden string."]}),"\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:"uiInputUniqueName"}),": Validates that the input is unique against a list of existing values."]}),"\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:"uiInputIsbn"}),": Validates a full ISBN-10 or ISBN-13 (checksum verified; hyphens/spaces ignored, ISBN-10 optional trailing ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"X"}),")."]}),"\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:"uiInputInteger"}),": Validates digits only and additionally ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"strips"})," every non-digit character live while typing (cooperates with the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clearable"})," clear button). Use on a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="text"'})," field with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'inputmode="numeric"'}),". Optional ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," signal inputs bound the range (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," is also capped live; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"})," is validated only)."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["In addition, Angular's built-in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"email"})," validator is fully supported — its\nerror is rendered with a localized message (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"form.errors.email"}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"built-in-email",children:["Built-in: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"email"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Angular's standard email validator (the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"email"})," attribute on an input with\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ngModel"}),"). No ui directive is needed; the error overlay shows the localized\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"form.errors.email"})," message."]}),"\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-input label="Email Input">\n <input\n class="ui"\n type="email"\n email\n ngModel\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_validators_component_stories__WEBPACK_IMPORTED_MODULE_4__.Email}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputisnumber",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsNumber"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Ensures the input value is a valid number. It also automatically applies to any ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'input[type="number"]'}),"."]}),"\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-input label="Number Input">\n <input\n class="ui"\n type="text"\n uiInputIsNumber\n ngModel\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--is-number",children:"Open story: uiInputIsNumber"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputishex",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsHex"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Validates that the entered string is a valid hexadecimal value."}),"\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:"Note:"})," When the input field receives focus and is empty, it automatically prepends ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"#"})," for better user experience."]}),"\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-input label="Hex Input">\n <input\n class="ui"\n type="text"\n uiInputIsHex\n ngModel\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--is-hex",children:"Open story: uiInputIsHex"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputurl",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUrl"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Validates that the entered string is a valid URL."}),"\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:"Note:"})," When the input field receives focus and is empty, it automatically prepends ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"https://"})," for better user experience."]}),"\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-input label="URL Input">\n <input\n class="ui"\n type="text"\n uiInputUrl\n ngModel\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--is-url",children:"Open story: uiInputUrl"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputforbiddenname",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputForbiddenName"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Invalidates the input if it matches a specific forbidden string."}),"\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-input label="Forbidden Name">\n <input\n class="ui"\n type="text"\n [uiInputForbiddenName]="\'forbidden\'"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n ngModel\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--forbidden-name",children:"Open story: uiInputForbiddenName"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputuniquename",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUniqueName"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Ensures the input value does not exist in a given list of strings. Ideal for checking uniqueness (e.g., username availability in a local list)."}),"\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-input label="Unique Name">\n <input\n class="ui"\n type="text"\n [uiInputUniqueName]="[\'taken\', \'also-taken\']"\n ngModel\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--unique-name",children:"Open story: uiInputUniqueName"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputisbn",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsbn"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Validates a full ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"ISBN-10 or ISBN-13"}),", checksum included. Hyphens and spaces\nare ignored, and an ISBN-10 may end in an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"X"})," check digit. Invalid numbers and\ntypos are rejected. Empty is treated as valid (skip on optional fields)."]}),"\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-input label="ISBN">\n <input class="ui" type="text" uiInputIsbn ngModel ui-tag />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--isbn",children:"Open story: uiInputIsbn"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputinteger",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputInteger"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Enforces ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"digits only"})," (a non-negative whole number). Beyond validating, it\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"removes"})," any non-digit character live as it is typed or pasted, so the field\ncan never hold letters — this pairs with the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clearable"})," clear button. Put it on\na ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="text"'})," input with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'inputmode="numeric"'})," (a native ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="number"'})," field\nreturns an empty value on invalid input, so the characters cannot be stripped)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Optional ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," (signal inputs) bound the integer range. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," is enforced\nlive — typing past it caps the value — while ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"})," is checked on validation only,\nso a partial entry is not bumped up prematurely. Both accept a plain attribute\n(",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'min="0"'}),") or a binding (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'[max]="10"'}),")."]}),"\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-input label="Rating" clearable>\n <input\n class="ui"\n type="text"\n inputmode="numeric"\n uiInputInteger\n min="0"\n max="10"\n ngModel\n ui-tag />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--integer",children:"Open story: uiInputInteger"})})]})}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/forms/validators/validators.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Email:()=>Email,ForbiddenName:()=>ForbiddenName,Integer:()=>Integer,IsHex:()=>IsHex,IsNumber:()=>IsNumber,IsUrl:()=>IsUrl,Isbn:()=>Isbn,UniqueName:()=>UniqueName,__namedExportsOrder:()=>__namedExportsOrder,default:()=>validators_component_stories});var _common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs");function controlForbiddenNameValidator(name){return control=>function forbiddenNameValidator(forbiddenName,value){return!(!forbiddenName||!value)&&new RegExp(`^${forbiddenName}$`,"i").test(value)}(name,control.value)?{inputForbiddenName:{value:control.value}}:null}let UiForbiddenValidatorDirective=class UiForbiddenValidatorDirective{uiInputForbiddenName="";validate(control){return this.uiInputForbiddenName?controlForbiddenNameValidator(this.uiInputForbiddenName)(control):null}static propDecorators={uiInputForbiddenName:[{type:_debug_node_chunk.pde}]}};UiForbiddenValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputForbiddenName]",providers:[{provide:fesm2022_forms.cz,useExisting:UiForbiddenValidatorDirective,multi:!0}]})],UiForbiddenValidatorDirective);var _effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");function controlIntegerValidator(){return control=>function integerValidator(value){return null!=value&&""!==value&&/^\d+$/.test(String(value))}(control.value)?null:{integer:!0}}let UiInputIntegerValidatorDirective=class UiInputIntegerValidatorDirective{elementRef=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);min=(0,core.input)(Number.NaN,{transform:core.numberAttribute});max=(0,core.input)(Number.NaN,{transform:core.numberAttribute});onInput(){const el=this.elementRef.nativeElement;let clean=el.value.replaceAll(/\D/g,"");const max=this.max();if(""!==clean&&Number.isFinite(max)&&Number(clean)>max&&(clean=String(max)),clean===el.value)return;const caret=Math.max(0,(el.selectionStart??clean.length)-1);el.value=clean,el.setSelectionRange?.(caret,caret),el.dispatchEvent(new Event("input",{bubbles:!0}))}validate(control){if(!control.value)return null;const base=controlIntegerValidator()(control);if(base)return base;const value=Number(control.value),min=this.min(),max=this.max();return Number.isFinite(min)&&value<min?{min:{min,actual:value}}:Number.isFinite(max)&&value>max?{max:{max,actual:value}}:null}static propDecorators={min:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"min",required:!1,transform:void 0}]}],max:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"max",required:!1,transform:void 0}]}],onInput:[{type:_debug_node_chunk.Z$l,args:["input"]}]}};function controlIsbnValidator(){return control=>function isbnValidator(value){if(!value)return!1;const s=String(value).replaceAll(/[\s-]/g,"").toUpperCase();if(/^\d{9}[\dX]$/.test(s)){let sum=0;for(let i=0;i<10;i++)sum+=("X"===s[i]?10:Number(s[i]))*(10-i);return sum%11==0}if(/^\d{13}$/.test(s)){let sum=0;for(let i=0;i<13;i++)sum+=Number(s[i])*(i%2==0?1:3);return sum%10==0}return!1}(control.value)?null:{isbn:!0}}UiInputIntegerValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputInteger]",providers:[{provide:fesm2022_forms.cz,useExisting:UiInputIntegerValidatorDirective,multi:!0}]})],UiInputIntegerValidatorDirective);let UiInputIsbnValidatorDirective=class UiInputIsbnValidatorDirective{validate(control){return control.value?controlIsbnValidator()(control):null}};UiInputIsbnValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsbn]",providers:[{provide:fesm2022_forms.cz,useExisting:UiInputIsbnValidatorDirective,multi:!0}]})],UiInputIsbnValidatorDirective);let UiIsHexValidatorDirective=class UiIsHexValidatorDirective{_control;onFocus(){this._control&&!this._control.value&&this._control.setValue("#")}validate(control){return this._control=control,control.value?(control=>{const isHex=function hexValidator(value){return!!value&&/^#?([\dA-Fa-f]{3}|[\dA-Fa-f]{6}|[\dA-Fa-f]{8})$/.test(value)}(control.value);return isHex?null:{hexNotValid:!isHex}})(control):null}static propDecorators={onFocus:[{type:_debug_node_chunk.Z$l,args:["focus"]}]}};UiIsHexValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsHex]",providers:[{provide:fesm2022_forms.cz,useExisting:UiIsHexValidatorDirective,multi:!0}]})],UiIsHexValidatorDirective);let UiIsNumberValidatorDirective=class UiIsNumberValidatorDirective{elementRef=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);validate(){return this.elementRef.nativeElement.checkValidity()?null:{numberNotValid:!0}}};UiIsNumberValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsNumber],input[type=number]",providers:[{provide:fesm2022_forms.cz,useExisting:UiIsNumberValidatorDirective,multi:!0}]})],UiIsNumberValidatorDirective);let UiUniqueValidatorDirective=class UiUniqueValidatorDirective{uiInputUniqueName=[];validate(control){return this.uiInputUniqueName?function controlNameValidator(existValues){return control=>{const unique=function uniqueValidator(existValues,value){return!existValues.includes(value)}(existValues,control.value);return unique?null:{inputUniqueName:{value:control.value}}}}(this.uiInputUniqueName)(control):null}static propDecorators={uiInputUniqueName:[{type:_debug_node_chunk.pde}]}};UiUniqueValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputUniqueName]",providers:[{provide:fesm2022_forms.cz,useExisting:UiUniqueValidatorDirective,multi:!0}]})],UiUniqueValidatorDirective);let UiUrlValidatorDirective=class UiUrlValidatorDirective{control;validate(control){return this.control=control,control.value?(control=>function urlValidator(value){return!!value&&/^(https?:\/\/)?([\d.a-z-]+)\.([.a-z]{2,6})([\w ./-]*)*\/?$/.test(value)}(control.value)?null:{urlNotValid:!0})(control):null}onFocus(){this.control&&!this.control.value&&this.control.setValue("https://")}static propDecorators={onFocus:[{type:_debug_node_chunk.Z$l,args:["focus"]}]}};UiUrlValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputUrl]",providers:[{provide:fesm2022_forms.cz,useExisting:UiUrlValidatorDirective,multi:!0}]})],UiUrlValidatorDirective);var transloco_storybook_module=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),input_component=__webpack_require__("./libs/ui/src/lib/forms/input/input.component.ts");const validators_component_stories={title:"Forms/Validators",decorators:[(0,dist.Iz)({providers:[fesm2022_forms.vS],imports:[header_component.b,fesm2022_forms.YN,_common_module_chunk.TG,input_component.K,UiIsNumberValidatorDirective,UiIsHexValidatorDirective,UiUrlValidatorDirective,UiForbiddenValidatorDirective,UiUniqueValidatorDirective,UiInputIsbnValidatorDirective,UiInputIntegerValidatorDirective,transloco_storybook_module.o]})],parameters:{controls:{disable:!0},docs:{canvas:{sourceState:"none"}}}},data={EmailValue:"",NumberValue:null,HexNumberValue:"",ForbiddenName:"forbidden",ForbiddenNameValue:"",UniqueNames:["taken","also-taken"],UniqueNameValue:"",UrlValue:"",IsbnValue:"",IntegerValue:""},example=(ref,field)=>`\n <ui-intern-header [theme]="'theme-light'"></ui-intern-header>\n <section class="relative flex flex-col">\n ${field}\n <hr class="ui-dotted">\n <strong>${ref}.errors</strong>\n <code class="ui"><pre>{{ ${ref}.errors | json }}</pre></code>\n </section>\n`,IsNumber={render:()=>({props:{data},template:example("exampleIsNumber",'<ui-input label="Directive: uiInputIsNumber || type=number" uiError>\n <input\n class="ui"\n #exampleIsNumber="ngModel"\n [(ngModel)]="data.NumberValue"\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n type="number"\n name="exampleIsNumber" />\n </ui-input>')})},IsHex={render:()=>({props:{data},template:example("exampleIsHex",'<ui-input label="Directive: uiInputIsHex (with auto # on focus)" uiError>\n <input\n class="ui"\n #exampleIsHex="ngModel"\n [(ngModel)]="data.HexNumberValue"\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n type="text"\n uiInputIsHex\n name="exampleIsHex" />\n </ui-input>')})},IsUrl={render:()=>({props:{data},template:example("exampleIsUrl",'<ui-input label="Directive: uiInputUrl (with auto https:// on focus)" uiError>\n <input\n class="ui"\n #exampleIsUrl="ngModel"\n [(ngModel)]="data.UrlValue"\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n type="text"\n uiInputUrl\n name="exampleIsUrl" />\n </ui-input>')})},ForbiddenName={render:()=>({props:{data},template:example("exampleForbiddenName",'<ui-input [label]="\'Directive: uiInputForbiddenName=\'+(data.ForbiddenName | json)" uiError>\n <input\n class="ui"\n #exampleForbiddenName="ngModel"\n [(ngModel)]="data.ForbiddenNameValue"\n ui-tag\n type="text"\n [uiInputForbiddenName]="data.ForbiddenName"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n name="exampleForbiddenName" />\n </ui-input>')})},UniqueName={render:()=>({props:{data},template:example("exampleUniqueName",'<ui-input [label]="\'Directive: uiInputUniqueName=\'+(data.UniqueNames | json)" uiError>\n <input\n class="ui"\n #exampleUniqueName="ngModel"\n [(ngModel)]="data.UniqueNameValue"\n ui-tag\n type="text"\n [uiInputUniqueName]="data.UniqueNames"\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n name="exampleUniqueName" />\n </ui-input>')})},Email={render:()=>({props:{data},template:example("exampleEmail",'<ui-input label="Built-in: email || type=email" uiError>\n <input\n class="ui"\n #exampleEmail="ngModel"\n [(ngModel)]="data.EmailValue"\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n type="email"\n email\n name="exampleEmail" />\n </ui-input>')})},Isbn={render:()=>({props:{data},template:example("exampleIsbn",'<ui-input label="Directive: uiInputIsbn (ISBN-10/13, checksum)" uiError>\n <input\n class="ui"\n #exampleIsbn="ngModel"\n [(ngModel)]="data.IsbnValue"\n ui-tag\n type="text"\n uiInputIsbn\n name="exampleIsbn" />\n </ui-input>')})},Integer={parameters:{controls:{disable:!1}},argTypes:{min:{control:{type:"range",min:0,max:100,step:1},description:"Inclusive lower bound"},max:{control:{type:"range",min:0,max:100,step:1},description:"Inclusive upper bound (capped live while typing)"}},args:{min:0,max:10},render:args=>({props:{...args,data},template:example("exampleInteger",'<ui-input [label]="\'Directive: uiInputInteger (digits only, min \' + min + \' / max \' + max + \')\'" uiError clearable>\n <input\n class="ui"\n #exampleInteger="ngModel"\n [(ngModel)]="data.IntegerValue"\n ui-tag\n type="text"\n inputmode="numeric"\n uiInputInteger\n [min]="min"\n [max]="max"\n name="exampleInteger" />\n </ui-input>')})},__namedExportsOrder=["IsNumber","IsHex","IsUrl","ForbiddenName","UniqueName","Email","Isbn","Integer"];IsNumber.parameters={...IsNumber.parameters,docs:{...IsNumber.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsNumber\', `<ui-input label="Directive: uiInputIsNumber || type=number" uiError>\n <input\n class="ui"\n #exampleIsNumber="ngModel"\n [(ngModel)]="data.NumberValue"\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n type="number"\n name="exampleIsNumber" />\n </ui-input>`)\n })\n}',...IsNumber.parameters?.docs?.source}}},IsHex.parameters={...IsHex.parameters,docs:{...IsHex.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsHex\', `<ui-input label="Directive: uiInputIsHex (with auto # on focus)" uiError>\n <input\n class="ui"\n #exampleIsHex="ngModel"\n [(ngModel)]="data.HexNumberValue"\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n type="text"\n uiInputIsHex\n name="exampleIsHex" />\n </ui-input>`)\n })\n}',...IsHex.parameters?.docs?.source}}},IsUrl.parameters={...IsUrl.parameters,docs:{...IsUrl.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsUrl\', `<ui-input label="Directive: uiInputUrl (with auto https:// on focus)" uiError>\n <input\n class="ui"\n #exampleIsUrl="ngModel"\n [(ngModel)]="data.UrlValue"\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n type="text"\n uiInputUrl\n name="exampleIsUrl" />\n </ui-input>`)\n })\n}',...IsUrl.parameters?.docs?.source}}},ForbiddenName.parameters={...ForbiddenName.parameters,docs:{...ForbiddenName.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleForbiddenName\', `<ui-input [label]="\'Directive: uiInputForbiddenName=\'+(data.ForbiddenName | json)" uiError>\n <input\n class="ui"\n #exampleForbiddenName="ngModel"\n [(ngModel)]="data.ForbiddenNameValue"\n ui-tag\n type="text"\n [uiInputForbiddenName]="data.ForbiddenName"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n name="exampleForbiddenName" />\n </ui-input>`)\n })\n}',...ForbiddenName.parameters?.docs?.source}}},UniqueName.parameters={...UniqueName.parameters,docs:{...UniqueName.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleUniqueName\', `<ui-input [label]="\'Directive: uiInputUniqueName=\'+(data.UniqueNames | json)" uiError>\n <input\n class="ui"\n #exampleUniqueName="ngModel"\n [(ngModel)]="data.UniqueNameValue"\n ui-tag\n type="text"\n [uiInputUniqueName]="data.UniqueNames"\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n name="exampleUniqueName" />\n </ui-input>`)\n })\n}',...UniqueName.parameters?.docs?.source}}},Email.parameters={...Email.parameters,docs:{...Email.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleEmail\', `<ui-input label="Built-in: email || type=email" uiError>\n <input\n class="ui"\n #exampleEmail="ngModel"\n [(ngModel)]="data.EmailValue"\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n type="email"\n email\n name="exampleEmail" />\n </ui-input>`)\n })\n}',...Email.parameters?.docs?.source}}},Isbn.parameters={...Isbn.parameters,docs:{...Isbn.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsbn\', `<ui-input label="Directive: uiInputIsbn (ISBN-10/13, checksum)" uiError>\n <input\n class="ui"\n #exampleIsbn="ngModel"\n [(ngModel)]="data.IsbnValue"\n ui-tag\n type="text"\n uiInputIsbn\n name="exampleIsbn" />\n </ui-input>`)\n })\n}',...Isbn.parameters?.docs?.source}}},Integer.parameters={...Integer.parameters,docs:{...Integer.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: false\n }\n },\n argTypes: {\n min: {\n control: {\n type: \'range\',\n min: 0,\n max: 100,\n step: 1\n },\n description: \'Inclusive lower bound\'\n },\n max: {\n control: {\n type: \'range\',\n min: 0,\n max: 100,\n step: 1\n },\n description: \'Inclusive upper bound (capped live while typing)\'\n }\n },\n args: {\n min: 0,\n max: 10\n },\n render: args => ({\n props: {\n ...args,\n data\n },\n template: example(\'exampleInteger\', `<ui-input [label]="\'Directive: uiInputInteger (digits only, min \' + min + \' / max \' + max + \')\'" uiError clearable>\n <input\n class="ui"\n #exampleInteger="ngModel"\n [(ngModel)]="data.IntegerValue"\n ui-tag\n type="text"\n inputmode="numeric"\n uiInputInteger\n [min]="min"\n [max]="max"\n name="exampleInteger" />\n </ui-input>`)\n })\n}',...Integer.parameters?.docs?.source},description:{story:"The one example with something to turn: the bounds. Sliders, and the\nlabel reads them back, so the field says what it is checking against.",...Integer.parameters?.docs?.description}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[6354],{"./libs/ui/src/lib/forms/validators/validators.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Email:()=>Email,ForbiddenName:()=>ForbiddenName,Integer:()=>Integer,IsHex:()=>IsHex,IsNumber:()=>IsNumber,IsUrl:()=>IsUrl,Isbn:()=>Isbn,UniqueName:()=>UniqueName,__namedExportsOrder:()=>__namedExportsOrder,default:()=>validators_component_stories});var _common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs");function controlForbiddenNameValidator(name){return control=>function forbiddenNameValidator(forbiddenName,value){return!(!forbiddenName||!value)&&new RegExp(`^${forbiddenName}$`,"i").test(value)}(name,control.value)?{inputForbiddenName:{value:control.value}}:null}let UiForbiddenValidatorDirective=class UiForbiddenValidatorDirective{uiInputForbiddenName="";validate(control){return this.uiInputForbiddenName?controlForbiddenNameValidator(this.uiInputForbiddenName)(control):null}static propDecorators={uiInputForbiddenName:[{type:_debug_node_chunk.pde}]}};UiForbiddenValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputForbiddenName]",providers:[{provide:fesm2022_forms.cz,useExisting:UiForbiddenValidatorDirective,multi:!0}]})],UiForbiddenValidatorDirective);var _effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");function controlIntegerValidator(){return control=>function integerValidator(value){return null!=value&&""!==value&&/^\d+$/.test(String(value))}(control.value)?null:{integer:!0}}let UiInputIntegerValidatorDirective=class UiInputIntegerValidatorDirective{elementRef=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);min=(0,core.input)(Number.NaN,{transform:core.numberAttribute});max=(0,core.input)(Number.NaN,{transform:core.numberAttribute});onInput(){const el=this.elementRef.nativeElement;let clean=el.value.replaceAll(/\D/g,"");const max=this.max();if(""!==clean&&Number.isFinite(max)&&Number(clean)>max&&(clean=String(max)),clean===el.value)return;const caret=Math.max(0,(el.selectionStart??clean.length)-1);el.value=clean,el.setSelectionRange?.(caret,caret),el.dispatchEvent(new Event("input",{bubbles:!0}))}validate(control){if(!control.value)return null;const base=controlIntegerValidator()(control);if(base)return base;const value=Number(control.value),min=this.min(),max=this.max();return Number.isFinite(min)&&value<min?{min:{min,actual:value}}:Number.isFinite(max)&&value>max?{max:{max,actual:value}}:null}static propDecorators={min:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"min",required:!1,transform:void 0}]}],max:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"max",required:!1,transform:void 0}]}],onInput:[{type:_debug_node_chunk.Z$l,args:["input"]}]}};function controlIsbnValidator(){return control=>function isbnValidator(value){if(!value)return!1;const s=String(value).replaceAll(/[\s-]/g,"").toUpperCase();if(/^\d{9}[\dX]$/.test(s)){let sum=0;for(let i=0;i<10;i++)sum+=("X"===s[i]?10:Number(s[i]))*(10-i);return sum%11==0}if(/^\d{13}$/.test(s)){let sum=0;for(let i=0;i<13;i++)sum+=Number(s[i])*(i%2==0?1:3);return sum%10==0}return!1}(control.value)?null:{isbn:!0}}UiInputIntegerValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputInteger]",providers:[{provide:fesm2022_forms.cz,useExisting:UiInputIntegerValidatorDirective,multi:!0}]})],UiInputIntegerValidatorDirective);let UiInputIsbnValidatorDirective=class UiInputIsbnValidatorDirective{validate(control){return control.value?controlIsbnValidator()(control):null}};UiInputIsbnValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsbn]",providers:[{provide:fesm2022_forms.cz,useExisting:UiInputIsbnValidatorDirective,multi:!0}]})],UiInputIsbnValidatorDirective);let UiIsHexValidatorDirective=class UiIsHexValidatorDirective{_control;onFocus(){this._control&&!this._control.value&&this._control.setValue("#")}validate(control){return this._control=control,control.value?(control=>{const isHex=function hexValidator(value){return!!value&&/^#?([\dA-Fa-f]{3}|[\dA-Fa-f]{6}|[\dA-Fa-f]{8})$/.test(value)}(control.value);return isHex?null:{hexNotValid:!isHex}})(control):null}static propDecorators={onFocus:[{type:_debug_node_chunk.Z$l,args:["focus"]}]}};UiIsHexValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsHex]",providers:[{provide:fesm2022_forms.cz,useExisting:UiIsHexValidatorDirective,multi:!0}]})],UiIsHexValidatorDirective);let UiIsNumberValidatorDirective=class UiIsNumberValidatorDirective{elementRef=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);validate(){return this.elementRef.nativeElement.checkValidity()?null:{numberNotValid:!0}}};UiIsNumberValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsNumber],input[type=number]",providers:[{provide:fesm2022_forms.cz,useExisting:UiIsNumberValidatorDirective,multi:!0}]})],UiIsNumberValidatorDirective);let UiUniqueValidatorDirective=class UiUniqueValidatorDirective{uiInputUniqueName=[];validate(control){return this.uiInputUniqueName?function controlNameValidator(existValues){return control=>{const unique=function uniqueValidator(existValues,value){return!existValues.includes(value)}(existValues,control.value);return unique?null:{inputUniqueName:{value:control.value}}}}(this.uiInputUniqueName)(control):null}static propDecorators={uiInputUniqueName:[{type:_debug_node_chunk.pde}]}};UiUniqueValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputUniqueName]",providers:[{provide:fesm2022_forms.cz,useExisting:UiUniqueValidatorDirective,multi:!0}]})],UiUniqueValidatorDirective);let UiUrlValidatorDirective=class UiUrlValidatorDirective{control;validate(control){return this.control=control,control.value?(control=>function urlValidator(value){return!!value&&/^(https?:\/\/)?([\d.a-z-]+)\.([.a-z]{2,6})([\w ./-]*)*\/?$/.test(value)}(control.value)?null:{urlNotValid:!0})(control):null}onFocus(){this.control&&!this.control.value&&this.control.setValue("https://")}static propDecorators={onFocus:[{type:_debug_node_chunk.Z$l,args:["focus"]}]}};UiUrlValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputUrl]",providers:[{provide:fesm2022_forms.cz,useExisting:UiUrlValidatorDirective,multi:!0}]})],UiUrlValidatorDirective);var transloco_storybook_module=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),input_component=__webpack_require__("./libs/ui/src/lib/forms/input/input.component.ts");const validators_component_stories={title:"Forms/Validators",decorators:[(0,dist.Iz)({providers:[fesm2022_forms.vS],imports:[header_component.b,fesm2022_forms.YN,_common_module_chunk.TG,input_component.K,UiIsNumberValidatorDirective,UiIsHexValidatorDirective,UiUrlValidatorDirective,UiForbiddenValidatorDirective,UiUniqueValidatorDirective,UiInputIsbnValidatorDirective,UiInputIntegerValidatorDirective,transloco_storybook_module.o]})],parameters:{controls:{disable:!0},docs:{canvas:{sourceState:"none"}}}},data={EmailValue:"",NumberValue:null,HexNumberValue:"",ForbiddenName:"forbidden",ForbiddenNameValue:"",UniqueNames:["taken","also-taken"],UniqueNameValue:"",UrlValue:"",IsbnValue:"",IntegerValue:""},example=(ref,field)=>`\n <ui-intern-header [theme]="'theme-light'"></ui-intern-header>\n <section class="relative flex flex-col">\n ${field}\n <hr class="ui-dotted">\n <strong>${ref}.errors</strong>\n <code class="ui"><pre>{{ ${ref}.errors | json }}</pre></code>\n </section>\n`,IsNumber={render:()=>({props:{data},template:example("exampleIsNumber",'<ui-input label="Directive: uiInputIsNumber || type=number" uiError>\n <input\n class="ui"\n #exampleIsNumber="ngModel"\n [(ngModel)]="data.NumberValue"\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n type="number"\n name="exampleIsNumber" />\n </ui-input>')})},IsHex={render:()=>({props:{data},template:example("exampleIsHex",'<ui-input label="Directive: uiInputIsHex (with auto # on focus)" uiError>\n <input\n class="ui"\n #exampleIsHex="ngModel"\n [(ngModel)]="data.HexNumberValue"\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n type="text"\n uiInputIsHex\n name="exampleIsHex" />\n </ui-input>')})},IsUrl={render:()=>({props:{data},template:example("exampleIsUrl",'<ui-input label="Directive: uiInputUrl (with auto https:// on focus)" uiError>\n <input\n class="ui"\n #exampleIsUrl="ngModel"\n [(ngModel)]="data.UrlValue"\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n type="text"\n uiInputUrl\n name="exampleIsUrl" />\n </ui-input>')})},ForbiddenName={render:()=>({props:{data},template:example("exampleForbiddenName",'<ui-input [label]="\'Directive: uiInputForbiddenName=\'+(data.ForbiddenName | json)" uiError>\n <input\n class="ui"\n #exampleForbiddenName="ngModel"\n [(ngModel)]="data.ForbiddenNameValue"\n ui-tag\n type="text"\n [uiInputForbiddenName]="data.ForbiddenName"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n name="exampleForbiddenName" />\n </ui-input>')})},UniqueName={render:()=>({props:{data},template:example("exampleUniqueName",'<ui-input [label]="\'Directive: uiInputUniqueName=\'+(data.UniqueNames | json)" uiError>\n <input\n class="ui"\n #exampleUniqueName="ngModel"\n [(ngModel)]="data.UniqueNameValue"\n ui-tag\n type="text"\n [uiInputUniqueName]="data.UniqueNames"\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n name="exampleUniqueName" />\n </ui-input>')})},Email={render:()=>({props:{data},template:example("exampleEmail",'<ui-input label="Built-in: email || type=email" uiError>\n <input\n class="ui"\n #exampleEmail="ngModel"\n [(ngModel)]="data.EmailValue"\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n type="email"\n email\n name="exampleEmail" />\n </ui-input>')})},Isbn={render:()=>({props:{data},template:example("exampleIsbn",'<ui-input label="Directive: uiInputIsbn (ISBN-10/13, checksum)" uiError>\n <input\n class="ui"\n #exampleIsbn="ngModel"\n [(ngModel)]="data.IsbnValue"\n ui-tag\n type="text"\n uiInputIsbn\n name="exampleIsbn" />\n </ui-input>')})},Integer={parameters:{controls:{disable:!1}},argTypes:{min:{control:{type:"range",min:0,max:100,step:1},description:"Inclusive lower bound"},max:{control:{type:"range",min:0,max:100,step:1},description:"Inclusive upper bound (capped live while typing)"}},args:{min:0,max:10},render:args=>({props:{...args,data},template:example("exampleInteger",'<ui-input [label]="\'Directive: uiInputInteger (digits only, min \' + min + \' / max \' + max + \')\'" uiError clearable>\n <input\n class="ui"\n #exampleInteger="ngModel"\n [(ngModel)]="data.IntegerValue"\n ui-tag\n type="text"\n inputmode="numeric"\n uiInputInteger\n [min]="min"\n [max]="max"\n name="exampleInteger" />\n </ui-input>')})},__namedExportsOrder=["IsNumber","IsHex","IsUrl","ForbiddenName","UniqueName","Email","Isbn","Integer"];IsNumber.parameters={...IsNumber.parameters,docs:{...IsNumber.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsNumber\', `<ui-input label="Directive: uiInputIsNumber || type=number" uiError>\n <input\n class="ui"\n #exampleIsNumber="ngModel"\n [(ngModel)]="data.NumberValue"\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n type="number"\n name="exampleIsNumber" />\n </ui-input>`)\n })\n}',...IsNumber.parameters?.docs?.source}}},IsHex.parameters={...IsHex.parameters,docs:{...IsHex.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsHex\', `<ui-input label="Directive: uiInputIsHex (with auto # on focus)" uiError>\n <input\n class="ui"\n #exampleIsHex="ngModel"\n [(ngModel)]="data.HexNumberValue"\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n type="text"\n uiInputIsHex\n name="exampleIsHex" />\n </ui-input>`)\n })\n}',...IsHex.parameters?.docs?.source}}},IsUrl.parameters={...IsUrl.parameters,docs:{...IsUrl.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsUrl\', `<ui-input label="Directive: uiInputUrl (with auto https:// on focus)" uiError>\n <input\n class="ui"\n #exampleIsUrl="ngModel"\n [(ngModel)]="data.UrlValue"\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n type="text"\n uiInputUrl\n name="exampleIsUrl" />\n </ui-input>`)\n })\n}',...IsUrl.parameters?.docs?.source}}},ForbiddenName.parameters={...ForbiddenName.parameters,docs:{...ForbiddenName.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleForbiddenName\', `<ui-input [label]="\'Directive: uiInputForbiddenName=\'+(data.ForbiddenName | json)" uiError>\n <input\n class="ui"\n #exampleForbiddenName="ngModel"\n [(ngModel)]="data.ForbiddenNameValue"\n ui-tag\n type="text"\n [uiInputForbiddenName]="data.ForbiddenName"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n name="exampleForbiddenName" />\n </ui-input>`)\n })\n}',...ForbiddenName.parameters?.docs?.source}}},UniqueName.parameters={...UniqueName.parameters,docs:{...UniqueName.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleUniqueName\', `<ui-input [label]="\'Directive: uiInputUniqueName=\'+(data.UniqueNames | json)" uiError>\n <input\n class="ui"\n #exampleUniqueName="ngModel"\n [(ngModel)]="data.UniqueNameValue"\n ui-tag\n type="text"\n [uiInputUniqueName]="data.UniqueNames"\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n name="exampleUniqueName" />\n </ui-input>`)\n })\n}',...UniqueName.parameters?.docs?.source}}},Email.parameters={...Email.parameters,docs:{...Email.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleEmail\', `<ui-input label="Built-in: email || type=email" uiError>\n <input\n class="ui"\n #exampleEmail="ngModel"\n [(ngModel)]="data.EmailValue"\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n type="email"\n email\n name="exampleEmail" />\n </ui-input>`)\n })\n}',...Email.parameters?.docs?.source}}},Isbn.parameters={...Isbn.parameters,docs:{...Isbn.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsbn\', `<ui-input label="Directive: uiInputIsbn (ISBN-10/13, checksum)" uiError>\n <input\n class="ui"\n #exampleIsbn="ngModel"\n [(ngModel)]="data.IsbnValue"\n ui-tag\n type="text"\n uiInputIsbn\n name="exampleIsbn" />\n </ui-input>`)\n })\n}',...Isbn.parameters?.docs?.source}}},Integer.parameters={...Integer.parameters,docs:{...Integer.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: false\n }\n },\n argTypes: {\n min: {\n control: {\n type: \'range\',\n min: 0,\n max: 100,\n step: 1\n },\n description: \'Inclusive lower bound\'\n },\n max: {\n control: {\n type: \'range\',\n min: 0,\n max: 100,\n step: 1\n },\n description: \'Inclusive upper bound (capped live while typing)\'\n }\n },\n args: {\n min: 0,\n max: 10\n },\n render: args => ({\n props: {\n ...args,\n data\n },\n template: example(\'exampleInteger\', `<ui-input [label]="\'Directive: uiInputInteger (digits only, min \' + min + \' / max \' + max + \')\'" uiError clearable>\n <input\n class="ui"\n #exampleInteger="ngModel"\n [(ngModel)]="data.IntegerValue"\n ui-tag\n type="text"\n inputmode="numeric"\n uiInputInteger\n [min]="min"\n [max]="max"\n name="exampleInteger" />\n </ui-input>`)\n })\n}',...Integer.parameters?.docs?.source},description:{story:"The one example with something to turn: the bounds. Sliders, and the\nlabel reads them back, so the field says what it is checking against.",...Integer.parameters?.docs?.description}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3767],{"./libs/ui/src/lib/home/guide.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"),_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_storybook_blocks_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");function _createMdxContent(props){const _components={code:"code",h3:"h3",p:"p",strong:"strong",...(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,{title:"Home/Guide"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"guide",children:"Guide"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["What to reach for a component for, what not, what instead, and where it\ndemonstrably runs. Every entry is written by an agent from the sources it\nnames and read against a commit; the same entries are served to agents by\nthe catalog's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"get_guide"})," tool. The component page tells the truth — what\nit does and does not — and the guide is the offer next to it. Where the two\ndisagree, the page wins."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["This table is ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"generated from the guide folder"}),", not written beside it:\n",_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H.length," entries, reviewed at ",(0,_storybook_blocks_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.ED)(_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H).join(", "),'.\nEach subject links to the page where its full entry stands, under the\nsection "What it does, and what it does not".']}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{className:"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:"Subject"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Use it for"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tbody",{children:(0,_storybook_blocks_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.K9)(_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H).map(row=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[row.href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href:row.href,children:row.subject}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:row.subject}),"situation"===row.kind&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("small",{children:" · situation"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:row.brief})]},row.subject))})]})]})}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
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[128],{"./libs/ui/src/lib/home/overview.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 jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),blocks=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");const package_namespaceObject_rE="2.3.0";function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Introduction"}),"\n","\n","\n",(0,jsx_runtime.jsx)("h2",{style:{textAlign:"right",borderBottom:"none",marginBottom:0},children:"Built for developers and agents"}),"\n",(0,jsx_runtime.jsx)("h1",{style:{textAlign:"right",color:"var(--ui-c-focus)",paddingBottom:"1rem",borderBottom:"var(--ui-border-width) solid var(--ui-c-fourthly)"},children:"Customers just talk to the agent"}),"\n",(0,jsx_runtime.jsx)(_components.h3,{id:"ui-library-overview",children:"UI Library Overview"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This library provides a modular set of Angular components for building consistent user\ninterfaces. It follows an atomic design approach, categorized into Electrons, Atoms,\nMolecules, Layouts, and Forms. Everything is ",(0,jsx_runtime.jsx)(_components.strong,{children:"standalone"})," — there are no NgModules anymore (the\nTransloco configuration modules are the only exception). State is managed with ",(0,jsx_runtime.jsx)(_components.strong,{children:"Signals"}),"\nand all apps run ",(0,jsx_runtime.jsx)(_components.strong,{children:"zoneless"}),"."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This documentation describes version ",(0,jsx_runtime.jsx)(_components.strong,{children:package_namespaceObject_rE})," of the library. To\ninstall exactly what is documented here:\n",(0,jsx_runtime.jsxs)("code",{children:["npm i @mojawork/ui@",package_namespaceObject_rE]}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"core-architecture",children:"Core Architecture"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The library is organized into the following categories (folders under ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/src/lib"}),").\nThe first three are layers, and they are told apart by ",(0,jsx_runtime.jsx)(_components.strong,{children:"composition and\nvisibility"}),", not by size: an atom may be large and a molecule small."]}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Category"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms/_electrons"})}),(0,jsx_runtime.jsxs)("td",{children:["Internal building blocks, ",(0,jsx_runtime.jsx)("strong",{children:"not exported"}),", selector ",(0,jsx_runtime.jsx)("code",{children:"ui-electron-*"}),". They exist only so ui components can build them in — an app never names one. Today: the form error message."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms"})}),(0,jsx_runtime.jsx)("td",{children:"Exported building blocks that compose nothing else from this library (e.g., thumbs, typewriter, language selector, copy-value)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"molecules"})}),(0,jsx_runtime.jsxs)("td",{children:["Built from at least one other ui component — that single test is the whole definition, and the folder follows it. ",(0,jsx_runtime.jsx)("code",{children:"image-editor"})," is the only one: it builds in the crop box, the overlay, its header and the slider. Size plays no part; an atom may be a large class and a molecule twenty lines."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"cdk"})}),(0,jsx_runtime.jsx)("td",{children:"CDK-based building blocks (e.g., table wrapper, drag-and-drop splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"layout"})}),(0,jsx_runtime.jsx)("td",{children:"Structural components that define the page grid and navigation (e.g., main layout, spinner, splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"forms"})}),(0,jsx_runtime.jsx)("td",{children:"Input elements and form validation components (inputs, checkboxes, validator directives)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsxs)("td",{children:[(0,jsx_runtime.jsx)("code",{children:"_directives"})," / ",(0,jsx_runtime.jsx)("code",{children:"_pipes"})]}),(0,jsx_runtime.jsx)("td",{children:"Utility directives and pipes for behavior modification (e.g., autofocus, intersection observer)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"transloco-modules"})}),(0,jsx_runtime.jsxs)("td",{children:["Internationalization setup (",(0,jsx_runtime.jsx)("code",{children:"TranslocoRootModule"}),") — the only remaining NgModules, imported once at application level."]})]})]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"styling-concept",children:"Styling Concept"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Every component in this library ships ",(0,jsx_runtime.jsx)(_components.strong,{children:"fully self-contained"}),": plain CSS built\nexclusively on ",(0,jsx_runtime.jsx)(_components.strong,{children:"design tokens"})," — CSS custom properties such as ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-c-*"}),"\n(colors, theme-aware), ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-spacer"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-border-radius"})," and ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-time"}),".\nThere are no hidden dependencies on any CSS framework, utility system or build\ntool: the components coexist with whatever styling setup your project uses."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Responsiveness"})," follows a single canonical breakpoint ladder with six levels\n(",(0,jsx_runtime.jsx)(_components.code,{children:"ms1"})," 340px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms2"})," 375px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms3"})," 481px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms4"})," 769px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms5"})," 1025px ·\n",(0,jsx_runtime.jsx)(_components.code,{children:"ms6"})," 1901px). The ladder deliberately exists only once and serves every layer\nfrom the same source:"]}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"CSS"}),": via named media queries (",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--ms4)"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--below-ms5)"}),")\nthat are resolved into standard queries at build time — the published package\ncontains plain, universally working CSS."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"TypeScript"}),": via the ",(0,jsx_runtime.jsx)(_components.code,{children:"UiLayoutMediaScreenService"}),", which exposes the\ncurrent level as a signal (",(0,jsx_runtime.jsx)(_components.code,{children:"mediascreen: 1..6"}),") — logic and layout are\nguaranteed to switch at the same boundaries."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"tailwind--not-required-but-offered",children:"Tailwind — not required, but offered"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The npm package ",(0,jsx_runtime.jsx)(_components.strong,{children:"does not require Tailwind"}),". Whether a project uses Tailwind\nis entirely that project's decision — the components work identically either\nway."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Projects that ",(0,jsx_runtime.jsx)(_components.strong,{children:"do want Tailwind (v4)"})," get a head start: the package ships a\nready-made theme file (",(0,jsx_runtime.jsx)(_components.code,{children:"@mojawork/ui/styles/tailwind.css"}),"). A single import\nwires Tailwind into the library's design system:"]}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Colors"})," mapped via ",(0,jsx_runtime.jsx)(_components.code,{children:"@theme"})," onto the runtime tokens — utilities like\n",(0,jsx_runtime.jsx)(_components.code,{children:"text-c-primary"})," automatically follow light/dark theme switching."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Breakpoints"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"ms1:"}),"–",(0,jsx_runtime.jsx)(_components.code,{children:"ms6:"})," — the same ladder the components use\ninternally."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Animation presets"})," (e.g. ",(0,jsx_runtime.jsx)(_components.code,{children:"loading"}),")."]}),"\n"]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["In short: ",(0,jsx_runtime.jsx)(_components.strong,{children:"shipped Tailwind-free, Tailwind-ready when wanted."})," Both paths are\nfirst-class; neither is forced."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Everything the library ships sits in the ",(0,jsx_runtime.jsx)(_components.code,{children:"ui"})," cascade layer, below Tailwind's\n",(0,jsx_runtime.jsx)(_components.code,{children:"utilities"})," — so a utility you write on a ui tag beats the component's own\ndefault, and your app's unlayered CSS beats both. One line on the Tailwind\nside makes the order explicit; see ",(0,jsx_runtime.jsx)(_components.a,{href:"?path=/docs/styling-layers--docs",children:"Styling › Layers"}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"for-contributors",children:"For contributors"}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Components in ",(0,jsx_runtime.jsx)(_components.code,{children:"src/lib"})," never use Tailwind utilities or ",(0,jsx_runtime.jsx)(_components.code,{children:"@apply"})," — plain CSS\nwith ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-*"})," tokens only; component-local classes carry a ",(0,jsx_runtime.jsx)(_components.code,{children:"_"})," prefix."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Storybook ",(0,jsx_runtime.jsx)(_components.strong,{children:"stories"})," (and the showcase components under ",(0,jsx_runtime.jsx)(_components.code,{children:".storybook/demos/"}),")\nexplicitly use Tailwind for their example layout."]}),"\n",(0,jsx_runtime.jsx)(_components.li,{children:"Breakpoints are never written as pixel literals — always via the ladder's\nnamed queries."}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"getting-started",children:"Getting Started"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["All components are standalone: import them directly from the barrel into the ",(0,jsx_runtime.jsx)(_components.code,{children:"imports"}),"\narray of your standalone component. Inside the monorepo the import path is mapped via\ntsconfig; external apps install the published npm package\n(",(0,jsx_runtime.jsx)("a",{href:"https://www.npmjs.com/package/@mojawork/ui",target:"_blank",rel:"noopener",children:"@mojawork/ui"}),")."]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-typescript",children:"import { Component } from '@angular/core';\nimport { UiInputComponent, UiCardComponent } from '@mojawork/ui';\n\n@Component({\n selector: 'app-my-feature',\n imports: [UiInputComponent, UiCardComponent],\n templateUrl: './my-feature.component.html',\n})\nexport class MyFeatureComponent {}\n"})}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"usage-principles",children:"Usage Principles"}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Principle"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Composition"}),(0,jsx_runtime.jsx)("td",{children:"Prefer composing smaller components into larger ones."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Consistency"}),(0,jsx_runtime.jsx)("td",{children:"Use the provided layouts to maintain a unified user experience across the application."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Signals & zoneless"}),(0,jsx_runtime.jsx)("td",{children:"Component state uses Angular Signals; all consumers run without Zone.js."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Translation"}),(0,jsx_runtime.jsx)("td",{children:"All text within components is managed via Transloco for easy localization."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3143],{"./libs/ui/src/lib/home/tips.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");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",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,{title:"Home/Tips & Tricks"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"tips--tricks",children:"Tips & Tricks"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Things that cost someone an hour before they were written down. Each entry\nnames the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"symptom"})," — what you actually see — and links to the page that\nexplains it and shows it working."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Two rules keep this page from rotting:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"An entry only appears here once its explanation exists somewhere else. This\npage is a signpost, never the only source."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"An entry that names a condition dies with it. When the condition is gone, the\nentry goes, and so does whatever workaround it points at."}),"\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:"an-icon-shows-a-word-instead-of-a-symbol",children:"An icon shows a word instead of a symbol"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A 96px ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"hme"})," where a house belongs. Material Icons draw an unknown ligature as\nplain text rather than failing, so a typo in an icon name looks like a broken\ncomponent."]}),"\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:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/styling-icons--docs",children:"Styling Icons"})})]}),"\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:"swapping-the-icon-font-or-not-using-it-at-all",children:"Swapping the icon font, or not using it at all"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"You want different icons, or you already ship your own set and would rather not\ncarry a second one."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Both font slots are CSS variables, so the drawing can be replaced — as long as\nthe replacement font uses the same ligature names. And ignoring ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:".ui-icon"}),"\nentirely is free: an unused ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"@font-face"})," is never downloaded."]}),"\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:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/styling-icons--docs",children:"Styling Icons: Bringing your own icons"})})]}),"\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:"which-component-for-this-and-what-to-reach-for-instead",children:"Which component for this, and what to reach for instead"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"You know what you want to build and not which part of the library it is —\nor you picked one and wonder whether it was the right one."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Every component page carries two sections under its title: the truth — what\nit does, and what it does not — and, below it, the guide: what to reach for\nit for, what not, what instead, and where it runs. The whole guide, one line\nper subject, is on the overview."}),"\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:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/home-guide--docs",children:"Home: Guide"})})]})]})}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
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3842],{"./libs/ui/src/lib/home/usage.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 jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),blocks=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");const usage_namespaceObject="# Using @mojawork/ui\n\nThe usage contract of the library: the rules that hold for every application\nconsuming `@mojawork/ui`, inside or outside the workspace it is built in.\nThis file is the single source for these rules — the catalog serves it to\nagents as the house rules of `get_guide`, and the workspace's shared agent\nrules point here instead of restating it. The component pages remain the\ntruth about each component; this file holds what is true across all of them.\n\n## Signals and zoneless change detection\n\n- Use Angular Signals (`signal()`, `computed()`, `effect()`) for state and\n reactive logic instead of manual state or plain observables.\n- The library and its reference applications run **zoneless**\n (`provideZonelessChangeDetection()`, no `zone.js` polyfill). Any\n template-bound state that is updated from an async source\n (`setTimeout`/`setInterval`, RxJS `subscribe`, `Promise`,\n `requestAnimationFrame`) MUST be a signal (or use the `async` pipe /\n `toSignal()`); a plain field written from such a callback will not trigger\n change detection. Imperative DOM writes (e.g. `element.setAttribute`, CSS\n custom properties) do not need this.\n\n## Forms\n\nForm inputs follow one fixed format:\n\n```html\n<ui-input [label]=\"'Label'\">\n <input ui-tag [(ngModel)]=\"model\" ... />\n</ui-input>\n```\n\n## Styling and tokens\n\n- Components are styled with plain CSS on the design tokens\n (`var(--ui-spacer)`, `var(--ui-border-radius)`, the `--ui-c-*` colours).\n No CSS framework is required, and no Sass.\n- Host geometry is a named hook with a fallback, never a pinned value —\n e.g. `width: var(--ui-background-width, 100%)`. A consumer without\n Tailwind sets the variable; one with Tailwind puts a utility on the tag,\n and the cascade layers below make it win. Each component documents its\n hooks in its story.\n- The package itself is Tailwind-free; its templates carry no utility\n classes. Tailwind is optional at the consumer: the package ships a\n ready-made Tailwind v4 theme that maps the utilities onto the tokens,\n including light/dark switching and the `ms1:`–`ms6:` breakpoint ladder.\n\n## Cascade layers — the library sits below the utilities\n\nA utility you write on a ui tag must win against the component's own\ndefault. Tailwind v4 puts everything in cascade layers, and **unlayered CSS\nbeats layered CSS regardless of specificity** — the order of layers, not\nspecificity, decides who wins.\n\nThe library's styles live in the `ui` layer, declared before Tailwind's:\n\n```css\n@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n```\n\n**Every consumer with its own Tailwind entry declares the same line before\nits import.** A layer nobody names is appended behind all named ones and\nwould beat the whole library. `cdk-resets` is part of the line so the\nAngular CDK's drag-preview reset sits below the library instead of\nstripping every preview of its surface.\n\nWhat this means in practice: a Tailwind utility on a ui tag wins over the\ncomponent's default, and unlayered consumer CSS wins over both. A `!` on a\nutility against a ui tag is a symptom, not a fix — it means the layer line\nis missing somewhere.\n\n## Disabled controls and the keyboard\n\n`disabled` is not only a visual state — it changes where the focus can live,\nand it does so retroactively. Two failure modes come out of that, and both\nhave already cost real debugging time.\n\n**A control that disables itself throws the focus away.** The moment an\nelement becomes `disabled`, the browser removes the focus from it and drops it\non `<body>`. So a button whose own activation makes it inert — a reset that\nhas nothing left to undo, a save that dies once everything is saved, a \"load\nmore\" at the end of a list — leaves a keyboard user with no place at all. The\nrow they were working in is gone from under them, and the next Tab starts over\nat the top of the document.\n\nNo navigation logic can repair this. It happens **after** the activation, so\nby the time anything notices, the previous position no longer exists.\n\n**Custom keyboard navigation and the browser disagree about who counts.** The\nbrowser skips disabled controls in the tab order; hand-written navigation that\ncollects controls with a plain `'input, select, textarea, button, a'` counts\nthem. The two sets drift apart: a remembered position points into a different\nlist than the one the focus actually walks, and `focus()` on a disabled\nelement does nothing at all — the focus stays put and the next key press picks\nthe very same dead target again. The navigation jams, silently, with no error\nanywhere.\n\n**Preferred pattern: do not disable at all.** Keep the control **enabled** and\nlet its action be a no-op when there is nothing to do. Express unavailability\nthrough styling plus `aria-disabled=\"true\"` — that keeps the control\nfocusable and reachable while screen readers still announce it as\nunavailable. A dimmed control without `aria-disabled` is, to anyone who only\nlistens, an ordinary control: the look carries the message, and nobody hears a\nlook.\n\n**If a control genuinely must be disabled**, move the focus somewhere\ndeliberate **before** disabling it — the neighbouring control, the container,\nthe element that replaces it. Never leave that decision to the browser.\n\n**And when you write navigation yourself**, derive the control list from the\nDOM on every key press and filter it to what can actually take focus\n(`:not(:disabled):not([hidden]):not([tabindex=\"-1\"])`), so it can never\ndisagree with the native tab order. Never cache the list and never store\npositions as constants: a cell may hold a different number of stations from\none moment to the next.\n\n## Where the documentation lives\n\nThe component page is the truth — the fixed section \"What it does, and what\nit does not\" on every page. The guide is the offer next to it: use for, not\nfor, instead, with proof. Where the two disagree, the page wins.\n\n- **Storybook** — `https://moja.work/storybook`: every component, every\n story, the guide entries next to the truth sections. It describes the\n current line (behaviour can change within 2.x) — pin an exact version of\n the package rather than a `^` range.\n- **MCP catalog for agents** — `https://moja.work/ui/mcp`: the tools\n `list_components` (the shelf), `get_component_doc` (one page, verbatim)\n and `get_guide` (the recommendations plus these rules). If you know a\n component's selector, ask for it directly instead of fetching the whole\n guide and filtering it yourself.\n- **`llms.txt`** — `https://moja.work/llms.txt`: the catalog for crawlers\n and plain-text readers.\n- **API reference** — the `.d.ts` files in the installed package are the\n version-true API; the hosted Compodoc at `https://moja.work/compodoc/ui`\n describes the line.\n",usageMarkdown=(usage_namespaceObject.default??usage_namespaceObject).trim();if(""===usageMarkdown)throw new Error("usage: libs/ui/usage.md is empty — an empty contract is a generator bug, not an empty page.");function _createMdxContent(props){const _components={code:"code",p:"p",strong:"strong",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Usage"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This page ",(0,jsx_runtime.jsx)(_components.strong,{children:"reads"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/usage.md"})," — the usage contract of the library.\nThe npm package ships the same file verbatim as ",(0,jsx_runtime.jsx)(_components.code,{children:"usage.md"}),", and the\ncatalog's ",(0,jsx_runtime.jsx)(_components.code,{children:"get_guide"})," tool serves its sections as the house rules; what\nstands here cannot drift from either."]}),"\n",(0,jsx_runtime.jsx)(blocks.oz,{children:usageMarkdown})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);