@mojawork/ui-docs 2.8.1 → 2.8.3
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 +6 -6
- package/catalog/layout/spinner.md +11 -2
- package/catalog/manifest.json +4 -4
- 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.574c843f.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.9b160561.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.d4e5afec.iframe.bundle.js +1 -0
- package/storybook/layout-spinner-spinner-component-stories.6b27a0bf.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.805054f3.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-spinner-spinner-component-stories.69ae1389.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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[6020,7363],{"./node_modules/css-loader/dist/runtime/api.js"(module){"use strict";module.exports=function(cssWithMappingToString){var list=[];return list.toString=function toString(){return this.map(function(item){var content="",needLayer=void 0!==item[5];return item[4]&&(content+="@supports (".concat(item[4],") {")),item[2]&&(content+="@media ".concat(item[2]," {")),needLayer&&(content+="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {")),content+=cssWithMappingToString(item),needLayer&&(content+="}"),item[2]&&(content+="}"),item[4]&&(content+="}"),content}).join("")},list.i=function i(modules,media,dedupe,supports,layer){"string"==typeof modules&&(modules=[[null,modules,void 0]]);var alreadyImportedModules={};if(dedupe)for(var k=0;k<this.length;k++){var id=this[k][0];null!=id&&(alreadyImportedModules[id]=!0)}for(var _k=0;_k<modules.length;_k++){var item=[].concat(modules[_k]);dedupe&&alreadyImportedModules[item[0]]||(void 0!==layer&&(void 0===item[5]||(item[1]="@layer".concat(item[5].length>0?" ".concat(item[5]):""," {").concat(item[1],"}")),item[5]=layer),media&&(item[2]?(item[1]="@media ".concat(item[2]," {").concat(item[1],"}"),item[2]=media):item[2]=media),supports&&(item[4]?(item[1]="@supports (".concat(item[4],") {").concat(item[1],"}"),item[4]=supports):item[4]="".concat(supports)),list.push(item))}},list}},"./node_modules/css-loader/dist/runtime/noSourceMaps.js"(module){"use strict";module.exports=function(i){return i[1]}},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/chip/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_chip_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/chip/chip.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_chip_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-chip.json");function _createMdxContent(props){const _components={code:"code",h3:"h3",h4:"h4",hr:"hr",p:"p",strong:"strong",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_chip_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"chip",children:"Chip"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A small label that reports what is done to it."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"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:["It shows the text it is given and emits — a set filter, a chosen genre, a tag\non a record. What a press MEANS is the consumer's answer: the chip does not\nselect itself, does not mark itself active, and above all ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"does not remove\nitself"}),". It says the cross was pressed; taking it out of the list is the job\nof whoever holds the list."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"That is the whole component. It has no active state, no group, no selection\nmodel and no keyboard walk across a row — a set of chips that behave as one\nchoice is a different thing, and it is not this one."}),"\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-chip",entry:_guide_ui_chip_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"two-buttons-never-nested",children:"Two buttons, never nested"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The label is one button and the remove cross is another, side by side inside\nthe chip's frame. This is the one decision worth knowing about, because from\nthe outside it looks like a single control."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A clickable chip containing a clickable cross would be a button inside a\nbutton. With the mouse you would have to hit pixels; with the keyboard you\nland on two targets of which one swallows the other, and the outer one fires\nwhen the inner one is pressed. As siblings both are reachable, in order, and\nno ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"stopPropagation"})," is needed anywhere — the cross simply is not inside the\nthing it would otherwise trigger."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"It also means focus is drawn on the control that has it, not around the whole\nchip: two stops must look like two stops."}),"\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:"default",children:"Default"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_chip_component_stories__WEBPACK_IMPORTED_MODULE_4__.Default}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"with-and-without-the-cross",children:"With and without the cross"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"removable"})," decides whether the chip can be thrown away. Nothing else changes\nwith it — the same component, one control more."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_chip_component_stories__WEBPACK_IMPORTED_MODULE_4__.Removable}),"\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:"a-row-of-them",children:"A row of them"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["How a filter bar collects itself. The chips are a plain list because they do\nnot remove themselves: the parent drops the entry when ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"chipRemove"})," says so,\nand the row re-renders."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_chip_component_stories__WEBPACK_IMPORTED_MODULE_4__.ARow}),"\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:"a-long-label",children:"A long label"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A label longer than the room it has shortens rather than pushing the row\napart, and the cross keeps its place at the end — so a row of chips holds one\nflight line whatever their labels do."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_chip_component_stories__WEBPACK_IMPORTED_MODULE_4__.LongLabel}),"\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:"colours",children:"Colours"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Custom properties, not inputs: set them on the tag, or once on a container so\na whole row follows. Every one falls back to a library token, so an unset chip\nis a chip in the house colours."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"variable"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"fallback"})]}),(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)(_components.code,{children:"--ui-chip-bg"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"var(--ui-c-fourthly)"})})]}),(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)(_components.code,{children:"--ui-chip-text"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"var(--ui-c-default)"})})]}),(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)(_components.code,{children:"--ui-chip-hover"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"the text colour at 10%"})]}),(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)(_components.code,{children:"--ui-chip-radius"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"999px"})," — a pill; set the library radius for a square one"]})]}),(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)(_components.code,{children:"--ui-chip-icon-size"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"1.6rem"})})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_chip_component_stories__WEBPACK_IMPORTED_MODULE_4__.Colours}),"\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:"arguments-props",children:"Arguments (Props)"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"inputs",children:"Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"removable"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"false"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Whether the remove cross is offered."})]}),(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)(_components.code,{children:"removeLabel"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:'What a screen reader is told the cross does. It carries no text of its\nown, and "close" says nothing about which chip — the sentence belongs to\nthe consumer, who knows both the word and the language.'})})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"outputs",children:"Outputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Payload"}),(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)(_components.code,{children:"chipClick"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"void"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The label was pressed."})]}),(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)(_components.code,{children:"chipRemove"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"void"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The cross was pressed. The chip stays; removing it is the parent's."})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"content",children:"Content"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The label is projected: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<ui-chip>Genre</ui-chip>"}),". Whatever a chip is a chip\nof goes inside — a word, a number, an icon beside a word."]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/chip/chip.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ARow:()=>ARow,Colours:()=>Colours,Default:()=>Default,LongLabel:()=>LongLabel,Removable:()=>Removable,__namedExportsOrder:()=>__namedExportsOrder,default:()=>chip_component_stories});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var chip_componentngResource=__webpack_require__("./libs/ui/src/lib/forms/chip/chip.component.css?ngResource"),chip_componentngResource_default=__webpack_require__.n(chip_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs");let UiChipComponent=class UiChipComponent{removable=(0,core.input)(!1);removeLabel=(0,core.input)(null);chipClick=(0,core.output)();chipRemove=(0,core.output)();static propDecorators={removable:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"removable",required:!1,transform:void 0}]}],removeLabel:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"removeLabel",required:!1,transform:void 0}]}],chipClick:[{type:_debug_node_chunk.k7i,args:["chipClick"]}],chipRemove:[{type:_debug_node_chunk.k7i,args:["chipRemove"]}]}};UiChipComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-chip",template:'\x3c!-- Two buttons as SIBLINGS, not one inside the other: see the class comment.\n The label projects its content, so a chip carries whatever it is a chip\n of — a word, a number, an icon beside a word. --\x3e\n<button class="_label" type="button" (click)="chipClick.emit()">\n <ng-content />\n</button>\n@if (removable()) {\n <button\n class="_remove"\n type="button"\n [attr.aria-label]="removeLabel()"\n (click)="chipRemove.emit()"\n >\n <span class="ui-icon" aria-hidden="true">close</span>\n </button>\n}\n',encapsulation:_debug_node_chunk.gXe.None,styles:[chip_componentngResource_default()]})],UiChipComponent);const chip_component_stories={title:"Forms/Chip",component:UiChipComponent,argTypes:{removeLabel:{control:{type:"select"},options:[null,"Remove"]}}},Default={args:{removable:!0,removeLabel:"Remove"},render:args=>({props:{...args},template:'\n <ui-chip\n [removable]="removable"\n [removeLabel]="removeLabel"\n (chipClick)="chipClick()"\n (chipRemove)="chipRemove()"\n >Label</ui-chip>\n '})},Removable={parameters:{controls:{disable:!0}},render:()=>({template:'\n <div class="flex flex-wrap items-center gap-4">\n <ui-chip>Plain</ui-chip>\n <ui-chip [removable]="true" removeLabel="Remove">Removable</ui-chip>\n </div>\n '})},ARow={parameters:{controls:{disable:!0}},render:()=>({template:'\n <div class="flex flex-wrap items-center gap-4">\n <ui-chip [removable]="true" removeLabel="Remove">Genre</ui-chip>\n <ui-chip [removable]="true" removeLabel="Remove">Year</ui-chip>\n <ui-chip [removable]="true" removeLabel="Remove">Publisher</ui-chip>\n </div>\n '})},LongLabel={parameters:{controls:{disable:!0}},render:()=>({template:'\n <div class="w-64">\n <ui-chip [removable]="true" removeLabel="Remove"\n >A label longer than the room it is given</ui-chip\n >\n </div>\n '})},Colours={parameters:{controls:{disable:!0}},render:()=>({template:'\n <div class="flex flex-wrap items-center gap-4">\n <ui-chip [removable]="true" removeLabel="Remove">Default</ui-chip>\n <ui-chip\n [removable]="true"\n removeLabel="Remove"\n style="--ui-chip-bg: var(--ui-c-focus); --ui-chip-text: var(--ui-c-static)"\n >Accent</ui-chip\n >\n <ui-chip style="--ui-chip-radius: var(--ui-border-radius)">Square</ui-chip>\n <ui-chip\n [removable]="true"\n removeLabel="Remove"\n style="--ui-chip-radius: var(--ui-border-radius)"\n >Square</ui-chip\n >\n </div>\n '})},__namedExportsOrder=["Default","Removable","ARow","LongLabel","Colours"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'{\n args: {\n removable: true,\n removeLabel: \'Remove\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-chip\n [removable]="removable"\n [removeLabel]="removeLabel"\n (chipClick)="chipClick()"\n (chipRemove)="chipRemove()"\n >Label</ui-chip>\n `\n })\n}',...Default.parameters?.docs?.source},description:{story:"Everything it can: the label, the cross, and both events. Storybook's own\nActions panel logs them — the component emits, and what a press means is\nthe consumer's answer, which is exactly what this story shows by having no\nanswer of its own.",...Default.parameters?.docs?.description}}},Removable.parameters={...Removable.parameters,docs:{...Removable.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n template: `\n <div class="flex flex-wrap items-center gap-4">\n <ui-chip>Plain</ui-chip>\n <ui-chip [removable]="true" removeLabel="Remove">Removable</ui-chip>\n </div>\n `\n })\n}',...Removable.parameters?.docs?.source},description:{story:"With and without the cross. The same component either way — the input says\nwhether the chip can be thrown away, and nothing else changes.",...Removable.parameters?.docs?.description}}},ARow.parameters={...ARow.parameters,docs:{...ARow.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n template: `\n <div class="flex flex-wrap items-center gap-4">\n <ui-chip [removable]="true" removeLabel="Remove">Genre</ui-chip>\n <ui-chip [removable]="true" removeLabel="Remove">Year</ui-chip>\n <ui-chip [removable]="true" removeLabel="Remove">Publisher</ui-chip>\n </div>\n `\n })\n}',...ARow.parameters?.docs?.source},description:{story:"A row of them, as a filter bar collects itself. The chips do not remove\nthemselves — the parent takes them out of its list when `chipRemove` says\nso, which is why they can be a plain list here.",...ARow.parameters?.docs?.description}}},LongLabel.parameters={...LongLabel.parameters,docs:{...LongLabel.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n template: `\n <div class="w-64">\n <ui-chip [removable]="true" removeLabel="Remove"\n >A label longer than the room it is given</ui-chip\n >\n </div>\n `\n })\n}',...LongLabel.parameters?.docs?.source},description:{story:"A label longer than the room it has shortens rather than pushing the row\napart, and the cross keeps its place at the end.",...LongLabel.parameters?.docs?.description}}},Colours.parameters={...Colours.parameters,docs:{...Colours.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: () => ({\n template: `\n <div class="flex flex-wrap items-center gap-4">\n <ui-chip [removable]="true" removeLabel="Remove">Default</ui-chip>\n <ui-chip\n [removable]="true"\n removeLabel="Remove"\n style="--ui-chip-bg: var(--ui-c-focus); --ui-chip-text: var(--ui-c-static)"\n >Accent</ui-chip\n >\n <ui-chip style="--ui-chip-radius: var(--ui-border-radius)">Square</ui-chip>\n <ui-chip\n [removable]="true"\n removeLabel="Remove"\n style="--ui-chip-radius: var(--ui-border-radius)"\n >Square</ui-chip\n >\n </div>\n `\n })\n}',...Colours.parameters?.docs?.source},description:{story:"Colours are custom properties, not inputs: set them on the tag, or once on\na container so a whole row follows.",...Colours.parameters?.docs?.description}}}},"./libs/ui/src/lib/forms/chip/chip.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\n /* The chip is the frame around its two controls; the controls carry the\n interaction. Colours are named hooks with the library's tokens as\n fallbacks — set them on the tag or once on a container and they inherit,\n the same arrangement the switch uses. */\n ui-chip {\n display: inline-flex;\n align-items: stretch;\n max-width: 100%;\n color: var(--ui-chip-text, var(--ui-c-default));\n background-color: var(--ui-chip-bg, var(--ui-c-fourthly));\n border-radius: var(--ui-chip-radius, 999px);\n overflow: hidden;\n }\n\n ui-chip button {\n display: inline-flex;\n align-items: center;\n color: inherit;\n background: none;\n border: 0;\n cursor: pointer;\n font: inherit;\n }\n\n ui-chip ._label {\n min-width: 0;\n padding: calc(var(--ui-spacer) * 0.125) calc(var(--ui-spacer) * 0.5);\n /* A long value shortens rather than stretching the chip past its row. */\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* The cross keeps the chip's right end and stays square, so a row of chips\n has one flight line whatever their labels do. */\n ui-chip ._remove {\n padding-right: calc(var(--ui-spacer) * 0.25);\n padding-left: calc(var(--ui-spacer) * 0.125);\n }\n\n ui-chip ._remove .ui-icon {\n font-size: var(--ui-chip-icon-size, 1.6rem);\n line-height: 1;\n }\n\n ui-chip ._label:hover,\n ui-chip ._remove:hover {\n background-color: var(--ui-chip-hover, rgba(var(--ui-c-default-value), 0.1));\n }\n\n /* Focus is drawn on the control that has it, not on the whole chip — the\n two are separate stops and must look it. */\n ui-chip button:focus-visible {\n outline: var(--ui-border-width) solid var(--ui-c-focus);\n outline-offset: calc(var(--ui-border-width) * -2);\n }\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[1686,4939],{"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/input/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_input_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/input/input.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_input_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-input.json");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,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_input_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"input",children:"Input"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A reusable and customizable input wrapper component for Angular."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A wrapper around a projected native text-based control — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"input"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"textarea"}),",\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"select"})," — that adds the label, the validation display (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiError"}),") and an\noptional clear button. The control stays native: value binding, validation and\nthe ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"type"})," are written on the projected element, and the wrapper neither reads\nnor rewrites the value. Ranges, checkboxes and switches have wrappers of their\nown."]}),"\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-input",entry:_guide_ui_input_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"overview",children:"Overview"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiInputComponent"})," provides a styled wrapper for standard text-based input elements. It handles labels and visual validation states, and integrates seamlessly with Angular's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ngModel"})," and form validation."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"properties",children:"Properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The following properties can be used to configure the input component:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"label"}),": (Input) The text label above the field. It is tied to the field:\na projected input keeps its own ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"id"})," if it has one, otherwise the component\nhands it one and points the label at it — a click on the label focuses the\nfield, a screen reader names it."]}),"\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:"uiError"}),": (Input) Whether to enable visual validation states based on the input's validity (default: true)."]}),"\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:"clearable"}),": (Input, boolean) When set, shows a clear (×) button at the right edge of the field once it holds a value; clicking it empties the input (default: false)."]}),"\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:"clearLabel"}),": (Input) Accessible label for the clear button; override for localisation (default: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"'Clear'"}),")."]}),"\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:"errorLabel"}),": (Input) Accessible label for the error button that opens the\noverlay; override for localisation (default: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"'Errors'"}),")."]}),"\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:"basic-example",children:"Basic Example"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"In this example, you can interactively change the input properties and see how the validation state reacts."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_input_component_stories__WEBPACK_IMPORTED_MODULE_4__.Input}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"usage",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]="\'Username\'">\n <input ui-tag type="text" class="ui" [(ngModel)]="value" />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The projected input can also use the standalone flat look — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'class="ui-flat"'}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"instead of"})," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'class="ui"'})," (invisible at rest, no hover effect; focus and\nerror render as a 8% color surface without border or shadow; see\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/styling-forms--docs",children:"Styling/Forms"}),"):"]}),"\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]="\'Username\'">\n <input ui-tag type="text" class="ui-flat" [(ngModel)]="value" />\n</ui-input>\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:"clearable-input",children:"Clearable Input"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Set ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clearable"})," to render a clear (×) button at the right edge of the field.\nIt appears only while the input holds a value and empties it on click\n(notifying ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ngModel"}),"). The button is positioned like the search affix — 24×24,\nright-aligned and vertically centred over the input."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-input--input-clearable",children:"Open story: Clearable"})}),"\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]="\'Username\'" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="value" />\n</ui-input>\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:"textarea-and-select",children:"Textarea and Select"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Any form control carrying the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-tag"})," attribute can be projected — textareas\nand selects receive the same full width as inputs, so mixed forms line up\nflush (they would otherwise shrink to their intrinsic width)."]}),"\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-input--input-textarea",children:"Open story: Textarea"})}),"\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]="\'Description\'">\n <textarea ui-tag class="ui" rows="5" [(ngModel)]="value"></textarea>\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-input--input-select",children:"Open story: Select"})}),"\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]="\'Format\'">\n <select ui-tag class="ui" [(ngModel)]="value">\n <option value="A">A</option>\n </select>\n</ui-input>\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:"password-input",children:"Password Input"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-input--input-password",children:"Open story: Password"})}),"\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]="\'Password\'">\n <input\n ui-tag\n type="password"\n class="ui"\n [(ngModel)]="value"\n [placeholder]="\'form.placeholder.enterPassword\' | transloco"\n />\n</ui-input>\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:"validation-overview",children:"Validation Overview"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"This overview shows how the component handles validation states."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The red border and the error icon always reflect the current validation\nstate. The icon is a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"button"})," — a keyboard user reaches it with Tab and\nopens the overlay with Enter; it carries ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"aria-expanded"})," — and an affix\ninside the field, right-aligned like the clear button — every icon a field can carry sits in the same place; the error\nicon keeps the edge so it always appears at the same spot, and where the\nclear button stands too, that one moves one box inward. Clicking the error icon opens a floating error overlay with the\nvalidation messages; the icon switches to a close icon while the overlay is\nopen. Only one error overlay is open at a time across all form fields —\nopening one closes any other open overlay (coordinated by the shared\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiFormErrorOverlayService"}),")."]}),"\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-input--input-validation",children:"Open story: Validation"})}),"\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:"error-overlay-behavior",children:"Error Overlay Behavior"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The story arrives submitted; click through the error icons: opening one\nfield's overlay closes any other open overlay — only one is visible at a time."}),"\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-input--input-error-overlay",children:"Open story: Error Overlay"})}),"\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]="\'Required Field\'" [uiError]="true">\n <input\n ui-tag\n type="text"\n class="ui"\n [(ngModel)]="value"\n required\n name="req"\n [placeholder]="\'form.placeholder.required\' | transloco"\n />\n</ui-input>\n'})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/input/input.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Input:()=>Input,InputClearable:()=>InputClearable,InputClearableNumber:()=>InputClearableNumber,InputErrorOverlay:()=>InputErrorOverlay,InputPassword:()=>InputPassword,InputSelect:()=>InputSelect,InputTextarea:()=>InputTextarea,InputValidation:()=>InputValidation,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_moja_projects_mojawork_mono_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),_angular_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),_storybook_angular__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),_input_component__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/src/lib/forms/input/input.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Forms/Input",component:_input_component__WEBPACK_IMPORTED_MODULE_5__.K,decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_2__.Iz)({providers:[_angular_forms__WEBPACK_IMPORTED_MODULE_1__.vS],imports:[_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_3__.b,_angular_forms__WEBPACK_IMPORTED_MODULE_1__.YN,_input_component__WEBPACK_IMPORTED_MODULE_5__.K,_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_4__.o]})],argTypes:{label:{control:"text"},uiError:{table:{disable:!0}},clearable:{control:"boolean"},value:{control:"text"}},args:{label:"Input Label",clearable:!1,value:""},parameters:{docs:{canvas:{sourceState:"none"}}}},onlyClearable={label:{table:{disable:!0}}},Input={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input\n ui-tag\n [(ngModel)]="value"\n class="ui"\n type="text"\n />\n </ui-input>\n </section>\n '})},InputClearable={argTypes:onlyClearable,args:{label:"Username",clearable:!0,value:"clear me"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input ui-tag type="text" class="ui" [(ngModel)]="value" />\n </ui-input>\n </section>\n '})},InputClearableNumber={argTypes:onlyClearable,args:{label:"Release year",clearable:!0,value:"2020"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input ui-tag type="number" class="ui" [(ngModel)]="value" />\n </ui-input>\n </section>\n '})},InputTextarea={parameters:{controls:{disable:!0}},args:{label:"Description",value:""},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label">\n <textarea ui-tag class="ui" rows="5" [(ngModel)]="value"></textarea>\n </ui-input>\n </section>\n '})},InputSelect={parameters:{controls:{disable:!0}},args:{label:"Format",value:"B"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label">\n <select ui-tag class="ui" [(ngModel)]="value">\n <option value="A">A</option>\n <option value="B">B</option>\n <option value="C">C</option>\n </select>\n </ui-input>\n </section>\n '})},InputPassword={parameters:{controls:{disable:!0}},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input label="Password">\n <input ui-tag type="password" class="ui" [(ngModel)]="value" [placeholder]="\'form.placeholder.enterPassword\' | transloco" />\n </ui-input>\n </section>\n '})},InputErrorOverlay={parameters:{controls:{disable:!0}},play:(_ref=(0,_Users_moja_projects_mojawork_mono_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*({canvasElement}){canvasElement.querySelector("form")?.requestSubmit()}),function play(_x){return _ref.apply(this,arguments)}),render:args=>({props:{...args,valueA:"",valueB:"ab",valueC:""},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <form class="relative flex flex-col gap-20" novalidate (ngSubmit)="(0)">\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueA" required name="a" />\n </ui-input>\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueB" required minlength="5" name="b" />\n </ui-input>\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueC" required name="c" />\n </ui-input>\n <button class="ui self-start" type="submit">send</button>\n </form>\n '})};var _ref;const InputValidation={parameters:{controls:{disable:!0}},play:(_ref2=(0,_Users_moja_projects_mojawork_mono_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*({canvasElement}){canvasElement.querySelector("form")?.requestSubmit()}),function play(_x2){return _ref2.apply(this,arguments)}),render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <form class="relative flex flex-col" novalidate (ngSubmit)="(0)">\n <ui-input label="Required Field" uiError>\n <input ui-tag type="text" class="ui" [(ngModel)]="value" required name="req" [placeholder]="\'form.placeholder.required\' | transloco" />\n </ui-input>\n </form>\n '})};var _ref2;const __namedExportsOrder=["Input","InputClearable","InputClearableNumber","InputTextarea","InputSelect","InputPassword","InputErrorOverlay","InputValidation"];Input.parameters={...Input.parameters,docs:{...Input.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input\n ui-tag\n [(ngModel)]="value"\n class="ui"\n type="text"\n />\n </ui-input>\n </section>\n `\n };\n }\n}',...Input.parameters?.docs?.source}}},InputClearable.parameters={...InputClearable.parameters,docs:{...InputClearable.parameters?.docs,source:{originalSource:'{\n argTypes: onlyClearable,\n args: {\n label: \'Username\',\n clearable: true,\n value: \'clear me\'\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input ui-tag type="text" class="ui" [(ngModel)]="value" />\n </ui-input>\n </section>\n `\n };\n }\n}',...InputClearable.parameters?.docs?.source}}},InputClearableNumber.parameters={...InputClearableNumber.parameters,docs:{...InputClearableNumber.parameters?.docs,source:{originalSource:'{\n argTypes: onlyClearable,\n args: {\n label: \'Release year\',\n clearable: true,\n value: \'2020\'\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input ui-tag type="number" class="ui" [(ngModel)]="value" />\n </ui-input>\n </section>\n `\n };\n }\n}',...InputClearableNumber.parameters?.docs?.source}}},InputTextarea.parameters={...InputTextarea.parameters,docs:{...InputTextarea.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n args: {\n label: \'Description\',\n value: \'\'\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label">\n <textarea ui-tag class="ui" rows="5" [(ngModel)]="value"></textarea>\n </ui-input>\n </section>\n `\n };\n }\n}',...InputTextarea.parameters?.docs?.source}}},InputSelect.parameters={...InputSelect.parameters,docs:{...InputSelect.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n args: {\n label: \'Format\',\n value: \'B\'\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label">\n <select ui-tag class="ui" [(ngModel)]="value">\n <option value="A">A</option>\n <option value="B">B</option>\n <option value="C">C</option>\n </select>\n </ui-input>\n </section>\n `\n };\n }\n}',...InputSelect.parameters?.docs?.source}}},InputPassword.parameters={...InputPassword.parameters,docs:{...InputPassword.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input label="Password">\n <input ui-tag type="password" class="ui" [(ngModel)]="value" [placeholder]="\'form.placeholder.enterPassword\' | transloco" />\n </ui-input>\n </section>\n `\n };\n }\n}',...InputPassword.parameters?.docs?.source}}},InputErrorOverlay.parameters={...InputErrorOverlay.parameters,docs:{...InputErrorOverlay.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n play: async ({\n canvasElement\n }) => {\n canvasElement.querySelector(\'form\')?.requestSubmit();\n },\n render: args => {\n return {\n props: {\n ...args,\n valueA: \'\',\n // Pre-filled and too short: a field that is invalid AND holds a value\n // shows the clear button and the error mark side by side.\n valueB: \'ab\',\n valueC: \'\'\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <form class="relative flex flex-col gap-20" novalidate (ngSubmit)="(0)">\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueA" required name="a" />\n </ui-input>\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueB" required minlength="5" name="b" />\n </ui-input>\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueC" required name="c" />\n </ui-input>\n <button class="ui self-start" type="submit">send</button>\n </form>\n `\n };\n }\n}',...InputErrorOverlay.parameters?.docs?.source},description:{story:'The error state is what this story is about, so it arrives in it: the play\nstep submits the form once the story stands, and the reader sees the\nmarks and the red borders without first having to click "send". The rows\nstand 50px apart — an open overlay is 45px tall and must not cover the\nnext field\'s label.',...InputErrorOverlay.parameters?.docs?.description}}},InputValidation.parameters={...InputValidation.parameters,docs:{...InputValidation.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n play: async ({\n canvasElement\n }) => {\n canvasElement.querySelector(\'form\')?.requestSubmit();\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <form class="relative flex flex-col" novalidate (ngSubmit)="(0)">\n <ui-input label="Required Field" uiError>\n <input ui-tag type="text" class="ui" [(ngModel)]="value" required name="req" [placeholder]="\'form.placeholder.required\' | transloco" />\n </ui-input>\n </form>\n `\n };\n }\n}',...InputValidation.parameters?.docs?.source},description:{story:"Submitted on arrival, like the overlay story: the reader sees the state.",...InputValidation.parameters?.docs?.description}}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[1686],{"./libs/ui/src/lib/forms/input/input.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Input:()=>Input,InputClearable:()=>InputClearable,InputClearableNumber:()=>InputClearableNumber,InputErrorOverlay:()=>InputErrorOverlay,InputPassword:()=>InputPassword,InputSelect:()=>InputSelect,InputTextarea:()=>InputTextarea,InputValidation:()=>InputValidation,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_moja_projects_mojawork_mono_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),_angular_forms__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),_storybook_angular__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),_input_component__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/src/lib/forms/input/input.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Forms/Input",component:_input_component__WEBPACK_IMPORTED_MODULE_5__.K,decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_2__.Iz)({providers:[_angular_forms__WEBPACK_IMPORTED_MODULE_1__.vS],imports:[_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_3__.b,_angular_forms__WEBPACK_IMPORTED_MODULE_1__.YN,_input_component__WEBPACK_IMPORTED_MODULE_5__.K,_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_4__.o]})],argTypes:{label:{control:"text"},uiError:{table:{disable:!0}},clearable:{control:"boolean"},value:{control:"text"}},args:{label:"Input Label",clearable:!1,value:""},parameters:{docs:{canvas:{sourceState:"none"}}}},onlyClearable={label:{table:{disable:!0}}},Input={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input\n ui-tag\n [(ngModel)]="value"\n class="ui"\n type="text"\n />\n </ui-input>\n </section>\n '})},InputClearable={argTypes:onlyClearable,args:{label:"Username",clearable:!0,value:"clear me"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input ui-tag type="text" class="ui" [(ngModel)]="value" />\n </ui-input>\n </section>\n '})},InputClearableNumber={argTypes:onlyClearable,args:{label:"Release year",clearable:!0,value:"2020"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input ui-tag type="number" class="ui" [(ngModel)]="value" />\n </ui-input>\n </section>\n '})},InputTextarea={parameters:{controls:{disable:!0}},args:{label:"Description",value:""},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label">\n <textarea ui-tag class="ui" rows="5" [(ngModel)]="value"></textarea>\n </ui-input>\n </section>\n '})},InputSelect={parameters:{controls:{disable:!0}},args:{label:"Format",value:"B"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label">\n <select ui-tag class="ui" [(ngModel)]="value">\n <option value="A">A</option>\n <option value="B">B</option>\n <option value="C">C</option>\n </select>\n </ui-input>\n </section>\n '})},InputPassword={parameters:{controls:{disable:!0}},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input label="Password">\n <input ui-tag type="password" class="ui" [(ngModel)]="value" [placeholder]="\'form.placeholder.enterPassword\' | transloco" />\n </ui-input>\n </section>\n '})},InputErrorOverlay={parameters:{controls:{disable:!0}},play:(_ref=(0,_Users_moja_projects_mojawork_mono_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*({canvasElement}){canvasElement.querySelector("form")?.requestSubmit()}),function play(_x){return _ref.apply(this,arguments)}),render:args=>({props:{...args,valueA:"",valueB:"ab",valueC:""},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <form class="relative flex flex-col gap-20" novalidate (ngSubmit)="(0)">\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueA" required name="a" />\n </ui-input>\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueB" required minlength="5" name="b" />\n </ui-input>\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueC" required name="c" />\n </ui-input>\n <button class="ui self-start" type="submit">send</button>\n </form>\n '})};var _ref;const InputValidation={parameters:{controls:{disable:!0}},play:(_ref2=(0,_Users_moja_projects_mojawork_mono_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*({canvasElement}){canvasElement.querySelector("form")?.requestSubmit()}),function play(_x2){return _ref2.apply(this,arguments)}),render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <form class="relative flex flex-col" novalidate (ngSubmit)="(0)">\n <ui-input label="Required Field" uiError>\n <input ui-tag type="text" class="ui" [(ngModel)]="value" required name="req" [placeholder]="\'form.placeholder.required\' | transloco" />\n </ui-input>\n </form>\n '})};var _ref2;const __namedExportsOrder=["Input","InputClearable","InputClearableNumber","InputTextarea","InputSelect","InputPassword","InputErrorOverlay","InputValidation"];Input.parameters={...Input.parameters,docs:{...Input.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input\n ui-tag\n [(ngModel)]="value"\n class="ui"\n type="text"\n />\n </ui-input>\n </section>\n `\n };\n }\n}',...Input.parameters?.docs?.source}}},InputClearable.parameters={...InputClearable.parameters,docs:{...InputClearable.parameters?.docs,source:{originalSource:'{\n argTypes: onlyClearable,\n args: {\n label: \'Username\',\n clearable: true,\n value: \'clear me\'\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input ui-tag type="text" class="ui" [(ngModel)]="value" />\n </ui-input>\n </section>\n `\n };\n }\n}',...InputClearable.parameters?.docs?.source}}},InputClearableNumber.parameters={...InputClearableNumber.parameters,docs:{...InputClearableNumber.parameters?.docs,source:{originalSource:'{\n argTypes: onlyClearable,\n args: {\n label: \'Release year\',\n clearable: true,\n value: \'2020\'\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label" [clearable]="clearable">\n <input ui-tag type="number" class="ui" [(ngModel)]="value" />\n </ui-input>\n </section>\n `\n };\n }\n}',...InputClearableNumber.parameters?.docs?.source}}},InputTextarea.parameters={...InputTextarea.parameters,docs:{...InputTextarea.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n args: {\n label: \'Description\',\n value: \'\'\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label">\n <textarea ui-tag class="ui" rows="5" [(ngModel)]="value"></textarea>\n </ui-input>\n </section>\n `\n };\n }\n}',...InputTextarea.parameters?.docs?.source}}},InputSelect.parameters={...InputSelect.parameters,docs:{...InputSelect.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n args: {\n label: \'Format\',\n value: \'B\'\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input [label]="label">\n <select ui-tag class="ui" [(ngModel)]="value">\n <option value="A">A</option>\n <option value="B">B</option>\n <option value="C">C</option>\n </select>\n </ui-input>\n </section>\n `\n };\n }\n}',...InputSelect.parameters?.docs?.source}}},InputPassword.parameters={...InputPassword.parameters,docs:{...InputPassword.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-input label="Password">\n <input ui-tag type="password" class="ui" [(ngModel)]="value" [placeholder]="\'form.placeholder.enterPassword\' | transloco" />\n </ui-input>\n </section>\n `\n };\n }\n}',...InputPassword.parameters?.docs?.source}}},InputErrorOverlay.parameters={...InputErrorOverlay.parameters,docs:{...InputErrorOverlay.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n play: async ({\n canvasElement\n }) => {\n canvasElement.querySelector(\'form\')?.requestSubmit();\n },\n render: args => {\n return {\n props: {\n ...args,\n valueA: \'\',\n // Pre-filled and too short: a field that is invalid AND holds a value\n // shows the clear button and the error mark side by side.\n valueB: \'ab\',\n valueC: \'\'\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <form class="relative flex flex-col gap-20" novalidate (ngSubmit)="(0)">\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueA" required name="a" />\n </ui-input>\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueB" required minlength="5" name="b" />\n </ui-input>\n <ui-input [label]="\'form.placeholder.required\' | transloco" clearable>\n <input ui-tag type="text" class="ui" [(ngModel)]="valueC" required name="c" />\n </ui-input>\n <button class="ui self-start" type="submit">send</button>\n </form>\n `\n };\n }\n}',...InputErrorOverlay.parameters?.docs?.source},description:{story:'The error state is what this story is about, so it arrives in it: the play\nstep submits the form once the story stands, and the reader sees the\nmarks and the red borders without first having to click "send". The rows\nstand 50px apart — an open overlay is 45px tall and must not cover the\nnext field\'s label.',...InputErrorOverlay.parameters?.docs?.description}}},InputValidation.parameters={...InputValidation.parameters,docs:{...InputValidation.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n play: async ({\n canvasElement\n }) => {\n canvasElement.querySelector(\'form\')?.requestSubmit();\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <form class="relative flex flex-col" novalidate (ngSubmit)="(0)">\n <ui-input label="Required Field" uiError>\n <input ui-tag type="text" class="ui" [(ngModel)]="value" required name="req" [placeholder]="\'form.placeholder.required\' | transloco" />\n </ui-input>\n </form>\n `\n };\n }\n}',...InputValidation.parameters?.docs?.source},description:{story:"Submitted on arrival, like the overlay story: the reader sees the state.",...InputValidation.parameters?.docs?.description}}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[6252,6922],{"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/slider/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_slider_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/slider/slider.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_slider_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-slider.json");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_slider_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"slider",children:"Slider"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A form wrapper around one or two native ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'<input type="range">'})," elements, with a label,\na live value read-out and a highlighted track fill."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A wrapper around one or two native ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'<input type="range">'})," elements: label,\nlive value read-out and a filled track, in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"single"})," or ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"range"})," mode where two\nthumbs cannot cross. Value binding stays native on the projected input. It has\nno validation or error state, because a range input always holds a value inside\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[min, max]"})," — there is nothing to be invalid."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-slider",entry:_guide_ui_slider_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"overview",children:"Overview"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiSliderComponent"})," styles the native range input(s) via ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"var(--ui-*)"})," design tokens.\nValue binding stays native: place ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[(ngModel)]"})," directly on the projected\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'<input type="range">'}),". In ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"range"})," mode two inputs (first = low, second = high) form a\nmin–max span; the component keeps them from crossing. A range input always holds a value\ninside ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"[min, max]"}),", so the slider has no validation/error state."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"properties",children:"Properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Property"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"label"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"string | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Text label above the slider, tied to the (first) projected input: it keeps its own ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"id"})," or is handed one, and the label points at it."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"sliderType"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'single' | 'range'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'single'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"One thumb (single value) or two thumbs (min–max span)."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"showValue"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"boolean"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"true"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Whether the current numeric value is rendered next to the slider."})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"single-value",children:"Single value"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The default story holds the whole panel — switch ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"sliderType"})," to see the\nsecond thumb arrive:"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_slider_component_stories__WEBPACK_IMPORTED_MODULE_4__.Slider}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-slider [label]="\'Volume\'">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" min="0" max="100" step="1" />\n</ui-slider>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"range-two-thumbs",children:"Range (two thumbs)"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The first projected input is the low bound, the second is the high bound. The component\nkeeps ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"low ≤ high"})," by clamping whichever thumb crosses the other, and the read-out shows\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"low – high"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-slider--range",children:"Open story: Range"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-slider [label]="\'Price\'" sliderType="range">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" min="0" max="100" step="1" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" min="0" max="100" step="1" />\n</ui-slider>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"steps",children:"Steps"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"}),", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"step"})," are set on the projected native input."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-slider--with-steps",children:"Open story: Steps"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"without-value-read-out",children:"Without value read-out"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-slider--value-hidden",children:"Open story: Without value read-out"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-slider [label]="\'Volume\'" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" min="0" max="100" step="1" />\n</ui-slider>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"disabled",children:"Disabled"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-slider--disabled",children:"Open story: Disabled"})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/slider/slider.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Disabled:()=>Disabled,Range:()=>Range,Slider:()=>Slider,ValueHidden:()=>ValueHidden,WithSteps:()=>WithSteps,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _angular_forms__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),_storybook_angular__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),_slider_component__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/slider/slider.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Forms/Slider",component:_slider_component__WEBPACK_IMPORTED_MODULE_4__.H,decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_1__.Iz)({providers:[_angular_forms__WEBPACK_IMPORTED_MODULE_0__.vS],imports:[_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_2__.b,_angular_forms__WEBPACK_IMPORTED_MODULE_0__.YN,_slider_component__WEBPACK_IMPORTED_MODULE_4__.H,_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_3__.o]})],argTypes:{label:{control:"text"},sliderType:{control:"select",options:["single","range"]},showValue:{control:"boolean"},value:{control:{type:"range",min:0,max:100,step:1}},low:{control:{type:"range",min:0,max:100,step:1}},high:{control:{type:"range",min:0,max:100,step:1}},min:{control:{type:"range",min:0,max:100,step:1}},max:{control:{type:"range",min:0,max:100,step:1}},step:{control:{type:"range",min:1,max:25,step:1}}},args:{label:"Volume",sliderType:"single",showValue:!0,value:40,low:25,high:75,min:0,max:100,step:1},parameters:{docs:{canvas:{sourceState:"none"}}}},hide=(...names)=>Object.fromEntries(names.map(n=>[n,{table:{disable:!0}}])),Slider={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n @if (sliderType === \'range\') {\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n } @else {\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n }\n </section>\n '})},Range={argTypes:hide("label","sliderType","showValue","value"),args:{label:"Price",sliderType:"range"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},WithSteps={argTypes:hide("label","sliderType","showValue","low","high"),args:{label:"Rating",value:6,min:0,max:10,step:2},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},ValueHidden={parameters:{controls:{disable:!0}},args:{showValue:!1},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},Disabled={parameters:{controls:{disable:!0}},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" disabled />\n </ui-slider>\n </section>\n '})},__namedExportsOrder=["Slider","Range","WithSteps","ValueHidden","Disabled"];Slider.parameters={...Slider.parameters,docs:{...Slider.parameters?.docs,source:{originalSource:'{\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n @if (sliderType === \'range\') {\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n } @else {\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n }\n </section>\n `\n })\n}',...Slider.parameters?.docs?.source},description:{story:"The whole panel: `sliderType` switches between one thumb and two, so\n`value` drives the single slider and `low`/`high` the range — every row\nmoves something in one of the two modes. One `ui-slider` per branch, not\nan `@if` around the projected inputs: a control-flow block with two root\nnodes is projected into the default slot, and the slider has none — the\nthumbs would be bound and invisible.",...Slider.parameters?.docs?.description}}},Range.parameters={...Range.parameters,docs:{...Range.parameters?.docs,source:{originalSource:'{\n argTypes: hide(\'label\', \'sliderType\', \'showValue\', \'value\'),\n args: {\n label: \'Price\',\n sliderType: \'range\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...Range.parameters?.docs?.source}}},WithSteps.parameters={...WithSteps.parameters,docs:{...WithSteps.parameters?.docs,source:{originalSource:'{\n argTypes: hide(\'label\', \'sliderType\', \'showValue\', \'low\', \'high\'),\n args: {\n label: \'Rating\',\n value: 6,\n min: 0,\n max: 10,\n step: 2\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...WithSteps.parameters?.docs?.source}}},ValueHidden.parameters={...ValueHidden.parameters,docs:{...ValueHidden.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n args: {\n showValue: false\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...ValueHidden.parameters?.docs?.source}}},Disabled.parameters={...Disabled.parameters,docs:{...Disabled.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" disabled />\n </ui-slider>\n </section>\n `\n })\n}',...Disabled.parameters?.docs?.source}}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[977,3048],{"./libs/ui/.storybook/demos/header/header.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>UiInternHeaderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var header_componentngResource=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.css?ngResource"),header_componentngResource_default=__webpack_require__.n(header_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ui_config_types=__webpack_require__("./libs/ui/src/config/ui-config.types.ts"),layout_service=__webpack_require__("./libs/ui/src/lib/layout/_service/layout.service.ts");let UiInternHeaderComponent=class UiInternHeaderComponent{layoutService=(0,_effect_chunk2.WQX)(layout_service.u);theme=(0,core.input)(null);display=(0,core.input)(!1,{transform:core.booleanAttribute});onTop=(0,core.input)(!1,{transform:core.booleanAttribute});ngOnInit(){this.layoutService.handleTheme(this.theme(),ui_config_types.Q)}ngOnDestroy(){this.layoutService.handleTheme("theme-light",ui_config_types.Q)}setTheme(){this.layoutService.handleTheme(null,ui_config_types.Q)}static propDecorators={theme:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"theme",required:!1,transform:void 0}]}],display:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"display",required:!1,transform:void 0}]}],onTop:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"onTop",required:!1,transform:void 0}]}]}};UiInternHeaderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-intern-header",template:'@if (display()) {\n <button class="ui" [class._on-top]="onTop()" (click)="setTheme()">\n switch Theme\n </button>\n}\n',encapsulation:_debug_node_chunk.gXe.Emulated,standalone:!0,imports:[_common_module_chunk.MD],styles:[header_componentngResource_default()]})],UiInternHeaderComponent)},"./libs/ui/src/config/ui-config.types.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>uiConfigStorybookCssPrefix,y:()=>uiConfigTypes});const uiConfigStorybookCssPrefix="ui-storybook ",uiConfigTypes={mainID:"ui-main",mainClass:"ui-main",storeName:"ui-layout"}},"./libs/ui/src/lib/layout/_service/layout.service.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>UiLayoutService});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@ngx-pwa/local-storage/fesm2022/ngx-pwa-local-storage.mjs"),_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/config/ui-config.types.ts");let UiLayoutService=class UiLayoutService{storage=(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.WQX)(_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__.AX);settings={cssPrefix:"",theme:null,zoom:null,fullscreen:null,direction:"center",layoutSize:null};setStorage(){this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}handleInit(config){this.settings.cssPrefix=config.cssPrefix,this.settings.theme=config.theme,this.settings.zoom=config.zoom?"zoom":"x-zoom",this.settings.fullscreen=config.fullscreen?"fullscreen":"x-fullscreen",this.handleFullScreen(this.settings.fullscreen),this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data),this.setStorage(),this.setTheme(null)})}setTheme(theme){document.body.className=theme?`${this.settings.cssPrefix} ${theme}`:`${this.settings.cssPrefix} ${this.settings.theme}`}getTheme(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.theme}getMainClass(){return`${_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.mainClass} ${this.settings.zoom} ${this.settings.fullscreen}`}handleFullScreen(init){init?this.settings.fullscreen=init:"fullscreen"===this.settings.fullscreen?this.settings.fullscreen="x-fullscreen":this.settings.fullscreen="fullscreen",this.setStorage()}handleZoom(init){init?this.settings.zoom=init:"zoom"===this.settings.zoom?this.settings.zoom="x-zoom":this.settings.zoom="zoom",this.setStorage()}handleTheme(theme,prefix){return prefix&&(this.settings.cssPrefix=prefix),theme?(this.setTheme(theme),this.settings.theme=theme):(this.settings.theme="theme-light"===this.settings.theme?"theme-dark":"theme-light",this.setTheme(null)),this.setStorage(),this.settings.theme}handleDirection(type){this.settings.direction=type,this.setStorage()}setLayoutSize(sizes){this.settings.layoutSize=sizes,this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}getLayoutSize(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.layoutSize}};UiLayoutService=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_1__._qm)({providedIn:"root"})],UiLayoutService)},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/switch/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_switch_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/switch/switch.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_switch_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-switch.json");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_switch_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"switch",children:"Switch"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A toggle switch built on a native checkbox."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A switch represents a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"deliberate user decision"}),": both states are always\nvalid and the change takes effect immediately. There is no invalid state,\ntherefore the component has ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"no validation support"})," — no error input, no\nerror icon, no error overlay. If you need to enforce a choice (e.g. a required\nconsent), use ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-checkbox"})," with validation instead."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-switch",entry:_guide_ui_switch_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"overview",children:"Overview"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiSwitchComponent"})," wraps a projected native checkbox (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-tag"}),") and styles\nit as a track-and-knob toggle switch — purely with CSS on the input itself, so\nsemantics, keyboard handling and form integration come from the real checkbox.\nIt follows the same anatomy as the other form components: control on the left,\nlabel alongside. The track matches the rendered height of ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-checkbox"}),", so\nmixed forms keep an even rhythm."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Give the projected input ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'role="switch"'})," so assistive technology announces a\nswitch instead of a checkbox."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"properties",children:"Properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"label"}),": (Input) The text label next to the switch. It is tied to the\nswitch: the projected input keeps its own ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"id"})," if it has one, otherwise the\ncomponent hands it one and points the label at it — a click on the label\nflips the switch, a screen reader names it."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Colours are CSS custom properties, not inputs — see below. The knob carries\nthe position, so a coloured track says something about the switch itself (one\nthat guards data, for instance), not about whether it is on."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"basic-example",children:"Basic Example"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The story binds the label to the model, so it reads the current state\n(",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"on"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"off"}),"):"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_switch_component_stories__WEBPACK_IMPORTED_MODULE_4__.Switch}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-switch [label]="on ? \'on\' : \'off\'">\n <input class="ui" ui-tag type="checkbox" role="switch" [(ngModel)]="on" />\n</ui-switch>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"custom-knob-color",children:"Custom knob color"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:['In the "on" state the knob takes ',(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--switch-knob-on-color"}),"; the track itself\nstays neutral:"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-switch--custom-knob-color",children:"Open story: Custom knob color"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-switch [label]="\'Pink\'" [style.--switch-knob-on-color]="\'#e91e63\'">\n <input class="ui" ui-tag type="checkbox" role="switch" [(ngModel)]="on" />\n</ui-switch>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"flat",children:"Flat"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The projected input carries ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-flat"})," instead of ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui"}),": the rim disappears\ninto the track and the knob drops its lift, leaving two plain surfaces. Focus\nis the one moment the rim returns — as a focus-colored border, never a glow,\nbecause flat controls in this house do not use shadows."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-switch--flat",children:"Open story: Flat"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-switch [label]="\'Locked\'" [style.--switch-knob-on-color]="\'#f5a623\'">\n <input class="ui-flat" ui-tag type="checkbox" role="switch" [(ngModel)]="on" />\n</ui-switch>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"custom-properties",children:"Custom properties"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:'Every surface the switch paints is a hook, so an app can dress it without\nout-specifying the component\'s rules. Set them on the element or anywhere\nabove it — they inherit: the component declares none of them on its own\nhost, it only reads them with a token fallback, so a value set on a\ncontainer reaches every switch below. (It used to declare them on the host,\nwhich beat anything inherited and made "set it once above" a claim the page\nmade and the component broke.)'}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tbody",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"--switch-track-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"var(--ui-c-fourthly)"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"The track, in both states."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"--switch-rim-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"var(--switch-track-color)"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The track's border — follows the track by default, so the rim is\ninvisible unless it is given a color of its own."})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"--switch-knob-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"var(--ui-c-background)"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:'The knob in the "off" state.'})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"--switch-knob-on-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"#2196f3"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:'The knob in the "on" state.'})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"--switch-focus-color"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"var(--ui-c-focus)"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Border and glow while focused. The focus itself stays the library's\nbusiness — apps recolor it, they do not rebuild it."})})]})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"animation",children:"Animation"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The knob squashes in travel direction while pressed (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:":active"}),") and settles\nwith a small overshoot on release (a springy ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cubic-bezier"})," on the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"translate"}),"\ntransition); its color cross-fades to ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--switch-knob-on-color"}),". All of it is plain CSS\ntimed in quarters of the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-time"})," token. With ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"prefers-reduced-motion"})," the\nknob slides plainly without squash or overshoot."]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/switch/switch.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CustomKnobColor:()=>CustomKnobColor,Flat:()=>Flat,Switch:()=>Switch,__namedExportsOrder:()=>__namedExportsOrder,default:()=>switch_component_stories});var fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),transloco_storybook_module=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var switch_componentngResource=__webpack_require__("./libs/ui/src/lib/forms/switch/switch.component.css?ngResource"),switch_componentngResource_default=__webpack_require__.n(switch_componentngResource),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let nextId=0,UiSwitchComponent=class UiSwitchComponent{host=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);label=(0,core.input)(null);fieldId=(0,_effect_chunk2.vPA)(null);ngAfterContentInit(){const el=this.host.nativeElement.querySelector("[ui-tag]");el&&(el.id||(el.id="ui-switch-"+nextId++),this.fieldId.set(el.id))}static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}]}};UiSwitchComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-switch",template:'<ng-content select="[ui-tag]"></ng-content>\n\n@if (label()) {\n <label class="ui-ellipsis" [attr.for]="fieldId()">{{ label() }}</label>\n}\n',encapsulation:_debug_node_chunk.gXe.None,styles:[switch_componentngResource_default()]})],UiSwitchComponent);const switch_component_stories={title:"Forms/Switch",component:UiSwitchComponent,decorators:[(0,dist.Iz)({imports:[header_component.b,fesm2022_forms.YN,UiSwitchComponent,transloco_storybook_module.o]})],argTypes:{knobColor:{control:"select",options:["","var(--ui-c-focus)","var(--ui-c-success)","var(--ui-c-warn)","var(--ui-c-error)"],description:'Knob color in the "on" state; empty keeps the stylesheet default.'},trackColor:{control:"select",options:["","var(--ui-c-fourthly)","var(--ui-c-secondary)","var(--ui-c-warn)","var(--ui-c-primary)"],description:"Track color in both states; empty keeps the neutral surface."},on:{control:"boolean"}},args:{knobColor:"",trackColor:"",on:!1},parameters:{docs:{canvas:{sourceState:"none"}}}},Switch={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n '})},Flat={argTypes:{on:{table:{disable:!0}}},args:{knobColor:"#f5a623",trackColor:"#e8e8e8",on:!0},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col gap-6">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui-flat"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n '})},CustomKnobColor={argTypes:{on:{table:{disable:!0}},trackColor:{table:{disable:!0}}},args:{knobColor:"#e91e63",on:!0},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n '})},__namedExportsOrder=["Switch","Flat","CustomKnobColor"];Switch.parameters={...Switch.parameters,docs:{...Switch.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n `\n };\n }\n}',...Switch.parameters?.docs?.source}}},Flat.parameters={...Flat.parameters,docs:{...Flat.parameters?.docs,source:{originalSource:'{\n argTypes: {\n on: {\n table: {\n disable: true\n }\n }\n },\n args: {\n // the colors ARE the example: a colored knob on a colored track\n knobColor: \'#f5a623\',\n trackColor: \'#e8e8e8\',\n on: true\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col gap-6">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui-flat"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n `\n };\n }\n}',...Flat.parameters?.docs?.source}}},CustomKnobColor.parameters={...CustomKnobColor.parameters,docs:{...CustomKnobColor.parameters?.docs,source:{originalSource:'{\n argTypes: {\n on: {\n table: {\n disable: true\n }\n },\n trackColor: {\n table: {\n disable: true\n }\n }\n },\n args: {\n // the color IS the example here: a custom "on" knob color\n knobColor: \'#e91e63\',\n on: true\n },\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-switch [label]="on ? \'on\' : \'off\'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">\n <input\n class="ui"\n ui-tag\n type="checkbox"\n role="switch"\n [(ngModel)]="on"\n />\n </ui-switch>\n </section>\n `\n };\n }\n}',...CustomKnobColor.parameters?.docs?.source}}}},"./libs/ui/.storybook/demos/header/header.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"/* The intern header is reduced to just the theme switch button, pinned to the */\n/* bottom-left corner of the Storybook canvas. */\nbutton {\n position: fixed;\n bottom: calc(var(--ui-spacer) * 0.5);\n left: calc(var(--ui-spacer) * 0.5);\n z-index: 1000;\n\n &._on-top {\n z-index: 10000;\n }\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/forms/switch/switch.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"@layer ui.base, ui.components;\n@layer ui.components {\nui-switch {\n /* scope only for component - encapsulation is set to ViewEncapsulation.None */\n position: relative;\n display: grid;\n grid-template-columns: auto 1fr;\n grid-gap: calc(var(--ui-spacer) * 0.4);\n\n /* Without a label there is no second column to reserve — otherwise the\n empty track keeps its share and the switch drags invisible space around\n with it wherever it is placed. */\n &:not(:has(label)) {\n grid-template-columns: auto;\n grid-gap: 0;\n }\n max-width: 100%;\n align-items: center;\n\n /* derived sizes — a touch above the rendered checkbox height (spacer 4rem → 2rem) */\n --switch-height: calc(var(--ui-spacer) * 0.5);\n --switch-width: calc(var(--switch-height) * 1.9);\n --switch-pad: calc(var(--ui-border-width) * 2);\n --switch-knob: calc(var(--switch-height) - (var(--switch-pad) * 2) - (var(--ui-border-width) * 2));\n --switch-travel: calc(\n var(--switch-width) - var(--switch-knob) - (var(--switch-pad) * 2) - (var(--ui-border-width) * 2)\n );\n /* --ui-time is 1s — the knob works in quarters of it */\n --switch-time: calc(var(--ui-time) * 0.25);\n\n /* Color hooks (tickets#146): every surface the switch paints reads a\n custom property with a token default, so an app dresses it by setting\n these — on the tag or on any container above, they inherit. The\n hooks are deliberately NOT declared on the host: a declaration here\n would beat anything inherited from above, and \"set it once on a\n container\" would be a lie (it was, measured: a value set on the\n parent changed nothing). Only the derived, internal sizes above are\n declared. */\n\n input[type='checkbox']:is(.ui, .ui-flat) {\n /* neutralise the global checkbox look (scale/translate from forms.css) */\n appearance: none;\n transform: none;\n position: relative;\n display: inline-flex;\n width: var(--switch-width);\n height: var(--switch-height);\n margin: 0;\n padding: 0;\n flex: 0 0 auto;\n border: var(--ui-border-width) solid\n var(--switch-rim-color, var(--switch-track-color, var(--ui-c-fourthly)));\n border-radius: var(--switch-height);\n background-color: var(--switch-track-color, var(--ui-c-fourthly));\n cursor: pointer;\n\n &::before {\n content: '';\n position: absolute;\n top: var(--switch-pad);\n left: var(--switch-pad);\n width: var(--switch-knob);\n height: var(--switch-knob);\n border-radius: 50%;\n background-color: var(--switch-knob-color, var(--ui-c-background));\n translate: 0 0;\n scale: 1;\n /* springy settle: the back-out bezier overshoots and pops in */\n transition:\n translate var(--switch-time) cubic-bezier(0.34, 1.56, 0.64, 1),\n scale calc(var(--switch-time) * 0.5) ease-out,\n background-color var(--switch-time) ease;\n }\n\n /* squash while pressing — stretches in travel direction, then releases */\n &:active:not(:disabled)::before {\n scale: 1.2 0.9;\n }\n\n &:checked::before {\n translate: var(--switch-travel) 0;\n background-color: var(--switch-knob-on-color, #2196f3);\n }\n\n &:focus-visible {\n outline: none;\n border-color: var(--switch-focus-color, var(--ui-c-focus));\n box-shadow: 0 0 calc(var(--ui-button-shadow) * 2) 0\n var(--switch-focus-color, var(--ui-c-focus));\n }\n\n &:disabled {\n cursor: default;\n }\n }\n\n /* Flat variant — active when the projected input carries `ui-flat`. Track\n and knob are pure surfaces: the rim disappears into the track and the\n knob drops its lift, so only the two areas speak. Focus is the one place\n the rim comes back — as a plain focus-colored border, never a glow;\n flat controls do not use shadows (see forms.css). */\n input[type='checkbox'].ui-flat {\n border-color: transparent;\n\n &::before {\n box-shadow: none;\n }\n\n /* The global flat rule (forms.css) answers focus with an 8% surface —\n right for a text field, wrong here: the track carries a color of its\n own. Keep it, and let the border do the talking. `:focus` (not just\n `:focus-visible`) because that is the selector being overridden. */\n &:focus {\n border-color: var(--switch-focus-color, var(--ui-c-focus));\n box-shadow: none;\n background-color: var(--switch-track-color, var(--ui-c-fourthly));\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n input[type='checkbox']:is(.ui, .ui-flat) {\n &::before {\n transition:\n translate var(--switch-time) ease,\n background-color var(--switch-time) ease;\n }\n\n &:active:not(:disabled)::before {\n scale: 1;\n }\n }\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[6354,7586],{"./libs/ui/src/lib/forms/validators/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_validators_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/validators/validators.component.stories.ts");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_validators_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"validators",children:"Validators"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["These directives provide common validation logic for input fields, integrating seamlessly with Angular's template-driven forms (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ngModel"}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"overview",children:"Overview"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The following validator directives are available:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsNumber"}),": Validates that the input is a valid number."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsHex"}),": Validates that the input is a valid hexadecimal string (3, 6, or 8 characters, optional #)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUrl"}),": Validates that the input is a valid URL."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputForbiddenName"}),": Validates that the input is NOT equal to a forbidden string."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUniqueName"}),": Validates that the input is unique against a list of existing values."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsbn"}),": Validates a full ISBN-10 or ISBN-13 (checksum verified; hyphens/spaces ignored, ISBN-10 optional trailing ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"X"}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputInteger"}),": Validates digits only and additionally ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"strips"})," every non-digit character live while typing (cooperates with the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clearable"})," clear button). Use on a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="text"'})," field with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'inputmode="numeric"'}),". Optional ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," signal inputs bound the range (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," is also capped live; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"})," is validated only)."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["In addition, Angular's built-in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"email"})," validator is fully supported — its\nerror is rendered with a localized message (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"form.errors.email"}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"built-in-email",children:["Built-in: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"email"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Angular's standard email validator (the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"email"})," attribute on an input with\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ngModel"}),"). No ui directive is needed; the error overlay shows the localized\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"form.errors.email"})," message."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Email Input">\n <input\n class="ui"\n type="email"\n email\n ngModel\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_validators_component_stories__WEBPACK_IMPORTED_MODULE_4__.Email}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputisnumber",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsNumber"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Ensures the input value is a valid number. It also automatically applies to any ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'input[type="number"]'}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Number Input">\n <input\n class="ui"\n type="text"\n uiInputIsNumber\n ngModel\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--is-number",children:"Open story: uiInputIsNumber"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputishex",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsHex"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Validates that the entered string is a valid hexadecimal value."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Note:"})," When the input field receives focus and is empty, it automatically prepends ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"#"})," for better user experience."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Hex Input">\n <input\n class="ui"\n type="text"\n uiInputIsHex\n ngModel\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--is-hex",children:"Open story: uiInputIsHex"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputurl",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUrl"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Validates that the entered string is a valid URL."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Note:"})," When the input field receives focus and is empty, it automatically prepends ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"https://"})," for better user experience."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="URL Input">\n <input\n class="ui"\n type="text"\n uiInputUrl\n ngModel\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--is-url",children:"Open story: uiInputUrl"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputforbiddenname",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputForbiddenName"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Invalidates the input if it matches a specific forbidden string."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Forbidden Name">\n <input\n class="ui"\n type="text"\n [uiInputForbiddenName]="\'forbidden\'"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n ngModel\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--forbidden-name",children:"Open story: uiInputForbiddenName"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputuniquename",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputUniqueName"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Ensures the input value does not exist in a given list of strings. Ideal for checking uniqueness (e.g., username availability in a local list)."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Unique Name">\n <input\n class="ui"\n type="text"\n [uiInputUniqueName]="[\'taken\', \'also-taken\']"\n ngModel\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n ui-tag\n />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--unique-name",children:"Open story: uiInputUniqueName"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputisbn",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputIsbn"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Validates a full ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"ISBN-10 or ISBN-13"}),", checksum included. Hyphens and spaces\nare ignored, and an ISBN-10 may end in an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"X"})," check digit. Invalid numbers and\ntypos are rejected. Empty is treated as valid (skip on optional fields)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="ISBN">\n <input class="ui" type="text" uiInputIsbn ngModel ui-tag />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--isbn",children:"Open story: uiInputIsbn"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h3,{id:"directive-uiinputinteger",children:["Directive: ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiInputInteger"})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Enforces ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"digits only"})," (a non-negative whole number). Beyond validating, it\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"removes"})," any non-digit character live as it is typed or pasted, so the field\ncan never hold letters — this pairs with the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clearable"})," clear button. Put it on\na ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="text"'})," input with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'inputmode="numeric"'})," (a native ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'type="number"'})," field\nreturns an empty value on invalid input, so the characters cannot be stripped)."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Optional ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," (signal inputs) bound the integer range. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"max"})," is enforced\nlive — typing past it caps the value — while ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"min"})," is checked on validation only,\nso a partial entry is not bumped up prematurely. Both accept a plain attribute\n(",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'min="0"'}),") or a binding (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'[max]="10"'}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Usage:"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-input label="Rating" clearable>\n <input\n class="ui"\n type="text"\n inputmode="numeric"\n uiInputInteger\n min="0"\n max="10"\n ngModel\n ui-tag />\n</ui-input>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/forms-validators--integer",children:"Open story: uiInputInteger"})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/validators/validators.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Email:()=>Email,ForbiddenName:()=>ForbiddenName,Integer:()=>Integer,IsHex:()=>IsHex,IsNumber:()=>IsNumber,IsUrl:()=>IsUrl,Isbn:()=>Isbn,UniqueName:()=>UniqueName,__namedExportsOrder:()=>__namedExportsOrder,default:()=>validators_component_stories});var _common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),header_component=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs");function controlForbiddenNameValidator(name){return control=>function forbiddenNameValidator(forbiddenName,value){return!(!forbiddenName||!value)&&new RegExp(`^${forbiddenName}$`,"i").test(value)}(name,control.value)?{inputForbiddenName:{value:control.value}}:null}let UiForbiddenValidatorDirective=class UiForbiddenValidatorDirective{uiInputForbiddenName="";validate(control){return this.uiInputForbiddenName?controlForbiddenNameValidator(this.uiInputForbiddenName)(control):null}static propDecorators={uiInputForbiddenName:[{type:_debug_node_chunk.pde}]}};UiForbiddenValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputForbiddenName]",providers:[{provide:fesm2022_forms.cz,useExisting:UiForbiddenValidatorDirective,multi:!0}]})],UiForbiddenValidatorDirective);var _effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");function controlIntegerValidator(){return control=>function integerValidator(value){return null!=value&&""!==value&&/^\d+$/.test(String(value))}(control.value)?null:{integer:!0}}let UiInputIntegerValidatorDirective=class UiInputIntegerValidatorDirective{elementRef=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);min=(0,core.input)(Number.NaN,{transform:core.numberAttribute});max=(0,core.input)(Number.NaN,{transform:core.numberAttribute});onInput(){const el=this.elementRef.nativeElement;let clean=el.value.replaceAll(/\D/g,"");const max=this.max();if(""!==clean&&Number.isFinite(max)&&Number(clean)>max&&(clean=String(max)),clean===el.value)return;const caret=Math.max(0,(el.selectionStart??clean.length)-1);el.value=clean,el.setSelectionRange?.(caret,caret),el.dispatchEvent(new Event("input",{bubbles:!0}))}validate(control){if(!control.value)return null;const base=controlIntegerValidator()(control);if(base)return base;const value=Number(control.value),min=this.min(),max=this.max();return Number.isFinite(min)&&value<min?{min:{min,actual:value}}:Number.isFinite(max)&&value>max?{max:{max,actual:value}}:null}static propDecorators={min:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"min",required:!1,transform:void 0}]}],max:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"max",required:!1,transform:void 0}]}],onInput:[{type:_debug_node_chunk.Z$l,args:["input"]}]}};function controlIsbnValidator(){return control=>function isbnValidator(value){if(!value)return!1;const s=String(value).replaceAll(/[\s-]/g,"").toUpperCase();if(/^\d{9}[\dX]$/.test(s)){let sum=0;for(let i=0;i<10;i++)sum+=("X"===s[i]?10:Number(s[i]))*(10-i);return sum%11==0}if(/^\d{13}$/.test(s)){let sum=0;for(let i=0;i<13;i++)sum+=Number(s[i])*(i%2==0?1:3);return sum%10==0}return!1}(control.value)?null:{isbn:!0}}UiInputIntegerValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputInteger]",providers:[{provide:fesm2022_forms.cz,useExisting:UiInputIntegerValidatorDirective,multi:!0}]})],UiInputIntegerValidatorDirective);let UiInputIsbnValidatorDirective=class UiInputIsbnValidatorDirective{validate(control){return control.value?controlIsbnValidator()(control):null}};UiInputIsbnValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsbn]",providers:[{provide:fesm2022_forms.cz,useExisting:UiInputIsbnValidatorDirective,multi:!0}]})],UiInputIsbnValidatorDirective);let UiIsHexValidatorDirective=class UiIsHexValidatorDirective{_control;onFocus(){this._control&&!this._control.value&&this._control.setValue("#")}validate(control){return this._control=control,control.value?(control=>{const isHex=function hexValidator(value){return!!value&&/^#?([\dA-Fa-f]{3}|[\dA-Fa-f]{6}|[\dA-Fa-f]{8})$/.test(value)}(control.value);return isHex?null:{hexNotValid:!isHex}})(control):null}static propDecorators={onFocus:[{type:_debug_node_chunk.Z$l,args:["focus"]}]}};UiIsHexValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsHex]",providers:[{provide:fesm2022_forms.cz,useExisting:UiIsHexValidatorDirective,multi:!0}]})],UiIsHexValidatorDirective);let UiIsNumberValidatorDirective=class UiIsNumberValidatorDirective{elementRef=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);validate(){return this.elementRef.nativeElement.checkValidity()?null:{numberNotValid:!0}}};UiIsNumberValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputIsNumber],input[type=number]",providers:[{provide:fesm2022_forms.cz,useExisting:UiIsNumberValidatorDirective,multi:!0}]})],UiIsNumberValidatorDirective);let UiUniqueValidatorDirective=class UiUniqueValidatorDirective{uiInputUniqueName=[];validate(control){return this.uiInputUniqueName?function controlNameValidator(existValues){return control=>{const unique=function uniqueValidator(existValues,value){return!existValues.includes(value)}(existValues,control.value);return unique?null:{inputUniqueName:{value:control.value}}}}(this.uiInputUniqueName)(control):null}static propDecorators={uiInputUniqueName:[{type:_debug_node_chunk.pde}]}};UiUniqueValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputUniqueName]",providers:[{provide:fesm2022_forms.cz,useExisting:UiUniqueValidatorDirective,multi:!0}]})],UiUniqueValidatorDirective);let UiUrlValidatorDirective=class UiUrlValidatorDirective{control;validate(control){return this.control=control,control.value?(control=>function urlValidator(value){return!!value&&/^(https?:\/\/)?([\d.a-z-]+)\.([.a-z]{2,6})([\w ./-]*)*\/?$/.test(value)}(control.value)?null:{urlNotValid:!0})(control):null}onFocus(){this.control&&!this.control.value&&this.control.setValue("https://")}static propDecorators={onFocus:[{type:_debug_node_chunk.Z$l,args:["focus"]}]}};UiUrlValidatorDirective=(0,tslib_es6.Cg)([(0,_debug_node_chunk.WLR)({selector:"[uiInputUrl]",providers:[{provide:fesm2022_forms.cz,useExisting:UiUrlValidatorDirective,multi:!0}]})],UiUrlValidatorDirective);var transloco_storybook_module=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),input_component=__webpack_require__("./libs/ui/src/lib/forms/input/input.component.ts");const validators_component_stories={title:"Forms/Validators",decorators:[(0,dist.Iz)({providers:[fesm2022_forms.vS],imports:[header_component.b,fesm2022_forms.YN,_common_module_chunk.TG,input_component.K,UiIsNumberValidatorDirective,UiIsHexValidatorDirective,UiUrlValidatorDirective,UiForbiddenValidatorDirective,UiUniqueValidatorDirective,UiInputIsbnValidatorDirective,UiInputIntegerValidatorDirective,transloco_storybook_module.o]})],parameters:{controls:{disable:!0},docs:{canvas:{sourceState:"none"}}}},data={EmailValue:"",NumberValue:null,HexNumberValue:"",ForbiddenName:"forbidden",ForbiddenNameValue:"",UniqueNames:["taken","also-taken"],UniqueNameValue:"",UrlValue:"",IsbnValue:"",IntegerValue:""},example=(ref,field)=>`\n <ui-intern-header [theme]="'theme-light'"></ui-intern-header>\n <section class="relative flex flex-col">\n ${field}\n <hr class="ui-dotted">\n <strong>${ref}.errors</strong>\n <code class="ui"><pre>{{ ${ref}.errors | json }}</pre></code>\n </section>\n`,IsNumber={render:()=>({props:{data},template:example("exampleIsNumber",'<ui-input label="Directive: uiInputIsNumber || type=number" uiError>\n <input\n class="ui"\n #exampleIsNumber="ngModel"\n [(ngModel)]="data.NumberValue"\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n type="number"\n name="exampleIsNumber" />\n </ui-input>')})},IsHex={render:()=>({props:{data},template:example("exampleIsHex",'<ui-input label="Directive: uiInputIsHex (with auto # on focus)" uiError>\n <input\n class="ui"\n #exampleIsHex="ngModel"\n [(ngModel)]="data.HexNumberValue"\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n type="text"\n uiInputIsHex\n name="exampleIsHex" />\n </ui-input>')})},IsUrl={render:()=>({props:{data},template:example("exampleIsUrl",'<ui-input label="Directive: uiInputUrl (with auto https:// on focus)" uiError>\n <input\n class="ui"\n #exampleIsUrl="ngModel"\n [(ngModel)]="data.UrlValue"\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n type="text"\n uiInputUrl\n name="exampleIsUrl" />\n </ui-input>')})},ForbiddenName={render:()=>({props:{data},template:example("exampleForbiddenName",'<ui-input [label]="\'Directive: uiInputForbiddenName=\'+(data.ForbiddenName | json)" uiError>\n <input\n class="ui"\n #exampleForbiddenName="ngModel"\n [(ngModel)]="data.ForbiddenNameValue"\n ui-tag\n type="text"\n [uiInputForbiddenName]="data.ForbiddenName"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n name="exampleForbiddenName" />\n </ui-input>')})},UniqueName={render:()=>({props:{data},template:example("exampleUniqueName",'<ui-input [label]="\'Directive: uiInputUniqueName=\'+(data.UniqueNames | json)" uiError>\n <input\n class="ui"\n #exampleUniqueName="ngModel"\n [(ngModel)]="data.UniqueNameValue"\n ui-tag\n type="text"\n [uiInputUniqueName]="data.UniqueNames"\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n name="exampleUniqueName" />\n </ui-input>')})},Email={render:()=>({props:{data},template:example("exampleEmail",'<ui-input label="Built-in: email || type=email" uiError>\n <input\n class="ui"\n #exampleEmail="ngModel"\n [(ngModel)]="data.EmailValue"\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n type="email"\n email\n name="exampleEmail" />\n </ui-input>')})},Isbn={render:()=>({props:{data},template:example("exampleIsbn",'<ui-input label="Directive: uiInputIsbn (ISBN-10/13, checksum)" uiError>\n <input\n class="ui"\n #exampleIsbn="ngModel"\n [(ngModel)]="data.IsbnValue"\n ui-tag\n type="text"\n uiInputIsbn\n name="exampleIsbn" />\n </ui-input>')})},Integer={parameters:{controls:{disable:!1}},argTypes:{min:{control:{type:"range",min:0,max:100,step:1},description:"Inclusive lower bound"},max:{control:{type:"range",min:0,max:100,step:1},description:"Inclusive upper bound (capped live while typing)"}},args:{min:0,max:10},render:args=>({props:{...args,data},template:example("exampleInteger",'<ui-input [label]="\'Directive: uiInputInteger (digits only, min \' + min + \' / max \' + max + \')\'" uiError clearable>\n <input\n class="ui"\n #exampleInteger="ngModel"\n [(ngModel)]="data.IntegerValue"\n ui-tag\n type="text"\n inputmode="numeric"\n uiInputInteger\n [min]="min"\n [max]="max"\n name="exampleInteger" />\n </ui-input>')})},__namedExportsOrder=["IsNumber","IsHex","IsUrl","ForbiddenName","UniqueName","Email","Isbn","Integer"];IsNumber.parameters={...IsNumber.parameters,docs:{...IsNumber.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsNumber\', `<ui-input label="Directive: uiInputIsNumber || type=number" uiError>\n <input\n class="ui"\n #exampleIsNumber="ngModel"\n [(ngModel)]="data.NumberValue"\n [placeholder]="\'form.placeholder.enterNumber\' | transloco"\n ui-tag\n type="number"\n name="exampleIsNumber" />\n </ui-input>`)\n })\n}',...IsNumber.parameters?.docs?.source}}},IsHex.parameters={...IsHex.parameters,docs:{...IsHex.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsHex\', `<ui-input label="Directive: uiInputIsHex (with auto # on focus)" uiError>\n <input\n class="ui"\n #exampleIsHex="ngModel"\n [(ngModel)]="data.HexNumberValue"\n [placeholder]="\'form.placeholder.enterHex\' | transloco"\n ui-tag\n type="text"\n uiInputIsHex\n name="exampleIsHex" />\n </ui-input>`)\n })\n}',...IsHex.parameters?.docs?.source}}},IsUrl.parameters={...IsUrl.parameters,docs:{...IsUrl.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsUrl\', `<ui-input label="Directive: uiInputUrl (with auto https:// on focus)" uiError>\n <input\n class="ui"\n #exampleIsUrl="ngModel"\n [(ngModel)]="data.UrlValue"\n [placeholder]="\'form.placeholder.enterUrl\' | transloco"\n ui-tag\n type="text"\n uiInputUrl\n name="exampleIsUrl" />\n </ui-input>`)\n })\n}',...IsUrl.parameters?.docs?.source}}},ForbiddenName.parameters={...ForbiddenName.parameters,docs:{...ForbiddenName.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleForbiddenName\', `<ui-input [label]="\'Directive: uiInputForbiddenName=\'+(data.ForbiddenName | json)" uiError>\n <input\n class="ui"\n #exampleForbiddenName="ngModel"\n [(ngModel)]="data.ForbiddenNameValue"\n ui-tag\n type="text"\n [uiInputForbiddenName]="data.ForbiddenName"\n [placeholder]="\'form.placeholder.enterForbiddenName\' | transloco"\n name="exampleForbiddenName" />\n </ui-input>`)\n })\n}',...ForbiddenName.parameters?.docs?.source}}},UniqueName.parameters={...UniqueName.parameters,docs:{...UniqueName.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleUniqueName\', `<ui-input [label]="\'Directive: uiInputUniqueName=\'+(data.UniqueNames | json)" uiError>\n <input\n class="ui"\n #exampleUniqueName="ngModel"\n [(ngModel)]="data.UniqueNameValue"\n ui-tag\n type="text"\n [uiInputUniqueName]="data.UniqueNames"\n [placeholder]="\'form.placeholder.enterUniqueName\' | transloco"\n name="exampleUniqueName" />\n </ui-input>`)\n })\n}',...UniqueName.parameters?.docs?.source}}},Email.parameters={...Email.parameters,docs:{...Email.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleEmail\', `<ui-input label="Built-in: email || type=email" uiError>\n <input\n class="ui"\n #exampleEmail="ngModel"\n [(ngModel)]="data.EmailValue"\n [placeholder]="\'form.placeholder.enterEmail\' | transloco"\n ui-tag\n type="email"\n email\n name="exampleEmail" />\n </ui-input>`)\n })\n}',...Email.parameters?.docs?.source}}},Isbn.parameters={...Isbn.parameters,docs:{...Isbn.parameters?.docs,source:{originalSource:'{\n render: () => ({\n props: {\n data\n },\n template: example(\'exampleIsbn\', `<ui-input label="Directive: uiInputIsbn (ISBN-10/13, checksum)" uiError>\n <input\n class="ui"\n #exampleIsbn="ngModel"\n [(ngModel)]="data.IsbnValue"\n ui-tag\n type="text"\n uiInputIsbn\n name="exampleIsbn" />\n </ui-input>`)\n })\n}',...Isbn.parameters?.docs?.source}}},Integer.parameters={...Integer.parameters,docs:{...Integer.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: false\n }\n },\n argTypes: {\n min: {\n control: {\n type: \'range\',\n min: 0,\n max: 100,\n step: 1\n },\n description: \'Inclusive lower bound\'\n },\n max: {\n control: {\n type: \'range\',\n min: 0,\n max: 100,\n step: 1\n },\n description: \'Inclusive upper bound (capped live while typing)\'\n }\n },\n args: {\n min: 0,\n max: 10\n },\n render: args => ({\n props: {\n ...args,\n data\n },\n template: example(\'exampleInteger\', `<ui-input [label]="\'Directive: uiInputInteger (digits only, min \' + min + \' / max \' + max + \')\'" uiError clearable>\n <input\n class="ui"\n #exampleInteger="ngModel"\n [(ngModel)]="data.IntegerValue"\n ui-tag\n type="text"\n inputmode="numeric"\n uiInputInteger\n [min]="min"\n [max]="max"\n name="exampleInteger" />\n </ui-input>`)\n })\n}',...Integer.parameters?.docs?.source},description:{story:"The one example with something to turn: the bounds. Sliders, and the\nlabel reads them back, so the field says what it is checking against.",...Integer.parameters?.docs?.description}}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3767],{"./libs/ui/src/lib/home/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_storybook_blocks_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");function _createMdxContent(props){const _components={code:"code",h3:"h3",p:"p",strong:"strong",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{title:"Home/Guide"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"guide",children:"Guide"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["What to reach for a component for, what not, what instead, and where it\ndemonstrably runs. Every entry is written by an agent from the sources it\nnames and read against a commit; the same entries are served to agents by\nthe catalog's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"get_guide"})," tool. The component page tells the truth — what\nit does and does not — and the guide is the offer next to it. Where the two\ndisagree, the page wins."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["This table is ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"generated from the guide folder"}),", not written beside it:\n",_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H.length," entries, reviewed at ",(0,_storybook_blocks_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.ED)(_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H).join(", "),'.\nEach subject links to the page where its full entry stands, under the\nsection "What it does, and what it does not".']}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{className:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Subject"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Use it for"})]})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tbody",{children:(0,_storybook_blocks_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.K9)(_storybook_blocks_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H).map(row=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:[row.href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href:row.href,children:row.subject}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:row.subject}),"situation"===row.kind&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("small",{children:" · situation"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:row.brief})]},row.subject))})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3143],{"./libs/ui/src/lib/home/tips.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{title:"Home/Tips & Tricks"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"tips--tricks",children:"Tips & Tricks"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Things that cost someone an hour before they were written down. Each entry\nnames the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"symptom"})," — what you actually see — and links to the page that\nexplains it and shows it working."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Two rules keep this page from rotting:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"An entry only appears here once its explanation exists somewhere else. This\npage is a signpost, never the only source."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"An entry that names a condition dies with it. When the condition is gone, the\nentry goes, and so does whatever workaround it points at."}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"an-icon-shows-a-word-instead-of-a-symbol",children:"An icon shows a word instead of a symbol"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A 96px ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"hme"})," where a house belongs. Material Icons draw an unknown ligature as\nplain text rather than failing, so a typo in an icon name looks like a broken\ncomponent."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["→ ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/styling-icons--docs",children:"Styling Icons"})})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"swapping-the-icon-font-or-not-using-it-at-all",children:"Swapping the icon font, or not using it at all"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"You want different icons, or you already ship your own set and would rather not\ncarry a second one."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Both font slots are CSS variables, so the drawing can be replaced — as long as\nthe replacement font uses the same ligature names. And ignoring ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:".ui-icon"}),"\nentirely is free: an unused ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"@font-face"})," is never downloaded."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["→ ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/styling-icons--docs",children:"Styling Icons: Bringing your own icons"})})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"which-component-for-this-and-what-to-reach-for-instead",children:"Which component for this, and what to reach for instead"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"You know what you want to build and not which part of the library it is —\nor you picked one and wonder whether it was the right one."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Every component page carries two sections under its title: the truth — what\nit does, and what it does not — and, below it, the guide: what to reach for\nit for, what not, what instead, and where it runs. The whole guide, one line\nper subject, is on the overview."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["→ ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/docs/home-guide--docs",children:"Home: Guide"})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
|