@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.
- package/README.md +22 -0
- package/bin/serve.mjs +73 -0
- package/catalog/atoms/background.md +130 -0
- package/catalog/atoms/barcode.md +285 -0
- package/catalog/atoms/buzzer.md +210 -0
- package/catalog/atoms/card.md +174 -0
- package/catalog/atoms/chart.md +236 -0
- package/catalog/atoms/clock.md +252 -0
- package/catalog/atoms/copy-value.md +203 -0
- package/catalog/atoms/image-grid.md +208 -0
- package/catalog/atoms/image-slider.md +216 -0
- package/catalog/atoms/lang-selector.md +237 -0
- package/catalog/atoms/mosaic.md +366 -0
- package/catalog/atoms/placeholder.md +157 -0
- package/catalog/atoms/qr-code.md +334 -0
- package/catalog/atoms/rating.md +176 -0
- package/catalog/atoms/reader-doc.md +404 -0
- package/catalog/atoms/text-animate.md +122 -0
- package/catalog/atoms/thumb.md +153 -0
- package/catalog/atoms/timer.md +111 -0
- package/catalog/atoms/typewriter.md +132 -0
- package/catalog/cdk/splitter.md +63 -0
- package/catalog/cdk/table.md +188 -0
- package/catalog/forms/autocomplete.md +304 -0
- package/catalog/forms/checkbox.md +218 -0
- package/catalog/forms/input.md +193 -0
- package/catalog/forms/slider.md +142 -0
- package/catalog/forms/switch.md +188 -0
- package/catalog/guide.json +1209 -0
- package/catalog/layout/header.md +167 -0
- package/catalog/layout/main.md +158 -0
- package/catalog/layout/media-screen.md +163 -0
- package/catalog/layout/nav.md +181 -0
- package/catalog/layout/overlay.md +256 -0
- package/catalog/layout/spinner.md +94 -0
- package/catalog/layout/splitter.md +331 -0
- package/catalog/layout/tabs.md +144 -0
- package/catalog/layout/top-scroll-bottom.md +98 -0
- package/catalog/manifest.json +482 -0
- package/catalog/mcp.json +44 -0
- package/catalog/molecules/image-editor.md +285 -0
- package/catalog/usage.md +137 -0
- package/catalog/version.json +4 -0
- package/package.json +10 -0
- package/storybook/1183.da25800b.iframe.bundle.js +1 -0
- package/storybook/1255.2abec879.iframe.bundle.js +2 -0
- package/storybook/1255.2abec879.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/1516.52d2dae7.iframe.bundle.js +2 -0
- package/storybook/1516.52d2dae7.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/2033.c705a7ce.iframe.bundle.js +1 -0
- package/storybook/2089.32694489.iframe.bundle.js +1 -0
- package/storybook/2096.431fc8f5.iframe.bundle.js +1 -0
- package/storybook/2127.29f153d2.iframe.bundle.js +2 -0
- package/storybook/2127.29f153d2.iframe.bundle.js.LICENSE.txt +7 -0
- package/storybook/2228.77650ef1.iframe.bundle.js +2 -0
- package/storybook/2228.77650ef1.iframe.bundle.js.LICENSE.txt +1 -0
- package/storybook/2249.6e6782ab.iframe.bundle.js +1 -0
- package/storybook/2639.29baa8af.iframe.bundle.js +1 -0
- package/storybook/2844.c9f47654.iframe.bundle.js +1 -0
- package/storybook/2971.edb202b4.iframe.bundle.js +1 -0
- package/storybook/3899.55560628.iframe.bundle.js +2 -0
- package/storybook/3899.55560628.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/3968.69b812e4.iframe.bundle.js +1 -0
- package/storybook/4255.eeeaf087.iframe.bundle.js +111 -0
- package/storybook/4255.eeeaf087.iframe.bundle.js.LICENSE.txt +49 -0
- package/storybook/4255.eeeaf087.iframe.bundle.js.map +1 -0
- package/storybook/4425.368129b3.iframe.bundle.js +2 -0
- package/storybook/4425.368129b3.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/4476.f8e4115f.iframe.bundle.js +1 -0
- package/storybook/4495.d1c8cc8d.iframe.bundle.js +1 -0
- package/storybook/4555.066c242d.iframe.bundle.js +1 -0
- package/storybook/4755.e4656207.iframe.bundle.js +23 -0
- package/storybook/4755.e4656207.iframe.bundle.js.LICENSE.txt +14 -0
- package/storybook/4755.e4656207.iframe.bundle.js.map +1 -0
- package/storybook/4935.8959522b.iframe.bundle.js +1 -0
- package/storybook/5568.c6172f92.iframe.bundle.js +1 -0
- package/storybook/5944.810cb147.iframe.bundle.js +1 -0
- package/storybook/6115.7f1470ef.iframe.bundle.js +1 -0
- package/storybook/6169.eaeed989.iframe.bundle.js +2 -0
- package/storybook/6169.eaeed989.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/6202.b8ca0e90.iframe.bundle.js +2 -0
- package/storybook/6202.b8ca0e90.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/660.18f0458e.iframe.bundle.js +1 -0
- package/storybook/6824.f5eb8bb7.iframe.bundle.js +1 -0
- package/storybook/7316.5b024e94.iframe.bundle.js +1 -0
- package/storybook/7749.2a853795.iframe.bundle.js +1 -0
- package/storybook/8051.719eb790.iframe.bundle.js +1 -0
- package/storybook/813.805c1e5f.iframe.bundle.js +1 -0
- package/storybook/8448.1baeb046.iframe.bundle.js +1 -0
- package/storybook/871.428deceb.iframe.bundle.js +1 -0
- package/storybook/8819.220ca21d.iframe.bundle.js +1 -0
- package/storybook/9045.a50616e9.iframe.bundle.js +2 -0
- package/storybook/9045.a50616e9.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/9560.668052f3.iframe.bundle.js +7 -0
- package/storybook/9560.668052f3.iframe.bundle.js.map +1 -0
- package/storybook/973.67f44bb0.iframe.bundle.js +1 -0
- package/storybook/9850.28367747.iframe.bundle.js +1 -0
- package/storybook/9946.36014b4e.iframe.bundle.js +1 -0
- package/storybook/MaterialIcons-Regular.woff2 +0 -0
- package/storybook/MaterialIconsOutlined-Regular.woff2 +0 -0
- package/storybook/PetMe64.ttf +0 -0
- package/storybook/_external-mwork-banner-docs-mdx.0d5549a0.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-banner-mwork-banner-stories.d44f6917.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-basic-interpreter-docs-mdx.03c6205c.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-basic-interpreter-mwork-basic-interpreter-stories.3252a9b8.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-music-player-docs-mdx.6f943768.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-music-player-mwork-music-player-stories.08fbf651.iframe.bundle.js +1 -0
- package/storybook/assets/fonts/PETME64-LICENSE.txt +20 -0
- package/storybook/assets/fonts/PetMe64.ttf +0 -0
- package/storybook/assets/fonts/icons/MaterialIcons-Regular.woff2 +0 -0
- package/storybook/assets/fonts/icons/MaterialIconsOutlined-Regular.woff2 +0 -0
- package/storybook/assets/ui/documents/demo.pdf +42 -0
- package/storybook/assets/ui/i18n/de-DE.json +1 -0
- package/storybook/assets/ui/i18n/en-EN.json +2 -0
- package/storybook/assets/ui/i18n/ui/de-DE.json +95 -0
- package/storybook/assets/ui/i18n/ui/en-EN.json +95 -0
- package/storybook/assets/ui/images/600x600.png +0 -0
- package/storybook/assets/ui/images/600x800.png +0 -0
- package/storybook/assets/ui/images/800x600.png +0 -0
- package/storybook/assets/ui/images/unknown.gif +0 -0
- package/storybook/atoms-_electrons-form-error-message-docs-mdx.5b9e78fe.iframe.bundle.js +1 -0
- package/storybook/atoms-_electrons-form-error-message-form-error-message-component-stories.7f749acc.iframe.bundle.js +1 -0
- package/storybook/atoms-background-background-component-stories.b6b50c0c.iframe.bundle.js +1 -0
- package/storybook/atoms-background-docs-mdx.4f102c17.iframe.bundle.js +1 -0
- package/storybook/atoms-barcode-barcode-component-stories.dc462559.iframe.bundle.js +1 -0
- package/storybook/atoms-barcode-docs-mdx.b74c501b.iframe.bundle.js +1 -0
- package/storybook/atoms-buzzer-buzzer-component-stories.13ee130d.iframe.bundle.js +1 -0
- package/storybook/atoms-buzzer-docs-mdx.23eb1913.iframe.bundle.js +1 -0
- package/storybook/atoms-card-card-component-stories.065b34e9.iframe.bundle.js +1 -0
- package/storybook/atoms-card-docs-mdx.7d276114.iframe.bundle.js +1 -0
- package/storybook/atoms-chart-chart-component-stories.5247b7cb.iframe.bundle.js +1 -0
- package/storybook/atoms-chart-docs-mdx.204609d4.iframe.bundle.js +1 -0
- package/storybook/atoms-clock-clock-component-stories.d1464731.iframe.bundle.js +1 -0
- package/storybook/atoms-clock-docs-mdx.501e6780.iframe.bundle.js +1 -0
- package/storybook/atoms-copy-value-copy-value-component-stories.58d3956a.iframe.bundle.js +1 -0
- package/storybook/atoms-copy-value-docs-mdx.f404dcd2.iframe.bundle.js +1 -0
- package/storybook/atoms-image-grid-docs-mdx.18b4df2a.iframe.bundle.js +1 -0
- package/storybook/atoms-image-grid-image-grid-component-stories.a0a92d9e.iframe.bundle.js +1 -0
- package/storybook/atoms-image-slider-docs-mdx.c616bb37.iframe.bundle.js +1 -0
- package/storybook/atoms-image-slider-image-slider-component-stories.484b9c41.iframe.bundle.js +1 -0
- package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js +2 -0
- package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js +2 -0
- package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/atoms-mosaic-docs-mdx.1aebfbdf.iframe.bundle.js +1 -0
- package/storybook/atoms-mosaic-mosaic-component-stories.0a6bc043.iframe.bundle.js +1 -0
- package/storybook/atoms-placeholder-docs-mdx.cd2f3976.iframe.bundle.js +1 -0
- package/storybook/atoms-placeholder-placeholder-component-stories.bc221534.iframe.bundle.js +1 -0
- package/storybook/atoms-qr-code-docs-mdx.4202568d.iframe.bundle.js +1 -0
- package/storybook/atoms-qr-code-qr-code-component-stories.5018e2b0.iframe.bundle.js +1 -0
- package/storybook/atoms-rating-docs-mdx.32fa4104.iframe.bundle.js +1 -0
- package/storybook/atoms-rating-rating-component-stories.982db47d.iframe.bundle.js +1 -0
- package/storybook/atoms-reader-doc-docs-mdx.0688c3b9.iframe.bundle.js +1 -0
- package/storybook/atoms-reader-doc-reader-doc-component-stories.a6fec57d.iframe.bundle.js +1 -0
- package/storybook/atoms-text-animate-docs-mdx.05e1baf4.iframe.bundle.js +1 -0
- package/storybook/atoms-text-animate-text-animate-component-stories.8041c0f1.iframe.bundle.js +1 -0
- package/storybook/atoms-thumb-docs-mdx.2143ad01.iframe.bundle.js +1 -0
- package/storybook/atoms-thumb-thumb-component-stories.06f51d03.iframe.bundle.js +1 -0
- package/storybook/atoms-timer-docs-mdx.6f724cc8.iframe.bundle.js +1 -0
- package/storybook/atoms-timer-timer-component-stories.9bee1037.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-docs-mdx.3b1088c0.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-typewriter-component-stories.4fefc019.iframe.bundle.js +1 -0
- package/storybook/cdk-components-drag-and-drop-splitter-docs-mdx.f12088fd.iframe.bundle.js +1 -0
- package/storybook/cdk-components-drag-and-drop-splitter-splitter-component-stories.286b5171.iframe.bundle.js +1 -0
- package/storybook/cdk-components-table-docs-mdx.cc2c11e7.iframe.bundle.js +1 -0
- package/storybook/cdk-components-table-table-component-stories.db9212fd.iframe.bundle.js +1 -0
- package/storybook/examples-burger-menu-stories.0a083a75.iframe.bundle.js +1 -0
- package/storybook/examples-docs-mdx.3111f2c6.iframe.bundle.js +1 -0
- package/storybook/examples-image-grid-slider-docs-mdx.9e38157e.iframe.bundle.js +1 -0
- package/storybook/examples-image-grid-slider-image-grid-slider-stories.028c8c2b.iframe.bundle.js +1 -0
- package/storybook/examples-layout-docs-mdx.bbacdfd2.iframe.bundle.js +1 -0
- package/storybook/examples-layout-layout-stories.05cd891f.iframe.bundle.js +1 -0
- package/storybook/examples-table-edit-focus-docs-mdx.3c0d1611.iframe.bundle.js +1 -0
- package/storybook/examples-table-edit-focus-table-edit-focus-stories.c79e214a.iframe.bundle.js +1 -0
- package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js +2 -0
- package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js +2 -0
- package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/favicon-wrapper.svg +46 -0
- package/storybook/favicon.svg +1 -0
- package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js +2 -0
- package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js +2 -0
- package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/forms-autofocus-autofocus-stories.2e94d887.iframe.bundle.js +1 -0
- package/storybook/forms-autofocus-docs-mdx.39611362.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-checkbox-component-stories.d45b4f0d.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-docs-mdx.74036eb7.iframe.bundle.js +1 -0
- package/storybook/forms-input-docs-mdx.72d0e99a.iframe.bundle.js +1 -0
- package/storybook/forms-input-input-component-stories.609db3f0.iframe.bundle.js +1 -0
- package/storybook/forms-slider-docs-mdx.120cefc6.iframe.bundle.js +1 -0
- package/storybook/forms-slider-slider-component-stories.058fb9b1.iframe.bundle.js +1 -0
- package/storybook/forms-switch-docs-mdx.9d58a341.iframe.bundle.js +1 -0
- package/storybook/forms-switch-switch-component-stories.bf67d7c9.iframe.bundle.js +1 -0
- package/storybook/forms-validators-docs-mdx.ebb47a43.iframe.bundle.js +1 -0
- package/storybook/forms-validators-validators-component-stories.9525f97b.iframe.bundle.js +1 -0
- package/storybook/home-guide-mdx.1a176b15.iframe.bundle.js +1 -0
- package/storybook/home-overview-mdx.d0cf448a.iframe.bundle.js +1 -0
- package/storybook/home-tips-mdx.26df81d8.iframe.bundle.js +1 -0
- package/storybook/home-usage-mdx.7ba89dd0.iframe.bundle.js +1 -0
- package/storybook/iframe.html +558 -0
- package/storybook/index.html +155 -0
- package/storybook/index.json +1 -0
- package/storybook/layout-main-docs-mdx.4c9208c5.iframe.bundle.js +1 -0
- package/storybook/layout-main-main-component-stories.788c0c54.iframe.bundle.js +1 -0
- package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js +2 -0
- package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js +2 -0
- package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/layout-nav-docs-mdx.cc919f94.iframe.bundle.js +1 -0
- package/storybook/layout-nav-nav-component-stories.766738fc.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-docs-mdx.823351e0.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-header-docs-mdx.394033ca.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-header-header-component-stories.5eaef192.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-overlay-component-stories.01f6cd84.iframe.bundle.js +1 -0
- package/storybook/layout-spinner-docs-mdx.4be572c0.iframe.bundle.js +1 -0
- package/storybook/layout-spinner-spinner-component-stories.ab8245c6.iframe.bundle.js +1 -0
- package/storybook/layout-splitter-docs-mdx.bf161b39.iframe.bundle.js +1 -0
- package/storybook/layout-splitter-splitter-component-stories.46b8b112.iframe.bundle.js +1 -0
- package/storybook/layout-tabs-docs-mdx.89d83606.iframe.bundle.js +1 -0
- package/storybook/layout-tabs-tabs-component-stories.8602cefa.iframe.bundle.js +1 -0
- package/storybook/layout-top-scroll-bottom-docs-mdx.ddc061f8.iframe.bundle.js +1 -0
- package/storybook/layout-top-scroll-bottom-top-scroll-bottom-component-stories.9ee7055f.iframe.bundle.js +1 -0
- package/storybook/main.2d116a57.iframe.bundle.js +1 -0
- package/storybook/main.a402659c6a0734088d14.css +2101 -0
- package/storybook/mocker-runtime-injected.js +1 -0
- package/storybook/molecules-image-editor-docs-mdx.119ea12a.iframe.bundle.js +1 -0
- package/storybook/molecules-image-editor-image-editor-component-stories.56467f17.iframe.bundle.js +1 -0
- package/storybook/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook/nunito-sans-bold.woff2 +0 -0
- package/storybook/nunito-sans-italic.woff2 +0 -0
- package/storybook/nunito-sans-regular.woff2 +0 -0
- package/storybook/project.json +1 -0
- package/storybook/runtime~main.a9b8ab83.iframe.bundle.js +1 -0
- package/storybook/sb-addons/docs-1/manager-bundle.js +3 -0
- package/storybook/sb-addons/libs-ui-storybook-2/manager-bundle.js +3 -0
- package/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +630 -0
- package/storybook/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook/sb-common-assets/favicon.svg +1 -0
- package/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook/sb-manager/globals-runtime.js +76714 -0
- package/storybook/sb-manager/globals.js +24 -0
- package/storybook/sb-manager/manager-stores.js +23 -0
- package/storybook/sb-manager/runtime.js +27451 -0
- package/storybook/sb-preview/globals.js +20 -0
- package/storybook/sb-preview/runtime.js +35491 -0
- package/storybook/styling-colors-colors-component-stories.58031f40.iframe.bundle.js +1 -0
- package/storybook/styling-colors-docs-mdx.95c504e4.iframe.bundle.js +1 -0
- package/storybook/styling-css-variables-docs-mdx.48afb4f3.iframe.bundle.js +1 -0
- package/storybook/styling-forms-docs-mdx.943e72f2.iframe.bundle.js +1 -0
- package/storybook/styling-forms-forms-component-stories.8af76278.iframe.bundle.js +1 -0
- package/storybook/styling-icons-docs-mdx.e1001dfd.iframe.bundle.js +1 -0
- package/storybook/styling-icons-icons-component-stories.2dd8c6f8.iframe.bundle.js +1 -0
- package/storybook/styling-layers-docs-mdx.5039dc45.iframe.bundle.js +1 -0
- package/storybook/styling-tags-docs-mdx.23ab2316.iframe.bundle.js +1 -0
- package/storybook/styling-tags-tags-component-stories.7a64bd20.iframe.bundle.js +1 -0
- package/storybook/styling-ui-tags-docs-mdx.8f75631d.iframe.bundle.js +1 -0
- package/storybook/styling-ui-tags-ui-tags-component-stories.2ec3109b.iframe.bundle.js +1 -0
- package/storybook/version.json +4 -0
- package/version.json +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[6212,6569],{"./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/cdk/components/table/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"),_table_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/cdk/components/table/table.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_cdk_table_wrapper_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-cdk-table-wrapper.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:_table_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"cdk-table-wrapper",children:"CDK Table Wrapper"}),"\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:"ui-cdk-table-wrapper"})," is a layout component that extends standard CDK tables with essential features like loading states, interactive rows, and fixed layouts."]}),"\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 a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cdk-table"})," that adds what the CDK leaves out: a loading\nskeleton, row hover and focus states, the header colours, a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"fixed"})," or\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"content"})," layout, column measurement for drag previews, and the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"inline"})," editor\nmode in which text and field share one box and the focused control is scrolled\ninto view. It renders no columns and holds no data — the table inside it is\nyours. Keyboard movement between cells is not in here either: that is the\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiTableEditFocus"})," directive, which it is built to be paired with."]}),"\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-cdk-table-wrapper",entry:_guide_ui_cdk_table_wrapper_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:"features",children:"Features"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Boolean Attributes:"})," Supports simple use of boolean inputs as attributes (e.g., ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"loading"})," instead of ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'[loading]="true"'}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Loading State:"})," Integrated skeleton animations for table rows."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Interactivity:"})," Hover and focus states for table rows."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Header row:"})," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-c-secondary"})," as background with the theme-independent ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-c-static"})," text color."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Drag & Drop Support:"})," Measures the columns when a row is grabbed and publishes them as CSS variables, so the detached drag preview mirrors the table it came from (see below)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Flexible Layouts:"})," Options for content adaptation (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"content"}),") and fixed column widths (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"fixed"}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Edge padding:"})," the first column (left) and the last column (right) get 1.5× the cell padding against the table edge."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Inline Editor Mode:"})," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"inline"})," removes the outer frame and the wrapper padding and keeps only the horizontal row separators; the host itself scrolls horizontally and smoothly centers focused controls (form fields, buttons, links — the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiTableEditFocus"})," control set) for keyboard, mouse and programmatic focus alike. The focused row additionally stays visible ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"vertically"}),": the page scrolls just enough to keep it in view (nearest edge, no centering), honouring the row's CSS ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"scroll-margin-top"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"-bottom"})," — set those to the height of any sticky chrome (nav, detached header, footer) the row must stay clear of. The wrapper is the single source of truth for the cell metrics: display texts and edit fields share the exact same box (no layout shifts when a cell toggles between text and field), header texts align to the same content inset, and the outer columns keep the 1.5× edge padding of the default mode. Pair it with the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiTableEditFocus"})," directive for clicked-cell focusing, Shift+Arrow cell navigation and select-all suppression."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Only reachable controls are navigation stations:"})," the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiTableEditFocus"})," control set counts a form field, button or link only while it can actually take focus — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"disabled"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"hidden"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'tabindex="-1"'})," are skipped, exactly as the browser skips them. A cell may therefore hold a different number of stations from one moment to the next (a button gated on pending changes, say) without anything having to be registered: the list is derived from the DOM on every key press. Counting unreachable controls would let the directive and the native tab order drift apart — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"focus()"})," on a disabled control does nothing, so the focus would stay put and the next key press would pick the same dead target again."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The component is used as a wrapper around a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cdk-table"}),":"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-default-table",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/cdk-table--default",children:"Open Default Table"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-cdk-table-wrapper loading content interactive>\n <table cdk-table [dataSource]="dataSource">\n \x3c!-- Your column definitions --\x3e\n </table>\n</ui-cdk-table-wrapper>\n'})}),"\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:"keyboard-navigation-uitableeditfocus",children:["Keyboard navigation (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiTableEditFocus"}),")"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The directive knows one chain of stations per row: every control a cell holds,\nin DOM order, filtered to what can actually take focus. Tab and Shift+Arrow\nwalk that same chain — they differ only in how far they reach."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Key"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Does"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"At the edge"})]})}),(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__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"Shift"})," + ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"←"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"→"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Offers the step to the app as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"uiRowStep"})," (before moving), then walks the controls of the current row — the remaining ones in the cell, then the nearest cell that has any, entered from the approached side."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Stops."})," The row is never left sideways."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"Tab"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"Shift"})," + ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"Tab"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Same chain, same order."}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Wraps"})," to the neighbour row via ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"uiRowNavigate"})," — forwards into its first control, backwards into its last, never into the middle."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"Shift"})," + ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"↑"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"↓"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Emits ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"uiRowNavigate"})," with the current column. The ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("em",{children:"app"})," decides what happens — which rows are eligible is domain knowledge the directive does not have."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Whatever the app does with it."})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Because left/right and Tab share one chain, a user only has to learn a single\norder. Left/right is then the tool for working ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"inside"})," a row, Tab the tool\nfor travelling through the table — and stopping at the edge is itself feedback:\nyou notice the row has ended without losing your place."]}),"\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:"The focus has to be in the table first."}),' The arrows have no row to count\nfrom otherwise, so the keys go to the page instead — it scrolls, or nothing\nhappens at all. That is indistinguishable from a defect for the person at the\nkeyboard, and it is the single most common reason for "the arrow keys don\'t\nwork". Get in by clicking a cell, or by tabbing into the table.']}),"\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:"A sideways step is offered before it is taken."})," A row rendered as plain text\nmay well be an editable row that is simply closed — and the directive cannot\nknow. So every Shift+Left/Right is announced as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiRowStep"})," first, carrying the\ndirection and the control it starts from. An app that ignores the event sees no\nchange at all. An app that sets ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"handled = true"})," takes the step over: the\ndirective leaves the focus alone, and the app can open the row and put the\nfocus where the step was heading. That is what turns a closed row from a\ndetour through its buttons into a door."]}),"\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:"Where the line runs:"})," the directive owns the mechanics — which controls are\nreachable, in what order, where the cell ends. The app owns the policy — which\nrow may be entered at all. Exactly two signals cross that line,\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiRowNavigate"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiRowStep"}),'. Concepts like "locked" or "signed in" belong\nto the application, never in here.']}),"\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:"inputs",children:"Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The component uses Angular Signals and the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"booleanAttribute"})," transformer for a clean API."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.ov,{of:_table_component_stories__WEBPACK_IMPORTED_MODULE_4__.Default}),"\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:"inline-editor-mode",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/cdk-table--inline",children:"Inline Editor Mode"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The default example table in inline mode: frameless, padding-free, horizontal row separators only. A fully editable table pairs this mode with the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiTableEditFocus"})," directive (click-to-edit, Shift+Arrow, auto-centering)."]}),"\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:"combined-tables-cross-table-drag--drop",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/cdk-table--content-inter-active-drag-and-drop-combine",children:"Combined Tables (Cross-Table Drag & Drop)"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Demonstrates the interaction between multiple tables within a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cdkDropListGroup"}),"."]}),"\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-is-checked-in-a-browser",children:"What is checked in a browser"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A drag is the one interaction no other net here can see: nobody photographs a\npreview hanging on the pointer, and a unit test has neither layout nor cascade\nlayers. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"npm run e2e:storybook"})," builds the Storybook and drags in a real\nbrowser, asking the two questions a screenshot cannot — does the flying thing\nhave a surface, and does it carry the columns of the table it came from. It\ncarries the row across a NEIGHBOURING table on the way, because that is where\nthe geometry used to be rewritten under 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:"the-column-geometry",children:"The column geometry"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A drag preview is a clone the CDK hangs on the pointer, outside the table it\ncame from — so it has no columns of its own. It gets them from two CSS\nvariables the wrapper publishes:"}),"\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:"Variable"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"What it holds"})]})}),(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:"--preview-grid-cols"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["The column widths, one after another, ready for ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"grid-template-columns"}),"."]})]}),(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:"--table-width"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The table's rendered width — the drag placeholder uses it too."})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Both are written on the host ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"and"})," on ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:":root"}),", because the things that\nalign to a table do not all live inside it: a detached sticky header sits\nabove the wrapper and reads them from the document."]}),"\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:"They are measured when a row is grabbed, and the grabbed row is what gets\nmeasured."})," That matters as soon as two tables share a page, which is what\nthe combined example is about: the variables are global, so a measurement\ntaken while the pointer crosses a neighbouring table would rewrite them under\na preview that is already in the air — and the flying row would re-lay itself\nout on foreign columns. So the publication freezes for as long as a preview\nexists, and a resize during a drag cannot move it either."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A row that does not span the whole table — an expanded detail row across a\nsingle cell — is not asked; the header answers instead. Otherwise its one\nwide track would land on everything else that aligns to these variables."})]})}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/cdk/components/table/table.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ContentInterActiveDragAndDropCombine:()=>ContentInterActiveDragAndDropCombine,Default:()=>Default,Inline:()=>Inline,__namedExportsOrder:()=>__namedExportsOrder,default:()=>table_component_stories});var drag_drop=__webpack_require__("./node_modules/@angular/cdk/fesm2022/drag-drop.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var _data_source_chunk=__webpack_require__("./node_modules/@angular/cdk/fesm2022/_data-source-chunk.mjs"),table=__webpack_require__("./node_modules/@angular/cdk/fesm2022/table.mjs"),_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"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),BehaviorSubject=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js");const gameData=[{id:1,name:"Mario",nameShortCut:"DK",type:"Jump n run",value:!1},{id:2,name:"Turrican",nameShortCut:"TU",type:"Shooter",value:!1},{id:3,name:"Crash",nameShortCut:"CB",type:"Jump n run",value:!1},{id:4,name:"Tetris",nameShortCut:"TE",type:"Puzzle",value:!1},{id:5,name:"Frogger",nameShortCut:"FR",type:"Arcade",value:!1},{id:6,name:"Lemmings",nameShortCut:"LE",type:"Puzzle",value:!1}],gameDataOne=[{id:1,name:"Super Mario",nameShortCut:"SM",type:"Jump n run",value:!1},{id:2,name:"Turrican",nameShortCut:"TU",type:"Shoot em up",value:!1},{id:3,name:"Crash",nameShortCut:"CB",type:"Jump n run",value:!1}],gameDataTwo=[{id:4,name:"Tetris",nameShortCut:"TE",type:"Puzzle",value:!1},{id:5,name:"Frogger",nameShortCut:"FR",type:"Arcade",value:!1},{id:6,name:"Lemmings",nameShortCut:"LE",type:"Puzzle",value:!1}],gameDataThree=[{id:7,name:"Double Dragon",nameShortCut:"DD",type:"Arcade",value:!1},{id:8,name:"Street Fighter",nameShortCut:"SF",type:"Beat n up",value:!1},{id:9,name:"Age Of Empire",nameShortCut:"AOE",type:"Strategy",value:!1}],gameDataFour=[{id:10,name:"Maniac Mansion",nameShortCut:"MM",type:"Point-and-Click-Adventure ",value:!1},{id:11,name:"Lionheartr",nameShortCut:"SF",type:"Jump n run",value:!1},{id:12,name:"Gears Of War",nameShortCut:"AOE",type:"Shooter",value:!1}];let UiExampleCDKTableComponent=class UiExampleCDKTableComponent{renderer=(0,_effect_chunk2.WQX)(_debug_node_chunk.sFG);debug=(0,core.input)(!1,{transform:core.booleanAttribute});draggable=(0,core.input)(!0);interactive=!1;gameDataValue=(0,core.input)(null);displayedColumns=["check","id","name","type","action"];dataSource=new GameDataSource([]);ngOnInit(){this.dataSource.updateDataValue(this.gameDataValue()??gameData)}buttonClick(element){alert(`buttonClick: ${element.id}`)}ngOnDestroy(){this.dataSource.disconnect()}onDrop(event){(0,drag_drop.eg)(event.previousContainer.data.dataValue(),event.container.data.dataValue(),event.previousIndex,event.currentIndex),event.previousContainer.data.updateDataValue(event.previousContainer.data.dataValue()),event.container.data.updateDataValue(event.container.data.dataValue())}selectItem(row){this.interactive&&this.dataSource.dataValue().map(item=>{item.id===row.id&&(item.value=!item.value)})}static propDecorators={debug:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"debug",required:!1,transform:void 0}]}],draggable:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"draggable",required:!1,transform:void 0}]}],interactive:[{type:_debug_node_chunk.pde,args:[{transform:core.booleanAttribute}]}],gameDataValue:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"gameDataValue",required:!1,transform:void 0}]}]}};UiExampleCDKTableComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-examples-cdk-table",template:'<table\n [dataSource]="dataSource"\n [cdkDropListData]="dataSource"\n (cdkDropListDropped)="onDrop($event)"\n cdkDropList\n cdk-table\n>\n <ng-container cdkColumnDef="check">\n <th class="w-20" *cdkHeaderCellDef cdk-header-cell>Check</th>\n <td class="w-20" *cdkCellDef="let element" cdk-cell>\n <input class="ui" [(ngModel)]="element.value" type="checkbox" />\n </td>\n </ng-container>\n\n <ng-container cdkColumnDef="id">\n <th class="w-10" *cdkHeaderCellDef cdk-header-cell>Id</th>\n <td class="w-10 text-left" *cdkCellDef="let element" cdk-cell>\n <div>{{ element.id }}</div>\n </td>\n </ng-container>\n\n <ng-container cdkColumnDef="name">\n <th *cdkHeaderCellDef cdk-header-cell>Name</th>\n <td *cdkCellDef="let element" cdk-cell>\n <div>{{ element.name }}</div>\n </td>\n </ng-container>\n\n <ng-container cdkColumnDef="type">\n <th *cdkHeaderCellDef cdk-header-cell>Type</th>\n <td *cdkCellDef="let element" cdk-cell>\n <div>{{ element.type }}</div>\n </td>\n </ng-container>\n\n <ng-container cdkColumnDef="action">\n <th *cdkHeaderCellDef cdk-header-cell>Actions</th>\n <td *cdkCellDef="let element" cdk-cell>\n <div class="mr-2 flex gap-2">\n <button class="ui-success" (click)="buttonClick(element)" type="button">\n click\n </button>\n <button class="ui-danger" (click)="buttonClick(element)" type="button">\n delete\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr *cdkHeaderRowDef="displayedColumns" cdk-header-row></tr>\n <tr\n *cdkRowDef="let row; columns: displayedColumns"\n [class.active]="row.value"\n (click)="selectItem(row)"\n cdkDrag\n [cdkDragDisabled]="!draggable()"\n [cdkDragData]="row"\n cdk-row\n >\n <div *cdkDragPlaceholder><span></span></div>\n </tr>\n</table>\n',imports:[table.N0,fesm2022_forms.YN,drag_drop.T1,drag_drop.O7,drag_drop.EM]})],UiExampleCDKTableComponent);class GameDataSource extends _data_source_chunk.q{data;$data=new BehaviorSubject.t([]);constructor(data){super(),this.data=data,this.updateDataValue(data)}swapIndex(array,from,to){const newArray=[...array],temp=newArray[from];return newArray[from]=newArray[to],newArray[to]=temp,newArray}dataValue(){return this.$data.value}updateDataValue(newData){this.$data.next(newData)}connect(){return this.$data}disconnect(){this.$data.complete()}}var header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),table_component=__webpack_require__("./libs/ui/src/lib/cdk/components/table/table.component.ts");const table_component_stories={title:"CDK/Table",component:table_component.N,decorators:[(0,dist.Iz)({providers:[],imports:[header_component.b,UiExampleCDKTableComponent,table_component.N,drag_drop.RK]})],argTypes:{loading:{control:"boolean"},content:{control:"boolean"},fixed:{control:"boolean"},interactive:{control:"boolean"},draggable:{control:"boolean"},inline:{control:"boolean"}},args:{loading:!1,content:!1,fixed:!1,interactive:!1,draggable:!1,inline:!1},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n '})},Default={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n '})},Inline={args:{inline:!0},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n [inline]="inline"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n '})},ContentInterActiveDragAndDropCombine={argTypes:{loading:{control:!1},content:{control:!1},fixed:{control:!1},interactive:{control:!1},draggable:{control:!1}},parameters:{controls:{disable:!1}},render:args=>({props:{...args,gameDataOne,gameDataTwo,gameDataThree,gameDataFour},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col p-4 [&_th.cdk-column-check]:text-transparent!" cdkDropListGroup>\n <div class="grid grid-cols-[1fr_1fr] gap-4 mb-4">\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataOne"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataTwo"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </div>\n <div class="grid grid-cols-[1fr_1fr] gap-4">\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataThree"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataFour"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </div>\n </section>\n '})},__namedExportsOrder=["Default","Inline","ContentInterActiveDragAndDropCombine"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n `\n };\n }\n}',...Default.parameters?.docs?.source}}},Inline.parameters={...Inline.parameters,docs:{...Inline.parameters?.docs,source:{originalSource:'{\n args: {\n inline: true\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n [inline]="inline"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n `\n };\n }\n}',...Inline.parameters?.docs?.source}}},ContentInterActiveDragAndDropCombine.parameters={...ContentInterActiveDragAndDropCombine.parameters,docs:{...ContentInterActiveDragAndDropCombine.parameters?.docs,source:{originalSource:'{\n argTypes: {\n loading: {\n control: false\n },\n content: {\n control: false\n },\n fixed: {\n control: false\n },\n interactive: {\n control: false\n },\n draggable: {\n control: false\n }\n },\n parameters: {\n controls: {\n disable: false\n }\n },\n render: args => {\n return {\n props: {\n ...args,\n gameDataOne,\n gameDataTwo,\n gameDataThree,\n gameDataFour\n },\n template: `\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col p-4 [&_th.cdk-column-check]:text-transparent!" cdkDropListGroup>\n <div class="grid grid-cols-[1fr_1fr] gap-4 mb-4">\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataOne"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataTwo"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </div>\n <div class="grid grid-cols-[1fr_1fr] gap-4">\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataThree"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataFour"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </div>\n </section>\n `\n };\n }\n}',...ContentInterActiveDragAndDropCombine.parameters?.docs?.source}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[6212],{"./libs/ui/src/lib/cdk/components/table/table.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ContentInterActiveDragAndDropCombine:()=>ContentInterActiveDragAndDropCombine,Default:()=>Default,Inline:()=>Inline,__namedExportsOrder:()=>__namedExportsOrder,default:()=>table_component_stories});var drag_drop=__webpack_require__("./node_modules/@angular/cdk/fesm2022/drag-drop.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var _data_source_chunk=__webpack_require__("./node_modules/@angular/cdk/fesm2022/_data-source-chunk.mjs"),table=__webpack_require__("./node_modules/@angular/cdk/fesm2022/table.mjs"),_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"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),BehaviorSubject=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js");const gameData=[{id:1,name:"Mario",nameShortCut:"DK",type:"Jump n run",value:!1},{id:2,name:"Turrican",nameShortCut:"TU",type:"Shooter",value:!1},{id:3,name:"Crash",nameShortCut:"CB",type:"Jump n run",value:!1},{id:4,name:"Tetris",nameShortCut:"TE",type:"Puzzle",value:!1},{id:5,name:"Frogger",nameShortCut:"FR",type:"Arcade",value:!1},{id:6,name:"Lemmings",nameShortCut:"LE",type:"Puzzle",value:!1}],gameDataOne=[{id:1,name:"Super Mario",nameShortCut:"SM",type:"Jump n run",value:!1},{id:2,name:"Turrican",nameShortCut:"TU",type:"Shoot em up",value:!1},{id:3,name:"Crash",nameShortCut:"CB",type:"Jump n run",value:!1}],gameDataTwo=[{id:4,name:"Tetris",nameShortCut:"TE",type:"Puzzle",value:!1},{id:5,name:"Frogger",nameShortCut:"FR",type:"Arcade",value:!1},{id:6,name:"Lemmings",nameShortCut:"LE",type:"Puzzle",value:!1}],gameDataThree=[{id:7,name:"Double Dragon",nameShortCut:"DD",type:"Arcade",value:!1},{id:8,name:"Street Fighter",nameShortCut:"SF",type:"Beat n up",value:!1},{id:9,name:"Age Of Empire",nameShortCut:"AOE",type:"Strategy",value:!1}],gameDataFour=[{id:10,name:"Maniac Mansion",nameShortCut:"MM",type:"Point-and-Click-Adventure ",value:!1},{id:11,name:"Lionheartr",nameShortCut:"SF",type:"Jump n run",value:!1},{id:12,name:"Gears Of War",nameShortCut:"AOE",type:"Shooter",value:!1}];let UiExampleCDKTableComponent=class UiExampleCDKTableComponent{renderer=(0,_effect_chunk2.WQX)(_debug_node_chunk.sFG);debug=(0,core.input)(!1,{transform:core.booleanAttribute});draggable=(0,core.input)(!0);interactive=!1;gameDataValue=(0,core.input)(null);displayedColumns=["check","id","name","type","action"];dataSource=new GameDataSource([]);ngOnInit(){this.dataSource.updateDataValue(this.gameDataValue()??gameData)}buttonClick(element){alert(`buttonClick: ${element.id}`)}ngOnDestroy(){this.dataSource.disconnect()}onDrop(event){(0,drag_drop.eg)(event.previousContainer.data.dataValue(),event.container.data.dataValue(),event.previousIndex,event.currentIndex),event.previousContainer.data.updateDataValue(event.previousContainer.data.dataValue()),event.container.data.updateDataValue(event.container.data.dataValue())}selectItem(row){this.interactive&&this.dataSource.dataValue().map(item=>{item.id===row.id&&(item.value=!item.value)})}static propDecorators={debug:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"debug",required:!1,transform:void 0}]}],draggable:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"draggable",required:!1,transform:void 0}]}],interactive:[{type:_debug_node_chunk.pde,args:[{transform:core.booleanAttribute}]}],gameDataValue:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"gameDataValue",required:!1,transform:void 0}]}]}};UiExampleCDKTableComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-examples-cdk-table",template:'<table\n [dataSource]="dataSource"\n [cdkDropListData]="dataSource"\n (cdkDropListDropped)="onDrop($event)"\n cdkDropList\n cdk-table\n>\n <ng-container cdkColumnDef="check">\n <th class="w-20" *cdkHeaderCellDef cdk-header-cell>Check</th>\n <td class="w-20" *cdkCellDef="let element" cdk-cell>\n <input class="ui" [(ngModel)]="element.value" type="checkbox" />\n </td>\n </ng-container>\n\n <ng-container cdkColumnDef="id">\n <th class="w-10" *cdkHeaderCellDef cdk-header-cell>Id</th>\n <td class="w-10 text-left" *cdkCellDef="let element" cdk-cell>\n <div>{{ element.id }}</div>\n </td>\n </ng-container>\n\n <ng-container cdkColumnDef="name">\n <th *cdkHeaderCellDef cdk-header-cell>Name</th>\n <td *cdkCellDef="let element" cdk-cell>\n <div>{{ element.name }}</div>\n </td>\n </ng-container>\n\n <ng-container cdkColumnDef="type">\n <th *cdkHeaderCellDef cdk-header-cell>Type</th>\n <td *cdkCellDef="let element" cdk-cell>\n <div>{{ element.type }}</div>\n </td>\n </ng-container>\n\n <ng-container cdkColumnDef="action">\n <th *cdkHeaderCellDef cdk-header-cell>Actions</th>\n <td *cdkCellDef="let element" cdk-cell>\n <div class="mr-2 flex gap-2">\n <button class="ui-success" (click)="buttonClick(element)" type="button">\n click\n </button>\n <button class="ui-danger" (click)="buttonClick(element)" type="button">\n delete\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr *cdkHeaderRowDef="displayedColumns" cdk-header-row></tr>\n <tr\n *cdkRowDef="let row; columns: displayedColumns"\n [class.active]="row.value"\n (click)="selectItem(row)"\n cdkDrag\n [cdkDragDisabled]="!draggable()"\n [cdkDragData]="row"\n cdk-row\n >\n <div *cdkDragPlaceholder><span></span></div>\n </tr>\n</table>\n',imports:[table.N0,fesm2022_forms.YN,drag_drop.T1,drag_drop.O7,drag_drop.EM]})],UiExampleCDKTableComponent);class GameDataSource extends _data_source_chunk.q{data;$data=new BehaviorSubject.t([]);constructor(data){super(),this.data=data,this.updateDataValue(data)}swapIndex(array,from,to){const newArray=[...array],temp=newArray[from];return newArray[from]=newArray[to],newArray[to]=temp,newArray}dataValue(){return this.$data.value}updateDataValue(newData){this.$data.next(newData)}connect(){return this.$data}disconnect(){this.$data.complete()}}var header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),table_component=__webpack_require__("./libs/ui/src/lib/cdk/components/table/table.component.ts");const table_component_stories={title:"CDK/Table",component:table_component.N,decorators:[(0,dist.Iz)({providers:[],imports:[header_component.b,UiExampleCDKTableComponent,table_component.N,drag_drop.RK]})],argTypes:{loading:{control:"boolean"},content:{control:"boolean"},fixed:{control:"boolean"},interactive:{control:"boolean"},draggable:{control:"boolean"},inline:{control:"boolean"}},args:{loading:!1,content:!1,fixed:!1,interactive:!1,draggable:!1,inline:!1},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n '})},Default={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n '})},Inline={args:{inline:!0},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n [inline]="inline"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n '})},ContentInterActiveDragAndDropCombine={argTypes:{loading:{control:!1},content:{control:!1},fixed:{control:!1},interactive:{control:!1},draggable:{control:!1}},parameters:{controls:{disable:!1}},render:args=>({props:{...args,gameDataOne,gameDataTwo,gameDataThree,gameDataFour},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col p-4 [&_th.cdk-column-check]:text-transparent!" cdkDropListGroup>\n <div class="grid grid-cols-[1fr_1fr] gap-4 mb-4">\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataOne"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataTwo"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </div>\n <div class="grid grid-cols-[1fr_1fr] gap-4">\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataThree"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataFour"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </div>\n </section>\n '})},__namedExportsOrder=["Default","Inline","ContentInterActiveDragAndDropCombine"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n `\n };\n }\n}',...Default.parameters?.docs?.source}}},Inline.parameters={...Inline.parameters,docs:{...Inline.parameters?.docs,source:{originalSource:'{\n args: {\n inline: true\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-cdk-table-wrapper\n [loading]="loading"\n [content]="content"\n [fixed]="fixed"\n [interactive]="interactive"\n [draggable]="draggable"\n [inline]="inline"\n >\n <ui-examples-cdk-table [draggable]="draggable"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </section>\n `\n };\n }\n}',...Inline.parameters?.docs?.source}}},ContentInterActiveDragAndDropCombine.parameters={...ContentInterActiveDragAndDropCombine.parameters,docs:{...ContentInterActiveDragAndDropCombine.parameters?.docs,source:{originalSource:'{\n argTypes: {\n loading: {\n control: false\n },\n content: {\n control: false\n },\n fixed: {\n control: false\n },\n interactive: {\n control: false\n },\n draggable: {\n control: false\n }\n },\n parameters: {\n controls: {\n disable: false\n }\n },\n render: args => {\n return {\n props: {\n ...args,\n gameDataOne,\n gameDataTwo,\n gameDataThree,\n gameDataFour\n },\n template: `\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col p-4 [&_th.cdk-column-check]:text-transparent!" cdkDropListGroup>\n <div class="grid grid-cols-[1fr_1fr] gap-4 mb-4">\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataOne"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataTwo"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </div>\n <div class="grid grid-cols-[1fr_1fr] gap-4">\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataThree"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n <ui-cdk-table-wrapper content interactive fixed [draggable]="true">\n <ui-examples-cdk-table class="w-min-[400px]" [debug]="\'true\'" [gameDataValue]="gameDataFour"></ui-examples-cdk-table>\n </ui-cdk-table-wrapper>\n </div>\n </section>\n `\n };\n }\n}',...ContentInterActiveDragAndDropCombine.parameters?.docs?.source}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[9652],{"./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>UiPlaceholderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var placeholder_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"),placeholder_componentngResource_default=__webpack_require__.n(placeholder_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");let UiPlaceholderComponent=class UiPlaceholderComponent{label=(0,core.input)(null);static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiPlaceholderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-placeholder",template:"<span class=\"_label\">{{ label() ?? ('placeholder.label' | transloco) }}</span>\n",encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[placeholder_componentngResource_default()]})],UiPlaceholderComponent)},"./node_modules/css-loader/dist/runtime/api.js"(module){"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map(function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content}).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js"(module){"use strict";module.exports=function(i){return i[1]}},"./libs/ui/src/lib/examples/burger-menu.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{BurgerMenu:()=>BurgerMenu,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_atoms_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"),_layout_overlay_header_header_component__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/src/lib/layout/overlay/header/header.component.ts"),_layout_overlay_overlay_component__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/layout/overlay/overlay.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Examples/Burger Menu",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({imports:[_layout_overlay_overlay_component__WEBPACK_IMPORTED_MODULE_3__.o,_layout_overlay_header_header_component__WEBPACK_IMPORTED_MODULE_2__.t,_atoms_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_1__.F]})],parameters:{docs:{description:{component:"Examples: recipes composed from ui building blocks — not components of\ntheir own, but copy-ready patterns as used in the consuming apps."}}}},BurgerMenu={render:()=>({props:{menuOpen:!1},template:'\n \x3c!-- translate-x-0 adds a transform, making this box the\n containing block for the overlay\'s fixed positioning — the\n drawer fills exactly this 32rem stage, docs canvas included. --\x3e\n <div class="relative flex h-[44rem] translate-x-0 flex-col overflow-hidden">\n <header class="flex w-full items-center justify-end border-b border-[color:var(--ui-c-default)] pb-6">\n <button\n class="ui"\n type="button"\n [attr.aria-expanded]="menuOpen"\n aria-label="menu"\n (click)="menuOpen = true"\n >\n <span class="ui-icon">menu</span>\n </button>\n </header>\n <section class="flex flex-col gap-4 pt-4">\n <ui-placeholder class="h-24"></ui-placeholder>\n <ui-placeholder class="h-24"></ui-placeholder>\n </section>\n <ui-layout-overlay\n [direction]="\'right\'"\n [maxWidth]="\'ms-1\'"\n [active]="menuOpen"\n (activeOutput)="menuOpen = $event"\n >\n <ui-layout-overlay-header\n overlay-header\n [headline]="\'Menu\'"\n (activeOutput)="menuOpen = $event"\n ></ui-layout-overlay-header>\n <ul overlay-content class="flex flex-col gap-2">\n <li><a href="#link01" (click)="menuOpen = false">link01</a></li>\n <li><a href="#link02" (click)="menuOpen = false">link02</a></li>\n <li><a href="#link03" (click)="menuOpen = false">link03</a></li>\n <li><a href="#link04" (click)="menuOpen = false">link04</a></li>\n </ul>\n </ui-layout-overlay>\n </div>\n'})},__namedExportsOrder=["BurgerMenu"];BurgerMenu.parameters={...BurgerMenu.parameters,docs:{...BurgerMenu.parameters?.docs,source:{originalSource:'{\n render: () => {\n return {\n props: {\n menuOpen: false\n },\n template: `\n \x3c!-- translate-x-0 adds a transform, making this box the\n containing block for the overlay\'s fixed positioning — the\n drawer fills exactly this 32rem stage, docs canvas included. --\x3e\n <div class="relative flex h-[44rem] translate-x-0 flex-col overflow-hidden">\n <header class="flex w-full items-center justify-end border-b border-[color:var(--ui-c-default)] pb-6">\n <button\n class="ui"\n type="button"\n [attr.aria-expanded]="menuOpen"\n aria-label="menu"\n (click)="menuOpen = true"\n >\n <span class="ui-icon">menu</span>\n </button>\n </header>\n <section class="flex flex-col gap-4 pt-4">\n <ui-placeholder class="h-24"></ui-placeholder>\n <ui-placeholder class="h-24"></ui-placeholder>\n </section>\n <ui-layout-overlay\n [direction]="\'right\'"\n [maxWidth]="\'ms-1\'"\n [active]="menuOpen"\n (activeOutput)="menuOpen = $event"\n >\n <ui-layout-overlay-header\n overlay-header\n [headline]="\'Menu\'"\n (activeOutput)="menuOpen = $event"\n ></ui-layout-overlay-header>\n <ul overlay-content class="flex flex-col gap-2">\n <li><a href="#link01" (click)="menuOpen = false">link01</a></li>\n <li><a href="#link02" (click)="menuOpen = false">link02</a></li>\n <li><a href="#link03" (click)="menuOpen = false">link03</a></li>\n <li><a href="#link04" (click)="menuOpen = false">link04</a></li>\n </ul>\n </ui-layout-overlay>\n </div>\n`\n };\n }\n}',...BurgerMenu.parameters?.docs?.source},description:{story:"The burger recipe (as used by the bookmarket navigation): a header row\nwith a burger button that opens a `ui-layout-overlay` sliding in from the\nright (`ms-1` width) with a `ui-layout-overlay-header` and a link list —\nevery link click closes the menu again. While the menu is open the page\nbehind it is scroll-locked by the overlay itself (#112).",...BurgerMenu.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* A floor, not a size: width and height come from wherever it is used.\n Without one an empty stand-in collapses to a text line and stops being\n the mass it exists to be. The floor is a named hook with a fallback, so a\n consumer who deliberately wants a smaller stand-in can set\n `--ui-placeholder-min-width` / `--ui-placeholder-min-height` without a\n cascade fight — an unlayered host rule otherwise beats a width utility in\n `@layer utilities` (tickets#241, tickets#251, tickets#253). */\n min-width: var(--ui-placeholder-min-width, calc(var(--ui-spacer) * 3));\n min-height: var(--ui-placeholder-min-height, calc(var(--ui-spacer) * 3));\n padding: calc(var(--ui-spacer) * 0.25);\n\n /* The overlay header's pair: filled enough to read as chrome rather than\n content, and theme-aware through the tokens. */\n background-color: var(--ui-c-primary);\n color: var(--ui-c-default);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-radius: var(--ui-border-radius);\n\n /* It is scenery, never the subject: nothing here should invite a click or\n land in a text selection. */\n -webkit-user-select: none;\n user-select: none;\n\n ._label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[1296,9652],{"./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>UiPlaceholderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var placeholder_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"),placeholder_componentngResource_default=__webpack_require__.n(placeholder_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");let UiPlaceholderComponent=class UiPlaceholderComponent{label=(0,core.input)(null);static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiPlaceholderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-placeholder",template:"<span class=\"_label\">{{ label() ?? ('placeholder.label' | transloco) }}</span>\n",encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[placeholder_componentngResource_default()]})],UiPlaceholderComponent)},"./node_modules/css-loader/dist/runtime/api.js"(module){"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map(function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content}).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js"(module){"use strict";module.exports=function(i){return i[1]}},"./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/examples/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"),_burger_menu_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/examples/burger-menu.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_burger_menu_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/burger-menu.json");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",...(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:_burger_menu_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"examples-burger-menu",children:"Examples: Burger Menu"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A copy-ready recipe composed from ui building blocks — not a component of its own."}),"\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:"burger-menu",entry:_guide_burger_menu_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 burger pattern used by the consuming apps (e.g. the bookmarket navigation): a header row with a burger button that opens a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutOverlayComponent"})," sliding in from the right, carrying a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutOverlayHeaderComponent"})," and a link list. Every link click closes the menu again; backdrop and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("kbd",{children:"Escape"})," close it too (built into the overlay)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["While the menu is open, the page behind it is scroll-locked by the overlay itself — see the scroll containment notes in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/layout-overlay--docs",children:"Layout: Overlay"}),"."]}),"\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:"recipe",children:"Recipe"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Part"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Building block"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Notes"})]})}),(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:"Trigger"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"button.ui-flat"})," with a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"menu"})," icon"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Carries ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"aria-expanded"})," (the open state) and an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"aria-label"}),"; sets the open flag."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Panel"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutOverlayComponent"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:'direction="right"'}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:'maxWidth="ms-1"'}),"; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"activeOutput"})," keeps the open flag in sync."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Header"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutOverlayHeaderComponent"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Headline plus the built-in close button."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Links"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Plain ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"ul"})," in the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"overlay-content"})," slot"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Each click resets the open flag so the menu closes after navigating."})]})]})]}),"\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:"example",children:"Example"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_burger_menu_stories__WEBPACK_IMPORTED_MODULE_4__.BurgerMenu})]})}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/examples/burger-menu.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{BurgerMenu:()=>BurgerMenu,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_atoms_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"),_layout_overlay_header_header_component__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/src/lib/layout/overlay/header/header.component.ts"),_layout_overlay_overlay_component__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/layout/overlay/overlay.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Examples/Burger Menu",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({imports:[_layout_overlay_overlay_component__WEBPACK_IMPORTED_MODULE_3__.o,_layout_overlay_header_header_component__WEBPACK_IMPORTED_MODULE_2__.t,_atoms_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_1__.F]})],parameters:{docs:{description:{component:"Examples: recipes composed from ui building blocks — not components of\ntheir own, but copy-ready patterns as used in the consuming apps."}}}},BurgerMenu={render:()=>({props:{menuOpen:!1},template:'\n \x3c!-- translate-x-0 adds a transform, making this box the\n containing block for the overlay\'s fixed positioning — the\n drawer fills exactly this 32rem stage, docs canvas included. --\x3e\n <div class="relative flex h-[44rem] translate-x-0 flex-col overflow-hidden">\n <header class="flex w-full items-center justify-end border-b border-[color:var(--ui-c-default)] pb-6">\n <button\n class="ui"\n type="button"\n [attr.aria-expanded]="menuOpen"\n aria-label="menu"\n (click)="menuOpen = true"\n >\n <span class="ui-icon">menu</span>\n </button>\n </header>\n <section class="flex flex-col gap-4 pt-4">\n <ui-placeholder class="h-24"></ui-placeholder>\n <ui-placeholder class="h-24"></ui-placeholder>\n </section>\n <ui-layout-overlay\n [direction]="\'right\'"\n [maxWidth]="\'ms-1\'"\n [active]="menuOpen"\n (activeOutput)="menuOpen = $event"\n >\n <ui-layout-overlay-header\n overlay-header\n [headline]="\'Menu\'"\n (activeOutput)="menuOpen = $event"\n ></ui-layout-overlay-header>\n <ul overlay-content class="flex flex-col gap-2">\n <li><a href="#link01" (click)="menuOpen = false">link01</a></li>\n <li><a href="#link02" (click)="menuOpen = false">link02</a></li>\n <li><a href="#link03" (click)="menuOpen = false">link03</a></li>\n <li><a href="#link04" (click)="menuOpen = false">link04</a></li>\n </ul>\n </ui-layout-overlay>\n </div>\n'})},__namedExportsOrder=["BurgerMenu"];BurgerMenu.parameters={...BurgerMenu.parameters,docs:{...BurgerMenu.parameters?.docs,source:{originalSource:'{\n render: () => {\n return {\n props: {\n menuOpen: false\n },\n template: `\n \x3c!-- translate-x-0 adds a transform, making this box the\n containing block for the overlay\'s fixed positioning — the\n drawer fills exactly this 32rem stage, docs canvas included. --\x3e\n <div class="relative flex h-[44rem] translate-x-0 flex-col overflow-hidden">\n <header class="flex w-full items-center justify-end border-b border-[color:var(--ui-c-default)] pb-6">\n <button\n class="ui"\n type="button"\n [attr.aria-expanded]="menuOpen"\n aria-label="menu"\n (click)="menuOpen = true"\n >\n <span class="ui-icon">menu</span>\n </button>\n </header>\n <section class="flex flex-col gap-4 pt-4">\n <ui-placeholder class="h-24"></ui-placeholder>\n <ui-placeholder class="h-24"></ui-placeholder>\n </section>\n <ui-layout-overlay\n [direction]="\'right\'"\n [maxWidth]="\'ms-1\'"\n [active]="menuOpen"\n (activeOutput)="menuOpen = $event"\n >\n <ui-layout-overlay-header\n overlay-header\n [headline]="\'Menu\'"\n (activeOutput)="menuOpen = $event"\n ></ui-layout-overlay-header>\n <ul overlay-content class="flex flex-col gap-2">\n <li><a href="#link01" (click)="menuOpen = false">link01</a></li>\n <li><a href="#link02" (click)="menuOpen = false">link02</a></li>\n <li><a href="#link03" (click)="menuOpen = false">link03</a></li>\n <li><a href="#link04" (click)="menuOpen = false">link04</a></li>\n </ul>\n </ui-layout-overlay>\n </div>\n`\n };\n }\n}',...BurgerMenu.parameters?.docs?.source},description:{story:"The burger recipe (as used by the bookmarket navigation): a header row\nwith a burger button that opens a `ui-layout-overlay` sliding in from the\nright (`ms-1` width) with a `ui-layout-overlay-header` and a link list —\nevery link click closes the menu again. While the menu is open the page\nbehind it is scroll-locked by the overlay itself (#112).",...BurgerMenu.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* A floor, not a size: width and height come from wherever it is used.\n Without one an empty stand-in collapses to a text line and stops being\n the mass it exists to be. The floor is a named hook with a fallback, so a\n consumer who deliberately wants a smaller stand-in can set\n `--ui-placeholder-min-width` / `--ui-placeholder-min-height` without a\n cascade fight — an unlayered host rule otherwise beats a width utility in\n `@layer utilities` (tickets#241, tickets#251, tickets#253). */\n min-width: var(--ui-placeholder-min-width, calc(var(--ui-spacer) * 3));\n min-height: var(--ui-placeholder-min-height, calc(var(--ui-spacer) * 3));\n padding: calc(var(--ui-spacer) * 0.25);\n\n /* The overlay header's pair: filled enough to read as chrome rather than\n content, and theme-aware through the tokens. */\n background-color: var(--ui-c-primary);\n color: var(--ui-c-default);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-radius: var(--ui-border-radius);\n\n /* It is scenery, never the subject: nothing here should invite a click or\n land in a text selection. */\n -webkit-user-select: none;\n user-select: none;\n\n ._label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[943,8938],{"./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>UiImageGridClickAreaDirective});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs");let UiImageGridClickAreaDirective=class UiImageGridClickAreaDirective{template=(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.WQX)(_angular_core__WEBPACK_IMPORTED_MODULE_1__.C4Q);static ngTemplateContextGuard(_directive,_context){return!0}};UiImageGridClickAreaDirective=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_1__.WLR)({selector:"ng-template[uiImageGridClickArea]"})],UiImageGridClickAreaDirective)},"./libs/ui/src/lib/atoms/image-grid/image-grid.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>UiImageGridComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_grid_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid.component.css?ngResource"),image_grid_componentngResource_default=__webpack_require__.n(image_grid_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),resize_signal=__webpack_require__("./libs/ui/src/lib/helpers/resize-signal.ts"),image_grid_click_area_directive=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts");let UiImageGridComponent=class UiImageGridComponent{get scrollerHeightValue(){return this.scrollerHeight()}scroller;imageContainer;clickArea=(0,core.contentChild)(image_grid_click_area_directive.u,{read:_debug_node_chunk.C4Q});resizeEvent=(0,resize_signal.H)();data=(0,core.input)(null);dataCount=(0,_resource_chunk.EW)(()=>this.data()?.length??0);dataCountItems=(0,_effect_chunk2.vPA)([0]);debug=(0,core.input)(!1);singleRow=(0,core.input)(!1);gap=(0,core.input)(0);overlayType=(0,core.input)("default");overlayTypeClass=(0,_resource_chunk.EW)(()=>`_-${this.overlayType()}`);cols=(0,core.input)(0);height=(0,core.input)();action=(0,core.input)(!1);loaded=(0,core.input)(!1);setIndex=(0,core.input)(0);currentIndex=(0,core.output)();clickIndex=(0,core.output)();scrollerHeight=(0,_resource_chunk.EW)(()=>{const height=this.height(),cols=this.cols();return this.singleRow()&&height&&cols?height/cols+"px":height?`${height}px`:"200px"});gridColsInternal=(0,_resource_chunk.EW)(()=>{const counter=this.cols();return 0!==counter&&this.dataCount()/counter>counter?Math.ceil(this.dataCount()/counter):counter});active=(0,_effect_chunk2.vPA)(null);hideDisplay=(0,_effect_chunk2.vPA)(!0);clickAreaExist=(0,_resource_chunk.EW)(()=>void 0!==this.clickArea());constructor(){(0,_effect_chunk2.QZP)(()=>{this.gap(),this.height(),this.cols(),this.resizeEvent(),this.updateGrid()}),(0,_effect_chunk2.QZP)(()=>{this.setIndex(),this.scrollToChild(this.setIndex()),this.active.set(this.setIndex())}),(0,_effect_chunk2.QZP)(()=>{this.action(),this.active.set(null)})}ngAfterViewInit(){this.active.set(this.setIndex()),this.updateGrid(),this.fader()}clickAreaContext(index){const item=this.data()?.[index];return item?{$implicit:item,index}:null}updateGrid(){const scroller=this.scroller?.nativeElement;scroller&&(scroller.style.height=this.scrollerHeight());const element=this.imageContainer?.nativeElement;if(element&&this.dataCount()){const gap=this.gap();this.dataCountItems.set(Array.from({length:this.gridColsInternal()*this.gridColsInternal()},(_,index)=>index+1));const repeatCount=this.singleRow()?this.dataCount():this.gridColsInternal();setTimeout(()=>{element.style.display="grid",element.style.gap=`${gap}px`,element.style.gridTemplateColumns=`repeat(${repeatCount}, 1fr)`,this.applyStylesToChildren()},100)}}calculateGridSize(containerSize){const adjustedSize=containerSize/this.cols()-this.gap();return Math.ceil(adjustedSize)}applyStylesToChildren(){const element=this.imageContainer?.nativeElement;if(element){const width=this.calculateGridSize(element.offsetWidth??0),height=this.singleRow()?element.offsetHeight:this.calculateGridSize(element.offsetHeight??0),applyChildStyles=child=>{child.style.height=`${height}px`,child.style.width=`${width}px`};element.childNodes.forEach(child=>{child instanceof HTMLElement&&applyChildStyles(child)})}}fader(){this.hideDisplay.set(!0),setTimeout(()=>{this.hideDisplay.set(!1)},800)}scrollToChild(index){const containerElement=this.imageContainer?.nativeElement;if(!containerElement)return;const targetChild=containerElement.childNodes[index];if(!(targetChild instanceof HTMLElement))return;const scrollOffset=this.calculateScrollOffset(containerElement,targetChild);this.scroller?.nativeElement.scrollTo({left:scrollOffset,top:0})}calculateScrollOffset(container,child){return child.offsetLeft-container.offsetWidth/2+child.offsetWidth/2}useAction(index){this.action()&&this.imageSrc(index)&&(this.clickAreaExist()&&this.active()===index&&this.clickIndex.emit(index),this.currentIndex.emit(index),this.active.set(index),this.scrollToChild(index))}scale(index){const value=this.data()?.[index]?.src.scale;return`transform: scale(${value??1})`}imageSrc(index){return this.data()?.[index]?.src.default}imageAlt(index){return this.data()?.[index]?.alt}imageTitle(index){return this.data()?.[index]?.title}static ctorParameters=()=>[];static propDecorators={scrollerHeightValue:[{type:_debug_node_chunk.g$6,args:["style.height"]}],scroller:[{type:core.ViewChild,args:["scroller"]}],imageContainer:[{type:core.ViewChild,args:["imageContainer"]}],clickArea:[{type:core.ContentChild,args:[image_grid_click_area_directive.u,{read:_debug_node_chunk.C4Q,isSignal:!0}]}],data:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"data",required:!1,transform:void 0}]}],debug:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"debug",required:!1,transform:void 0}]}],singleRow:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"singleRow",required:!1,transform:void 0}]}],gap:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"gap",required:!1,transform:void 0}]}],overlayType:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"overlayType",required:!1,transform:void 0}]}],cols:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"cols",required:!1,transform:void 0}]}],height:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"height",required:!1,transform:void 0}]}],action:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"action",required:!1,transform:void 0}]}],loaded:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"loaded",required:!1,transform:void 0}]}],setIndex:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"setIndex",required:!1,transform:void 0}]}],currentIndex:[{type:_debug_node_chunk.k7i,args:["currentIndex"]}],clickIndex:[{type:_debug_node_chunk.k7i,args:["clickIndex"]}]}};UiImageGridComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-image-grid",template:'@if (data()) {\n <div class="_scroller" #scroller>\n <div\n #imageContainer\n class="_image-container"\n [class._-hide-display]="hideDisplay()"\n >\n @for (item of dataCountItems(); track item; let i = $index) {\n <button\n class="_wrapper"\n [class._-action]="action() && imageSrc(i)"\n [class._-active]="active() === i"\n [class._-no-image]="!imageSrc(i)"\n [class]="overlayTypeClass()"\n (click)="useAction(i)"\n >\n @if (debug()) {\n dataCount: {{ this.dataCount() }} <br />\n internalCounter: {{ this.gridColsInternal() }} <br />\n counter: {{ this.cols() }} <br />\n src: {{ imageSrc(i) }}\n } @else {\n @if (imageSrc(i) && loaded()) {\n <figure>\n <img\n [style]="scale(i)"\n [src]="imageSrc(i)"\n [alt]="imageAlt(i)"\n [title]="imageTitle(i)"\n />\n </figure>\n @if (clickArea(); as template) {\n <div class="_click-area">\n <ng-container\n *ngTemplateOutlet="template; context: clickAreaContext(i)"\n ></ng-container>\n </div>\n }\n } @else {\n \x3c!-- No picture: the same shape the image editor uses — icon\n centred, whatever title the item carries underneath. No\n stand-in text: an empty title is the caller\'s business. --\x3e\n <div class="_empty">\n <span class="ui-icon x3" aria-hidden="true">image</span>\n <strong>{{ imageTitle(i) }}</strong>\n </div>\n }\n }\n </button>\n }\n </div>\n </div>\n}\n',imports:[_common_module_chunk.T3],styles:[image_grid_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiImageGridComponent)},"./libs/ui/.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/.storybook/demos/examples/image-grid-slider/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"),_image_grid_slider_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/demos/examples/image-grid-slider/image-grid-slider.stories.ts"),_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_image_gallery_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/image-gallery.json");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",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,{of:_image_grid_slider_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"example-image-gallery",children:"Example Image Gallery"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Two atoms, one index: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-image-grid"})," for the overview, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-image-slider"}),"\nfor the single picture. This page shows the two ways they are wired; what\neach of them takes and emits is on their own pages —\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/atoms-image-grid--docs",children:"Image Grid"})," and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/atoms-image-slider--docs",children:"Image Slider"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"image-gallery",entry:_guide_image_gallery_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:"open-story-side-by-side",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/examples-image-gallery--image-gallery",children:"Open story: side by side"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Both are visible, and both read and write the same index: a click in the\ngrid moves the slider, a step in the slider moves the grid's selection."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-image-slider\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [zoom]="false">\n</ui-image-slider>\n\n<ui-image-grid\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [action]="true"\n [loaded]="true"\n [height]="400"\n [cols]="3"\n [gap]="10">\n</ui-image-grid>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"open-story-zoom-on-demand",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/examples-image-gallery--image-gallery-zoom",children:"Open story: zoom on demand"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The slider exists only while it is open. It takes two clicks, by design of\nthe grid: the first click ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"selects"})," a tile, the second — on the selected\ntile's click area, the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<ng-template uiImageGridClickArea>"})," projected into the grid and stamped\ninto every tile with the tile's item — emits ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clickIndex"}),". That creates the\nslider in zoom; the slider's own close hands ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"currentZoom"})," back as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"false"}),",\nand the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"@if"})," removes it again."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-image-grid\n [data]="data"\n [setIndex]="index"\n (clickIndex)="index=$event; zoom=true"\n [action]="true"\n [loaded]="true"\n overlayType="doors"\n [height]="480"\n [cols]="3"\n [gap]="10">\n <ng-template uiImageGridClickArea let-item>\n <div>{{ item.title }}</div>\n </ng-template>\n</ui-image-grid>\n\n@if (zoom) {\n <ui-image-slider\n [data]="data"\n [setIndex]="index"\n (currentIndex)="index=$event"\n (currentZoom)="zoom=$event"\n [zoom]="zoom">\n </ui-image-slider>\n}\n'})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/.storybook/demos/examples/image-grid-slider/image-grid-slider.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ImageGallery:()=>ImageGallery,ImageGalleryZoom:()=>ImageGalleryZoom,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_src_lib_atoms_image_grid_image_grid_click_area_directive__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts"),_src_lib_atoms_image_grid_image_grid_component__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid.component.ts"),_src_lib_atoms_image_slider_image_slider_component__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/atoms/image-slider/image-slider.component.ts"),_src_lib_atoms_image_mock__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/image.mock.ts"),_header_header_component__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Examples/Image Gallery",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({imports:[_header_header_component__WEBPACK_IMPORTED_MODULE_5__.b,_src_lib_atoms_image_grid_image_grid_component__WEBPACK_IMPORTED_MODULE_2__.p,_src_lib_atoms_image_grid_image_grid_click_area_directive__WEBPACK_IMPORTED_MODULE_1__.u,_src_lib_atoms_image_slider_image_slider_component__WEBPACK_IMPORTED_MODULE_3__.u]})]},ImageGallery={render:args=>({props:{...args,data:(0,_src_lib_atoms_image_mock__WEBPACK_IMPORTED_MODULE_4__.W)(),currentIndex:0},template:'\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="flex flex-col">\n <ui-image-slider\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [zoom]="false">\n </ui-image-slider>\n <div class="relative h-[400px] mt-(--ui-spacer)">\n <ui-image-grid\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [action]="true"\n [loaded]="true"\n [height]="400"\n [cols]="3"\n [gap]="10">\n </ui-image-grid>\n </div>\n </section>\n '})},ImageGalleryZoom={render:args=>({props:{...args,data:(0,_src_lib_atoms_image_mock__WEBPACK_IMPORTED_MODULE_4__.W)(),index:0,zoom:!1},template:'\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-image-grid\n [data]="data"\n [setIndex]="index"\n (clickIndex)="index=$event;zoom=true"\n [action]="true"\n [loaded]="true"\n overlayType="doors"\n [height]="480"\n [cols]="3"\n [gap]="10">\n <ng-template uiImageGridClickArea let-item>\n <div class="bg-c-background p-2">{{ item.title }}</div>\n </ng-template>\n </ui-image-grid>\n @if(zoom) {\n <ui-image-slider\n [data]="data"\n [setIndex]="index"\n (currentIndex)="index=$event"\n (currentZoom)="zoom=$event"\n [zoom]="zoom"></ui-image-slider>\n }\n </section>\n '})},__namedExportsOrder=["ImageGallery","ImageGalleryZoom"];ImageGallery.parameters={...ImageGallery.parameters,docs:{...ImageGallery.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args,\n data: uiImageMock(),\n currentIndex: 0\n },\n template: `\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="flex flex-col">\n <ui-image-slider\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [zoom]="false">\n </ui-image-slider>\n <div class="relative h-[400px] mt-(--ui-spacer)">\n <ui-image-grid\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [action]="true"\n [loaded]="true"\n [height]="400"\n [cols]="3"\n [gap]="10">\n </ui-image-grid>\n </div>\n </section>\n `\n };\n }\n}',...ImageGallery.parameters?.docs?.source},description:{story:"Grid and slider side by side, sharing one index: a click in the grid moves\nthe slider, a step in the slider moves the grid's selection.",...ImageGallery.parameters?.docs?.description}}},ImageGalleryZoom.parameters={...ImageGalleryZoom.parameters,docs:{...ImageGalleryZoom.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args,\n data: uiImageMock(),\n index: 0,\n zoom: false\n },\n template: `\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-image-grid\n [data]="data"\n [setIndex]="index"\n (clickIndex)="index=$event;zoom=true"\n [action]="true"\n [loaded]="true"\n overlayType="doors"\n [height]="480"\n [cols]="3"\n [gap]="10">\n <ng-template uiImageGridClickArea let-item>\n <div class="bg-c-background p-2">{{ item.title }}</div>\n </ng-template>\n </ui-image-grid>\n @if(zoom) {\n <ui-image-slider\n [data]="data"\n [setIndex]="index"\n (currentIndex)="index=$event"\n (currentZoom)="zoom=$event"\n [zoom]="zoom"></ui-image-slider>\n }\n </section>\n `\n };\n }\n}',...ImageGalleryZoom.parameters?.docs?.source},description:{story:"The slider exists only while it is open. A click selects a tile; a click on\nthe selected tile's click area — the projected template, stamped per tile\nwith the tile's item — emits `clickIndex`, which creates the slider in zoom;\nthe slider's own close hands `currentZoom` back and removes it.",...ImageGalleryZoom.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/image-grid/image-grid.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n:host {\n z-index: 0;\n --wrapper-height: 60rem;\n --button-size: 4rem;\n display: flex;\n /* Fills its container by default; the named hooks let a consumer set a fixed\n size without a cascade fight (tickets#241, tickets#251). */\n width: var(--ui-image-grid-width, 100%);\n height: var(--ui-image-grid-height, 100%);\n border-radius: calc(var(--ui-border-width) * 4);\n\n ._scroller {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n width: 100%;\n height: 100%;\n overflow-y: hidden;\n overflow-x: scroll;\n background-color: var(--ui-c-background);\n scroll-behavior: smooth;\n }\n\n ._image-container {\n position: absolute;\n top: 0;\n left: 0;\n display: grid;\n width: 100%;\n height: 100%;\n transition: opacity calc(var(--ui-time) * 0.1) linear;\n\n &._-hide-display {\n opacity: 0;\n }\n\n button._wrapper {\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n gap: calc(var(--ui-spacer) * 0.5);\n align-items: center;\n justify-content: center;\n overflow: hidden;\n transition: scale calc(var(--ui-time) * 0.5) ease-in-out;\n background-color: var(--ui-c-fourthly);\n border: 0;\n\n &._-no-image {\n cursor: default;\n opacity: 0.5;\n }\n\n /* The empty state, same arrangement as the image editor's: icon above,\n title below, both dimmed. */\n ._empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: calc(var(--ui-spacer) * 0.25);\n }\n\n &._-default {\n &:not(._-action) {\n cursor: default;\n }\n\n &._-active {\n border: 0.32rem solid var(--ui-c-focus);\n\n img {\n transform: scale(1.1) !important;\n }\n }\n\n &._-action:hover {\n img {\n transform: scale(1.1) !important;\n }\n }\n }\n\n &._-doors {\n &._-active {\n border: 0.32rem solid var(--ui-c-focus);\n }\n\n &._-action:hover {\n img {\n transform: scale(1.1) !important;\n }\n }\n\n &::after,\n &::before {\n z-index: 1;\n content: '\\00a0';\n position: absolute;\n left: 0;\n display: flex;\n height: 100%;\n width: 100%;\n background-color: var(--ui-c-background);\n transition: var(--ui-time) ease-in-out;\n opacity: 0.6;\n }\n\n &::before {\n top: -50%;\n z-index: 1;\n }\n\n &::after {\n top: 50%;\n }\n\n &._-active::before {\n opacity: 0;\n top: -100%;\n }\n\n &._-active::after {\n opacity: 0;\n top: 100%;\n }\n }\n\n figure {\n position: relative;\n display: flex;\n flex-flow: column;\n justify-content: center;\n align-items: center;\n padding: 0;\n\n img {\n width: auto;\n max-width: initial;\n aspect-ratio: auto;\n transition: transform calc(var(--ui-time) * 0.5) ease-in-out;\n -webkit-user-select: none;\n user-select: none;\n }\n }\n\n ._click-area {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: var(--ui-time) ease-in-out;\n }\n\n &._-active {\n ._click-area {\n opacity: 1;\n }\n }\n }\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
package/storybook/examples-image-grid-slider-image-grid-slider-stories.028c8c2b.iframe.bundle.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[8938],{"./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>UiImageGridClickAreaDirective});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs");let UiImageGridClickAreaDirective=class UiImageGridClickAreaDirective{template=(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.WQX)(_angular_core__WEBPACK_IMPORTED_MODULE_1__.C4Q);static ngTemplateContextGuard(_directive,_context){return!0}};UiImageGridClickAreaDirective=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_1__.WLR)({selector:"ng-template[uiImageGridClickArea]"})],UiImageGridClickAreaDirective)},"./libs/ui/src/lib/atoms/image-grid/image-grid.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>UiImageGridComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_grid_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid.component.css?ngResource"),image_grid_componentngResource_default=__webpack_require__.n(image_grid_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),resize_signal=__webpack_require__("./libs/ui/src/lib/helpers/resize-signal.ts"),image_grid_click_area_directive=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts");let UiImageGridComponent=class UiImageGridComponent{get scrollerHeightValue(){return this.scrollerHeight()}scroller;imageContainer;clickArea=(0,core.contentChild)(image_grid_click_area_directive.u,{read:_debug_node_chunk.C4Q});resizeEvent=(0,resize_signal.H)();data=(0,core.input)(null);dataCount=(0,_resource_chunk.EW)(()=>this.data()?.length??0);dataCountItems=(0,_effect_chunk2.vPA)([0]);debug=(0,core.input)(!1);singleRow=(0,core.input)(!1);gap=(0,core.input)(0);overlayType=(0,core.input)("default");overlayTypeClass=(0,_resource_chunk.EW)(()=>`_-${this.overlayType()}`);cols=(0,core.input)(0);height=(0,core.input)();action=(0,core.input)(!1);loaded=(0,core.input)(!1);setIndex=(0,core.input)(0);currentIndex=(0,core.output)();clickIndex=(0,core.output)();scrollerHeight=(0,_resource_chunk.EW)(()=>{const height=this.height(),cols=this.cols();return this.singleRow()&&height&&cols?height/cols+"px":height?`${height}px`:"200px"});gridColsInternal=(0,_resource_chunk.EW)(()=>{const counter=this.cols();return 0!==counter&&this.dataCount()/counter>counter?Math.ceil(this.dataCount()/counter):counter});active=(0,_effect_chunk2.vPA)(null);hideDisplay=(0,_effect_chunk2.vPA)(!0);clickAreaExist=(0,_resource_chunk.EW)(()=>void 0!==this.clickArea());constructor(){(0,_effect_chunk2.QZP)(()=>{this.gap(),this.height(),this.cols(),this.resizeEvent(),this.updateGrid()}),(0,_effect_chunk2.QZP)(()=>{this.setIndex(),this.scrollToChild(this.setIndex()),this.active.set(this.setIndex())}),(0,_effect_chunk2.QZP)(()=>{this.action(),this.active.set(null)})}ngAfterViewInit(){this.active.set(this.setIndex()),this.updateGrid(),this.fader()}clickAreaContext(index){const item=this.data()?.[index];return item?{$implicit:item,index}:null}updateGrid(){const scroller=this.scroller?.nativeElement;scroller&&(scroller.style.height=this.scrollerHeight());const element=this.imageContainer?.nativeElement;if(element&&this.dataCount()){const gap=this.gap();this.dataCountItems.set(Array.from({length:this.gridColsInternal()*this.gridColsInternal()},(_,index)=>index+1));const repeatCount=this.singleRow()?this.dataCount():this.gridColsInternal();setTimeout(()=>{element.style.display="grid",element.style.gap=`${gap}px`,element.style.gridTemplateColumns=`repeat(${repeatCount}, 1fr)`,this.applyStylesToChildren()},100)}}calculateGridSize(containerSize){const adjustedSize=containerSize/this.cols()-this.gap();return Math.ceil(adjustedSize)}applyStylesToChildren(){const element=this.imageContainer?.nativeElement;if(element){const width=this.calculateGridSize(element.offsetWidth??0),height=this.singleRow()?element.offsetHeight:this.calculateGridSize(element.offsetHeight??0),applyChildStyles=child=>{child.style.height=`${height}px`,child.style.width=`${width}px`};element.childNodes.forEach(child=>{child instanceof HTMLElement&&applyChildStyles(child)})}}fader(){this.hideDisplay.set(!0),setTimeout(()=>{this.hideDisplay.set(!1)},800)}scrollToChild(index){const containerElement=this.imageContainer?.nativeElement;if(!containerElement)return;const targetChild=containerElement.childNodes[index];if(!(targetChild instanceof HTMLElement))return;const scrollOffset=this.calculateScrollOffset(containerElement,targetChild);this.scroller?.nativeElement.scrollTo({left:scrollOffset,top:0})}calculateScrollOffset(container,child){return child.offsetLeft-container.offsetWidth/2+child.offsetWidth/2}useAction(index){this.action()&&this.imageSrc(index)&&(this.clickAreaExist()&&this.active()===index&&this.clickIndex.emit(index),this.currentIndex.emit(index),this.active.set(index),this.scrollToChild(index))}scale(index){const value=this.data()?.[index]?.src.scale;return`transform: scale(${value??1})`}imageSrc(index){return this.data()?.[index]?.src.default}imageAlt(index){return this.data()?.[index]?.alt}imageTitle(index){return this.data()?.[index]?.title}static ctorParameters=()=>[];static propDecorators={scrollerHeightValue:[{type:_debug_node_chunk.g$6,args:["style.height"]}],scroller:[{type:core.ViewChild,args:["scroller"]}],imageContainer:[{type:core.ViewChild,args:["imageContainer"]}],clickArea:[{type:core.ContentChild,args:[image_grid_click_area_directive.u,{read:_debug_node_chunk.C4Q,isSignal:!0}]}],data:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"data",required:!1,transform:void 0}]}],debug:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"debug",required:!1,transform:void 0}]}],singleRow:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"singleRow",required:!1,transform:void 0}]}],gap:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"gap",required:!1,transform:void 0}]}],overlayType:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"overlayType",required:!1,transform:void 0}]}],cols:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"cols",required:!1,transform:void 0}]}],height:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"height",required:!1,transform:void 0}]}],action:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"action",required:!1,transform:void 0}]}],loaded:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"loaded",required:!1,transform:void 0}]}],setIndex:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"setIndex",required:!1,transform:void 0}]}],currentIndex:[{type:_debug_node_chunk.k7i,args:["currentIndex"]}],clickIndex:[{type:_debug_node_chunk.k7i,args:["clickIndex"]}]}};UiImageGridComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-image-grid",template:'@if (data()) {\n <div class="_scroller" #scroller>\n <div\n #imageContainer\n class="_image-container"\n [class._-hide-display]="hideDisplay()"\n >\n @for (item of dataCountItems(); track item; let i = $index) {\n <button\n class="_wrapper"\n [class._-action]="action() && imageSrc(i)"\n [class._-active]="active() === i"\n [class._-no-image]="!imageSrc(i)"\n [class]="overlayTypeClass()"\n (click)="useAction(i)"\n >\n @if (debug()) {\n dataCount: {{ this.dataCount() }} <br />\n internalCounter: {{ this.gridColsInternal() }} <br />\n counter: {{ this.cols() }} <br />\n src: {{ imageSrc(i) }}\n } @else {\n @if (imageSrc(i) && loaded()) {\n <figure>\n <img\n [style]="scale(i)"\n [src]="imageSrc(i)"\n [alt]="imageAlt(i)"\n [title]="imageTitle(i)"\n />\n </figure>\n @if (clickArea(); as template) {\n <div class="_click-area">\n <ng-container\n *ngTemplateOutlet="template; context: clickAreaContext(i)"\n ></ng-container>\n </div>\n }\n } @else {\n \x3c!-- No picture: the same shape the image editor uses — icon\n centred, whatever title the item carries underneath. No\n stand-in text: an empty title is the caller\'s business. --\x3e\n <div class="_empty">\n <span class="ui-icon x3" aria-hidden="true">image</span>\n <strong>{{ imageTitle(i) }}</strong>\n </div>\n }\n }\n </button>\n }\n </div>\n </div>\n}\n',imports:[_common_module_chunk.T3],styles:[image_grid_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiImageGridComponent)},"./libs/ui/.storybook/demos/examples/image-grid-slider/image-grid-slider.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ImageGallery:()=>ImageGallery,ImageGalleryZoom:()=>ImageGalleryZoom,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_src_lib_atoms_image_grid_image_grid_click_area_directive__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts"),_src_lib_atoms_image_grid_image_grid_component__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid.component.ts"),_src_lib_atoms_image_slider_image_slider_component__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/atoms/image-slider/image-slider.component.ts"),_src_lib_atoms_image_mock__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/image.mock.ts"),_header_header_component__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Examples/Image Gallery",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({imports:[_header_header_component__WEBPACK_IMPORTED_MODULE_5__.b,_src_lib_atoms_image_grid_image_grid_component__WEBPACK_IMPORTED_MODULE_2__.p,_src_lib_atoms_image_grid_image_grid_click_area_directive__WEBPACK_IMPORTED_MODULE_1__.u,_src_lib_atoms_image_slider_image_slider_component__WEBPACK_IMPORTED_MODULE_3__.u]})]},ImageGallery={render:args=>({props:{...args,data:(0,_src_lib_atoms_image_mock__WEBPACK_IMPORTED_MODULE_4__.W)(),currentIndex:0},template:'\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="flex flex-col">\n <ui-image-slider\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [zoom]="false">\n </ui-image-slider>\n <div class="relative h-[400px] mt-(--ui-spacer)">\n <ui-image-grid\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [action]="true"\n [loaded]="true"\n [height]="400"\n [cols]="3"\n [gap]="10">\n </ui-image-grid>\n </div>\n </section>\n '})},ImageGalleryZoom={render:args=>({props:{...args,data:(0,_src_lib_atoms_image_mock__WEBPACK_IMPORTED_MODULE_4__.W)(),index:0,zoom:!1},template:'\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-image-grid\n [data]="data"\n [setIndex]="index"\n (clickIndex)="index=$event;zoom=true"\n [action]="true"\n [loaded]="true"\n overlayType="doors"\n [height]="480"\n [cols]="3"\n [gap]="10">\n <ng-template uiImageGridClickArea let-item>\n <div class="bg-c-background p-2">{{ item.title }}</div>\n </ng-template>\n </ui-image-grid>\n @if(zoom) {\n <ui-image-slider\n [data]="data"\n [setIndex]="index"\n (currentIndex)="index=$event"\n (currentZoom)="zoom=$event"\n [zoom]="zoom"></ui-image-slider>\n }\n </section>\n '})},__namedExportsOrder=["ImageGallery","ImageGalleryZoom"];ImageGallery.parameters={...ImageGallery.parameters,docs:{...ImageGallery.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args,\n data: uiImageMock(),\n currentIndex: 0\n },\n template: `\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="flex flex-col">\n <ui-image-slider\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [zoom]="false">\n </ui-image-slider>\n <div class="relative h-[400px] mt-(--ui-spacer)">\n <ui-image-grid\n [data]="data"\n [setIndex]="currentIndex"\n (currentIndex)="currentIndex=$event"\n [action]="true"\n [loaded]="true"\n [height]="400"\n [cols]="3"\n [gap]="10">\n </ui-image-grid>\n </div>\n </section>\n `\n };\n }\n}',...ImageGallery.parameters?.docs?.source},description:{story:"Grid and slider side by side, sharing one index: a click in the grid moves\nthe slider, a step in the slider moves the grid's selection.",...ImageGallery.parameters?.docs?.description}}},ImageGalleryZoom.parameters={...ImageGalleryZoom.parameters,docs:{...ImageGalleryZoom.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args,\n data: uiImageMock(),\n index: 0,\n zoom: false\n },\n template: `\n <ui-intern-header theme="theme-light" display onTop></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-image-grid\n [data]="data"\n [setIndex]="index"\n (clickIndex)="index=$event;zoom=true"\n [action]="true"\n [loaded]="true"\n overlayType="doors"\n [height]="480"\n [cols]="3"\n [gap]="10">\n <ng-template uiImageGridClickArea let-item>\n <div class="bg-c-background p-2">{{ item.title }}</div>\n </ng-template>\n </ui-image-grid>\n @if(zoom) {\n <ui-image-slider\n [data]="data"\n [setIndex]="index"\n (currentIndex)="index=$event"\n (currentZoom)="zoom=$event"\n [zoom]="zoom"></ui-image-slider>\n }\n </section>\n `\n };\n }\n}',...ImageGalleryZoom.parameters?.docs?.source},description:{story:"The slider exists only while it is open. A click selects a tile; a click on\nthe selected tile's click area — the projected template, stamped per tile\nwith the tile's item — emits `clickIndex`, which creates the slider in zoom;\nthe slider's own close hands `currentZoom` back and removes it.",...ImageGalleryZoom.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/image-grid/image-grid.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n:host {\n z-index: 0;\n --wrapper-height: 60rem;\n --button-size: 4rem;\n display: flex;\n /* Fills its container by default; the named hooks let a consumer set a fixed\n size without a cascade fight (tickets#241, tickets#251). */\n width: var(--ui-image-grid-width, 100%);\n height: var(--ui-image-grid-height, 100%);\n border-radius: calc(var(--ui-border-width) * 4);\n\n ._scroller {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n width: 100%;\n height: 100%;\n overflow-y: hidden;\n overflow-x: scroll;\n background-color: var(--ui-c-background);\n scroll-behavior: smooth;\n }\n\n ._image-container {\n position: absolute;\n top: 0;\n left: 0;\n display: grid;\n width: 100%;\n height: 100%;\n transition: opacity calc(var(--ui-time) * 0.1) linear;\n\n &._-hide-display {\n opacity: 0;\n }\n\n button._wrapper {\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n gap: calc(var(--ui-spacer) * 0.5);\n align-items: center;\n justify-content: center;\n overflow: hidden;\n transition: scale calc(var(--ui-time) * 0.5) ease-in-out;\n background-color: var(--ui-c-fourthly);\n border: 0;\n\n &._-no-image {\n cursor: default;\n opacity: 0.5;\n }\n\n /* The empty state, same arrangement as the image editor's: icon above,\n title below, both dimmed. */\n ._empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: calc(var(--ui-spacer) * 0.25);\n }\n\n &._-default {\n &:not(._-action) {\n cursor: default;\n }\n\n &._-active {\n border: 0.32rem solid var(--ui-c-focus);\n\n img {\n transform: scale(1.1) !important;\n }\n }\n\n &._-action:hover {\n img {\n transform: scale(1.1) !important;\n }\n }\n }\n\n &._-doors {\n &._-active {\n border: 0.32rem solid var(--ui-c-focus);\n }\n\n &._-action:hover {\n img {\n transform: scale(1.1) !important;\n }\n }\n\n &::after,\n &::before {\n z-index: 1;\n content: '\\00a0';\n position: absolute;\n left: 0;\n display: flex;\n height: 100%;\n width: 100%;\n background-color: var(--ui-c-background);\n transition: var(--ui-time) ease-in-out;\n opacity: 0.6;\n }\n\n &::before {\n top: -50%;\n z-index: 1;\n }\n\n &::after {\n top: 50%;\n }\n\n &._-active::before {\n opacity: 0;\n top: -100%;\n }\n\n &._-active::after {\n opacity: 0;\n top: 100%;\n }\n }\n\n figure {\n position: relative;\n display: flex;\n flex-flow: column;\n justify-content: center;\n align-items: center;\n padding: 0;\n\n img {\n width: auto;\n max-width: initial;\n aspect-ratio: auto;\n transition: transform calc(var(--ui-time) * 0.5) ease-in-out;\n -webkit-user-select: none;\n user-select: none;\n }\n }\n\n ._click-area {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: var(--ui-time) ease-in-out;\n }\n\n &._-active {\n ._click-area {\n opacity: 1;\n }\n }\n }\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[1481,5684],{"./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>UiPlaceholderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var placeholder_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"),placeholder_componentngResource_default=__webpack_require__.n(placeholder_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");let UiPlaceholderComponent=class UiPlaceholderComponent{label=(0,core.input)(null);static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiPlaceholderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-placeholder",template:"<span class=\"_label\">{{ label() ?? ('placeholder.label' | transloco) }}</span>\n",encapsulation:_debug_node_chunk.gXe.None,imports:[ngneat_transloco.Kj],styles:[placeholder_componentngResource_default()]})],UiPlaceholderComponent)},"./libs/ui/src/lib/layout/splitter/splitter.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{J:()=>UiLayoutSplitterComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var splitter_componentngResource=__webpack_require__("./libs/ui/src/lib/layout/splitter/splitter.component.css?ngResource"),splitter_componentngResource_default=__webpack_require__.n(splitter_componentngResource),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs"),ngx_pwa_local_storage=__webpack_require__("./node_modules/@ngx-pwa/local-storage/fesm2022/ngx-pwa-local-storage.mjs"),layout_service=__webpack_require__("./libs/ui/src/lib/layout/_service/layout.service.ts");const DIRECTIONS=new Set(["left","center","right","split"]),PANEL_ORDERS=new Set(["left-first","right-first"]);let UiLayoutSplitterComponent=class UiLayoutSplitterComponent{layoutService=(0,_effect_chunk2.WQX)(layout_service.u);storage=(0,_effect_chunk2.WQX)(ngx_pwa_local_storage.AX);id=(0,core.input)();defaultDirection=(0,core.input)("center");defaultPanelOrder=(0,core.input)("left-first");layoutAction=(0,core.input)(!0);themeAction=(0,core.input)(!0);animating=(0,core.output)();directionChange=(0,core.output)();direction=(0,_effect_chunk2.vPA)("center");panelOrder=(0,_effect_chunk2.vPA)("left-first");locked=(0,_effect_chunk2.vPA)(!1);zoomActive=(0,_effect_chunk2.vPA)(!1);fullscreenActive=(0,_effect_chunk2.vPA)(!1);syncActionStates(){this.zoomActive.set("zoom"===this.layoutService.settings.zoom),this.fullscreenActive.set("fullscreen"===this.layoutService.settings.fullscreen)}animate=(0,_effect_chunk2.vPA)(!1);ngOnInit(){this.direction.set(this.defaultDirection()),this.panelOrder.set(this.defaultPanelOrder());const key=this.storageKey();if(!key)return this.directionChange.emit(this.direction()),this.syncActionStates(),void this.enableAnimations();this.storage.get(key).subscribe(value=>{const state=value??{};state.direction&&DIRECTIONS.has(state.direction)&&this.direction.set(state.direction),state.panelOrder&&PANEL_ORDERS.has(state.panelOrder)&&(this.panelOrder.set(state.panelOrder),this.applyPanelOrder()),this.directionChange.emit(this.direction()),state.zoom&&this.layoutService.handleZoom(state.zoom),state.fullscreen&&this.layoutService.handleFullScreen(state.fullscreen),this.syncActionStates(),this.enableAnimations()})}enableAnimations(){setTimeout(()=>this.animate.set(!0))}leftPanel=(0,core.viewChild)("leftPanel");rightPanel=(0,core.viewChild)("rightPanel");panelObserver=null;ngAfterViewInit(){const left=this.leftPanel()?.nativeElement,right=this.rightPanel()?.nativeElement;left&&right&&(this.applyPanelOrder(),this.publishPanelWidths(left,right),"undefined"!=typeof ResizeObserver&&(this.panelObserver=new ResizeObserver(()=>this.publishPanelWidths(left,right)),this.panelObserver.observe(left),this.panelObserver.observe(right)))}ngOnDestroy(){this.panelObserver?.disconnect(),this.resumeTimer&&clearTimeout(this.resumeTimer)}publishPanelWidths(left,right){if(this.directionAnimating())return;const id=this.id(),write=(side,element)=>{const width=`${element.getBoundingClientRect().width}px`;document.body.style.setProperty(`--ui-splitter-${side}-width`,width),id&&document.body.style.setProperty(`--ui-splitter-${id}-${side}-width`,width)};write("left",left),write("right",right)}applyPanelOrder(){const left=this.leftPanel()?.nativeElement,right=this.rightPanel()?.nativeElement;if(!left||!right)return;const parent=left.parentElement;if(!parent)return;const rightFirst="right-first"===this.panelOrder(),first=rightFirst?right:left,second=rightFirst?left:right;if(first.nextElementSibling===second)return;const focused=document.activeElement instanceof HTMLElement&&parent.contains(document.activeElement)?document.activeElement:null;second.before(first),focused?.focus()}onSwapClick(){this.locked()||this.swapPanels()}onDirectionClick(type){this.locked()||this.setDirection(type)}onFullscreenClick(){this.locked()||this.fullscreen()}onZoomClick(){this.locked()||this.zoom()}onThemeClick(){this.locked()||this.theme()}swapPanels(){this.panelOrder.update(order=>"left-first"===order?"right-first":"left-first"),this.applyPanelOrder(),this.persist()}setDirection(type){this.direction.set(type),this.directionChange.emit(type),this.pauseMeasuring(),this.persist()}directionAnimating=(0,_effect_chunk2.vPA)(!1);resumeTimer=null;pauseMeasuring(){this.directionAnimating.set(!0),this.animating.emit(!0),this.resumeTimer&&clearTimeout(this.resumeTimer),this.resumeTimer=setTimeout(()=>this.resumeMeasuring(),1e3)}onDirectionSettled(event){event.target===event.currentTarget&&this.resumeMeasuring()}resumeMeasuring(){if(this.resumeTimer&&(clearTimeout(this.resumeTimer),this.resumeTimer=null),!this.directionAnimating())return;this.directionAnimating.set(!1),this.animating.emit(!1);const left=this.leftPanel()?.nativeElement,right=this.rightPanel()?.nativeElement;left&&right&&this.publishPanelWidths(left,right)}fullscreen(){this.layoutService.handleFullScreen(),this.syncActionStates(),this.persist()}zoom(){this.layoutService.handleZoom(),this.syncActionStates(),this.persist()}theme(){this.layoutService.handleTheme(null,null)}persist(){const key=this.storageKey();if(!key)return;const state={direction:this.direction(),panelOrder:this.panelOrder(),zoom:this.layoutService.settings.zoom,fullscreen:this.layoutService.settings.fullscreen};this.storage.set(key,state).subscribe()}storageKey(){const id=this.id();return id?`ui-layout-splitter:${id}`:null}static propDecorators={id:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"id",required:!1,transform:void 0}]}],defaultDirection:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"defaultDirection",required:!1,transform:void 0}]}],defaultPanelOrder:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"defaultPanelOrder",required:!1,transform:void 0}]}],layoutAction:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"layoutAction",required:!1,transform:void 0}]}],themeAction:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"themeAction",required:!1,transform:void 0}]}],animating:[{type:_debug_node_chunk.k7i,args:["animating"]}],directionChange:[{type:_debug_node_chunk.k7i,args:["directionChange"]}],leftPanel:[{type:core.ViewChild,args:["leftPanel",{isSignal:!0}]}],rightPanel:[{type:core.ViewChild,args:["rightPanel",{isSignal:!0}]}]}};UiLayoutSplitterComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-layout-splitter",template:'<div class="_splitter">\n <nav class="_navigation">\n <div class="_actions">\n <ng-content select="[splitter-header]"></ng-content>\n </div>\n <div class="_display">\n <button\n class="ui-icon"\n [class.active]="direction() === \'right\'"\n [title]="\'splitter.direction.right\' | transloco"\n (click)="onDirectionClick(\'right\')"\n >\n border_right\n </button>\n <button\n class="ui-icon"\n [class.active]="direction() === \'center\'"\n [title]="\'splitter.direction.center\' | transloco"\n (click)="onDirectionClick(\'center\')"\n >\n border_vertical\n </button>\n <button\n class="ui-icon"\n [class.active]="direction() === \'left\'"\n [title]="\'splitter.direction.left\' | transloco"\n (click)="onDirectionClick(\'left\')"\n >\n border_left\n </button>\n <button\n class="ui-icon"\n [class.active]="direction() === \'split\'"\n [title]="\'splitter.direction.split\' | transloco"\n (click)="onDirectionClick(\'split\')"\n >\n border_horizontal\n </button>\n <button\n class="ui-icon"\n [class.active]="panelOrder() === \'right-first\'"\n [title]="\'splitter.swap\' | transloco"\n (click)="onSwapClick()"\n >\n swap_horiz\n </button>\n @if (layoutAction()) {\n <button\n class="ui-icon"\n [class.active]="fullscreenActive()"\n [title]="\'splitter.fullscreen\' | transloco"\n (click)="onFullscreenClick()"\n >\n zoom_out_map\n </button>\n }\n @if (layoutAction()) {\n <button\n class="ui-icon"\n [class.active]="zoomActive()"\n [title]="\'splitter.zoom\' | transloco"\n (click)="onZoomClick()"\n >\n center_focus_strong\n </button>\n }\n @if (themeAction()) {\n <button\n class="ui-icon"\n [title]="\'splitter.theme\' | transloco"\n (click)="onThemeClick()"\n >\n invert_colors\n </button>\n }\n </div>\n </nav>\n <div\n class="_bottom"\n [class]="\'_-\' + direction()"\n [class._-animate]="animate()"\n (transitionend)="onDirectionSettled($event)"\n >\n <section #leftPanel>\n <ng-content select="[splitter-left]"></ng-content>\n </section>\n <section #rightPanel>\n <ng-content select="[splitter-right]"></ng-content>\n </section>\n </div>\n</div>\n',imports:[ngneat_transloco.Kj],styles:[splitter_componentngResource_default()]})],UiLayoutSplitterComponent)},"./libs/ui/src/lib/layout/tabs/tabs.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{q:()=>UiLayoutTabsComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var tabs_componentngResource=__webpack_require__("./libs/ui/src/lib/layout/tabs/tabs.component.css?ngResource"),tabs_componentngResource_default=__webpack_require__.n(tabs_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 UiLayoutTabsComponent=class UiLayoutTabsComponent{el=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);tabNames=(0,core.input)([]);activeTab=(0,core.input)(0);activeTabChange=(0,core.output)();activeTabValue=0;tabNamesValue=[];ngOnInit(){this.activeTabValue=this.activeTab(),this.tabNamesValue=[...this.tabNames()],this.activeContent(this.activeTabValue)}ngOnChanges(){this.activeTabValue=this.activeTab(),this.tabNamesValue=[...this.tabNames()],this.activeContent(this.activeTabValue)}active(index){this.activeTabValue=index,this.activeContent(index),this.activeTabChange.emit(index)}defaultLabels(count){0===this.tabNamesValue.length&&(this.tabNamesValue=[...Array.from({length:count}).keys()].map(key=>`0${(key+1).toString()}`))}activeContent(index){const contents=this.el.nativeElement.querySelectorAll("._bottom")[0].childNodes;this.defaultLabels(contents.length),contents.forEach((content,contentIndex)=>{const element=content;element.classList.remove("_-active"),contentIndex===index&&element.classList.add("_-active")})}static propDecorators={tabNames:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"tabNames",required:!1,transform:void 0}]}],activeTab:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"activeTab",required:!1,transform:void 0}]}],activeTabChange:[{type:_debug_node_chunk.k7i,args:["activeTabChange"]}]}};UiLayoutTabsComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-layout-tabs",template:'\x3c!-- Real buttons, not clickable divs: Tab reaches them, Enter and Space\n switch natively — no synthetic key handling. `role="tab"` and\n `aria-selected` say which one is open. Tracked by index, not by name:\n two tabs may carry the same label. --\x3e\n<header role="tablist">\n @for (name of tabNamesValue; track $index; let i = $index) {\n <button\n type="button"\n role="tab"\n class="_tab-selector"\n [class._-active]="i === activeTabValue"\n [attr.aria-selected]="i === activeTabValue"\n (click)="active(i)"\n >\n {{ name }}\n </button>\n }\n</header>\n<div class="_bottom">\n <ng-content></ng-content>\n</div>\n',encapsulation:_debug_node_chunk.gXe.None,styles:[tabs_componentngResource_default()]})],UiLayoutTabsComponent)},"./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/.storybook/demos/examples/layout/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"),_layout_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/demos/examples/layout/layout.stories.ts"),_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_app_shell_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/app-shell.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:_layout_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"example-layout",children:"Example Layout"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Four layout components nested into one application shell. Each of them\nworks by ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"content projection"}),": you put your own elements into named\nslots, and the component arranges them. What each component takes is on\nits own page — this page shows how they sit inside one another."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"app-shell",entry:_guide_app_shell_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:"the-parts",children:"The parts"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/layout-main--docs",children:"Main"})," — the outer container with the\nslots ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[main-header]"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[main-content]"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[main-footer]"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/layout-nav--docs",children:"Nav"})," — the navigation, here in the\nheader. In the story it runs in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"debug"}),' mode, which means nothing more\nthan "take the list from the ',(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"navList"}),' input"; in an app the nav service\nprovides it.']}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/layout-splitter--docs",children:"Splitter"})," — two panels and a header\nfor actions: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[splitter-header]"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[splitter-left]"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[splitter-right]"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/layout-tabs--docs",children:"Tabs"})," — one ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<section>"})," per name in\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tabNames"}),", projected as plain content."]}),"\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:"open-story-composition",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/examples-layout--layout",children:"Open story: composition"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The nesting, as the story renders it. The header buttons and the tab bodies\nare stand-ins for the slots they occupy; the right panel shows the nav's\nown data, so the header and the panel describe each other."}),"\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-layout-main [cssPrefix]="prefix" [zoom]="false" [fullScreen]="false">\n <div main-header>\n <h1 class="px-[calc(var(--ui-spacer)*0.5)]">Header</h1>\n <ui-layout-nav [theme]="\'tab\'" [debug]="true" [navList]="navMock"></ui-layout-nav>\n </div>\n <div main-content class="p-4 pt-24">\n <ui-layout-splitter [layoutAction]="true">\n <div splitter-header>\n <button class="ui-icon" type="button">star</button>\n </div>\n <div splitter-left>\n <ui-layout-tabs [tabNames]="[\'one\', \'two\']">\n <section><ui-placeholder class="h-32 w-64"></ui-placeholder></section>\n <section><ui-placeholder class="h-48 w-80"></ui-placeholder></section>\n </ui-layout-tabs>\n </div>\n <div splitter-right>\n <code class="ui"><pre>{{ navMock | json }}</pre></code>\n </div>\n </ui-layout-splitter>\n </div>\n <div main-footer class="p-4">footer</div>\n</ui-layout-main>\n'})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/.storybook/demos/examples/layout/layout.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Layout:()=>Layout,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _angular_common__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),_storybook_angular__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_src_config_ui_config_types__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/src/config/ui-config.types.ts"),_src_lib_atoms_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/atoms/placeholder/placeholder.component.ts"),_src_lib_layout_main_main_component__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/layout/main/main.component.ts"),_src_lib_layout_nav_nav_component__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/src/lib/layout/nav/nav.component.ts"),_src_lib_layout_splitter_splitter_component__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/src/lib/layout/splitter/splitter.component.ts"),_src_lib_layout_tabs_tabs_component__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./libs/ui/src/lib/layout/tabs/tabs.component.ts");const navMock=[{label:"link01",route:"link01",title:"link01"},{label:"link02",route:"link02",title:"link02",subNav:[{label:"link01",route:"link01",title:"link02"}]},{label:"link03",route:"link03",title:"link03"}],__WEBPACK_DEFAULT_EXPORT__={title:"Examples/Layout",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_1__.Iz)({imports:[_angular_common__WEBPACK_IMPORTED_MODULE_0__.TG,_src_lib_layout_main_main_component__WEBPACK_IMPORTED_MODULE_4__.z,_src_lib_layout_nav_nav_component__WEBPACK_IMPORTED_MODULE_5__.L,_src_lib_layout_splitter_splitter_component__WEBPACK_IMPORTED_MODULE_6__.J,_src_lib_layout_tabs_tabs_component__WEBPACK_IMPORTED_MODULE_7__.q,_src_lib_atoms_placeholder_placeholder_component__WEBPACK_IMPORTED_MODULE_3__.F]})]},Layout={render:args=>({props:{...args,prefix:_src_config_ui_config_types__WEBPACK_IMPORTED_MODULE_2__.Q,navMock},template:'\n <ui-layout-main [cssPrefix]="prefix" [zoom]="false" [fullScreen]="false">\n <div class="app-header" main-header>\n <h1 class="py-4 px-[calc(var(--ui-spacer)*0.5)]">Header</h1>\n <ui-layout-nav\n [theme]="\'tab\'"\n [debug]="true"\n [navList]="navMock"\n ></ui-layout-nav>\n </div>\n <div main-content class="p-4 pt-24">\n <ui-layout-splitter [layoutAction]="true" >\n <div splitter-header>\n <div class="flex gap-4 p-4">\n <button class="ui-icon" type="button">star</button>\n <button class="ui-icon" type="button">favorite</button>\n <button class="ui-icon" type="button">pets</button>\n </div>\n </div>\n <div splitter-left>\n <div class="p-4">\n <ui-layout-tabs [tabNames]="[\'one\', \'two\', \'three\', \'four\']">\n <section><ui-placeholder class="h-32 w-64"></ui-placeholder></section>\n <section><ui-placeholder class="h-48 w-80"></ui-placeholder></section>\n <section><ui-placeholder class="h-32 w-64"></ui-placeholder></section>\n <section><ui-placeholder class="h-64 w-64"></ui-placeholder></section>\n </ui-layout-tabs>\n </div>\n </div>\n <div splitter-right>\n <div class="flex flex-col gap-2 p-4">\n <strong>navMock</strong>\n <code class="ui"><pre>{{ navMock | json }}</pre></code>\n </div>\n </div>\n </ui-layout-splitter>\n </div>\n <div main-footer class="p-4">footer</div>\n </ui-layout-main>\n '})},__namedExportsOrder=["Layout"];Layout.parameters={...Layout.parameters,docs:{...Layout.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args,\n prefix: uiConfigStorybookCssPrefix,\n navMock\n },\n template: `\n <ui-layout-main [cssPrefix]="prefix" [zoom]="false" [fullScreen]="false">\n <div class="app-header" main-header>\n <h1 class="py-4 px-[calc(var(--ui-spacer)*0.5)]">Header</h1>\n <ui-layout-nav\n [theme]="\'tab\'"\n [debug]="true"\n [navList]="navMock"\n ></ui-layout-nav>\n </div>\n <div main-content class="p-4 pt-24">\n <ui-layout-splitter [layoutAction]="true" >\n <div splitter-header>\n <div class="flex gap-4 p-4">\n <button class="ui-icon" type="button">star</button>\n <button class="ui-icon" type="button">favorite</button>\n <button class="ui-icon" type="button">pets</button>\n </div>\n </div>\n <div splitter-left>\n <div class="p-4">\n <ui-layout-tabs [tabNames]="[\'one\', \'two\', \'three\', \'four\']">\n <section><ui-placeholder class="h-32 w-64"></ui-placeholder></section>\n <section><ui-placeholder class="h-48 w-80"></ui-placeholder></section>\n <section><ui-placeholder class="h-32 w-64"></ui-placeholder></section>\n <section><ui-placeholder class="h-64 w-64"></ui-placeholder></section>\n </ui-layout-tabs>\n </div>\n </div>\n <div splitter-right>\n <div class="flex flex-col gap-2 p-4">\n <strong>navMock</strong>\n <code class="ui"><pre>{{ navMock | json }}</pre></code>\n </div>\n </div>\n </ui-layout-splitter>\n </div>\n <div main-footer class="p-4">footer</div>\n </ui-layout-main>\n `\n };\n }\n}',...Layout.parameters?.docs?.source},description:{story:'The shell, composed: main with its three slots, the nav in the header, a\nsplitter in the content with tabs on the left and the nav\'s own data on the\nright. The nav runs in `debug` mode, which here means nothing more than\n"take the list from the input" — outside a story the nav service provides\nit. The header buttons and the tab bodies are stand-ins for the slots they\noccupy, nothing else.',...Layout.parameters?.docs?.description}}}},"./libs/ui/src/lib/atoms/placeholder/placeholder.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n/* Encapsulation.None — one nested block anchored on the tag, so the rules\n cannot leak while the host itself stays styleable from outside. */\nui-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* A floor, not a size: width and height come from wherever it is used.\n Without one an empty stand-in collapses to a text line and stops being\n the mass it exists to be. The floor is a named hook with a fallback, so a\n consumer who deliberately wants a smaller stand-in can set\n `--ui-placeholder-min-width` / `--ui-placeholder-min-height` without a\n cascade fight — an unlayered host rule otherwise beats a width utility in\n `@layer utilities` (tickets#241, tickets#251, tickets#253). */\n min-width: var(--ui-placeholder-min-width, calc(var(--ui-spacer) * 3));\n min-height: var(--ui-placeholder-min-height, calc(var(--ui-spacer) * 3));\n padding: calc(var(--ui-spacer) * 0.25);\n\n /* The overlay header's pair: filled enough to read as chrome rather than\n content, and theme-aware through the tokens. */\n background-color: var(--ui-c-primary);\n color: var(--ui-c-default);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-radius: var(--ui-border-radius);\n\n /* It is scenery, never the subject: nothing here should invite a click or\n land in a text selection. */\n -webkit-user-select: none;\n user-select: none;\n\n ._label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/layout/splitter/splitter.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n._splitter {\n display: flex;\n flex-flow: column;\n\n ._navigation {\n display: flex;\n justify-content: space-between;\n /* padding: $spacer * 0.25; */\n margin-bottom: calc(var(--ui-spacer) * 0.5);\n padding-bottom: calc(var(--ui-spacer) * 0.5);\n\n border-bottom: var(--ui-border-width) solid var(--ui-c-fourthly);\n\n ._actions {\n display: flex;\n justify-content: flex-end;\n button {\n margin-right: calc(var(--ui-spacer) * 0.5);\n }\n }\n\n ._display {\n display: flex;\n justify-content: flex-start;\n button {\n margin-left: calc(var(--ui-spacer) * 0.5);\n\n &.active {\n color: var(--ui-c-focus);\n }\n }\n }\n\n @media (max-width: 1024px) {\n display: none;\n }\n }\n\n ._bottom {\n display: grid;\n\n grid-template-columns: 1fr 1fr;\n grid-gap: calc(var(--ui-spacer) * 0.25);\n\n /* Animate direction changes only after the initial (persisted) state has\n been restored — the `_-animate` modifier is added once the component is\n ready, so a restored layout appears instantly. */\n &._-animate {\n transition: var(--ui-time) ease-in;\n }\n\n > section {\n /* background-color: var(--ui-cb-secondary); */\n border-radius: var(--ui-border-radius);\n /* padding: $spacer * 0.25; */\n /* Grid items default to min-width: auto and never shrink below their\n content — wide content (e.g. tables) would blow the panel out of\n the viewport instead of scrolling inside it. */\n min-width: 0;\n }\n\n &._-left {\n grid-template-columns: 3fr 1fr;\n }\n\n &._-center {\n grid-template-columns: 1fr 1fr;\n }\n\n &._-right {\n grid-template-columns: 1fr 3fr;\n }\n\n &._-split {\n grid-template-columns: 1fr;\n }\n\n /* --- breakpoint 01 - 03 --- */\n @media (max-width: 1024px) {\n &._-left,\n &._-center,\n &._-right {\n grid-template-columns: 1fr;\n }\n }\n\n /* The panel order is deliberately NOT expressed here. `order` would move\n the pixels and leave the focus behind, so reading order and tab order\n would disagree; the component moves the two sections in the DOM instead\n and this grid simply lays out whatever it finds. */\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/layout/tabs/tabs.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-layout-tabs {\n /* scope only for component - encapsulation is set to ViewEncapsulation.None */\n display: flex;\n flex-flow: column;\n\n header {\n display: flex;\n padding: calc(var(--ui-spacer) * 0.25);\n padding-bottom: 0;\n /* background-color: var(--ui-cb-secondary); */\n\n ._tab-selector {\n display: flex;\n /* A button now (it always acted like one) — strip the native face so\n the class keeps the exact look the div had. */\n appearance: none;\n border: 0;\n font: inherit;\n color: inherit;\n cursor: pointer;\n background-color: var(--ui-c-fourthly);\n padding: calc(var(--ui-spacer) * 0.2);\n border-radius: var(--ui-border-radius) var(--ui-border-radius) 0 0;\n margin: calc(var(--ui-spacer) * 0.08);\n margin-bottom: 0;\n line-height: 0.8;\n\n &:first-of-type {\n margin-left: 0;\n }\n\n &:last-of-type {\n margin-right: 0;\n }\n\n &._-active {\n background-color: var(--ui-c-background);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-bottom: 0;\n transform: translateY(var(--ui-border-width));\n }\n\n /* The house focus ring — the underscore class is outside the global\n button rules, so the ring is declared here. */\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 calc(var(--ui-button-shadow) * 2) 0 var(--ui-c-focus);\n }\n }\n }\n\n ._bottom {\n display: flex;\n flex-flow: column;\n background-color: var(--ui-c-background);\n border: var(--ui-border-width) solid var(--ui-c-fourthly);\n border-radius: var(--ui-border-radius);\n padding: calc(var(--ui-spacer) * 0.25);\n height: 100%;\n\n > * {\n display: none;\n }\n\n > *._-active {\n display: flex;\n }\n }\n}\n\n/* --- breakpoint 01 - 03 --- */\n@media (max-width: 768px) {\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|