@mojawork/ui-docs 2.8.1 → 2.8.2
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 +2 -2
- package/catalog/atoms/typewriter.md +4 -3
- package/catalog/guide.json +3 -3
- package/catalog/manifest.json +3 -3
- package/catalog/version.json +2 -2
- package/package.json +1 -1
- package/storybook/1183.fafda52d.iframe.bundle.js +1 -0
- package/storybook/2033.986e1406.iframe.bundle.js +1 -0
- package/storybook/2089.d5a3e21e.iframe.bundle.js +1 -0
- package/storybook/2127.d7de271b.iframe.bundle.js +2 -0
- package/storybook/2228.7013a637.iframe.bundle.js +2 -0
- package/storybook/2639.7f497882.iframe.bundle.js +1 -0
- package/storybook/2971.036e7a14.iframe.bundle.js +1 -0
- package/storybook/3968.3c931220.iframe.bundle.js +1 -0
- package/storybook/{4425.368129b3.iframe.bundle.js → 4425.7f753a38.iframe.bundle.js} +2 -2
- package/storybook/4476.1b913b82.iframe.bundle.js +1 -0
- package/storybook/{4555.e26d162c.iframe.bundle.js → 4555.c83b35c3.iframe.bundle.js} +1 -1
- package/storybook/4755.0561bac5.iframe.bundle.js +23 -0
- package/storybook/{4755.e4656207.iframe.bundle.js.map → 4755.0561bac5.iframe.bundle.js.map} +1 -1
- package/storybook/4935.f88465d9.iframe.bundle.js +1 -0
- package/storybook/5568.be85a9aa.iframe.bundle.js +1 -0
- package/storybook/6824.4b8f7b0a.iframe.bundle.js +1 -0
- package/storybook/8051.dbaf9937.iframe.bundle.js +1 -0
- package/storybook/871.5a781df6.iframe.bundle.js +1 -0
- package/storybook/8819.8e56201f.iframe.bundle.js +1 -0
- package/storybook/9850.5a17be74.iframe.bundle.js +1 -0
- package/storybook/9946.6fea16dc.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-banner-docs-mdx.f33bbf56.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-basic-interpreter-docs-mdx.81168b4c.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-music-player-docs-mdx.46f4887e.iframe.bundle.js +1 -0
- package/storybook/assets/ui/sounds/type.mp3 +0 -0
- package/storybook/atoms-_electrons-form-error-message-docs-mdx.9382b0cb.iframe.bundle.js +1 -0
- package/storybook/atoms-_electrons-loader-docs-mdx.e8bb9642.iframe.bundle.js +1 -0
- package/storybook/atoms-background-docs-mdx.0e861f2c.iframe.bundle.js +1 -0
- package/storybook/atoms-barcode-docs-mdx.78b610dc.iframe.bundle.js +1 -0
- package/storybook/atoms-buzzer-docs-mdx.f9daf952.iframe.bundle.js +1 -0
- package/storybook/atoms-card-docs-mdx.f8b63920.iframe.bundle.js +1 -0
- package/storybook/atoms-chart-docs-mdx.29f10b89.iframe.bundle.js +1 -0
- package/storybook/atoms-clock-docs-mdx.6864626c.iframe.bundle.js +1 -0
- package/storybook/atoms-copy-value-docs-mdx.fbe168e2.iframe.bundle.js +1 -0
- package/storybook/atoms-image-grid-docs-mdx.9df158a9.iframe.bundle.js +1 -0
- package/storybook/atoms-image-slider-docs-mdx.4ae341f5.iframe.bundle.js +1 -0
- package/storybook/atoms-inline-spinner-docs-mdx.8b942147.iframe.bundle.js +1 -0
- package/storybook/atoms-lang-selector-docs-mdx.0487b819.iframe.bundle.js +2 -0
- package/storybook/atoms-mosaic-docs-mdx.738f012c.iframe.bundle.js +1 -0
- package/storybook/atoms-placeholder-docs-mdx.7d376291.iframe.bundle.js +1 -0
- package/storybook/atoms-qr-code-docs-mdx.c47f67c9.iframe.bundle.js +1 -0
- package/storybook/atoms-rating-docs-mdx.d7df9a29.iframe.bundle.js +1 -0
- package/storybook/atoms-reader-doc-docs-mdx.f5375a37.iframe.bundle.js +1 -0
- package/storybook/atoms-text-animate-docs-mdx.152fc1bd.iframe.bundle.js +1 -0
- package/storybook/atoms-thumb-docs-mdx.525fc046.iframe.bundle.js +1 -0
- package/storybook/atoms-timer-docs-mdx.686f0392.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-docs-mdx.a6c3f6b0.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-typewriter-component-stories.3a4f5356.iframe.bundle.js +1 -0
- package/storybook/cdk-components-drag-and-drop-splitter-docs-mdx.0aa5b787.iframe.bundle.js +1 -0
- package/storybook/cdk-components-table-docs-mdx.74bd247c.iframe.bundle.js +1 -0
- package/storybook/examples-docs-mdx.1a9d8db0.iframe.bundle.js +1 -0
- package/storybook/examples-image-grid-slider-docs-mdx.e56160ef.iframe.bundle.js +1 -0
- package/storybook/examples-layout-docs-mdx.d7d6f90b.iframe.bundle.js +1 -0
- package/storybook/examples-table-edit-focus-docs-mdx.55960e55.iframe.bundle.js +1 -0
- package/storybook/examples-transloco-docs-mdx.46447d84.iframe.bundle.js +2 -0
- package/storybook/forms-autocomplete-docs-mdx.698eef62.iframe.bundle.js +2 -0
- package/storybook/forms-autofocus-docs-mdx.ce239261.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-checkbox-component-stories.df3196e5.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-docs-mdx.890972f3.iframe.bundle.js +1 -0
- package/storybook/forms-chip-docs-mdx.89a48075.iframe.bundle.js +1 -0
- package/storybook/forms-input-docs-mdx.56627297.iframe.bundle.js +1 -0
- package/storybook/forms-input-input-component-stories.b68ea104.iframe.bundle.js +1 -0
- package/storybook/forms-slider-docs-mdx.68b9e21c.iframe.bundle.js +1 -0
- package/storybook/forms-switch-docs-mdx.832228cb.iframe.bundle.js +1 -0
- package/storybook/forms-validators-docs-mdx.e11fe615.iframe.bundle.js +1 -0
- package/storybook/home-guide-mdx.2f32ffc1.iframe.bundle.js +1 -0
- package/storybook/{home-overview-mdx.0e32f57f.iframe.bundle.js → home-overview-mdx.00ee5070.iframe.bundle.js} +1 -1
- package/storybook/home-tips-mdx.24dc3e35.iframe.bundle.js +1 -0
- package/storybook/iframe.html +2 -2
- package/storybook/layout-main-docs-mdx.445bce2a.iframe.bundle.js +1 -0
- package/storybook/layout-media-screen-docs-mdx.c382b73b.iframe.bundle.js +2 -0
- package/storybook/layout-nav-docs-mdx.92eac076.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-docs-mdx.a680859b.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-header-docs-mdx.6eb6e326.iframe.bundle.js +1 -0
- package/storybook/layout-spinner-docs-mdx.a792dea6.iframe.bundle.js +1 -0
- package/storybook/layout-splitter-docs-mdx.6b0e4fd2.iframe.bundle.js +1 -0
- package/storybook/layout-tabs-docs-mdx.aad59db3.iframe.bundle.js +1 -0
- package/storybook/layout-top-scroll-bottom-docs-mdx.42c18a0d.iframe.bundle.js +1 -0
- package/storybook/molecules-image-editor-docs-mdx.dba18ee6.iframe.bundle.js +1 -0
- package/storybook/project.json +1 -1
- package/storybook/{runtime~main.786a8152.iframe.bundle.js → runtime~main.ec39977b.iframe.bundle.js} +1 -1
- package/storybook/styling-colors-docs-mdx.3f513a8d.iframe.bundle.js +1 -0
- package/storybook/styling-css-variables-docs-mdx.5a090407.iframe.bundle.js +1 -0
- package/storybook/styling-forms-docs-mdx.649ae948.iframe.bundle.js +1 -0
- package/storybook/styling-icons-docs-mdx.e3ed5ebd.iframe.bundle.js +1 -0
- package/storybook/styling-layers-docs-mdx.d810a2c8.iframe.bundle.js +1 -0
- package/storybook/styling-tags-docs-mdx.ce4814c9.iframe.bundle.js +1 -0
- package/storybook/styling-ui-tags-docs-mdx.d94258ab.iframe.bundle.js +1 -0
- package/storybook/version.json +2 -2
- package/version.json +2 -2
- package/storybook/1183.da25800b.iframe.bundle.js +0 -1
- package/storybook/2033.c705a7ce.iframe.bundle.js +0 -1
- package/storybook/2089.32694489.iframe.bundle.js +0 -1
- package/storybook/2127.29f153d2.iframe.bundle.js +0 -2
- package/storybook/2228.77650ef1.iframe.bundle.js +0 -2
- package/storybook/2639.29baa8af.iframe.bundle.js +0 -1
- package/storybook/2971.edb202b4.iframe.bundle.js +0 -1
- package/storybook/3968.69b812e4.iframe.bundle.js +0 -1
- package/storybook/4476.f8e4115f.iframe.bundle.js +0 -1
- package/storybook/4755.e4656207.iframe.bundle.js +0 -23
- package/storybook/4935.8959522b.iframe.bundle.js +0 -1
- package/storybook/5568.c6172f92.iframe.bundle.js +0 -1
- package/storybook/6824.f5eb8bb7.iframe.bundle.js +0 -1
- package/storybook/8051.719eb790.iframe.bundle.js +0 -1
- package/storybook/871.428deceb.iframe.bundle.js +0 -1
- package/storybook/8819.220ca21d.iframe.bundle.js +0 -1
- package/storybook/9850.28367747.iframe.bundle.js +0 -1
- package/storybook/9946.36014b4e.iframe.bundle.js +0 -1
- package/storybook/_external-mwork-banner-docs-mdx.0d5549a0.iframe.bundle.js +0 -1
- package/storybook/_external-mwork-basic-interpreter-docs-mdx.03c6205c.iframe.bundle.js +0 -1
- package/storybook/_external-mwork-music-player-docs-mdx.3d0f7156.iframe.bundle.js +0 -1
- package/storybook/atoms-_electrons-form-error-message-docs-mdx.5b9e78fe.iframe.bundle.js +0 -1
- package/storybook/atoms-_electrons-loader-docs-mdx.1176957f.iframe.bundle.js +0 -1
- package/storybook/atoms-background-docs-mdx.4f102c17.iframe.bundle.js +0 -1
- package/storybook/atoms-barcode-docs-mdx.b74c501b.iframe.bundle.js +0 -1
- package/storybook/atoms-buzzer-docs-mdx.23eb1913.iframe.bundle.js +0 -1
- package/storybook/atoms-card-docs-mdx.7d276114.iframe.bundle.js +0 -1
- package/storybook/atoms-chart-docs-mdx.204609d4.iframe.bundle.js +0 -1
- package/storybook/atoms-clock-docs-mdx.501e6780.iframe.bundle.js +0 -1
- package/storybook/atoms-copy-value-docs-mdx.f404dcd2.iframe.bundle.js +0 -1
- package/storybook/atoms-image-grid-docs-mdx.8161de39.iframe.bundle.js +0 -1
- package/storybook/atoms-image-slider-docs-mdx.c616bb37.iframe.bundle.js +0 -1
- package/storybook/atoms-inline-spinner-docs-mdx.a98163b8.iframe.bundle.js +0 -1
- package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js +0 -2
- package/storybook/atoms-mosaic-docs-mdx.1aebfbdf.iframe.bundle.js +0 -1
- package/storybook/atoms-placeholder-docs-mdx.cd2f3976.iframe.bundle.js +0 -1
- package/storybook/atoms-qr-code-docs-mdx.4202568d.iframe.bundle.js +0 -1
- package/storybook/atoms-rating-docs-mdx.32fa4104.iframe.bundle.js +0 -1
- package/storybook/atoms-reader-doc-docs-mdx.1860338f.iframe.bundle.js +0 -1
- package/storybook/atoms-text-animate-docs-mdx.05e1baf4.iframe.bundle.js +0 -1
- package/storybook/atoms-thumb-docs-mdx.7286b617.iframe.bundle.js +0 -1
- package/storybook/atoms-timer-docs-mdx.6f724cc8.iframe.bundle.js +0 -1
- package/storybook/atoms-typewriter-docs-mdx.993bc264.iframe.bundle.js +0 -1
- package/storybook/atoms-typewriter-typewriter-component-stories.80f07c89.iframe.bundle.js +0 -1
- package/storybook/cdk-components-drag-and-drop-splitter-docs-mdx.f12088fd.iframe.bundle.js +0 -1
- package/storybook/cdk-components-table-docs-mdx.cc2c11e7.iframe.bundle.js +0 -1
- package/storybook/examples-docs-mdx.3111f2c6.iframe.bundle.js +0 -1
- package/storybook/examples-image-grid-slider-docs-mdx.d3578699.iframe.bundle.js +0 -1
- package/storybook/examples-layout-docs-mdx.bbacdfd2.iframe.bundle.js +0 -1
- package/storybook/examples-table-edit-focus-docs-mdx.3c0d1611.iframe.bundle.js +0 -1
- package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js +0 -2
- package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js +0 -2
- package/storybook/forms-autofocus-docs-mdx.39611362.iframe.bundle.js +0 -1
- package/storybook/forms-checkbox-checkbox-component-stories.d45b4f0d.iframe.bundle.js +0 -1
- package/storybook/forms-checkbox-docs-mdx.74036eb7.iframe.bundle.js +0 -1
- package/storybook/forms-chip-docs-mdx.01e1b518.iframe.bundle.js +0 -1
- package/storybook/forms-input-docs-mdx.72d0e99a.iframe.bundle.js +0 -1
- package/storybook/forms-input-input-component-stories.609db3f0.iframe.bundle.js +0 -1
- package/storybook/forms-slider-docs-mdx.120cefc6.iframe.bundle.js +0 -1
- package/storybook/forms-switch-docs-mdx.9d58a341.iframe.bundle.js +0 -1
- package/storybook/forms-validators-docs-mdx.ebb47a43.iframe.bundle.js +0 -1
- package/storybook/home-guide-mdx.1a176b15.iframe.bundle.js +0 -1
- package/storybook/home-tips-mdx.26df81d8.iframe.bundle.js +0 -1
- package/storybook/layout-main-docs-mdx.4c9208c5.iframe.bundle.js +0 -1
- package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js +0 -2
- package/storybook/layout-nav-docs-mdx.cc919f94.iframe.bundle.js +0 -1
- package/storybook/layout-overlay-docs-mdx.823351e0.iframe.bundle.js +0 -1
- package/storybook/layout-overlay-header-docs-mdx.394033ca.iframe.bundle.js +0 -1
- package/storybook/layout-spinner-docs-mdx.03741741.iframe.bundle.js +0 -1
- package/storybook/layout-splitter-docs-mdx.bf161b39.iframe.bundle.js +0 -1
- package/storybook/layout-tabs-docs-mdx.89d83606.iframe.bundle.js +0 -1
- package/storybook/layout-top-scroll-bottom-docs-mdx.ddc061f8.iframe.bundle.js +0 -1
- package/storybook/molecules-image-editor-docs-mdx.805dcd5a.iframe.bundle.js +0 -1
- package/storybook/styling-colors-docs-mdx.95c504e4.iframe.bundle.js +0 -1
- package/storybook/styling-css-variables-docs-mdx.48afb4f3.iframe.bundle.js +0 -1
- package/storybook/styling-forms-docs-mdx.943e72f2.iframe.bundle.js +0 -1
- package/storybook/styling-icons-docs-mdx.e1001dfd.iframe.bundle.js +0 -1
- package/storybook/styling-layers-docs-mdx.a563260e.iframe.bundle.js +0 -1
- package/storybook/styling-tags-docs-mdx.23ab2316.iframe.bundle.js +0 -1
- package/storybook/styling-ui-tags-docs-mdx.8f75631d.iframe.bundle.js +0 -1
- /package/storybook/{2127.29f153d2.iframe.bundle.js.LICENSE.txt → 2127.d7de271b.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{2228.77650ef1.iframe.bundle.js.LICENSE.txt → 2228.7013a637.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{4425.368129b3.iframe.bundle.js.LICENSE.txt → 4425.7f753a38.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{4755.e4656207.iframe.bundle.js.LICENSE.txt → 4755.0561bac5.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js.LICENSE.txt → atoms-lang-selector-docs-mdx.0487b819.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{examples-transloco-docs-mdx.97df7022.iframe.bundle.js.LICENSE.txt → examples-transloco-docs-mdx.46447d84.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js.LICENSE.txt → forms-autocomplete-docs-mdx.698eef62.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js.LICENSE.txt → layout-media-screen-docs-mdx.c382b73b.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[6354,7586],{"./libs/ui/src/lib/forms/validators/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_validators_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/validators/validators.component.stories.ts");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_validators_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"validators",children:"Validators"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["These directives provide common validation logic for input fields, integrating seamlessly with Angular's template-driven forms (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ngModel"}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"overview",children:"Overview"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The following validator directives are available:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsNumber"}),": Validates that the input is a valid number."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsHex"}),": Validates that the input is a valid hexadecimal string (3, 6, or 8 characters, optional #)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUrl"}),": Validates that the input is a valid URL."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputForbiddenName"}),": Validates that the input is NOT equal to a forbidden string."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUniqueName"}),": Validates that the input is unique against a list of existing values."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsbn"}),": Validates a full ISBN-10 or ISBN-13 (checksum verified; hyphens/spaces ignored, ISBN-10 optional trailing ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"X"}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputInteger"}),": Validates digits only and additionally ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"strips"})," every non-digit character live while typing (cooperates with the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clearable"})," clear button). Use on a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="text"'})," field with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'inputmode="numeric"'}),". Optional ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," signal inputs bound the range (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," is also capped live; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"})," is validated only)."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["In addition, Angular's built-in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"email"})," validator is fully supported — its\nerror is rendered with a localized message (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"form.errors.email"}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"built-in-email",children:["Built-in: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"email"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Angular's standard email validator (the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"email"})," attribute on an input with\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ngModel"}),"). No ui directive is needed; the error overlay shows the localized\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"form.errors.email"})," message."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Email Input">\n <input\n class="ui"\n type="email"\n email\n ngModel\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_validators_component_stories__WEBPACK_IMPORTED_MODULE_4__.Email}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputisnumber",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsNumber"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Ensures the input value is a valid number. It also automatically applies to any ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'input[type="number"]'}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Number Input">\n <input\n class="ui"\n type="text"\n uiInputIsNumber\n ngModel\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--is-number",children:"Open story: uiInputIsNumber"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputishex",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsHex"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Validates that the entered string is a valid hexadecimal value."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Note:"})," When the input field receives focus and is empty, it automatically prepends ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"#"})," for better user experience."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Hex Input">\n <input\n class="ui"\n type="text"\n uiInputIsHex\n ngModel\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--is-hex",children:"Open story: uiInputIsHex"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputurl",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUrl"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Validates that the entered string is a valid URL."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Note:"})," When the input field receives focus and is empty, it automatically prepends ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"https://"})," for better user experience."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="URL Input">\n <input\n class="ui"\n type="text"\n uiInputUrl\n ngModel\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--is-url",children:"Open story: uiInputUrl"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputforbiddenname",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputForbiddenName"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Invalidates the input if it matches a specific forbidden string."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Forbidden Name">\n <input\n class="ui"\n type="text"\n [uiInputForbiddenName]="\'forbidden\'"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n ngModel\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--forbidden-name",children:"Open story: uiInputForbiddenName"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputuniquename",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUniqueName"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Ensures the input value does not exist in a given list of strings. Ideal for checking uniqueness (e.g., username availability in a local list)."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Unique Name">\n <input\n class="ui"\n type="text"\n [uiInputUniqueName]="[\'taken\', \'also-taken\']"\n ngModel\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--unique-name",children:"Open story: uiInputUniqueName"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputisbn",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsbn"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Validates a full ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"ISBN-10 or ISBN-13"}),", checksum included. Hyphens and spaces\nare ignored, and an ISBN-10 may end in an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"X"})," check digit. Invalid numbers and\ntypos are rejected. Empty is treated as valid (skip on optional fields)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="ISBN">\n <input class="ui" type="text" uiInputIsbn ngModel ui-tag />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--isbn",children:"Open story: uiInputIsbn"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputinteger",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputInteger"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Enforces ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"digits only"})," (a non-negative whole number). Beyond validating, it\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"removes"})," any non-digit character live as it is typed or pasted, so the field\ncan never hold letters — this pairs with the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clearable"})," clear button. Put it on\na ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="text"'})," input with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'inputmode="numeric"'})," (a native ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="number"'})," field\nreturns an empty value on invalid input, so the characters cannot be stripped)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Optional ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," (signal inputs) bound the integer range. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," is enforced\nlive — typing past it caps the value — while ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"})," is checked on validation only,\nso a partial entry is not bumped up prematurely. Both accept a plain attribute\n(",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'min="0"'}),") or a binding (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'[max]="10"'}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Rating" clearable>\n <input\n class="ui"\n type="text"\n inputmode="numeric"\n uiInputInteger\n min="0"\n max="10"\n ngModel\n ui-tag />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--integer",children:"Open story: uiInputInteger"})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/validators/validators.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Email:()=>Email,ForbiddenName:()=>ForbiddenName,Integer:()=>Integer,IsHex:()=>IsHex,IsNumber:()=>IsNumber,IsUrl:()=>IsUrl,Isbn:()=>Isbn,UniqueName:()=>UniqueName,__namedExportsOrder:()=>__namedExportsOrder,default:()=>validators_component_stories});var _common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs");function controlForbiddenNameValidator(name){return control=>function forbiddenNameValidator(forbiddenName,value){return!(!forbiddenName||!value)&&new RegExp(`^${forbiddenName}$`,"i").test(value)}(name,control.value)?{inputForbiddenName:{value:control.value}}:null}let UiForbiddenValidatorDirective=class UiForbiddenValidatorDirective{uiInputForbiddenName="";validate(control){return this.uiInputForbiddenName?controlForbiddenNameValidator(this.uiInputForbiddenName)(control):null}static propDecorators={uiInputForbiddenName:[{type:_debug_node_chunk.pde}]}};UiForbiddenValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputForbiddenName]",providers:[{provide:fesm2022_forms.cz,useExisting:UiForbiddenValidatorDirective,multi:!0}]})],UiForbiddenValidatorDirective);var _effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");function controlIntegerValidator(){return control=>function integerValidator(value){return null!=value&&""!==value&&/^\d+$/.test(String(value))}(control.value)?null:{integer:!0}}let UiInputIntegerValidatorDirective=class UiInputIntegerValidatorDirective{elementRef=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);min=(0,core.input)(Number.NaN,{transform:core.numberAttribute});max=(0,core.input)(Number.NaN,{transform:core.numberAttribute});onInput(){const el=this.elementRef.nativeElement;let clean=el.value.replaceAll(/\D/g,"");const max=this.max();if(""!==clean&&Number.isFinite(max)&&Number(clean)>max&&(clean=String(max)),clean===el.value)return;const caret=Math.max(0,(el.selectionStart??clean.length)-1);el.value=clean,el.setSelectionRange?.(caret,caret),el.dispatchEvent(new Event("input",{bubbles:!0}))}validate(control){if(!control.value)return null;const base=controlIntegerValidator()(control);if(base)return base;const value=Number(control.value),min=this.min(),max=this.max();return Number.isFinite(min)&&value<min?{min:{min,actual:value}}:Number.isFinite(max)&&value>max?{max:{max,actual:value}}:null}static propDecorators={min:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"min",required:!1,transform:void 0}]}],max:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"max",required:!1,transform:void 0}]}],onInput:[{type:_debug_node_chunk.Z$l,args:["input"]}]}};function controlIsbnValidator(){return control=>function isbnValidator(value){if(!value)return!1;const s=String(value).replaceAll(/[\s-]/g,"").toUpperCase();if(/^\d{9}[\dX]$/.test(s)){let sum=0;for(let i=0;i<10;i++)sum+=("X"===s[i]?10:Number(s[i]))*(10-i);return sum%11==0}if(/^\d{13}$/.test(s)){let sum=0;for(let i=0;i<13;i++)sum+=Number(s[i])*(i%2==0?1:3);return sum%10==0}return!1}(control.value)?null:{isbn:!0}}UiInputIntegerValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputInteger]",providers:[{provide:fesm2022_forms.cz,useExisting:UiInputIntegerValidatorDirective,multi:!0}]})],UiInputIntegerValidatorDirective);let UiInputIsbnValidatorDirective=class UiInputIsbnValidatorDirective{validate(control){return control.value?controlIsbnValidator()(control):null}};UiInputIsbnValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsbn]",providers:[{provide:fesm2022_forms.cz,useExisting:UiInputIsbnValidatorDirective,multi:!0}]})],UiInputIsbnValidatorDirective);let UiIsHexValidatorDirective=class UiIsHexValidatorDirective{_control;onFocus(){this._control&&!this._control.value&&this._control.setValue("#")}validate(control){return this._control=control,control.value?(control=>{const isHex=function hexValidator(value){return!!value&&/^#?([\dA-Fa-f]{3}|[\dA-Fa-f]{6}|[\dA-Fa-f]{8})$/.test(value)}(control.value);return isHex?null:{hexNotValid:!isHex}})(control):null}static propDecorators={onFocus:[{type:_debug_node_chunk.Z$l,args:["focus"]}]}};UiIsHexValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsHex]",providers:[{provide:fesm2022_forms.cz,useExisting:UiIsHexValidatorDirective,multi:!0}]})],UiIsHexValidatorDirective);let UiIsNumberValidatorDirective=class UiIsNumberValidatorDirective{elementRef=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);validate(){return this.elementRef.nativeElement.checkValidity()?null:{numberNotValid:!0}}};UiIsNumberValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsNumber],input[type=number]",providers:[{provide:fesm2022_forms.cz,useExisting:UiIsNumberValidatorDirective,multi:!0}]})],UiIsNumberValidatorDirective);let UiUniqueValidatorDirective=class UiUniqueValidatorDirective{uiInputUniqueName=[];validate(control){return this.uiInputUniqueName?function controlNameValidator(existValues){return control=>{const unique=function uniqueValidator(existValues,value){return!existValues.includes(value)}(existValues,control.value);return unique?null:{inputUniqueName:{value:control.value}}}}(this.uiInputUniqueName)(control):null}static propDecorators={uiInputUniqueName:[{type:_debug_node_chunk.pde}]}};UiUniqueValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputUniqueName]",providers:[{provide:fesm2022_forms.cz,useExisting:UiUniqueValidatorDirective,multi:!0}]})],UiUniqueValidatorDirective);let UiUrlValidatorDirective=class UiUrlValidatorDirective{control;validate(control){return this.control=control,control.value?(control=>function urlValidator(value){return!!value&&/^(https?:\/\/)?([\d.a-z-]+)\.([.a-z]{2,6})([\w ./-]*)*\/?$/.test(value)}(control.value)?null:{urlNotValid:!0})(control):null}onFocus(){this.control&&!this.control.value&&this.control.setValue("https://")}static propDecorators={onFocus:[{type:_debug_node_chunk.Z$l,args:["focus"]}]}};UiUrlValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputUrl]",providers:[{provide:fesm2022_forms.cz,useExisting:UiUrlValidatorDirective,multi:!0}]})],UiUrlValidatorDirective);var transloco_storybook_module=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),input_component=__webpack_require__("./libs/ui/src/lib/forms/input/input.component.ts");const validators_component_stories={title:"Forms/Validators",decorators:[(0,dist.Iz)({providers:[fesm2022_forms.vS],imports:[header_component.b,fesm2022_forms.YN,_common_module_chunk.TG,input_component.K,UiIsNumberValidatorDirective,UiIsHexValidatorDirective,UiUrlValidatorDirective,UiForbiddenValidatorDirective,UiUniqueValidatorDirective,UiInputIsbnValidatorDirective,UiInputIntegerValidatorDirective,transloco_storybook_module.o]})],parameters:{controls:{disable:!0},docs:{canvas:{sourceState:"none"}}}},data={EmailValue:"",NumberValue:null,HexNumberValue:"",ForbiddenName:"forbidden",ForbiddenNameValue:"",UniqueNames:["taken","also-taken"],UniqueNameValue:"",UrlValue:"",IsbnValue:"",IntegerValue:""},example=(ref,field)=>`\n <ui-intern-header [theme]="'theme-light'"></ui-intern-header>\n <section class="relative flex flex-col">\n ${field}\n <hr class="ui-dotted">\n <strong>${ref}.errors</strong>\n <code class="ui"><pre>{{ ${ref}.errors | json }}</pre></code>\n </section>\n`,IsNumber={render:()=>({props:{data},template:example("exampleIsNumber",'<ui-input label="Directive: uiInputIsNumber || type=number" uiError>\n <input\n class="ui"\n #exampleIsNumber="ngModel"\n [(ngModel)]="data.NumberValue"\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n type="number"\n name="exampleIsNumber" />\n </ui-input>')})},IsHex={render:()=>({props:{data},template:example("exampleIsHex",'<ui-input label="Directive: uiInputIsHex (with auto # on focus)" uiError>\n <input\n class="ui"\n #exampleIsHex="ngModel"\n [(ngModel)]="data.HexNumberValue"\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n type="text"\n uiInputIsHex\n name="exampleIsHex" />\n </ui-input>')})},IsUrl={render:()=>({props:{data},template:example("exampleIsUrl",'<ui-input label="Directive: uiInputUrl (with auto https:// on focus)" uiError>\n <input\n class="ui"\n #exampleIsUrl="ngModel"\n [(ngModel)]="data.UrlValue"\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n type="text"\n uiInputUrl\n name="exampleIsUrl" />\n </ui-input>')})},ForbiddenName={render:()=>({props:{data},template:example("exampleForbiddenName",'<ui-input [label]="\'Directive: uiInputForbiddenName=\'+(data.ForbiddenName | json)" uiError>\n <input\n class="ui"\n #exampleForbiddenName="ngModel"\n [(ngModel)]="data.ForbiddenNameValue"\n ui-tag\n type="text"\n [uiInputForbiddenName]="data.ForbiddenName"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n name="exampleForbiddenName" />\n </ui-input>')})},UniqueName={render:()=>({props:{data},template:example("exampleUniqueName",'<ui-input [label]="\'Directive: uiInputUniqueName=\'+(data.UniqueNames | json)" uiError>\n <input\n class="ui"\n #exampleUniqueName="ngModel"\n [(ngModel)]="data.UniqueNameValue"\n ui-tag\n type="text"\n [uiInputUniqueName]="data.UniqueNames"\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n name="exampleUniqueName" />\n </ui-input>')})},Email={render:()=>({props:{data},template:example("exampleEmail",'<ui-input label="Built-in: email || type=email" uiError>\n <input\n class="ui"\n #exampleEmail="ngModel"\n [(ngModel)]="data.EmailValue"\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n type="email"\n email\n name="exampleEmail" />\n </ui-input>')})},Isbn={render:()=>({props:{data},template:example("exampleIsbn",'<ui-input label="Directive: uiInputIsbn (ISBN-10/13, checksum)" uiError>\n <input\n class="ui"\n #exampleIsbn="ngModel"\n [(ngModel)]="data.IsbnValue"\n ui-tag\n type="text"\n uiInputIsbn\n name="exampleIsbn" />\n </ui-input>')})},Integer={parameters:{controls:{disable:!1}},argTypes:{min:{control:{type:"range",min:0,max:100,step:1},description:"Inclusive lower bound"},max:{control:{type:"range",min:0,max:100,step:1},description:"Inclusive upper bound (capped live while typing)"}},args:{min:0,max:10},render:args=>({props:{...args,data},template:example("exampleInteger",'<ui-input [label]="\'Directive: uiInputInteger (digits only, min \' + min + \' / max \' + max + \')\'" uiError clearable>\n <input\n class="ui"\n #exampleInteger="ngModel"\n [(ngModel)]="data.IntegerValue"\n ui-tag\n type="text"\n inputmode="numeric"\n uiInputInteger\n [min]="min"\n [max]="max"\n name="exampleInteger" />\n </ui-input>')})},__namedExportsOrder=["IsNumber","IsHex","IsUrl","ForbiddenName","UniqueName","Email","Isbn","Integer"];IsNumber.parameters={...IsNumber.parameters,docs:{...IsNumber.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsNumber\', `<ui-input label="Directive: uiInputIsNumber || type=number" uiError>\n <input\n class="ui"\n #exampleIsNumber="ngModel"\n [(ngModel)]="data.NumberValue"\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n type="number"\n name="exampleIsNumber" />\n </ui-input>`)\n })\n}',...IsNumber.parameters?.docs?.source}}},IsHex.parameters={...IsHex.parameters,docs:{...IsHex.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsHex\', `<ui-input label="Directive: uiInputIsHex (with auto # on focus)" uiError>\n <input\n class="ui"\n #exampleIsHex="ngModel"\n [(ngModel)]="data.HexNumberValue"\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n type="text"\n uiInputIsHex\n name="exampleIsHex" />\n </ui-input>`)\n })\n}',...IsHex.parameters?.docs?.source}}},IsUrl.parameters={...IsUrl.parameters,docs:{...IsUrl.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsUrl\', `<ui-input label="Directive: uiInputUrl (with auto https:// on focus)" uiError>\n <input\n class="ui"\n #exampleIsUrl="ngModel"\n [(ngModel)]="data.UrlValue"\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n type="text"\n uiInputUrl\n name="exampleIsUrl" />\n </ui-input>`)\n })\n}',...IsUrl.parameters?.docs?.source}}},ForbiddenName.parameters={...ForbiddenName.parameters,docs:{...ForbiddenName.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleForbiddenName\', `<ui-input [label]="\'Directive: uiInputForbiddenName=\'+(data.ForbiddenName | json)" uiError>\n <input\n class="ui"\n #exampleForbiddenName="ngModel"\n [(ngModel)]="data.ForbiddenNameValue"\n ui-tag\n type="text"\n [uiInputForbiddenName]="data.ForbiddenName"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n name="exampleForbiddenName" />\n </ui-input>`)\n })\n}',...ForbiddenName.parameters?.docs?.source}}},UniqueName.parameters={...UniqueName.parameters,docs:{...UniqueName.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleUniqueName\', `<ui-input [label]="\'Directive: uiInputUniqueName=\'+(data.UniqueNames | json)" uiError>\n <input\n class="ui"\n #exampleUniqueName="ngModel"\n [(ngModel)]="data.UniqueNameValue"\n ui-tag\n type="text"\n [uiInputUniqueName]="data.UniqueNames"\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n name="exampleUniqueName" />\n </ui-input>`)\n })\n}',...UniqueName.parameters?.docs?.source}}},Email.parameters={...Email.parameters,docs:{...Email.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleEmail\', `<ui-input label="Built-in: email || type=email" uiError>\n <input\n class="ui"\n #exampleEmail="ngModel"\n [(ngModel)]="data.EmailValue"\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n type="email"\n email\n name="exampleEmail" />\n </ui-input>`)\n })\n}',...Email.parameters?.docs?.source}}},Isbn.parameters={...Isbn.parameters,docs:{...Isbn.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsbn\', `<ui-input label="Directive: uiInputIsbn (ISBN-10/13, checksum)" uiError>\n <input\n class="ui"\n #exampleIsbn="ngModel"\n [(ngModel)]="data.IsbnValue"\n ui-tag\n type="text"\n uiInputIsbn\n name="exampleIsbn" />\n </ui-input>`)\n })\n}',...Isbn.parameters?.docs?.source}}},Integer.parameters={...Integer.parameters,docs:{...Integer.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: false\n }\n },\n argTypes: {\n min: {\n control: {\n type: \'range\',\n min: 0,\n max: 100,\n step: 1\n },\n description: \'Inclusive lower bound\'\n },\n max: {\n control: {\n type: \'range\',\n min: 0,\n max: 100,\n step: 1\n },\n description: \'Inclusive upper bound (capped live while typing)\'\n }\n },\n args: {\n min: 0,\n max: 10\n },\n render: args => ({\n props: {\n ...args,\n data\n },\n template: example(\'exampleInteger\', `<ui-input [label]="\'Directive: uiInputInteger (digits only, min \' + min + \' / max \' + max + \')\'" uiError clearable>\n <input\n class="ui"\n #exampleInteger="ngModel"\n [(ngModel)]="data.IntegerValue"\n ui-tag\n type="text"\n inputmode="numeric"\n uiInputInteger\n [min]="min"\n [max]="max"\n name="exampleInteger" />\n </ui-input>`)\n })\n}',...Integer.parameters?.docs?.source},description:{story:"The one example with something to turn: the bounds. Sliders, and the\nlabel reads them back, so the field says what it is checking against.",...Integer.parameters?.docs?.description}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3767],{"./libs/ui/src/lib/home/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_storybook_blocks_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");function _createMdxContent(props){const _components={code:"code",h3:"h3",p:"p",strong:"strong",...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{title:"Home/Guide"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"guide",children:"Guide"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["What to reach for a component for, what not, what instead, and where it\ndemonstrably runs. Every entry is written by an agent from the sources it\nnames and read against a commit; the same entries are served to agents by\nthe catalog's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"get_guide"})," tool. The component page tells the truth — what\nit does and does not — and the guide is the offer next to it. Where the two\ndisagree, the page wins."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["This table is ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"generated from the guide folder"}),", not written beside it:\n",_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H.length," entries, reviewed at ",(0,_storybook_blocks_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.ED)(_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H).join(", "),'.\nEach subject links to the page where its full entry stands, under the\nsection "What it does, and what it does not".']}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{className:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Subject"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Use it for"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tbody",{children:(0,_storybook_blocks_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.K9)(_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H).map(row=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[row.href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href:row.href,children:row.subject}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:row.subject}),"situation"===row.kind&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("small",{children:" · situation"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:row.brief})]},row.subject))})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_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)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[128],{"./libs/ui/src/lib/home/overview.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),blocks=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");const package_namespaceObject_rE="2.8.1";function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Introduction"}),"\n","\n","\n",(0,jsx_runtime.jsx)("h2",{style:{textAlign:"right",borderBottom:"none",marginBottom:0},children:"Built for developers and agents"}),"\n",(0,jsx_runtime.jsx)("h1",{style:{textAlign:"right",color:"var(--ui-c-focus)",paddingBottom:"1rem",borderBottom:"var(--ui-border-width) solid var(--ui-c-fourthly)"},children:"Customers just talk to the agent"}),"\n",(0,jsx_runtime.jsx)(_components.h3,{id:"ui-library-overview",children:"UI Library Overview"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This library provides a modular set of Angular components for building consistent user\ninterfaces. It follows an atomic design approach, categorized into Electrons, Atoms,\nMolecules, Layouts, and Forms. Everything is ",(0,jsx_runtime.jsx)(_components.strong,{children:"standalone"})," — there are no NgModules anymore (the\nTransloco configuration modules are the only exception). State is managed with ",(0,jsx_runtime.jsx)(_components.strong,{children:"Signals"}),"\nand all apps run ",(0,jsx_runtime.jsx)(_components.strong,{children:"zoneless"}),"."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This documentation describes version ",(0,jsx_runtime.jsx)(_components.strong,{children:package_namespaceObject_rE})," of the library. To\ninstall exactly what is documented here:\n",(0,jsx_runtime.jsxs)("code",{children:["npm i @mojawork/ui@",package_namespaceObject_rE]}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"core-architecture",children:"Core Architecture"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The library is organized into the following categories (folders under ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/src/lib"}),").\nThe first three are layers, and they are told apart by ",(0,jsx_runtime.jsx)(_components.strong,{children:"composition and\nvisibility"}),", not by size: an atom may be large and a molecule small."]}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Category"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms/_electrons"})}),(0,jsx_runtime.jsxs)("td",{children:["Internal building blocks, ",(0,jsx_runtime.jsx)("strong",{children:"not exported"}),", selector ",(0,jsx_runtime.jsx)("code",{children:"ui-electron-*"}),". They exist only so ui components can build them in — an app never names one. Today: the form error message."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms"})}),(0,jsx_runtime.jsx)("td",{children:"Exported building blocks that compose nothing else from this library (e.g., thumbs, typewriter, language selector, copy-value)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"molecules"})}),(0,jsx_runtime.jsxs)("td",{children:["Built from at least one other ui component — that single test is the whole definition, and the folder follows it. ",(0,jsx_runtime.jsx)("code",{children:"image-editor"})," is the only one: it builds in the crop box, the overlay, its header and the slider. Size plays no part; an atom may be a large class and a molecule twenty lines."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"cdk"})}),(0,jsx_runtime.jsx)("td",{children:"CDK-based building blocks (e.g., table wrapper, drag-and-drop splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"layout"})}),(0,jsx_runtime.jsx)("td",{children:"Structural components that define the page grid and navigation (e.g., main layout, spinner, splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"forms"})}),(0,jsx_runtime.jsx)("td",{children:"Input elements and form validation components (inputs, checkboxes, validator directives)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsxs)("td",{children:[(0,jsx_runtime.jsx)("code",{children:"_directives"})," / ",(0,jsx_runtime.jsx)("code",{children:"_pipes"})]}),(0,jsx_runtime.jsx)("td",{children:"Utility directives and pipes for behavior modification (e.g., autofocus, intersection observer)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"transloco-modules"})}),(0,jsx_runtime.jsxs)("td",{children:["Internationalization setup (",(0,jsx_runtime.jsx)("code",{children:"TranslocoRootModule"}),") — the only remaining NgModules, imported once at application level."]})]})]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"styling-concept",children:"Styling Concept"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Every component in this library ships ",(0,jsx_runtime.jsx)(_components.strong,{children:"fully self-contained"}),": plain CSS built\nexclusively on ",(0,jsx_runtime.jsx)(_components.strong,{children:"design tokens"})," — CSS custom properties such as ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-c-*"}),"\n(colors, theme-aware), ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-spacer"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-border-radius"})," and ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-time"}),".\nThere are no hidden dependencies on any CSS framework, utility system or build\ntool: the components coexist with whatever styling setup your project uses."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Responsiveness"})," follows a single canonical breakpoint ladder with six levels\n(",(0,jsx_runtime.jsx)(_components.code,{children:"ms1"})," 340px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms2"})," 375px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms3"})," 481px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms4"})," 769px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms5"})," 1025px ·\n",(0,jsx_runtime.jsx)(_components.code,{children:"ms6"})," 1901px). The ladder deliberately exists only once and serves every layer\nfrom the same source:"]}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"CSS"}),": via named media queries (",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--ms4)"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--below-ms5)"}),")\nthat are resolved into standard queries at build time — the published package\ncontains plain, universally working CSS."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"TypeScript"}),": via the ",(0,jsx_runtime.jsx)(_components.code,{children:"UiLayoutMediaScreenService"}),", which exposes the\ncurrent level as a signal (",(0,jsx_runtime.jsx)(_components.code,{children:"mediascreen: 1..6"}),") — logic and layout are\nguaranteed to switch at the same boundaries."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"tailwind--not-required-but-offered",children:"Tailwind — not required, but offered"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The npm package ",(0,jsx_runtime.jsx)(_components.strong,{children:"does not require Tailwind"}),". Whether a project uses Tailwind\nis entirely that project's decision — the components work identically either\nway."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Projects that ",(0,jsx_runtime.jsx)(_components.strong,{children:"do want Tailwind (v4)"})," get a head start: the package ships a\nready-made theme file, ",(0,jsx_runtime.jsx)(_components.code,{children:"@mojawork/ui/styles/theme.css"}),". One import in the\napp's own Tailwind entry wires Tailwind into the library's design system:"]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-css",children:"@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n@import '@mojawork/ui/styles/theme.css';\n@source './app';\n@source '../node_modules/@mojawork/ui';\n"})}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Colors"})," mapped via ",(0,jsx_runtime.jsx)(_components.code,{children:"@theme"})," onto the runtime tokens — utilities like\n",(0,jsx_runtime.jsx)(_components.code,{children:"text-c-primary"})," automatically follow light/dark theme switching."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Breakpoints"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"ms1:"}),"–",(0,jsx_runtime.jsx)(_components.code,{children:"ms6:"})," — the same ladder the components use\ninternally."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Animation presets"})," (e.g. ",(0,jsx_runtime.jsx)(_components.code,{children:"loading"}),")."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.p,{children:"The theme carries the mapping and nothing else: no Tailwind import of its\nown, no source paths. The layer line stays in the app's file because it has\nto be the first statement there, before Tailwind declares its own layers —\nan import cannot put it in front of itself."}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["In short: ",(0,jsx_runtime.jsx)(_components.strong,{children:"shipped Tailwind-free, Tailwind-ready when wanted."})," Both paths are\nfirst-class; neither is forced."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Everything the library ships sits in the ",(0,jsx_runtime.jsx)(_components.code,{children:"ui"})," cascade layer, below Tailwind's\n",(0,jsx_runtime.jsx)(_components.code,{children:"utilities"})," — so a utility you write on a ui tag beats the component's own\ndefault, and your app's unlayered CSS beats both. One line on the Tailwind\nside makes the order explicit; see ",(0,jsx_runtime.jsx)(_components.a,{href:"?path=/docs/styling-layers--docs",children:"Styling › Layers"}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"for-contributors",children:"For contributors"}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Components in ",(0,jsx_runtime.jsx)(_components.code,{children:"src/lib"})," never use Tailwind utilities or ",(0,jsx_runtime.jsx)(_components.code,{children:"@apply"})," — plain CSS\nwith ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-*"})," tokens only; component-local classes carry a ",(0,jsx_runtime.jsx)(_components.code,{children:"_"})," prefix."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Storybook ",(0,jsx_runtime.jsx)(_components.strong,{children:"stories"})," (and the showcase components under ",(0,jsx_runtime.jsx)(_components.code,{children:".storybook/demos/"}),")\nexplicitly use Tailwind for their example layout."]}),"\n",(0,jsx_runtime.jsx)(_components.li,{children:"Breakpoints are never written as pixel literals — always via the ladder's\nnamed queries."}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"getting-started",children:"Getting Started"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["All components are standalone: import them directly from the barrel into the ",(0,jsx_runtime.jsx)(_components.code,{children:"imports"}),"\narray of your standalone component. Inside the monorepo the import path is mapped via\ntsconfig; external apps install the published npm package\n(",(0,jsx_runtime.jsx)("a",{href:"https://www.npmjs.com/package/@mojawork/ui",target:"_blank",rel:"noopener",children:"@mojawork/ui"}),")."]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-typescript",children:"import { Component } from '@angular/core';\nimport { UiInputComponent, UiCardComponent } from '@mojawork/ui';\n\n@Component({\n selector: 'app-my-feature',\n imports: [UiInputComponent, UiCardComponent],\n templateUrl: './my-feature.component.html',\n})\nexport class MyFeatureComponent {}\n"})}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"usage-principles",children:"Usage Principles"}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Principle"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Composition"}),(0,jsx_runtime.jsx)("td",{children:"Prefer composing smaller components into larger ones."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Consistency"}),(0,jsx_runtime.jsx)("td",{children:"Use the provided layouts to maintain a unified user experience across the application."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Signals & zoneless"}),(0,jsx_runtime.jsx)("td",{children:"Component state uses Angular Signals; all consumers run without Zone.js."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Translation"}),(0,jsx_runtime.jsx)("td",{children:"All text within components is managed via Transloco for easy localization."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[128],{"./libs/ui/src/lib/home/overview.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),blocks=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");const package_namespaceObject_rE="2.8.2";function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Introduction"}),"\n","\n","\n",(0,jsx_runtime.jsx)("h2",{style:{textAlign:"right",borderBottom:"none",marginBottom:0},children:"Built for developers and agents"}),"\n",(0,jsx_runtime.jsx)("h1",{style:{textAlign:"right",color:"var(--ui-c-focus)",paddingBottom:"1rem",borderBottom:"var(--ui-border-width) solid var(--ui-c-fourthly)"},children:"Customers just talk to the agent"}),"\n",(0,jsx_runtime.jsx)(_components.h3,{id:"ui-library-overview",children:"UI Library Overview"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This library provides a modular set of Angular components for building consistent user\ninterfaces. It follows an atomic design approach, categorized into Electrons, Atoms,\nMolecules, Layouts, and Forms. Everything is ",(0,jsx_runtime.jsx)(_components.strong,{children:"standalone"})," — there are no NgModules anymore (the\nTransloco configuration modules are the only exception). State is managed with ",(0,jsx_runtime.jsx)(_components.strong,{children:"Signals"}),"\nand all apps run ",(0,jsx_runtime.jsx)(_components.strong,{children:"zoneless"}),"."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This documentation describes version ",(0,jsx_runtime.jsx)(_components.strong,{children:package_namespaceObject_rE})," of the library. To\ninstall exactly what is documented here:\n",(0,jsx_runtime.jsxs)("code",{children:["npm i @mojawork/ui@",package_namespaceObject_rE]}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"core-architecture",children:"Core Architecture"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The library is organized into the following categories (folders under ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/src/lib"}),").\nThe first three are layers, and they are told apart by ",(0,jsx_runtime.jsx)(_components.strong,{children:"composition and\nvisibility"}),", not by size: an atom may be large and a molecule small."]}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Category"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms/_electrons"})}),(0,jsx_runtime.jsxs)("td",{children:["Internal building blocks, ",(0,jsx_runtime.jsx)("strong",{children:"not exported"}),", selector ",(0,jsx_runtime.jsx)("code",{children:"ui-electron-*"}),". They exist only so ui components can build them in — an app never names one. Today: the form error message."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms"})}),(0,jsx_runtime.jsx)("td",{children:"Exported building blocks that compose nothing else from this library (e.g., thumbs, typewriter, language selector, copy-value)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"molecules"})}),(0,jsx_runtime.jsxs)("td",{children:["Built from at least one other ui component — that single test is the whole definition, and the folder follows it. ",(0,jsx_runtime.jsx)("code",{children:"image-editor"})," is the only one: it builds in the crop box, the overlay, its header and the slider. Size plays no part; an atom may be a large class and a molecule twenty lines."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"cdk"})}),(0,jsx_runtime.jsx)("td",{children:"CDK-based building blocks (e.g., table wrapper, drag-and-drop splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"layout"})}),(0,jsx_runtime.jsx)("td",{children:"Structural components that define the page grid and navigation (e.g., main layout, spinner, splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"forms"})}),(0,jsx_runtime.jsx)("td",{children:"Input elements and form validation components (inputs, checkboxes, validator directives)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsxs)("td",{children:[(0,jsx_runtime.jsx)("code",{children:"_directives"})," / ",(0,jsx_runtime.jsx)("code",{children:"_pipes"})]}),(0,jsx_runtime.jsx)("td",{children:"Utility directives and pipes for behavior modification (e.g., autofocus, intersection observer)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"transloco-modules"})}),(0,jsx_runtime.jsxs)("td",{children:["Internationalization setup (",(0,jsx_runtime.jsx)("code",{children:"TranslocoRootModule"}),") — the only remaining NgModules, imported once at application level."]})]})]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"styling-concept",children:"Styling Concept"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Every component in this library ships ",(0,jsx_runtime.jsx)(_components.strong,{children:"fully self-contained"}),": plain CSS built\nexclusively on ",(0,jsx_runtime.jsx)(_components.strong,{children:"design tokens"})," — CSS custom properties such as ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-c-*"}),"\n(colors, theme-aware), ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-spacer"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-border-radius"})," and ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-time"}),".\nThere are no hidden dependencies on any CSS framework, utility system or build\ntool: the components coexist with whatever styling setup your project uses."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Responsiveness"})," follows a single canonical breakpoint ladder with six levels\n(",(0,jsx_runtime.jsx)(_components.code,{children:"ms1"})," 340px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms2"})," 375px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms3"})," 481px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms4"})," 769px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms5"})," 1025px ·\n",(0,jsx_runtime.jsx)(_components.code,{children:"ms6"})," 1901px). The ladder deliberately exists only once and serves every layer\nfrom the same source:"]}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"CSS"}),": via named media queries (",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--ms4)"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--below-ms5)"}),")\nthat are resolved into standard queries at build time — the published package\ncontains plain, universally working CSS."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"TypeScript"}),": via the ",(0,jsx_runtime.jsx)(_components.code,{children:"UiLayoutMediaScreenService"}),", which exposes the\ncurrent level as a signal (",(0,jsx_runtime.jsx)(_components.code,{children:"mediascreen: 1..6"}),") — logic and layout are\nguaranteed to switch at the same boundaries."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"tailwind--not-required-but-offered",children:"Tailwind — not required, but offered"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The npm package ",(0,jsx_runtime.jsx)(_components.strong,{children:"does not require Tailwind"}),". Whether a project uses Tailwind\nis entirely that project's decision — the components work identically either\nway."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Projects that ",(0,jsx_runtime.jsx)(_components.strong,{children:"do want Tailwind (v4)"})," get a head start: the package ships a\nready-made theme file, ",(0,jsx_runtime.jsx)(_components.code,{children:"@mojawork/ui/styles/theme.css"}),". One import in the\napp's own Tailwind entry wires Tailwind into the library's design system:"]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-css",children:"@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n@import '@mojawork/ui/styles/theme.css';\n@source './app';\n@source '../node_modules/@mojawork/ui';\n"})}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Colors"})," mapped via ",(0,jsx_runtime.jsx)(_components.code,{children:"@theme"})," onto the runtime tokens — utilities like\n",(0,jsx_runtime.jsx)(_components.code,{children:"text-c-primary"})," automatically follow light/dark theme switching."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Breakpoints"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"ms1:"}),"–",(0,jsx_runtime.jsx)(_components.code,{children:"ms6:"})," — the same ladder the components use\ninternally."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Animation presets"})," (e.g. ",(0,jsx_runtime.jsx)(_components.code,{children:"loading"}),")."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.p,{children:"The theme carries the mapping and nothing else: no Tailwind import of its\nown, no source paths. The layer line stays in the app's file because it has\nto be the first statement there, before Tailwind declares its own layers —\nan import cannot put it in front of itself."}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["In short: ",(0,jsx_runtime.jsx)(_components.strong,{children:"shipped Tailwind-free, Tailwind-ready when wanted."})," Both paths are\nfirst-class; neither is forced."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Everything the library ships sits in the ",(0,jsx_runtime.jsx)(_components.code,{children:"ui"})," cascade layer, below Tailwind's\n",(0,jsx_runtime.jsx)(_components.code,{children:"utilities"})," — so a utility you write on a ui tag beats the component's own\ndefault, and your app's unlayered CSS beats both. One line on the Tailwind\nside makes the order explicit; see ",(0,jsx_runtime.jsx)(_components.a,{href:"?path=/docs/styling-layers--docs",children:"Styling › Layers"}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"for-contributors",children:"For contributors"}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Components in ",(0,jsx_runtime.jsx)(_components.code,{children:"src/lib"})," never use Tailwind utilities or ",(0,jsx_runtime.jsx)(_components.code,{children:"@apply"})," — plain CSS\nwith ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-*"})," tokens only; component-local classes carry a ",(0,jsx_runtime.jsx)(_components.code,{children:"_"})," prefix."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Storybook ",(0,jsx_runtime.jsx)(_components.strong,{children:"stories"})," (and the showcase components under ",(0,jsx_runtime.jsx)(_components.code,{children:".storybook/demos/"}),")\nexplicitly use Tailwind for their example layout."]}),"\n",(0,jsx_runtime.jsx)(_components.li,{children:"Breakpoints are never written as pixel literals — always via the ladder's\nnamed queries."}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"getting-started",children:"Getting Started"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["All components are standalone: import them directly from the barrel into the ",(0,jsx_runtime.jsx)(_components.code,{children:"imports"}),"\narray of your standalone component. Inside the monorepo the import path is mapped via\ntsconfig; external apps install the published npm package\n(",(0,jsx_runtime.jsx)("a",{href:"https://www.npmjs.com/package/@mojawork/ui",target:"_blank",rel:"noopener",children:"@mojawork/ui"}),")."]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-typescript",children:"import { Component } from '@angular/core';\nimport { UiInputComponent, UiCardComponent } from '@mojawork/ui';\n\n@Component({\n selector: 'app-my-feature',\n imports: [UiInputComponent, UiCardComponent],\n templateUrl: './my-feature.component.html',\n})\nexport class MyFeatureComponent {}\n"})}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"usage-principles",children:"Usage Principles"}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Principle"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Composition"}),(0,jsx_runtime.jsx)("td",{children:"Prefer composing smaller components into larger ones."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Consistency"}),(0,jsx_runtime.jsx)("td",{children:"Use the provided layouts to maintain a unified user experience across the application."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Signals & zoneless"}),(0,jsx_runtime.jsx)("td",{children:"Component state uses Angular Signals; all consumers run without Zone.js."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Translation"}),(0,jsx_runtime.jsx)("td",{children:"All text within components is managed via Transloco for easy localization."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3143],{"./libs/ui/src/lib/home/tips.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{title:"Home/Tips & Tricks"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"tips--tricks",children:"Tips & Tricks"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Things that cost someone an hour before they were written down. Each entry\nnames the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"symptom"})," — what you actually see — and links to the page that\nexplains it and shows it working."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Two rules keep this page from rotting:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"An entry only appears here once its explanation exists somewhere else. This\npage is a signpost, never the only source."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"An entry that names a condition dies with it. When the condition is gone, the\nentry goes, and so does whatever workaround it points at."}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"an-icon-shows-a-word-instead-of-a-symbol",children:"An icon shows a word instead of a symbol"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A 96px ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"hme"})," where a house belongs. Material Icons draw an unknown ligature as\nplain text rather than failing, so a typo in an icon name looks like a broken\ncomponent."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["→ ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/styling-icons--docs",children:"Styling Icons"})})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"swapping-the-icon-font-or-not-using-it-at-all",children:"Swapping the icon font, or not using it at all"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"You want different icons, or you already ship your own set and would rather not\ncarry a second one."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Both font slots are CSS variables, so the drawing can be replaced — as long as\nthe replacement font uses the same ligature names. And ignoring ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:".ui-icon"}),"\nentirely is free: an unused ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"@font-face"})," is never downloaded."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["→ ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/styling-icons--docs",children:"Styling Icons: Bringing your own icons"})})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"which-component-for-this-and-what-to-reach-for-instead",children:"Which component for this, and what to reach for instead"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"You know what you want to build and not which part of the library it is —\nor you picked one and wonder whether it was the right one."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Every component page carries two sections under its title: the truth — what\nit does, and what it does not — and, below it, the guide: what to reach for\nit for, what not, what instead, and where it runs. The whole guide, one line\nper subject, is on the overview."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["→ ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/home-guide--docs",children:"Home: Guide"})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_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)}}}]);
|
package/storybook/iframe.html
CHANGED
|
@@ -551,8 +551,8 @@
|
|
|
551
551
|
|
|
552
552
|
import './mocker-runtime-injected.js';
|
|
553
553
|
|
|
554
|
-
import './runtime~main.
|
|
554
|
+
import './runtime~main.ec39977b.iframe.bundle.js';
|
|
555
555
|
|
|
556
|
-
import './4755.
|
|
556
|
+
import './4755.0561bac5.iframe.bundle.js';
|
|
557
557
|
|
|
558
558
|
import './main.5e4e255f.iframe.bundle.js';</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3837,7683],{"./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_moja_code_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_moja_code_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/layout/main/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_moja_code_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"),_main_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/layout/main/main.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_layout_main_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-layout-main.json");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",p:"p",...(0,file_Users_moja_projects_moja_code_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:_main_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"layout-main",children:"Layout: Main"}),"\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:"UiLayoutMainComponent"})," serves as the primary structural container for the application layout. It provides a standardized grid with three main sections: header, content, and footer. This component is designed to be used only once as the root layout of the application."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:'Zoom and fullscreen state is persisted and restored on load. To avoid a visible "replay", all layout transitions are suppressed until the restored state has settled — the restored layout appears instantly, and only subsequent user actions animate.'}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Entering or leaving fullscreen collapses the header and footer bars. Chromium\nanimates them to ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max-height: 0"})," over ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-time"})," (it interpolates the\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max-content"})," keyword through ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"interpolate-size"}),"). Engines without that\nsupport toggle instantly via ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"display"})," instead — deliberately not through\nmax-height: after a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"0 → max-content"})," round trip WebKit's flex layout keeps\nthe cached 0 for good, and the bar never came back from fullscreen\n(tickets#223). The bars stay in the DOM either way; a collapsed bar measures\nheight 0, and a ResizeObserver reports the return to full height."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The bars clip their content (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"overflow: clip"}),") only while collapsed or while\nthe max-height transition runs (tracked via transition events as the\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"_-bars-animating"})," modifier). In the resting expanded state they do not clip,\nso absolutely positioned dropdowns hanging below a bar — such as the tab\nnav's second level — are rendered in full instead of being cut off."]}),"\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:["The outer shell of an application — one grid with the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[main-header]"}),",\n",(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]"})," slots, plus the zoom and fullscreen state\nthe other layout components share through ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutService"}),", persisted and\nrestored without a replay. It is used once, as the root of the layout. It lays\nout; it does not navigate, scroll or route — the nav goes into its header, a\nscrolling area into its content."]}),"\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-layout-main",entry:_guide_ui_layout_main_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__.jsxs)(_components.h3,{id:"see-the-main-story-for-a-live-demonstration",children:["See the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/layout-main--main",children:"Main Story"})," for a live demonstration."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"content-slots-ng-content",children:"Content Slots (ng-content)"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The component uses named slots to project content into specific areas of the layout."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{style:{width:"16rem"},children:"Slot Selector"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"[main-header]"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Projects content into the top header section."})]}),(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:"[main-content]"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Projects content into the central scrollable area."})]}),(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:"[main-footer]"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Projects content into the bottom footer section."})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"component-inputs",children:"Component Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{style:{width:"16rem"},children:"@Input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{style:{width:"16rem"},children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{style:{width:"16rem"},children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"cssPrefix"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"''"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Optional CSS class prefix applied to the layout for scoping."})]}),(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:"theme"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutThemeType"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'theme-light'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Sets the visual theme of the layout. Options: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'theme-light'"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'theme-dark'"}),"."]})]}),(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:"maxWidth"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutMaxWidth"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'default'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Configures the maximum width of the content area. Options: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'default'"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'max-ms4'"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'max-ms5'"}),"."]})]}),(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:"zoom"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"false"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Enables or disables layout zoom scaling."})]}),(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:"fullScreen"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"false"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"When enabled, the layout expands to fill the entire viewport."})]}),(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:"contentStyle"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutMainType"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'default'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Defines the styling variant for the main content area. Options: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'default'"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'flat'"}),"."]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h4,{id:"layout-service-uilayoutservice",children:["Layout Service (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutService"}),")"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The layout's state and dimensions are managed via the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutService"}),". The\ntable lists the methods the layout itself leans on — the service also carries\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"getTheme"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"handleFullScreen"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"handleZoom"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"handleDirection"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{style:{width:"16rem"},children:"Method"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{style:{width:"16rem"},children:"Parameter Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{style:{width:"16rem"},children:"Return Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"handleInit"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutConfigSettings"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"void"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Initializes the layout settings (theme, zoom, fullscreen) and persists them to storage."})]}),(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:"setLayoutSize"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutSizeSettings"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"void"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Updates the recorded dimensions of all layout sections (header, footer, etc.) in the service state."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"getMainClass"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"-"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Returns the computed CSS classes based on current zoom and fullscreen states."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"getLayoutSize"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"-"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutSizeSettings | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Retrieves the current calculated sizes of the layout elements, or ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})," before the first measurement."]})]}),(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:"handleTheme"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutThemeType"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutThemeType"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Toggles or sets the application theme and updates storage."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_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/layout/main/main.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Main:()=>Main,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_config_ui_config_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/src/config/ui-config.types.ts"),_main_component__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/src/lib/layout/main/main.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Layout/Main",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({providers:[],declarations:[],imports:[_main_component__WEBPACK_IMPORTED_MODULE_2__.z]})]},Main={render:args=>({props:{...args,prefix:_config_ui_config_types__WEBPACK_IMPORTED_MODULE_1__.Q},template:'\n <ui-layout-main [cssPrefix]="prefix">\n <div main-header><span class="p-4">header</span></div>\n <div main-content><span class="p-4">main</span></div>\n <div main-footer><span class="p-4">footer</span></div>\n </ui-layout-main>\n '})},__namedExportsOrder=["Main"];Main.parameters={...Main.parameters,docs:{...Main.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args,\n prefix: uiConfigStorybookCssPrefix\n },\n template: `\n <ui-layout-main [cssPrefix]="prefix">\n <div main-header><span class="p-4">header</span></div>\n <div main-content><span class="p-4">main</span></div>\n <div main-footer><span class="p-4">footer</span></div>\n </ui-layout-main>\n `\n };\n }\n}',...Main.parameters?.docs?.source}}}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see layout-media-screen-docs-mdx.c382b73b.iframe.bundle.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3151,3651],{"./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{br:()=>toObservable,ot:()=>toSignal,pQ:()=>takeUntilDestroyed});var rxjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Observable.js"),rxjs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/ReplaySubject.js"),rxjs_operators__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js"),_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs");function takeUntilDestroyed(destroyRef){destroyRef||(ngDevMode&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.Af3)(takeUntilDestroyed),destroyRef=(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.WQX)(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz));const destroyed$=new rxjs__WEBPACK_IMPORTED_MODULE_0__.c(subscriber=>{if(destroyRef.destroyed)return void subscriber.next();return destroyRef.onDestroy(subscriber.next.bind(subscriber))});return source=>source.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.Q)(destroyed$))}function toObservable(source,options){ngDevMode&&!options?.injector&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.Af3)(toObservable);const injector=options?.injector??(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.WQX)(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.zZn),subject=new rxjs__WEBPACK_IMPORTED_MODULE_1__.m(1),watcher=(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.QZP)(()=>{let value;try{value=source()}catch(err){return void(0,_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__.O8)(()=>subject.error(err))}(0,_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__.O8)(()=>subject.next(value))},{injector,manualCleanup:!0});return injector.get(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz).onDestroy(()=>{watcher.destroy(),subject.complete()}),subject.asObservable()}function toSignal(source,options){"undefined"!=typeof ngDevMode&&ngDevMode&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.tdH)(toSignal,"Invoking `toSignal` causes new subscriptions every time. Consider moving `toSignal` outside of the reactive context and read the signal value where needed.");const requiresCleanup=!options?.manualCleanup;ngDevMode&&requiresCleanup&&!options?.injector&&(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.Af3)(toSignal);const cleanupRef=requiresCleanup?options?.injector?.get(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz)??(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.WQX)(_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.abz):null,equal=function makeToSignalEqual(userEquality=Object.is){return(a,b)=>1===a.kind&&1===b.kind&&userEquality(a.value,b.value)}(options?.equal);let state,destroyUnregisterFn;state=options?.requireSync?(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.vPA)({kind:0},{equal,...ngDevMode?createDebugNameObject(options?.debugName,"state"):void 0}):(0,_effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.vPA)({kind:1,value:options?.initialValue},{equal,...ngDevMode?createDebugNameObject(options?.debugName,"state"):void 0});const sub=source.subscribe({next:value=>state.set({kind:1,value}),error:error=>{state.set({kind:2,error}),destroyUnregisterFn?.()},complete:()=>{destroyUnregisterFn?.()}});if(options?.requireSync&&0===state().kind)throw new _effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.buA(601,("undefined"==typeof ngDevMode||ngDevMode)&&"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.");return destroyUnregisterFn=cleanupRef?.onDestroy(sub.unsubscribe.bind(sub)),(0,_resource_chunk_mjs__WEBPACK_IMPORTED_MODULE_4__.EW)(()=>{const current=state();switch(current.kind){case 1:return current.value;case 2:throw current.error;case 0:throw new _effect_chunk2_mjs__WEBPACK_IMPORTED_MODULE_3__.buA(601,("undefined"==typeof ngDevMode||ngDevMode)&&"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.")}},{equal:options?.equal,...ngDevMode?createDebugNameObject(options?.debugName,"source"):void 0})}function createDebugNameObject(toSignalDebugName,internalSignalDebugName){return{debugName:`toSignal${toSignalDebugName?"#"+toSignalDebugName:""}.${internalSignalDebugName}`}}},"./libs/ui/src/config/ui-config.types.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>uiConfigStorybookCssPrefix,y:()=>uiConfigTypes});const uiConfigStorybookCssPrefix="ui-storybook ",uiConfigTypes={mainID:"ui-main",mainClass:"ui-main",storeName:"ui-layout"}},"./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]}},"./node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>fromEvent});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),_Observable__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Observable.js"),_operators_mergeMap__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js"),_util_isArrayLike__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js"),_util_isFunction__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/isFunction.js"),_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js"),nodeEventEmitterMethods=["addListener","removeListener"],eventTargetMethods=["addEventListener","removeEventListener"],jqueryMethods=["on","off"];function fromEvent(target,eventName,options,resultSelector){if((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.T)(options)&&(resultSelector=options,options=void 0),resultSelector)return fromEvent(target,eventName,options).pipe((0,_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__.I)(resultSelector));var _a=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.zs)(function isEventTarget(target){return(0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.T)(target.addEventListener)&&(0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.T)(target.removeEventListener)}(target)?eventTargetMethods.map(function(methodName){return function(handler){return target[methodName](eventName,handler,options)}}):function isNodeStyleEventEmitter(target){return(0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.T)(target.addListener)&&(0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.T)(target.removeListener)}(target)?nodeEventEmitterMethods.map(toCommonHandlerRegistry(target,eventName)):function isJQueryStyleEventEmitter(target){return(0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.T)(target.on)&&(0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.T)(target.off)}(target)?jqueryMethods.map(toCommonHandlerRegistry(target,eventName)):[],2),add=_a[0],remove=_a[1];if(!add&&(0,_util_isArrayLike__WEBPACK_IMPORTED_MODULE_4__.X)(target))return(0,_operators_mergeMap__WEBPACK_IMPORTED_MODULE_3__.Z)(function(subTarget){return fromEvent(subTarget,eventName,options)})((0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__.Tg)(target));if(!add)throw new TypeError("Invalid event target");return new _Observable__WEBPACK_IMPORTED_MODULE_2__.c(function(subscriber){var handler=function(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];return subscriber.next(1<args.length?args:args[0])};return add(handler),function(){return remove(handler)}})}function toCommonHandlerRegistry(target,eventName){return function(methodName){return function(handler){return target[methodName](eventName,handler)}}}},"./node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>takeUntil});var _util_lift__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/lift.js"),_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js"),_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js"),_util_noop__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/noop.js");function takeUntil(notifier){return(0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.N)(function(source,subscriber){(0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__.Tg)(notifier).subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__._)(subscriber,function(){return subscriber.complete()},_util_noop__WEBPACK_IMPORTED_MODULE_3__.l)),!subscriber.closed&&source.subscribe(subscriber)})}},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_moja_code_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_moja_code_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/layout/media-screen/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_moja_code_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"),_media_screen_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/layout/media-screen/media-screen.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_layout_media_screen_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-layout-media-screen.json");function _createMdxContent(props){const _components={code:"code",h3:"h3",h4:"h4",h5:"h5",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_moja_code_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:_media_screen_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"layout-media-screen",children:"Layout: Media Screen"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"This component is a bit of a special tool in our shed."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A silent bridge from CSS to TypeScript: it reads the current breakpoint and\norientation off its own ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"::after"})," pseudo-element and hands them to\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutMediaScreenService"}),", so components ask the service instead of\nmeasuring the window. Placed once in the app shell, invisible unless ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"debug"}),"\nis set. It shows nothing and styles nothing — it only reports, and the ladder it\nreports is the library's, not one written in the app."]}),"\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-layout-media-screen",entry:_guide_ui_layout_media_screen_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.p,{children:'It\'s a "silent helper" that bridges the gap between CSS media queries and our JavaScript/Angular logic.\nInstead of reinventing the wheel with window resize listeners everywhere, we let CSS do the heavy lifting of breakpoint detection.'}),"\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:"How it works"}),": The component reads the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"content"})," property of its own ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:":after"})," pseudo-element via CSS."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"The bridge"}),": It passes these values directly to the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutMediaScreenService"}),"."]}),"\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:"Global usage"}),": You usually just throw this into your ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"app.html"})," once and forget about it. It doesn't need to be seen (unless you want to debug)."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_media_screen_component_stories__WEBPACK_IMPORTED_MODULE_4__.MediaScreen}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"inputs",children:"Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"@Input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tbody",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"debug"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["If true, it adds a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"._-debug"})," class to the element, making it visible for\ntroubleshooting."]})})]})})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"service-uilayoutmediascreenservice",children:"Service: UiLayoutMediaScreenService"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"This is where the magic happens. Other components can subscribe to the screen settings here."}),"\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:"Method"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Return Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"getSettings()"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Observable<UiLayoutMediaScreenServiceSettings>"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Returns an Observable that updates whenever the screen size or\norientation changes."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"getSettingsSignal()"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Signal<UiLayoutMediaScreenServiceSettings>"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Returns a Signal providing the current screen settings. This is the\npreferred way for modern Angular versions."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"setSettings(pseudoAfterContent: string)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"void"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Internally used by the component to update the current state."})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h5,{id:"data-structure-uilayoutmediascreenservicesettings",children:"Data Structure (UiLayoutMediaScreenServiceSettings)"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The service provides an object with these properties:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Property"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"mediascreen"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The current breakpoint value parsed from CSS."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"orientation"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'portrait' | 'landscape' | null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The current screen orientation."})]})]})]}),"\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:"implementation-example",children:"Implementation Example"}),"\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:"Just put it in your root component:"})}),"\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-media-screen></ui-layout-media-screen>\n"})}),"\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:"If you need to see what's going on while building:"})}),"\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-media-screen debug></ui-layout-media-screen>\n"})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_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/layout/media-screen/media-screen.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{MediaScreen:()=>MediaScreen,__namedExportsOrder:()=>__namedExportsOrder,default:()=>media_screen_component_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),ui_config_types=__webpack_require__("./libs/ui/src/config/ui-config.types.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var media_screen_componentngResource=__webpack_require__("./libs/ui/src/lib/layout/media-screen/media-screen.component.css?ngResource"),media_screen_componentngResource_default=__webpack_require__.n(media_screen_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"),_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"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),fromEvent=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js");let UiLayoutMediaScreenService=class UiLayoutMediaScreenService{settings=(0,_effect_chunk2.vPA)({mediascreen:null,orientation:null});getSettings(){return(0,rxjs_interop.br)(this.settings)}getSettingsSignal(){return this.settings.asReadonly()}setSettings(pseudoAfterContent){const match=pseudoAfterContent.match(/ms-(\d+)-(portrait|landscape)/);this.settings.set({mediascreen:match?Number(match[1]):null,orientation:match?match[2]:null})}};UiLayoutMediaScreenService=(0,tslib_es6.Cg)([(0,_debug_node_chunk._qm)({providedIn:"root"})],UiLayoutMediaScreenService);let UiLayoutMediaScreenComponent=class UiLayoutMediaScreenComponent{debug=(0,core.input)(!1,{transform:core.booleanAttribute});element=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);service=(0,_effect_chunk2.WQX)(UiLayoutMediaScreenService);settings=(0,rxjs_interop.ot)(this.service.getSettings());resizeSignal=(0,rxjs_interop.ot)((0,fromEvent.R)(window,"resize"));constructor(){(0,_effect_chunk2.QZP)(()=>{this.resizeSignal(),this.service.setSettings(this.getPseudoAfterContent())}),(0,_effect_chunk2.QZP)(()=>{this.element.nativeElement.setAttribute("class",this.debug()?"_-debug":"")})}ngAfterViewInit(){this.service.setSettings(this.getPseudoAfterContent())}getPseudoAfterContent(){return String(window.getComputedStyle(this.element.nativeElement,":after").content).replace(/'/g,"")??"error"}static ctorParameters=()=>[];static propDecorators={debug:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"debug",required:!1,transform:void 0}]}]}};UiLayoutMediaScreenComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-layout-media-screen, ui-media-screen",template:'@if (debug()) {\n <div>{{ settings() | json }}</div>\n}\n<div id="ui-media-screen"></div>\n',encapsulation:_debug_node_chunk.gXe.None,imports:[_common_module_chunk.TG],styles:[media_screen_componentngResource_default()]}),(0,tslib_es6.Sn)("design:paramtypes",[])],UiLayoutMediaScreenComponent);const media_screen_component_stories={title:"Layout/Media Screen",decorators:[(0,dist.Iz)({providers:[],declarations:[],imports:[UiLayoutMediaScreenComponent]})]},MediaScreen={parameters:{docs:{canvas:{sourceState:"none"}}},render:args=>({props:{...args,prefix:ui_config_types.Q},template:'\n <section class="relative flex flex-col h-48">\n <ui-layout-media-screen debug></ui-layout-media-screen>\n </section>\n '})},__namedExportsOrder=["MediaScreen"];MediaScreen.parameters={...MediaScreen.parameters,docs:{...MediaScreen.parameters?.docs,source:{originalSource:"{\n parameters: {\n docs: {\n canvas: {\n sourceState: 'none'\n }\n }\n },\n render: args => {\n return {\n props: {\n ...args,\n prefix: uiConfigStorybookCssPrefix\n },\n template: `\n <section class=\"relative flex flex-col h-48\">\n <ui-layout-media-screen debug></ui-layout-media-screen>\n </section>\n `\n };\n }\n}",...MediaScreen.parameters?.docs?.source}}}},"./libs/ui/src/lib/layout/media-screen/media-screen.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-media-screen,\nui-media-screen {\n position: fixed;\n display: none;\n bottom: 1rem;\n right: 1rem;\n z-index: 1000000000;\n padding: calc(var(--ui-spacer) * 0.25);\n background-color: var(--ui-c-primary);\n border: 1px solid var(--ui-c-default);\n &._-debug {\n display: flex;\n gap: calc(var(--ui-spacer) * 0.5);\n }\n\n /* --- mediascreen 01 --- */\n @media (max-width: 374px) {\n &::after {\n content: 'ms-1-portrait';\n }\n }\n @media (max-width: 374px) and (orientation: landscape) {\n &::after {\n content: 'ms-1-landscape';\n }\n }\n\n /* --- mediascreen 02 --- */\n @media (min-width: 375px) and (max-width: 480px) {\n &::after {\n content: 'ms-2-portrait';\n }\n }\n @media (min-width: 375px) and (max-width: 480px) and (orientation: landscape) {\n &::after {\n content: 'ms-2-landscape';\n }\n }\n\n /* --- mediascreen 03 --- */\n @media (min-width: 481px) and (max-width: 768px) {\n &::after {\n content: 'ms-3-portrait';\n }\n }\n @media (min-width: 481px) and (max-width: 768px) and (orientation: landscape) {\n &::after {\n content: 'ms-3-landscape';\n }\n }\n\n /* --- mediascreen 04 --- */\n @media (min-width: 769px) and (max-width: 1024px) {\n &::after {\n content: 'ms-4-portrait';\n }\n }\n @media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {\n &::after {\n content: 'ms-4-landscape';\n }\n }\n\n /* --- mediascreen 05 --- */\n @media (min-width: 1025px) and (max-width: 1900px) {\n &::after {\n content: 'ms-5-portrait';\n }\n }\n @media (min-width: 1025px) and (max-width: 1900px) and (orientation: landscape) {\n &::after {\n content: 'ms-5-landscape';\n }\n }\n\n /* --- mediascreen 06 --- */\n @media (min-width: 1901px) {\n &::after {\n content: 'ms-6-portrait';\n }\n }\n @media (min-width: 1901px) and (orientation: landscape) {\n &::after {\n content: 'ms-6-landscape';\n }\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[9475,9653],{"./libs/ui/.storybook/demos/header/header.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>UiInternHeaderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var header_componentngResource=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.css?ngResource"),header_componentngResource_default=__webpack_require__.n(header_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ui_config_types=__webpack_require__("./libs/ui/src/config/ui-config.types.ts"),layout_service=__webpack_require__("./libs/ui/src/lib/layout/_service/layout.service.ts");let UiInternHeaderComponent=class UiInternHeaderComponent{layoutService=(0,_effect_chunk2.WQX)(layout_service.u);theme=(0,core.input)(null);display=(0,core.input)(!1,{transform:core.booleanAttribute});onTop=(0,core.input)(!1,{transform:core.booleanAttribute});ngOnInit(){this.layoutService.handleTheme(this.theme(),ui_config_types.Q)}ngOnDestroy(){this.layoutService.handleTheme("theme-light",ui_config_types.Q)}setTheme(){this.layoutService.handleTheme(null,ui_config_types.Q)}static propDecorators={theme:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"theme",required:!1,transform:void 0}]}],display:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"display",required:!1,transform:void 0}]}],onTop:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"onTop",required:!1,transform:void 0}]}]}};UiInternHeaderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-intern-header",template:'@if (display()) {\n <button class="ui" [class._on-top]="onTop()" (click)="setTheme()">\n switch Theme\n </button>\n}\n',encapsulation:_debug_node_chunk.gXe.Emulated,standalone:!0,imports:[_common_module_chunk.MD],styles:[header_componentngResource_default()]})],UiInternHeaderComponent)},"./libs/ui/src/config/ui-config.types.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>uiConfigStorybookCssPrefix,y:()=>uiConfigTypes});const uiConfigStorybookCssPrefix="ui-storybook ",uiConfigTypes={mainID:"ui-main",mainClass:"ui-main",storeName:"ui-layout"}},"./libs/ui/src/lib/layout/_service/layout.service.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>UiLayoutService});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@ngx-pwa/local-storage/fesm2022/ngx-pwa-local-storage.mjs"),_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/config/ui-config.types.ts");let UiLayoutService=class UiLayoutService{storage=(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.WQX)(_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__.AX);settings={cssPrefix:"",theme:null,zoom:null,fullscreen:null,direction:"center",layoutSize:null};setStorage(){this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}handleInit(config){this.settings.cssPrefix=config.cssPrefix,this.settings.theme=config.theme,this.settings.zoom=config.zoom?"zoom":"x-zoom",this.settings.fullscreen=config.fullscreen?"fullscreen":"x-fullscreen",this.handleFullScreen(this.settings.fullscreen),this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data),this.setStorage(),this.setTheme(null)})}setTheme(theme){document.body.className=theme?`${this.settings.cssPrefix} ${theme}`:`${this.settings.cssPrefix} ${this.settings.theme}`}getTheme(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.theme}getMainClass(){return`${_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.mainClass} ${this.settings.zoom} ${this.settings.fullscreen}`}handleFullScreen(init){init?this.settings.fullscreen=init:"fullscreen"===this.settings.fullscreen?this.settings.fullscreen="x-fullscreen":this.settings.fullscreen="fullscreen",this.setStorage()}handleZoom(init){init?this.settings.zoom=init:"zoom"===this.settings.zoom?this.settings.zoom="x-zoom":this.settings.zoom="zoom",this.setStorage()}handleTheme(theme,prefix){return prefix&&(this.settings.cssPrefix=prefix),theme?(this.setTheme(theme),this.settings.theme=theme):(this.settings.theme="theme-light"===this.settings.theme?"theme-dark":"theme-light",this.setTheme(null)),this.setStorage(),this.settings.theme}handleDirection(type){this.settings.direction=type,this.setStorage()}setLayoutSize(sizes){this.settings.layoutSize=sizes,this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}getLayoutSize(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.layoutSize}};UiLayoutService=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_1__._qm)({providedIn:"root"})],UiLayoutService)},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_moja_code_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_moja_code_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/layout/nav/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_moja_code_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"),_nav_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/layout/nav/nav.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_layout_nav_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-layout-nav.json");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_moja_code_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:_nav_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"layout-nav",children:"Layout: Nav"}),"\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-layout-nav"})," component provides a navigation bar that can be styled as a tab or an app bar."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Note:"})," The component should only be used once within a layout."]}),"\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 navigation bar in two themes — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tab"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"app"}),", the latter with a home\nbutton — fed from ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutNavService"})," or, in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"debug"})," mode, from the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"navList"}),"\ninput. It is used once per layout and renders the list it is given, nested\nlevels included, marking the active route from the router. It does not decide\nwhat the list contains or where a link leads."]}),"\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-layout-nav",entry:_guide_ui_layout_nav_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.p,{children:"Default theme for navigation tabs:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"example-tab-theme",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/layout-nav--template-tab",children:"Example: Tab Theme"})}),"\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:"Navigation theme suitable for application headers, including a home button."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"example-app-theme",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/layout-nav--template-app",children:"Example: App Theme"})}),"\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:"configuration",children:"Configuration"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The component can be controlled via service or component inputs."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"inputs",children:"Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"@Input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"navList"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutNavListItemType[] | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Array of navigation items to display."})]}),(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:"theme"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutNavThemeType"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'tab'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Theme of the navigation (e.g., ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'tab'"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'app'"}),")."]})]}),(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:"homeButton"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"false"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Whether to show the home button (app theme)."})]}),(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:"debug"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"false"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Enables debug mode for visual adjustments."})]}),(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:"defaultRoute"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Default route for navigation."})]})]})]}),"\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:"css-classes",children:"CSS Classes"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-nav"}),": Base class for the navigation container."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-nav-item"}),": Class for individual navigation items."]}),"\n"]}),"\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:"Encapsulation:"})," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ViewEncapsulation.None"})]}),"\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:"internal-dependencies",children:"Internal Dependencies"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The component utilizes:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"Router"})," (injected for navigation handling)"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutNavItemComponent"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiLayoutNavService"})}),"\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:"nav-item-details",children:"Nav Item Details"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Individual navigation items support several properties."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"inputs-1",children:"Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"@Input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"link"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"false"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Renders the item as a router link."})]}),(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:"icon"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"false"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Whether to show an icon."})]}),(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:"subNav"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Base path for sub-navigation."})]}),(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:"item"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UILayoutNavItemType | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The navigation item data."})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h4,{id:"item-data-uilayoutnavitemtype",children:["Item data (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UILayoutNavItemType"}),")"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Besides ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"label"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"route"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"title"})," and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"icon"}),", an item may carry an optional ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"fragment"}),": it is\nbound to the router link's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"fragment"})," input, producing an anchor\nlike ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"/route#fragment"}),". Use it for in-page anchor targets — the\nconsuming app is responsible for scrolling to the fragment after navigation."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Active-state tracking is fragment-aware: the URL fragment never leaks into the\nroute matching (so the parent stays active on ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"/route#fragment"})," and\nits sub-nav stays open), and a sub-item with a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"fragment"})," is marked\nactive when its parent route and the URL fragment both match. Same-page anchor\nsub-items use an empty ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"route"}),"; the item then targets the sub-nav\nparent itself."]}),"\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:"Scroll-spy hook:"})," a host app can feed the reading position via\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiLayoutNavService.setActiveFragment(fragment | null)"})," — matching\nanchor sub-items are highlighted without any router navigation (the URL stays\nthe user's intent; a NavigationEnd overrides the state with the real\nfragment). ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})," clears the highlight."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Property"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("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:"fragment"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | undefined"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Optional URL fragment appended to the route (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"route#fragment"}),")."]})]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_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/layout/nav/nav.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{TemplateApp:()=>TemplateApp,TemplateTab:()=>TemplateTab,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),_nav_component__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/src/lib/layout/nav/nav.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Layout/Nav",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.Iz)({providers:[],imports:[_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_1__.b,_nav_component__WEBPACK_IMPORTED_MODULE_2__.L]})]},Mock=[{label:"link01",route:"link01",title:"link01",icon:null},{label:"link02",route:"link02",title:"link02",icon:null,subNav:[{label:"link01",route:"link01",title:"link02",icon:null}]},{label:"link03",route:"link03",title:"link03",active:!0,subNav:[{label:"the good link",route:"the-good-link",title:"the good link",icon:null,active:!0},{label:"the bad link",route:"the-bad-link",title:"the bad link",icon:null},{label:"typography",route:"typography",title:"typography",icon:null},{label:"jumping jelly",route:"jumping-jelly",title:"jumping jelly",icon:null},{label:"the anchor link",route:"the-good-link",fragment:"ankersection",title:"the anchor link",icon:null}]}],TemplateTab={render:args=>({props:{...args,mock:Mock},template:'\n <ui-intern-header [display]="true" [onTop]="true" theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-layout-nav [debug]="true" [theme]="\'tab\'" [navList]="mock"></ui-layout-nav>\n </section>\n '})},TemplateApp={render:args=>({props:{...args,mock:Mock},template:'\n <ui-intern-header [display]="true" [onTop]="true" theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-layout-nav [debug]="true" [theme]="\'app\'" [homeButton]="true" [navList]="mock"></ui-layout-nav>\n </section>\n '})},__namedExportsOrder=["TemplateTab","TemplateApp"];TemplateTab.parameters={...TemplateTab.parameters,docs:{...TemplateTab.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args,\n mock: Mock\n },\n template: `\n <ui-intern-header [display]="true" [onTop]="true" theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-layout-nav [debug]="true" [theme]="\'tab\'" [navList]="mock"></ui-layout-nav>\n </section>\n `\n };\n }\n}',...TemplateTab.parameters?.docs?.source}}},TemplateApp.parameters={...TemplateApp.parameters,docs:{...TemplateApp.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args,\n mock: Mock\n },\n template: `\n <ui-intern-header [display]="true" [onTop]="true" theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-layout-nav [debug]="true" [theme]="\'app\'" [homeButton]="true" [navList]="mock"></ui-layout-nav>\n </section>\n `\n };\n }\n}',...TemplateApp.parameters?.docs?.source}}}},"./libs/ui/.storybook/demos/header/header.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"/* The intern header is reduced to just the theme switch button, pinned to the */\n/* bottom-left corner of the Storybook canvas. */\nbutton {\n position: fixed;\n bottom: calc(var(--ui-spacer) * 0.5);\n left: calc(var(--ui-spacer) * 0.5);\n z-index: 1000;\n\n &._on-top {\n z-index: 10000;\n }\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|