@mojawork/ui-docs 2.8.0 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/catalog/atoms/image-grid.md +1 -1
- package/catalog/atoms/typewriter.md +4 -3
- package/catalog/guide.json +4 -4
- package/catalog/manifest.json +3 -3
- package/catalog/version.json +2 -2
- package/package.json +1 -1
- package/storybook/1183.fafda52d.iframe.bundle.js +1 -0
- package/storybook/2033.986e1406.iframe.bundle.js +1 -0
- package/storybook/2089.d5a3e21e.iframe.bundle.js +1 -0
- package/storybook/2127.d7de271b.iframe.bundle.js +2 -0
- package/storybook/2228.7013a637.iframe.bundle.js +2 -0
- package/storybook/2621.b3ba2291.iframe.bundle.js +1 -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.525bbef9.iframe.bundle.js → 4555.c83b35c3.iframe.bundle.js} +1 -1
- package/storybook/4755.0561bac5.iframe.bundle.js +23 -0
- package/storybook/{4755.e4656207.iframe.bundle.js.map → 4755.0561bac5.iframe.bundle.js.map} +1 -1
- package/storybook/4935.f88465d9.iframe.bundle.js +1 -0
- package/storybook/5568.be85a9aa.iframe.bundle.js +1 -0
- package/storybook/6824.4b8f7b0a.iframe.bundle.js +1 -0
- package/storybook/8051.dbaf9937.iframe.bundle.js +1 -0
- package/storybook/871.5a781df6.iframe.bundle.js +1 -0
- package/storybook/8819.8e56201f.iframe.bundle.js +1 -0
- package/storybook/9850.5a17be74.iframe.bundle.js +1 -0
- package/storybook/9946.6fea16dc.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-banner-docs-mdx.f33bbf56.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-basic-interpreter-docs-mdx.81168b4c.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-music-player-docs-mdx.46f4887e.iframe.bundle.js +1 -0
- package/storybook/assets/ui/sounds/type.mp3 +0 -0
- package/storybook/atoms-_electrons-form-error-message-docs-mdx.9382b0cb.iframe.bundle.js +1 -0
- package/storybook/atoms-_electrons-loader-docs-mdx.e8bb9642.iframe.bundle.js +1 -0
- package/storybook/atoms-background-docs-mdx.0e861f2c.iframe.bundle.js +1 -0
- package/storybook/atoms-barcode-docs-mdx.78b610dc.iframe.bundle.js +1 -0
- package/storybook/atoms-buzzer-docs-mdx.f9daf952.iframe.bundle.js +1 -0
- package/storybook/atoms-card-docs-mdx.f8b63920.iframe.bundle.js +1 -0
- package/storybook/atoms-chart-docs-mdx.29f10b89.iframe.bundle.js +1 -0
- package/storybook/atoms-clock-docs-mdx.6864626c.iframe.bundle.js +1 -0
- package/storybook/atoms-copy-value-docs-mdx.fbe168e2.iframe.bundle.js +1 -0
- package/storybook/atoms-image-grid-docs-mdx.9df158a9.iframe.bundle.js +1 -0
- package/storybook/atoms-image-slider-docs-mdx.4ae341f5.iframe.bundle.js +1 -0
- package/storybook/atoms-inline-spinner-docs-mdx.8b942147.iframe.bundle.js +1 -0
- package/storybook/atoms-lang-selector-docs-mdx.0487b819.iframe.bundle.js +2 -0
- package/storybook/atoms-mosaic-docs-mdx.738f012c.iframe.bundle.js +1 -0
- package/storybook/atoms-placeholder-docs-mdx.7d376291.iframe.bundle.js +1 -0
- package/storybook/atoms-qr-code-docs-mdx.c47f67c9.iframe.bundle.js +1 -0
- package/storybook/atoms-rating-docs-mdx.d7df9a29.iframe.bundle.js +1 -0
- package/storybook/atoms-reader-doc-docs-mdx.f5375a37.iframe.bundle.js +1 -0
- package/storybook/atoms-text-animate-docs-mdx.152fc1bd.iframe.bundle.js +1 -0
- package/storybook/atoms-thumb-docs-mdx.525fc046.iframe.bundle.js +1 -0
- package/storybook/atoms-timer-docs-mdx.686f0392.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-docs-mdx.a6c3f6b0.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-typewriter-component-stories.3a4f5356.iframe.bundle.js +1 -0
- package/storybook/cdk-components-drag-and-drop-splitter-docs-mdx.0aa5b787.iframe.bundle.js +1 -0
- package/storybook/cdk-components-table-docs-mdx.74bd247c.iframe.bundle.js +1 -0
- package/storybook/examples-docs-mdx.1a9d8db0.iframe.bundle.js +1 -0
- package/storybook/examples-image-grid-slider-docs-mdx.e56160ef.iframe.bundle.js +1 -0
- package/storybook/examples-layout-docs-mdx.d7d6f90b.iframe.bundle.js +1 -0
- package/storybook/examples-table-edit-focus-docs-mdx.55960e55.iframe.bundle.js +1 -0
- package/storybook/examples-transloco-docs-mdx.46447d84.iframe.bundle.js +2 -0
- package/storybook/forms-autocomplete-docs-mdx.698eef62.iframe.bundle.js +2 -0
- package/storybook/forms-autofocus-docs-mdx.ce239261.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-checkbox-component-stories.df3196e5.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-docs-mdx.890972f3.iframe.bundle.js +1 -0
- package/storybook/forms-chip-docs-mdx.89a48075.iframe.bundle.js +1 -0
- package/storybook/forms-input-docs-mdx.56627297.iframe.bundle.js +1 -0
- package/storybook/forms-input-input-component-stories.b68ea104.iframe.bundle.js +1 -0
- package/storybook/forms-slider-docs-mdx.68b9e21c.iframe.bundle.js +1 -0
- package/storybook/forms-switch-docs-mdx.832228cb.iframe.bundle.js +1 -0
- package/storybook/forms-validators-docs-mdx.e11fe615.iframe.bundle.js +1 -0
- package/storybook/home-guide-mdx.2f32ffc1.iframe.bundle.js +1 -0
- package/storybook/{home-overview-mdx.a2833e60.iframe.bundle.js → home-overview-mdx.00ee5070.iframe.bundle.js} +1 -1
- package/storybook/home-tips-mdx.24dc3e35.iframe.bundle.js +1 -0
- package/storybook/iframe.html +2 -2
- package/storybook/layout-main-docs-mdx.445bce2a.iframe.bundle.js +1 -0
- package/storybook/layout-media-screen-docs-mdx.c382b73b.iframe.bundle.js +2 -0
- package/storybook/layout-nav-docs-mdx.92eac076.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-docs-mdx.a680859b.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-header-docs-mdx.6eb6e326.iframe.bundle.js +1 -0
- package/storybook/layout-spinner-docs-mdx.a792dea6.iframe.bundle.js +1 -0
- package/storybook/layout-splitter-docs-mdx.6b0e4fd2.iframe.bundle.js +1 -0
- package/storybook/layout-tabs-docs-mdx.aad59db3.iframe.bundle.js +1 -0
- package/storybook/layout-top-scroll-bottom-docs-mdx.42c18a0d.iframe.bundle.js +1 -0
- package/storybook/molecules-image-editor-docs-mdx.dba18ee6.iframe.bundle.js +1 -0
- package/storybook/project.json +1 -1
- package/storybook/{runtime~main.a2ec52c2.iframe.bundle.js → runtime~main.ec39977b.iframe.bundle.js} +1 -1
- package/storybook/styling-colors-docs-mdx.3f513a8d.iframe.bundle.js +1 -0
- package/storybook/styling-css-variables-docs-mdx.5a090407.iframe.bundle.js +1 -0
- package/storybook/styling-forms-docs-mdx.649ae948.iframe.bundle.js +1 -0
- package/storybook/styling-icons-docs-mdx.e3ed5ebd.iframe.bundle.js +1 -0
- package/storybook/styling-layers-docs-mdx.d810a2c8.iframe.bundle.js +1 -0
- package/storybook/styling-tags-docs-mdx.ce4814c9.iframe.bundle.js +1 -0
- package/storybook/styling-ui-tags-docs-mdx.d94258ab.iframe.bundle.js +1 -0
- package/storybook/version.json +2 -2
- package/version.json +2 -2
- package/storybook/1183.da25800b.iframe.bundle.js +0 -1
- package/storybook/2033.c705a7ce.iframe.bundle.js +0 -1
- package/storybook/2089.32694489.iframe.bundle.js +0 -1
- package/storybook/2127.29f153d2.iframe.bundle.js +0 -2
- package/storybook/2228.77650ef1.iframe.bundle.js +0 -2
- package/storybook/2621.2245d387.iframe.bundle.js +0 -1
- 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.7cb6414e.iframe.bundle.js +0 -1
- package/storybook/atoms-image-slider-docs-mdx.c616bb37.iframe.bundle.js +0 -1
- package/storybook/atoms-inline-spinner-docs-mdx.a98163b8.iframe.bundle.js +0 -1
- package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js +0 -2
- package/storybook/atoms-mosaic-docs-mdx.1aebfbdf.iframe.bundle.js +0 -1
- package/storybook/atoms-placeholder-docs-mdx.cd2f3976.iframe.bundle.js +0 -1
- package/storybook/atoms-qr-code-docs-mdx.4202568d.iframe.bundle.js +0 -1
- package/storybook/atoms-rating-docs-mdx.32fa4104.iframe.bundle.js +0 -1
- package/storybook/atoms-reader-doc-docs-mdx.1860338f.iframe.bundle.js +0 -1
- package/storybook/atoms-text-animate-docs-mdx.05e1baf4.iframe.bundle.js +0 -1
- package/storybook/atoms-thumb-docs-mdx.7286b617.iframe.bundle.js +0 -1
- package/storybook/atoms-timer-docs-mdx.6f724cc8.iframe.bundle.js +0 -1
- package/storybook/atoms-typewriter-docs-mdx.993bc264.iframe.bundle.js +0 -1
- package/storybook/atoms-typewriter-typewriter-component-stories.80f07c89.iframe.bundle.js +0 -1
- package/storybook/cdk-components-drag-and-drop-splitter-docs-mdx.f12088fd.iframe.bundle.js +0 -1
- package/storybook/cdk-components-table-docs-mdx.cc2c11e7.iframe.bundle.js +0 -1
- package/storybook/examples-docs-mdx.3111f2c6.iframe.bundle.js +0 -1
- package/storybook/examples-image-grid-slider-docs-mdx.d3578699.iframe.bundle.js +0 -1
- package/storybook/examples-layout-docs-mdx.bbacdfd2.iframe.bundle.js +0 -1
- package/storybook/examples-table-edit-focus-docs-mdx.3c0d1611.iframe.bundle.js +0 -1
- package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js +0 -2
- package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js +0 -2
- package/storybook/forms-autofocus-docs-mdx.39611362.iframe.bundle.js +0 -1
- package/storybook/forms-checkbox-checkbox-component-stories.d45b4f0d.iframe.bundle.js +0 -1
- package/storybook/forms-checkbox-docs-mdx.74036eb7.iframe.bundle.js +0 -1
- package/storybook/forms-chip-docs-mdx.01e1b518.iframe.bundle.js +0 -1
- package/storybook/forms-input-docs-mdx.72d0e99a.iframe.bundle.js +0 -1
- package/storybook/forms-input-input-component-stories.609db3f0.iframe.bundle.js +0 -1
- package/storybook/forms-slider-docs-mdx.120cefc6.iframe.bundle.js +0 -1
- package/storybook/forms-switch-docs-mdx.9d58a341.iframe.bundle.js +0 -1
- package/storybook/forms-validators-docs-mdx.ebb47a43.iframe.bundle.js +0 -1
- package/storybook/home-guide-mdx.1a176b15.iframe.bundle.js +0 -1
- package/storybook/home-tips-mdx.26df81d8.iframe.bundle.js +0 -1
- package/storybook/layout-main-docs-mdx.4c9208c5.iframe.bundle.js +0 -1
- package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js +0 -2
- package/storybook/layout-nav-docs-mdx.cc919f94.iframe.bundle.js +0 -1
- package/storybook/layout-overlay-docs-mdx.823351e0.iframe.bundle.js +0 -1
- package/storybook/layout-overlay-header-docs-mdx.394033ca.iframe.bundle.js +0 -1
- package/storybook/layout-spinner-docs-mdx.03741741.iframe.bundle.js +0 -1
- package/storybook/layout-splitter-docs-mdx.bf161b39.iframe.bundle.js +0 -1
- package/storybook/layout-tabs-docs-mdx.89d83606.iframe.bundle.js +0 -1
- package/storybook/layout-top-scroll-bottom-docs-mdx.ddc061f8.iframe.bundle.js +0 -1
- package/storybook/molecules-image-editor-docs-mdx.805dcd5a.iframe.bundle.js +0 -1
- package/storybook/styling-colors-docs-mdx.95c504e4.iframe.bundle.js +0 -1
- package/storybook/styling-css-variables-docs-mdx.48afb4f3.iframe.bundle.js +0 -1
- package/storybook/styling-forms-docs-mdx.943e72f2.iframe.bundle.js +0 -1
- package/storybook/styling-icons-docs-mdx.e1001dfd.iframe.bundle.js +0 -1
- package/storybook/styling-layers-docs-mdx.a563260e.iframe.bundle.js +0 -1
- package/storybook/styling-tags-docs-mdx.23ab2316.iframe.bundle.js +0 -1
- package/storybook/styling-ui-tags-docs-mdx.8f75631d.iframe.bundle.js +0 -1
- /package/storybook/{2127.29f153d2.iframe.bundle.js.LICENSE.txt → 2127.d7de271b.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{2228.77650ef1.iframe.bundle.js.LICENSE.txt → 2228.7013a637.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{4425.368129b3.iframe.bundle.js.LICENSE.txt → 4425.7f753a38.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{4755.e4656207.iframe.bundle.js.LICENSE.txt → 4755.0561bac5.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js.LICENSE.txt → atoms-lang-selector-docs-mdx.0487b819.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{examples-transloco-docs-mdx.97df7022.iframe.bundle.js.LICENSE.txt → examples-transloco-docs-mdx.46447d84.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js.LICENSE.txt → forms-autocomplete-docs-mdx.698eef62.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook/{layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js.LICENSE.txt → layout-media-screen-docs-mdx.c382b73b.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3678,8108],{"./libs/ui/.storybook/demos/header/header.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>UiInternHeaderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var header_componentngResource=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.css?ngResource"),header_componentngResource_default=__webpack_require__.n(header_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ui_config_types=__webpack_require__("./libs/ui/src/config/ui-config.types.ts"),layout_service=__webpack_require__("./libs/ui/src/lib/layout/_service/layout.service.ts");let UiInternHeaderComponent=class UiInternHeaderComponent{layoutService=(0,_effect_chunk2.WQX)(layout_service.u);theme=(0,core.input)(null);display=(0,core.input)(!1,{transform:core.booleanAttribute});onTop=(0,core.input)(!1,{transform:core.booleanAttribute});ngOnInit(){this.layoutService.handleTheme(this.theme(),ui_config_types.Q)}ngOnDestroy(){this.layoutService.handleTheme("theme-light",ui_config_types.Q)}setTheme(){this.layoutService.handleTheme(null,ui_config_types.Q)}static propDecorators={theme:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"theme",required:!1,transform:void 0}]}],display:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"display",required:!1,transform:void 0}]}],onTop:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"onTop",required:!1,transform:void 0}]}]}};UiInternHeaderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-intern-header",template:'@if (display()) {\n <button class="ui" [class._on-top]="onTop()" (click)="setTheme()">\n switch Theme\n </button>\n}\n',encapsulation:_debug_node_chunk.gXe.Emulated,standalone:!0,imports:[_common_module_chunk.MD],styles:[header_componentngResource_default()]})],UiInternHeaderComponent)},"./libs/ui/src/config/ui-config.types.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>uiConfigStorybookCssPrefix,y:()=>uiConfigTypes});const uiConfigStorybookCssPrefix="ui-storybook ",uiConfigTypes={mainID:"ui-main",mainClass:"ui-main",storeName:"ui-layout"}},"./libs/ui/src/lib/atoms/_electrons/form-error-message/form-error-message.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{d:()=>UiElectronFormErrorMessageComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var form_error_message_componentngResource=__webpack_require__("./libs/ui/src/lib/atoms/_electrons/form-error-message/form-error-message.component.css?ngResource"),form_error_message_componentngResource_default=__webpack_require__.n(form_error_message_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ngneat_transloco=__webpack_require__("./node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs");let UiElectronFormErrorMessageComponent=class UiElectronFormErrorMessageComponent{errors=(0,core.input)({});variant=(0,core.input)("field");static propDecorators={errors:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"errors",required:!1,transform:void 0}]}],variant:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"variant",required:!1,transform:void 0}]}]}};UiElectronFormErrorMessageComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-electron-form-error-message",template:"@if (errors()['required']) {\n <span\n >{{ 'form.errors.required' | transloco }}\n </span>\n}\n\n@if (errors()['minlength']) {\n <span>\n {{ 'form.errors.minlength' | transloco }}\n {{ errors()['minlength']['requiredLength'] }}\n </span>\n}\n\n@if (errors()['maxlength']) {\n <span>\n {{ 'form.errors.maxlength' | transloco }}\n {{ errors()['maxlength']['requiredLength'] }}\n </span>\n}\n\n@if (errors()['min']) {\n <span>\n {{ 'form.errors.min' | transloco }} {{ errors()['min']['min'] }}\n </span>\n}\n@if (errors()['max']) {\n <span>\n {{ 'form.errors.max' | transloco }} {{ errors()['max']['max'] }}\n </span>\n}\n@if (errors()['email']) {\n <span>{{\n 'form.errors.email' | transloco\n }}</span>\n}\n@if (errors()['numberNotValid']) {\n <span>{{\n 'form.errors.numberNotValid' | transloco\n }}</span>\n}\n@if (errors()['hexNotValid']) {\n <span>{{\n 'form.errors.hexNotValid' | transloco\n }}</span>\n}\n@if (errors()['urlInvalid']) {\n <span>{{\n 'form.errors.urlInvalid' | transloco\n }}</span>\n}\n@if (errors()['forbiddenName']) {\n <span>{{\n 'form.errors.forbiddenName' | transloco\n }}</span>\n}\n@if (errors()['uniqueName']) {\n <span>{{\n 'form.errors.uniqueName' | transloco\n }}</span>\n}\n@if (errors()['isbn']) {\n <span>{{\n 'form.errors.isbn' | transloco\n }}</span>\n}\n@if (errors()['integer']) {\n <span>{{\n 'form.errors.integer' | transloco\n }}</span>\n}\n\n@if (\n !errors()['required'] &&\n !errors()['minlength'] &&\n !errors()['maxlength'] &&\n !errors()['min'] &&\n !errors()['max'] &&\n !errors()['email'] &&\n !errors()['numberNotValid'] &&\n !errors()['hexNotValid'] &&\n !errors()['urlInvalid'] &&\n !errors()['forbiddenName'] &&\n !errors()['uniqueName'] &&\n !errors()['isbn'] &&\n !errors()['integer']\n ) {\n <span\n >\n {{ 'form.errors.unknown' | transloco }}\n </span>\n}\n",encapsulation:_debug_node_chunk.gXe.None,host:{"[class.floating]":"variant() === 'floating'"},imports:[ngneat_transloco.Kj],styles:[form_error_message_componentngResource_default()]})],UiElectronFormErrorMessageComponent)},"./libs/ui/src/lib/forms/_service/form-error-overlay.service.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>UiFormErrorOverlayService});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs");let UiFormErrorOverlayService=class UiFormErrorOverlayService{owner=(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.vPA)(null);openOwner=this.owner.asReadonly();toggle(owner){this.owner.update(current=>current===owner?null:owner)}};UiFormErrorOverlayService=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_1__._qm)({providedIn:"root"})],UiFormErrorOverlayService)},"./libs/ui/src/lib/forms/checkbox/checkbox.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>UiCheckboxComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var checkbox_componentngResource=__webpack_require__("./libs/ui/src/lib/forms/checkbox/checkbox.component.css?ngResource"),checkbox_componentngResource_default=__webpack_require__.n(checkbox_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"),_resource_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_resource-chunk.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),form_error_message_component=__webpack_require__("./libs/ui/src/lib/atoms/_electrons/form-error-message/form-error-message.component.ts"),form_error_overlay_service=__webpack_require__("./libs/ui/src/lib/forms/_service/form-error-overlay.service.ts");let nextId=0,UiCheckboxComponent=class UiCheckboxComponent{errorOverlay=(0,_effect_chunk2.WQX)(form_error_overlay_service.I);host=(0,_effect_chunk2.WQX)(_debug_node_chunk.aKT);label=(0,core.input)(null);display=(0,core.input)("none");uiError=(0,core.input)(!0,{transform:core.booleanAttribute});errorLabel=(0,core.input)("Errors");model=(0,core.contentChild)(fesm2022_forms.vS);fieldId=(0,_effect_chunk2.vPA)(null);showError(){const model=this.model();return this.uiError()&&Boolean(model?.errors)&&Boolean(model?.control?.touched||model?.control?.dirty||model?.formDirective?.submitted)}showOverlayError=(0,_resource_chunk.EW)(()=>this.errorOverlay.openOwner()===this);ngAfterContentInit(){const el=this.host.nativeElement.querySelector("[ui-tag]");el&&(el.id||(el.id="ui-checkbox-"+nextId++),this.fieldId.set(el.id))}toggleOverlayError(){this.errorOverlay.toggle(this)}static propDecorators={label:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"label",required:!1,transform:void 0}]}],display:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"display",required:!1,transform:void 0}]}],uiError:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"uiError",required:!1,transform:void 0}]}],errorLabel:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"errorLabel",required:!1,transform:void 0}]}],model:[{type:core.ContentChild,args:[fesm2022_forms.vS,{isSignal:!0}]}]}};UiCheckboxComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-checkbox",template:'<div\n [class._validation]="uiError()"\n [class._check-icon]="display() === \'check-icon\'"\n>\n @if (display() === \'check-icon\') {\n <div\n class="_check"\n [class._-active]="model()?.value"\n [class._-error]="showError()"\n >\n <span class="ui-icon">\n {{ model()?.value ? \'check\' : \'none\' }}\n </span>\n </div>\n }\n <ng-content select="[ui-tag]"></ng-content>\n\n @if (showError()) {\n \x3c!-- A button, not a span: the overlay is opened by a click, and a\n keyboard user needs a tab stop to do the same. --\x3e\n <button\n type="button"\n class="ui-flat _error-icon"\n [attr.aria-label]="errorLabel()"\n [attr.aria-expanded]="showOverlayError()"\n (click)="toggleOverlayError()"\n >\n <span class="ui-icon">{{ showOverlayError() ? \'cancel\' : \'error\' }}</span>\n </button>\n }\n</div>\n\n@if (label()) {\n <label class="ui-ellipsis" [attr.for]="fieldId()">{{ label() }}</label>\n}\n\n@if (showError() && showOverlayError() && model()?.errors; as errors) {\n <ui-electron-form-error-message\n variant="floating"\n [errors]="errors"\n ></ui-electron-form-error-message>\n}\n',encapsulation:_debug_node_chunk.gXe.None,imports:[form_error_message_component.d],styles:[checkbox_componentngResource_default()]})],UiCheckboxComponent)},"./libs/ui/src/lib/layout/_service/layout.service.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>UiLayoutService});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@ngx-pwa/local-storage/fesm2022/ngx-pwa-local-storage.mjs"),_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/config/ui-config.types.ts");let UiLayoutService=class UiLayoutService{storage=(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.WQX)(_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__.AX);settings={cssPrefix:"",theme:null,zoom:null,fullscreen:null,direction:"center",layoutSize:null};setStorage(){this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}handleInit(config){this.settings.cssPrefix=config.cssPrefix,this.settings.theme=config.theme,this.settings.zoom=config.zoom?"zoom":"x-zoom",this.settings.fullscreen=config.fullscreen?"fullscreen":"x-fullscreen",this.handleFullScreen(this.settings.fullscreen),this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data),this.setStorage(),this.setTheme(null)})}setTheme(theme){document.body.className=theme?`${this.settings.cssPrefix} ${theme}`:`${this.settings.cssPrefix} ${this.settings.theme}`}getTheme(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.theme}getMainClass(){return`${_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.mainClass} ${this.settings.zoom} ${this.settings.fullscreen}`}handleFullScreen(init){init?this.settings.fullscreen=init:"fullscreen"===this.settings.fullscreen?this.settings.fullscreen="x-fullscreen":this.settings.fullscreen="fullscreen",this.setStorage()}handleZoom(init){init?this.settings.zoom=init:"zoom"===this.settings.zoom?this.settings.zoom="x-zoom":this.settings.zoom="zoom",this.setStorage()}handleTheme(theme,prefix){return prefix&&(this.settings.cssPrefix=prefix),theme?(this.setTheme(theme),this.settings.theme=theme):(this.settings.theme="theme-light"===this.settings.theme?"theme-dark":"theme-light",this.setTheme(null)),this.setStorage(),this.settings.theme}handleDirection(type){this.settings.direction=type,this.setStorage()}setLayoutSize(sizes){this.settings.layoutSize=sizes,this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}getLayoutSize(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.layoutSize}};UiLayoutService=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_1__._qm)({providedIn:"root"})],UiLayoutService)},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/checkbox/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_checkbox_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/checkbox/checkbox.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_checkbox_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-checkbox.json");function _createMdxContent(props){const _components={a:"a",blockquote:"blockquote",code:"code",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_checkbox_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"checkbox",children:"Checkbox"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A reusable and customizable checkbox 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 styled wrapper around a projected native checkbox (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-tag"}),"): the label, an\noptional self-painted icon variant, and the validation display through\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiError"}),". Semantics, keyboard handling and form integration are the native\ninput's; the component adds the look and the error reporting. It is the control\nfor a choice that can be required or invalid — a toggle that is always valid\nis ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-switch"}),"."]}),"\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-checkbox",entry:_guide_ui_checkbox_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:"UiCheckboxComponent"})," provides a styled wrapper for standard checkbox inputs. It supports labels, different display types (like icons), and integration with Angular's validation system."]}),"\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__.jsx)(_components.p,{children:"The following properties can be used to configure the checkbox:"}),"\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 box. It is tied to the box: a\nprojected 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 ticks the\nbox, 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:"display"}),": (Input) The visual style of the checkbox ('none' | 'check-icon')."]}),"\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 validation errors are shown (boolean, default ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"true"}),"). It is on by default, so a checkbox reports an invalid state without being asked; set it to ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"false"})," where the surrounding form does the reporting itself."]}),"\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 checkbox properties."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.blockquote,{children:["\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:"})," This variant renders the native checkbox, and Safari is unreliable\nwith author-styled native controls — the focus state stays invisible, and a\nchecked box can even vanish under a transformed ancestor. Prefer the\nself-painted ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"#icon-example",children:"Icon Example"})," below; it renders identically in\nevery browser."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.Hl,{of:_checkbox_component_stories__WEBPACK_IMPORTED_MODULE_4__.Checkbox}),"\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-checkbox [label]="\'Checkbox Label\'">\n <input class="ui" ui-tag type="checkbox" [(ngModel)]="accepted" />\n</ui-checkbox>\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:"icon-example",children:"Icon Example"}),"\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-checkbox--checkbox-icon",children:"Open story: Icon"})}),"\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-checkbox [label]="\'Checkbox Icon\'" display="check-icon">\n <input class="ui" ui-tag type="checkbox" [(ngModel)]="accepted" />\n</ui-checkbox>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The glyph is sized to the box (no scaling hack) and thickened with a text\nstroke, because Material Icons ship a single weight."}),"\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-icon-example",children:"Flat Icon Example"}),"\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 box drops its own\nsurface and every shadow, and focus answers with an 8% surface instead of a\nring — the same language the flat fields speak. The frame stays, because\nwithout one a checkbox stops reading as a control. The error state keeps its\nred frame and shadow."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"That is the whole variant. Anything richer — a tinted tile behind the box, a\ncolored frame, a different check color for a specific surface — is styling an\napp puts on top; the library stays plain here on purpose, so it fits into any\nof them."}),"\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:"The colors of the check-icon box are hooks, so an app can fit it to whatever\nsurface it ends up on without out-specifying the library's own rules. Set them\non the element or anywhere above it — they inherit."}),"\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:"--ui-checkbox-border-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-secondary)"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Frame at rest."})]}),(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:"--ui-checkbox-border-color-checked"})}),(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:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Frame while checked — the default lets it blend into the filled\nsurface, so the check carries the state on 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:"--ui-checkbox-border-color-focus"})}),(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:"Frame while the box has focus."})]}),(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:"--ui-checkbox-check-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:"The check glyph."})]})]})]}),"\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-css",children:"/* e.g. an inline table editor: ink on every surface the row can take */\n._my-cell {\n --ui-checkbox-border-color: var(--ui-c-default);\n --ui-checkbox-border-color-checked: var(--ui-c-default);\n --ui-checkbox-border-color-focus: var(--ui-c-default);\n --ui-checkbox-check-color: var(--ui-c-default);\n}\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-checkbox--checkbox-icon-flat",children:"Open story: Flat Icon"})}),"\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-checkbox [label]="\'Checkbox Icon\'" display="check-icon">\n <input class="ui-flat" ui-tag type="checkbox" [(ngModel)]="accepted" />\n</ui-checkbox>\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-example",children:"Validation Example"}),"\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:"UiCheckboxComponent"})," supports Angular's validation system. As long as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"uiError"})," stays at its default ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"true"}),", the component visually indicates invalid states (e.g., when a required field is not checked) by showing a red error icon and border — once the box has been touched or changed, or the form around it submitted; the same rule as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-input"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The error icon is a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"button"})," above the box — a keyboard user reaches it\nwith Tab and opens the overlay with Enter; it carries ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"aria-expanded"}),".\nClicking it opens a floating error overlay with the validation messages;\nthe icon switches to a close icon while the overlay is open. Only\none error overlay is open at a time across all form fields — opening one\ncloses 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__.jsxs)(_components.p,{children:["The checkbox uses the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"floating"})," variant of the error message: a\nself-contained box that only fits its text, carries a full border and hovers\nwith a small gap below the checkbox (unlike the full-width, field-attached\nlook of text inputs)."]}),"\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-checkbox--checkbox-validation",children:"Open story: Validation"})}),"\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-checkbox [label]="\'Required Checkbox\'" [uiError]="true">\n <input class="ui" ui-tag type="checkbox" [(ngModel)]="accepted" required />\n</ui-checkbox>\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:"types-uicheckboxtype",children:"Types: UiCheckboxType"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Available display types:\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"'none' | 'check-icon'"})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/checkbox/checkbox.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Checkbox:()=>Checkbox,CheckboxIcon:()=>CheckboxIcon,CheckboxIconFlat:()=>CheckboxIconFlat,CheckboxValidation:()=>CheckboxValidation,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _Users_moja_projects_moja_code_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"),_checkbox_component__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/src/lib/forms/checkbox/checkbox.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Forms/Checkbox",component:_checkbox_component__WEBPACK_IMPORTED_MODULE_5__.j,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,_checkbox_component__WEBPACK_IMPORTED_MODULE_5__.j,_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_4__.o]})],argTypes:{label:{control:"text"},display:{control:"select",options:["none","check-icon"]},uiError:{table:{disable:!0}},accepted:{control:"boolean"},required:{control:"boolean"}},args:{label:"Checkbox Label",display:"check-icon",accepted:!1,required:!1},parameters:{docs:{canvas:{sourceState:"none"}}}},onlyAccepted={label:{table:{disable:!0}},display:{table:{disable:!0}},required:{table:{disable:!0}}},Checkbox={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-checkbox [label]="label">\n <input\n class="ui"\n ui-tag\n [(ngModel)]="accepted"\n type="checkbox"\n [required]="required"\n />\n </ui-checkbox>\n </section>\n '})},CheckboxIcon={argTypes:onlyAccepted,render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col gap-4">\n <ui-checkbox [label]="\'Icon Checkbox\'" display="check-icon">\n <input class="ui" ui-tag type="checkbox" [(ngModel)]="accepted" />\n </ui-checkbox>\n\n <ui-checkbox [label]="\'Icon Checkbox (checked)\'" display="check-icon">\n <input class="ui" ui-tag type="checkbox" [ngModel]="true" />\n </ui-checkbox>\n </section>\n '})},CheckboxIconFlat={argTypes:onlyAccepted,render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col gap-4">\n <ui-checkbox [label]="\'Flat Icon Checkbox\'" display="check-icon">\n <input class="ui-flat" ui-tag type="checkbox" [(ngModel)]="accepted" />\n </ui-checkbox>\n\n <ui-checkbox [label]="\'Flat Icon Checkbox (checked)\'" display="check-icon">\n <input class="ui-flat" ui-tag type="checkbox" [ngModel]="true" />\n </ui-checkbox>\n </section>\n '})},CheckboxValidation={argTypes:{label:{table:{disable:!0}},display:{table:{disable:!0}}},args:{required:!0},play:(_ref=(0,_Users_moja_projects_moja_code_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},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <form class="relative flex flex-col pt-8 h-40" novalidate (ngSubmit)="(0)">\n <ui-checkbox [label]="\'required\'" display="check-icon">\n <input class="ui" ui-tag type="checkbox" name="accepted" [(ngModel)]="accepted" [required]="required" />\n </ui-checkbox>\n </form>\n '})};var _ref;const __namedExportsOrder=["Checkbox","CheckboxIcon","CheckboxIconFlat","CheckboxValidation"];Checkbox.parameters={...Checkbox.parameters,docs:{...Checkbox.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-checkbox [label]="label">\n <input\n class="ui"\n ui-tag\n [(ngModel)]="accepted"\n type="checkbox"\n [required]="required"\n />\n </ui-checkbox>\n </section>\n `\n };\n }\n}',...Checkbox.parameters?.docs?.source}}},CheckboxIcon.parameters={...CheckboxIcon.parameters,docs:{...CheckboxIcon.parameters?.docs,source:{originalSource:'{\n argTypes: onlyAccepted,\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-4">\n <ui-checkbox [label]="\'Icon Checkbox\'" display="check-icon">\n <input class="ui" ui-tag type="checkbox" [(ngModel)]="accepted" />\n </ui-checkbox>\n\n <ui-checkbox [label]="\'Icon Checkbox (checked)\'" display="check-icon">\n <input class="ui" ui-tag type="checkbox" [ngModel]="true" />\n </ui-checkbox>\n </section>\n `\n };\n }\n}',...CheckboxIcon.parameters?.docs?.source}}},CheckboxIconFlat.parameters={...CheckboxIconFlat.parameters,docs:{...CheckboxIconFlat.parameters?.docs,source:{originalSource:'{\n argTypes: onlyAccepted,\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-4">\n <ui-checkbox [label]="\'Flat Icon Checkbox\'" display="check-icon">\n <input class="ui-flat" ui-tag type="checkbox" [(ngModel)]="accepted" />\n </ui-checkbox>\n\n <ui-checkbox [label]="\'Flat Icon Checkbox (checked)\'" display="check-icon">\n <input class="ui-flat" ui-tag type="checkbox" [ngModel]="true" />\n </ui-checkbox>\n </section>\n `\n };\n }\n}',...CheckboxIconFlat.parameters?.docs?.source}}},CheckboxValidation.parameters={...CheckboxValidation.parameters,docs:{...CheckboxValidation.parameters?.docs,source:{originalSource:'{\n argTypes: onlyValidation,\n args: {\n required: true\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 pt-8 h-40" novalidate (ngSubmit)="(0)">\n <ui-checkbox [label]="\'required\'" display="check-icon">\n <input class="ui" ui-tag type="checkbox" name="accepted" [(ngModel)]="accepted" [required]="required" />\n </ui-checkbox>\n </form>\n `\n };\n }\n}',...CheckboxValidation.parameters?.docs?.source},description:{story:"Arrives submitted (a play step), so the reader sees the mark and the red\nframe without first touching the box — a required checkbox is the one\ncontrol that is invalid at rest.",...CheckboxValidation.parameters?.docs?.description}}}},"./libs/ui/.storybook/demos/header/header.component.css?ngResource"(module,__unused_webpack_exports,__webpack_require__){var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"/* The intern header is reduced to just the theme switch button, pinned to the */\n/* bottom-left corner of the Storybook canvas. */\nbutton {\n position: fixed;\n bottom: calc(var(--ui-spacer) * 0.5);\n left: calc(var(--ui-spacer) * 0.5);\n z-index: 1000;\n\n &._on-top {\n z-index: 10000;\n }\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/atoms/_electrons/form-error-message/form-error-message.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-electron-form-error-message {\n position: absolute;\n bottom: 0;\n left: 0;\n display: flex;\n flex-flow: column;\n /* Same width as the wrapped input (which is `100% - 0.25·spacer` wide) and\n flush against its bottom edge — reads as a continuation of the field's\n error border (aligned on both sides, no gap, no shadow). */\n width: calc(100% - var(--ui-spacer) * 0.25);\n transform: translateY(100%);\n background-color: var(--ui-c-background);\n border: var(--ui-border-width) solid var(--ui-c-error);\n border-top: 0;\n border-radius: 0 0 var(--ui-border-radius) var(--ui-border-radius);\n padding: calc(var(--ui-spacer) * 0.25);\n max-height: 12rem;\n overflow-y: auto;\n z-index: 1;\n span {\n border-bottom: var(--ui-border-width) solid var(--ui-c-fourthly);\n padding-bottom: calc(var(--ui-spacer) * 0.25);\n margin-bottom: calc(var(--ui-spacer) * 0.25);\n\n &:last-of-type {\n border: 0;\n }\n\n &:only-of-type {\n padding-bottom: 0;\n margin-bottom: 0;\n }\n }\n\n /* Self-contained box below compact controls (checkbox): fits its text,\n carries its own full border (incl. top) and hovers with a small gap. */\n &.floating {\n width: fit-content;\n max-width: 100%;\n transform: translateY(calc(100% + var(--ui-spacer) * 0.15));\n border: var(--ui-border-width) solid var(--ui-c-error);\n border-radius: var(--ui-border-radius);\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./libs/ui/src/lib/forms/checkbox/checkbox.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-checkbox {\n /* scope only for component - encapsulation is set to ViewEncapsulation.None */\n\n /* Themable hooks for the check-icon box (tickets#146). Apps recolor the\n box by setting these on (or above) the element — no out-specifying of\n the library's own rules, and no assumptions here about which surface the\n box will end up sitting on. */\n --ui-checkbox-border-color: var(--ui-c-secondary);\n --ui-checkbox-border-color-checked: var(--ui-c-fourthly);\n --ui-checkbox-border-color-focus: var(--ui-c-focus);\n --ui-checkbox-check-color: var(--ui-c-focus);\n\n position: relative;\n display: grid;\n grid-template-columns: auto 1fr;\n grid-gap: calc(var(--ui-spacer) * 0.4);\n max-width: 100%;\n align-items: center;\n\n /* The error mark: a button above the box, so a keyboard user can reach it\n and open the overlay; its position is the checkbox's own gestalt. (The\n `._-error` modifier below is the BOX's error state, a different thing.) */\n ._error-icon {\n position: absolute;\n top: calc((var(--ui-spacer) * -1) * 0.6);\n left: 0;\n transform: translateX(60%);\n width: 24px;\n height: 24px;\n min-width: 24px;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ui-c-error);\n cursor: pointer;\n }\n\n ._check-icon {\n position: relative;\n display: flex;\n margin-right: calc(var(--ui-spacer) * 0.25);\n\n ._error-icon {\n transform: translate(80%, -50%);\n }\n\n ._check {\n position: absolute;\n top: 50%;\n left: 0;\n transform: translate(-0%, -50%);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n /* Three quarters of the icon box: a whole-pixel size at the default\n icon scale. A fractional box lands its border and its centred glyph\n between device pixels, which the browser then renders soft. */\n width: calc(var(--ui-icon-size) * 0.75);\n height: calc(var(--ui-icon-size) * 0.75);\n color: var(--ui-checkbox-check-color);\n background-color: var(--ui-c-fourthly);\n border: var(--ui-border-width) solid var(--ui-checkbox-border-color);\n border-radius: var(--ui-border-radius);\n cursor: pointer;\n\n &._-active {\n border-color: var(--ui-checkbox-border-color-checked);\n }\n\n &._-error {\n outline: none;\n border: var(--ui-border-width) solid var(--ui-c-error);\n box-shadow: 0 0 calc(var(--ui-button-shadow) * 2) 0 var(--ui-c-error);\n }\n\n /* The glyph is sized to the box instead of being scaled up and nudged\n back into place — the check now sits inside the frame at every\n icon size. Material Icons ship a single weight, so the stroke does\n the bolding (font-weight would do nothing). */\n .ui-icon {\n font-size: calc(var(--ui-icon-size) * 0.75);\n -webkit-text-stroke: 0.06em currentColor;\n }\n }\n\n &:focus-within {\n ._check {\n outline: none;\n border: var(--ui-border-width) solid var(--ui-checkbox-border-color-focus);\n box-shadow: 0 0 calc(var(--ui-button-shadow) * 2) 0 var(--ui-c-focus);\n }\n }\n\n /* Flat variant — active when the projected input carries `ui-flat`.\n House flat language (see forms.css) and nothing beyond it: the box\n keeps its frame (without one it stops reading as a checkbox) but\n drops its own surface, and focus answers with an 8% surface instead\n of a ring — flat controls never use shadows. Everything richer\n (tinted tiles, colored frames, a different check color) is an app's\n business, not the library's. The error state keeps its red frame and\n shadow. */\n &:has([ui-tag].ui-flat) {\n ._check:not(._-error) {\n background-color: transparent;\n }\n\n &:focus-within ._check:not(._-error) {\n box-shadow: none;\n background-color: color-mix(in srgb, var(--ui-c-focus) 8%, transparent);\n }\n }\n\n input[type='checkbox'] {\n position: absolute;\n top: 0;\n left: 0;\n transform: translate(14%, 10%);\n opacity: 0;\n scale: 2.8;\n }\n }\n\n /* The native box: red once invalid AND the user has been there — the\n untouched rule below undoes the red until then — and red as well after a\n submit, whose flag sits on the form OUTSIDE the component (hence the\n rule that starts there; same fix as ui-input). */\n ._validation {\n .ng-invalid {\n outline: none;\n border: var(--ui-border-width) solid var(--ui-c-error);\n box-shadow: 0 0 calc(var(--ui-button-shadow) * 2) 0 var(--ui-c-error);\n }\n\n .ng-untouched {\n outline: none;\n border: var(--ui-border-width) solid var(--ui-c-default);\n box-shadow: none;\n }\n }\n\n .ng-submitted & ._validation .ng-invalid.ng-untouched {\n border: var(--ui-border-width) solid var(--ui-c-error);\n box-shadow: 0 0 calc(var(--ui-button-shadow) * 2) 0 var(--ui-c-error);\n }\n}\n}\n",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/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()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/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_moja_code_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_moja_code_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_moja_code_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}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
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_moja_code_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_moja_code_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_moja_code_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}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[6252,6922],{"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/slider/slider.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Disabled:()=>Disabled,Range:()=>Range,Slider:()=>Slider,ValueHidden:()=>ValueHidden,WithSteps:()=>WithSteps,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _angular_forms__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),_storybook_angular__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/angular/dist/index.js"),_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.ts"),_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/transloco-modules/transloco-storybook.module.ts"),_slider_component__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/forms/slider/slider.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Forms/Slider",component:_slider_component__WEBPACK_IMPORTED_MODULE_4__.H,decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_1__.Iz)({providers:[_angular_forms__WEBPACK_IMPORTED_MODULE_0__.vS],imports:[_storybook_demos_header_header_component__WEBPACK_IMPORTED_MODULE_2__.b,_angular_forms__WEBPACK_IMPORTED_MODULE_0__.YN,_slider_component__WEBPACK_IMPORTED_MODULE_4__.H,_transloco_modules_transloco_storybook_module__WEBPACK_IMPORTED_MODULE_3__.o]})],argTypes:{label:{control:"text"},sliderType:{control:"select",options:["single","range"]},showValue:{control:"boolean"},value:{control:{type:"range",min:0,max:100,step:1}},low:{control:{type:"range",min:0,max:100,step:1}},high:{control:{type:"range",min:0,max:100,step:1}},min:{control:{type:"range",min:0,max:100,step:1}},max:{control:{type:"range",min:0,max:100,step:1}},step:{control:{type:"range",min:1,max:25,step:1}}},args:{label:"Volume",sliderType:"single",showValue:!0,value:40,low:25,high:75,min:0,max:100,step:1},parameters:{docs:{canvas:{sourceState:"none"}}}},hide=(...names)=>Object.fromEntries(names.map(n=>[n,{table:{disable:!0}}])),Slider={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n @if (sliderType === \'range\') {\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n } @else {\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n }\n </section>\n '})},Range={argTypes:hide("label","sliderType","showValue","value"),args:{label:"Price",sliderType:"range"},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},WithSteps={argTypes:hide("label","sliderType","showValue","low","high"),args:{label:"Rating",value:6,min:0,max:10,step:2},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},ValueHidden={parameters:{controls:{disable:!0}},args:{showValue:!1},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n '})},Disabled={parameters:{controls:{disable:!0}},render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" disabled />\n </ui-slider>\n </section>\n '})},__namedExportsOrder=["Slider","Range","WithSteps","ValueHidden","Disabled"];Slider.parameters={...Slider.parameters,docs:{...Slider.parameters?.docs,source:{originalSource:'{\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n @if (sliderType === \'range\') {\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n } @else {\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n }\n </section>\n `\n })\n}',...Slider.parameters?.docs?.source},description:{story:"The whole panel: `sliderType` switches between one thumb and two, so\n`value` drives the single slider and `low`/`high` the range — every row\nmoves something in one of the two modes. One `ui-slider` per branch, not\nan `@if` around the projected inputs: a control-flow block with two root\nnodes is projected into the default slot, and the slider has none — the\nthumbs would be bound and invisible.",...Slider.parameters?.docs?.description}}},Range.parameters={...Range.parameters,docs:{...Range.parameters?.docs,source:{originalSource:'{\n argTypes: hide(\'label\', \'sliderType\', \'showValue\', \'value\'),\n args: {\n label: \'Price\',\n sliderType: \'range\'\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" sliderType="range" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />\n <input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...Range.parameters?.docs?.source}}},WithSteps.parameters={...WithSteps.parameters,docs:{...WithSteps.parameters?.docs,source:{originalSource:'{\n argTypes: hide(\'label\', \'sliderType\', \'showValue\', \'low\', \'high\'),\n args: {\n label: \'Rating\',\n value: 6,\n min: 0,\n max: 10,\n step: 2\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...WithSteps.parameters?.docs?.source}}},ValueHidden.parameters={...ValueHidden.parameters,docs:{...ValueHidden.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n args: {\n showValue: false\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="false">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />\n </ui-slider>\n </section>\n `\n })\n}',...ValueHidden.parameters?.docs?.source}}},Disabled.parameters={...Disabled.parameters,docs:{...Disabled.parameters?.docs,source:{originalSource:'{\n parameters: {\n controls: {\n disable: true\n }\n },\n render: args => ({\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light"></ui-intern-header>\n <section class="relative flex flex-col w-96">\n <ui-slider [label]="label" [showValue]="showValue">\n <input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" disabled />\n </ui-slider>\n </section>\n `\n })\n}',...Disabled.parameters?.docs?.source}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[977,3048],{"./libs/ui/.storybook/demos/header/header.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{b:()=>UiInternHeaderComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var header_componentngResource=__webpack_require__("./libs/ui/.storybook/demos/header/header.component.css?ngResource"),header_componentngResource_default=__webpack_require__.n(header_componentngResource),_common_module_chunk=__webpack_require__("./node_modules/@angular/common/fesm2022/_common_module-chunk.mjs"),_effect_chunk2=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),_debug_node_chunk=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),ui_config_types=__webpack_require__("./libs/ui/src/config/ui-config.types.ts"),layout_service=__webpack_require__("./libs/ui/src/lib/layout/_service/layout.service.ts");let UiInternHeaderComponent=class UiInternHeaderComponent{layoutService=(0,_effect_chunk2.WQX)(layout_service.u);theme=(0,core.input)(null);display=(0,core.input)(!1,{transform:core.booleanAttribute});onTop=(0,core.input)(!1,{transform:core.booleanAttribute});ngOnInit(){this.layoutService.handleTheme(this.theme(),ui_config_types.Q)}ngOnDestroy(){this.layoutService.handleTheme("theme-light",ui_config_types.Q)}setTheme(){this.layoutService.handleTheme(null,ui_config_types.Q)}static propDecorators={theme:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"theme",required:!1,transform:void 0}]}],display:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"display",required:!1,transform:void 0}]}],onTop:[{type:_debug_node_chunk.pde,args:[{isSignal:!0,alias:"onTop",required:!1,transform:void 0}]}]}};UiInternHeaderComponent=(0,tslib_es6.Cg)([(0,_debug_node_chunk.uAl)({selector:"ui-intern-header",template:'@if (display()) {\n <button class="ui" [class._on-top]="onTop()" (click)="setTheme()">\n switch Theme\n </button>\n}\n',encapsulation:_debug_node_chunk.gXe.Emulated,standalone:!0,imports:[_common_module_chunk.MD],styles:[header_componentngResource_default()]})],UiInternHeaderComponent)},"./libs/ui/src/config/ui-config.types.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Q:()=>uiConfigStorybookCssPrefix,y:()=>uiConfigTypes});const uiConfigStorybookCssPrefix="ui-storybook ",uiConfigTypes={mainID:"ui-main",mainClass:"ui-main",storeName:"ui-layout"}},"./libs/ui/src/lib/layout/_service/layout.service.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{u:()=>UiLayoutService});var tslib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@angular/core/fesm2022/_debug_node-chunk.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@angular/core/fesm2022/_effect-chunk2.mjs"),_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@ngx-pwa/local-storage/fesm2022/ngx-pwa-local-storage.mjs"),_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/config/ui-config.types.ts");let UiLayoutService=class UiLayoutService{storage=(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.WQX)(_ngx_pwa_local_storage__WEBPACK_IMPORTED_MODULE_3__.AX);settings={cssPrefix:"",theme:null,zoom:null,fullscreen:null,direction:"center",layoutSize:null};setStorage(){this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}handleInit(config){this.settings.cssPrefix=config.cssPrefix,this.settings.theme=config.theme,this.settings.zoom=config.zoom?"zoom":"x-zoom",this.settings.fullscreen=config.fullscreen?"fullscreen":"x-fullscreen",this.handleFullScreen(this.settings.fullscreen),this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data),this.setStorage(),this.setTheme(null)})}setTheme(theme){document.body.className=theme?`${this.settings.cssPrefix} ${theme}`:`${this.settings.cssPrefix} ${this.settings.theme}`}getTheme(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.theme}getMainClass(){return`${_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.mainClass} ${this.settings.zoom} ${this.settings.fullscreen}`}handleFullScreen(init){init?this.settings.fullscreen=init:"fullscreen"===this.settings.fullscreen?this.settings.fullscreen="x-fullscreen":this.settings.fullscreen="fullscreen",this.setStorage()}handleZoom(init){init?this.settings.zoom=init:"zoom"===this.settings.zoom?this.settings.zoom="x-zoom":this.settings.zoom="zoom",this.setStorage()}handleTheme(theme,prefix){return prefix&&(this.settings.cssPrefix=prefix),theme?(this.setTheme(theme),this.settings.theme=theme):(this.settings.theme="theme-light"===this.settings.theme?"theme-dark":"theme-light",this.setTheme(null)),this.setStorage(),this.settings.theme}handleDirection(type){this.settings.direction=type,this.setStorage()}setLayoutSize(sizes){this.settings.layoutSize=sizes,this.storage.set(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName,this.settings).subscribe()}getLayoutSize(){return this.storage.get(_config_ui_config_types__WEBPACK_IMPORTED_MODULE_4__.y.storeName).subscribe(data=>{data&&(this.settings=data)}),this.settings.layoutSize}};UiLayoutService=(0,tslib__WEBPACK_IMPORTED_MODULE_0__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_1__._qm)({providedIn:"root"})],UiLayoutService)},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,file_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_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_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/forms/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()}}]);
|