@mojawork/ui-docs 2.9.0 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/README.md +2 -2
  2. package/catalog/atoms/image-grid.md +27 -13
  3. package/catalog/guide.json +6 -6
  4. package/catalog/manifest.json +4 -4
  5. package/catalog/version.json +2 -2
  6. package/package.json +1 -1
  7. package/storybook/2621.fdb0f39b.iframe.bundle.js +2 -0
  8. package/storybook/2621.fdb0f39b.iframe.bundle.js.map +1 -0
  9. package/storybook/{4555.767c4a26.iframe.bundle.js → 4555.755c5b81.iframe.bundle.js} +2 -2
  10. package/storybook/{4555.767c4a26.iframe.bundle.js.map → 4555.755c5b81.iframe.bundle.js.map} +1 -1
  11. package/storybook/atoms-image-grid-docs-mdx.66afba9a.iframe.bundle.js +2 -0
  12. package/storybook/atoms-image-grid-docs-mdx.66afba9a.iframe.bundle.js.map +1 -0
  13. package/storybook/atoms-image-grid-image-grid-component-stories.18152774.iframe.bundle.js +2 -0
  14. package/storybook/atoms-image-grid-image-grid-component-stories.18152774.iframe.bundle.js.map +1 -0
  15. package/storybook/home-overview-mdx.8b0a9768.iframe.bundle.js +2 -0
  16. package/storybook/{home-overview-mdx.9521137d.iframe.bundle.js.map → home-overview-mdx.8b0a9768.iframe.bundle.js.map} +1 -1
  17. package/storybook/iframe.html +1 -1
  18. package/storybook/project.json +1 -1
  19. package/storybook/{runtime~main.1fc884d5.iframe.bundle.js → runtime~main.299654f7.iframe.bundle.js} +2 -2
  20. package/storybook/{runtime~main.1fc884d5.iframe.bundle.js.map → runtime~main.299654f7.iframe.bundle.js.map} +1 -1
  21. package/storybook/version.json +2 -2
  22. package/version.json +2 -2
  23. package/storybook/2621.41931f1f.iframe.bundle.js +0 -2
  24. package/storybook/2621.41931f1f.iframe.bundle.js.map +0 -1
  25. package/storybook/atoms-image-grid-docs-mdx.884fa455.iframe.bundle.js +0 -2
  26. package/storybook/atoms-image-grid-docs-mdx.884fa455.iframe.bundle.js.map +0 -1
  27. package/storybook/atoms-image-grid-image-grid-component-stories.c2cb1e12.iframe.bundle.js +0 -2
  28. package/storybook/atoms-image-grid-image-grid-component-stories.c2cb1e12.iframe.bundle.js.map +0 -1
  29. package/storybook/home-overview-mdx.9521137d.iframe.bundle.js +0 -2
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[8039],{"./libs/ui/src/lib/atoms/image-grid/image-grid.component.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);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"),_image_mock__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./libs/ui/src/lib/atoms/image.mock.ts"),_image_grid_click_area_directive__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid-click-area.directive.ts"),_image_grid_component__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Atoms/Image Grid",component:_image_grid_component__WEBPACK_IMPORTED_MODULE_5__.p,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,_image_grid_component__WEBPACK_IMPORTED_MODULE_5__.p,_image_grid_click_area_directive__WEBPACK_IMPORTED_MODULE_4__.u]})],argTypes:{cols:{control:{type:"range",min:1,max:16,step:1}},gap:{control:{type:"range",min:0,max:64,step:1}},height:{control:{type:"range",min:100,max:1e3,step:10}},setIndex:{control:{type:"range",min:0,max:24,step:1}},tileHeight:{control:{type:"range",min:40,max:300,step:10}},tileAspect:{control:"select",options:["1/1","16/9","4/3","2/3"]},imageFit:{control:"select",options:["none","cover","contain"]},action:{control:"boolean"},loaded:{control:"boolean"},singleRow:{control:"boolean"},overlayType:{control:"select",options:["default","doors"]},currentIndex:{table:{disable:!0}},clickIndex:{table:{disable:!0}},data:{control:"object"}},parameters:{docs:{canvas:{sourceState:"none"},source:{code:null}}},args:{cols:4,gap:4,height:520,setIndex:0,action:!0,loaded:!0,singleRow:!1,overlayType:"default",tileHeight:void 0,tileAspect:"1/1",imageFit:"none",data:(0,_image_mock__WEBPACK_IMPORTED_MODULE_3__.W)()}},ImageGrid={render:args=>({props:{...args},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-image-grid\n [setIndex]="setIndex"\n (currentIndex)="currentIndex=$event"\n (clickIndex)="clickIndex=$event"\n [data]="data"\n [action]="action"\n [height]="height"\n [singleRow]="singleRow"\n [loaded]="loaded"\n [cols]="cols"\n [gap]="gap"\n [tileHeight]="tileHeight"\n [tileAspect]="tileAspect"\n [imageFit]="imageFit"\n [overlayType]="overlayType">\n <ng-template uiImageGridClickArea let-item let-index="index">\n <div class="bg-c-background p-2">{{ index + 1 }}: {{ item.title }}</div>\n </ng-template>\n </ui-image-grid>\n </section>\n '})},Strip={argTypes:Object.fromEntries(["cols","gap","height","setIndex","action","loaded","singleRow","data","debug"].map(key=>[key,{table:{disable:!0}}])),args:{tileHeight:100,tileAspect:"16/9",imageFit:"cover",overlayType:"default"},render:args=>({props:{...args,strip:(0,_image_mock__WEBPACK_IMPORTED_MODULE_3__.W)().slice(0,12)},template:'\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex w-full flex-col">\n <ui-image-grid\n class="w-full"\n [data]="strip"\n [singleRow]="true"\n [tileHeight]="tileHeight"\n [tileAspect]="tileAspect"\n [imageFit]="imageFit"\n [overlayType]="overlayType"\n [gap]="4"\n [action]="true"\n [loaded]="true">\n <ng-template uiImageGridClickArea let-item>\n <div class="bg-c-background px-2 py-1 font-bold">{{ item.alt }}</div>\n </ng-template>\n </ui-image-grid>\n </section>\n '})};ImageGrid.parameters={...ImageGrid.parameters,docs:{...ImageGrid.parameters?.docs,source:{originalSource:'{\n render: args => {\n return {\n props: {\n ...args\n },\n template: `\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex flex-col">\n <ui-image-grid\n [setIndex]="setIndex"\n (currentIndex)="currentIndex=$event"\n (clickIndex)="clickIndex=$event"\n [data]="data"\n [action]="action"\n [height]="height"\n [singleRow]="singleRow"\n [loaded]="loaded"\n [cols]="cols"\n [gap]="gap"\n [tileHeight]="tileHeight"\n [tileAspect]="tileAspect"\n [imageFit]="imageFit"\n [overlayType]="overlayType">\n <ng-template uiImageGridClickArea let-item let-index="index">\n <div class="bg-c-background p-2">{{ index + 1 }}: {{ item.title }}</div>\n </ng-template>\n </ui-image-grid>\n </section>\n `\n };\n }\n}',...ImageGrid.parameters?.docs?.source}}},Strip.parameters={...Strip.parameters,docs:{...Strip.parameters?.docs,source:{originalSource:'{\n argTypes: hideAll,\n args: {\n tileHeight: 100,\n tileAspect: \'16/9\',\n imageFit: \'cover\',\n overlayType: \'default\'\n },\n render: args => ({\n props: {\n ...args,\n strip: uiImageMock().slice(0, 12)\n },\n template: `\n <ui-intern-header theme="theme-light" [onTop]="true" [display]="true"></ui-intern-header>\n <section class="relative flex w-full flex-col">\n <ui-image-grid\n class="w-full"\n [data]="strip"\n [singleRow]="true"\n [tileHeight]="tileHeight"\n [tileAspect]="tileAspect"\n [imageFit]="imageFit"\n [overlayType]="overlayType"\n [gap]="4"\n [action]="true"\n [loaded]="true">\n <ng-template uiImageGridClickArea let-item>\n <div class="bg-c-background px-2 py-1 font-bold">{{ item.alt }}</div>\n </ng-template>\n </ui-image-grid>\n </section>\n `\n })\n}',...Strip.parameters?.docs?.source},description:{story:"One row of fixed-size tiles that scrolls sideways — an episode strip. The\ntiles keep their height and shape whatever the container's width; with\nmore of them than fit, the row overflows and scrolls instead of shrinking\nthem. `cols` is not read here, and nothing is padded: twelve pictures are\ntwelve tiles. The pictures fill their tiles (`imageFit: 'cover'`).",...Strip.parameters?.docs?.description}}},__webpack_require__.d(__webpack_exports__,["ImageGrid",0,ImageGrid,"Strip",0,Strip,"__namedExportsOrder",0,["ImageGrid","Strip"],"default",0,__WEBPACK_DEFAULT_EXPORT__])}}]);
2
- //# sourceMappingURL=atoms-image-grid-image-grid-component-stories.c2cb1e12.iframe.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"atoms-image-grid-image-grid-component-stories.c67dc0b3.iframe.bundle.js","mappings":"AAMA","sources":["webpack://moja-work/./libs/ui/src/lib/atoms/image-grid/image-grid.component.stories.ts"],"sourcesContent":["import { FormsModule, NgModel } from '@angular/forms';\nimport { moduleMetadata } from '@storybook/angular';\nimport { UiInternHeaderComponent } from '../../../../.storybook/demos/header/header.component';\nimport { uiImageMock } from '../image.mock';\nimport { UiImageGridClickAreaDirective } from './image-grid-click-area.directive';\nimport { UiImageGridComponent } from './image-grid.component';\nconst meta = {\n title: 'Atoms/Image Grid',\n component: UiImageGridComponent,\n decorators: [\n moduleMetadata({\n providers: [NgModel],\n imports: [\n UiInternHeaderComponent,\n FormsModule,\n UiImageGridComponent,\n UiImageGridClickAreaDirective,\n ],\n }),\n ],\n argTypes: {\n cols: { control: { type: 'range', min: 1, max: 16, step: 1 } },\n gap: { control: { type: 'range', min: 0, max: 64, step: 1 } },\n height: { control: { type: 'range', min: 100, max: 1000, step: 10 } },\n setIndex: { control: { type: 'range', min: 0, max: 24, step: 1 } },\n tileHeight: { control: { type: 'range', min: 40, max: 300, step: 10 } },\n tileAspect: { control: 'select', options: ['1/1', '16/9', '4/3', '2/3'] },\n imageFit: { control: 'select', options: ['none', 'cover', 'contain'] },\n action: { control: 'boolean' },\n loaded: { control: 'boolean' },\n singleRow: { control: 'boolean' },\n overlayType: {\n control: 'select',\n options: ['default', 'doors'],\n },\n // Outputs, not settings. The Actions addon is switched off library-wide\n // (`actions: { disable: true }` in preview.ts), so an `action:` entry here\n // produced a row that offered \"Setup controls\" and then did nothing. The\n // emissions are documented in docs.mdx; the panel stays free of rows that\n // cannot move anything.\n currentIndex: { table: { disable: true } },\n clickIndex: { table: { disable: true } },\n data: { control: 'object' },\n },\n parameters: {\n docs: {\n canvas: {\n sourceState: 'none',\n },\n source: {\n code: null,\n },\n },\n },\n args: {\n cols: 4,\n gap: 4,\n height: 520,\n setIndex: 0,\n action: true,\n loaded: true,\n singleRow: false,\n overlayType: 'default',\n tileHeight: undefined,\n tileAspect: '1/1',\n imageFit: 'none',\n data: uiImageMock(),\n },\n};\n/** The default story shows everything; the strip shows its own three and the overlay. */\nconst hideAll = Object.fromEntries(['cols', 'gap', 'height', 'setIndex', 'action', 'loaded', 'singleRow', 'data', 'debug'].map((key) => [key, { table: { disable: true } }]));\nexport default meta;\nexport const ImageGrid = {\n render: (args) => {\n return {\n props: {\n ...args,\n },\n template: `\n <ui-intern-header theme=\"theme-light\" [onTop]=\"true\" [display]=\"true\"></ui-intern-header>\n <section class=\"relative flex flex-col\">\n <ui-image-grid\n [setIndex]=\"setIndex\"\n (currentIndex)=\"currentIndex=$event\"\n (clickIndex)=\"clickIndex=$event\"\n [data]=\"data\"\n [action]=\"action\"\n [height]=\"height\"\n [singleRow]=\"singleRow\"\n [loaded]=\"loaded\"\n [cols]=\"cols\"\n [gap]=\"gap\"\n [tileHeight]=\"tileHeight\"\n [tileAspect]=\"tileAspect\"\n [imageFit]=\"imageFit\"\n [overlayType]=\"overlayType\">\n <ng-template uiImageGridClickArea let-item let-index=\"index\">\n <div class=\"bg-c-background p-2\">{{ index + 1 }}: {{ item.title }}</div>\n </ng-template>\n </ui-image-grid>\n </section>\n `,\n };\n },\n};\n/**\n * One row of fixed-size tiles that scrolls sideways — an episode strip. The\n * tiles keep their height and shape whatever the container's width; with\n * more of them than fit, the row overflows and scrolls instead of shrinking\n * them. `cols` is not read here, and nothing is padded: twelve pictures are\n * twelve tiles. The pictures fill their tiles (`imageFit: 'cover'`).\n */\nexport const Strip = {\n argTypes: hideAll,\n args: {\n tileHeight: 100,\n tileAspect: '16/9',\n imageFit: 'cover',\n overlayType: 'default',\n },\n render: (args) => ({\n props: { ...args, strip: uiImageMock().slice(0, 12) },\n template: `\n <ui-intern-header theme=\"theme-light\" [onTop]=\"true\" [display]=\"true\"></ui-intern-header>\n <section class=\"relative flex w-full flex-col\">\n <ui-image-grid\n class=\"w-full\"\n [data]=\"strip\"\n [singleRow]=\"true\"\n [tileHeight]=\"tileHeight\"\n [tileAspect]=\"tileAspect\"\n [imageFit]=\"imageFit\"\n [overlayType]=\"overlayType\"\n [gap]=\"4\"\n [action]=\"true\"\n [loaded]=\"true\">\n <ng-template uiImageGridClickArea let-item>\n <div class=\"bg-c-background px-2 py-1 font-bold\">{{ item.alt }}</div>\n </ng-template>\n </ui-image-grid>\n </section>\n `,\n }),\n};\n"],"names":[],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[128],{"./libs/ui/src/lib/home/overview.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),blocks=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");const package_namespaceObject_rE="2.9.0";function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Introduction"}),"\n","\n","\n",(0,jsx_runtime.jsx)("h2",{style:{textAlign:"right",borderBottom:"none",marginBottom:0},children:"Built for developers and agents"}),"\n",(0,jsx_runtime.jsx)("h1",{style:{textAlign:"right",color:"var(--ui-c-focus)",paddingBottom:"1rem",borderBottom:"var(--ui-border-width) solid var(--ui-c-fourthly)"},children:"Customers just talk to the agent"}),"\n",(0,jsx_runtime.jsx)(_components.h3,{id:"ui-library-overview",children:"UI Library Overview"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This library provides a modular set of Angular components for building consistent user\ninterfaces. It follows an atomic design approach, categorized into Electrons, Atoms,\nMolecules, Layouts, and Forms. Everything is ",(0,jsx_runtime.jsx)(_components.strong,{children:"standalone"})," — there are no NgModules anymore (the\nTransloco configuration modules are the only exception). State is managed with ",(0,jsx_runtime.jsx)(_components.strong,{children:"Signals"}),"\nand all apps run ",(0,jsx_runtime.jsx)(_components.strong,{children:"zoneless"}),"."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This documentation describes version ",(0,jsx_runtime.jsx)(_components.strong,{children:package_namespaceObject_rE})," of the library. To\ninstall exactly what is documented here:\n",(0,jsx_runtime.jsxs)("code",{children:["npm i @mojawork/ui@",package_namespaceObject_rE]}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"core-architecture",children:"Core Architecture"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The library is organized into the following categories (folders under ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/src/lib"}),").\nThe first three are layers, and they are told apart by ",(0,jsx_runtime.jsx)(_components.strong,{children:"composition and\nvisibility"}),", not by size: an atom may be large and a molecule small."]}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Category"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms/_electrons"})}),(0,jsx_runtime.jsxs)("td",{children:["Internal building blocks, ",(0,jsx_runtime.jsx)("strong",{children:"not exported"}),", selector ",(0,jsx_runtime.jsx)("code",{children:"ui-electron-*"}),". They exist only so ui components can build them in — an app never names one. Today: the form error message."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms"})}),(0,jsx_runtime.jsx)("td",{children:"Exported building blocks that compose nothing else from this library (e.g., thumbs, typewriter, language selector, copy-value)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"molecules"})}),(0,jsx_runtime.jsxs)("td",{children:["Built from at least one other ui component — that single test is the whole definition, and the folder follows it. ",(0,jsx_runtime.jsx)("code",{children:"image-editor"})," is the only one: it builds in the crop box, the overlay, its header and the slider. Size plays no part; an atom may be a large class and a molecule twenty lines."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"cdk"})}),(0,jsx_runtime.jsx)("td",{children:"CDK-based building blocks (e.g., table wrapper, drag-and-drop splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"layout"})}),(0,jsx_runtime.jsx)("td",{children:"Structural components that define the page grid and navigation (e.g., main layout, spinner, splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"forms"})}),(0,jsx_runtime.jsx)("td",{children:"Input elements and form validation components (inputs, checkboxes, validator directives)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsxs)("td",{children:[(0,jsx_runtime.jsx)("code",{children:"_directives"})," / ",(0,jsx_runtime.jsx)("code",{children:"_pipes"})]}),(0,jsx_runtime.jsx)("td",{children:"Utility directives and pipes for behavior modification (e.g., autofocus, intersection observer)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"transloco-modules"})}),(0,jsx_runtime.jsxs)("td",{children:["Internationalization setup (",(0,jsx_runtime.jsx)("code",{children:"TranslocoRootModule"}),") — the only remaining NgModules, imported once at application level."]})]})]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"styling-concept",children:"Styling Concept"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Every component in this library ships ",(0,jsx_runtime.jsx)(_components.strong,{children:"fully self-contained"}),": plain CSS built\nexclusively on ",(0,jsx_runtime.jsx)(_components.strong,{children:"design tokens"})," — CSS custom properties such as ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-c-*"}),"\n(colors, theme-aware), ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-spacer"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-border-radius"})," and ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-time"}),".\nThere are no hidden dependencies on any CSS framework, utility system or build\ntool: the components coexist with whatever styling setup your project uses."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Responsiveness"})," follows a single canonical breakpoint ladder with six levels\n(",(0,jsx_runtime.jsx)(_components.code,{children:"ms1"})," 340px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms2"})," 375px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms3"})," 481px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms4"})," 769px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms5"})," 1025px ·\n",(0,jsx_runtime.jsx)(_components.code,{children:"ms6"})," 1901px). The ladder deliberately exists only once and serves every layer\nfrom the same source:"]}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"CSS"}),": via named media queries (",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--ms4)"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--below-ms5)"}),")\nthat are resolved into standard queries at build time — the published package\ncontains plain, universally working CSS."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"TypeScript"}),": via the ",(0,jsx_runtime.jsx)(_components.code,{children:"UiLayoutMediaScreenService"}),", which exposes the\ncurrent level as a signal (",(0,jsx_runtime.jsx)(_components.code,{children:"mediascreen: 1..6"}),") — logic and layout are\nguaranteed to switch at the same boundaries."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"tailwind--not-required-but-offered",children:"Tailwind — not required, but offered"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The npm package ",(0,jsx_runtime.jsx)(_components.strong,{children:"does not require Tailwind"}),". Whether a project uses Tailwind\nis entirely that project's decision — the components work identically either\nway."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Projects that ",(0,jsx_runtime.jsx)(_components.strong,{children:"do want Tailwind (v4)"})," get a head start: the package ships a\nready-made theme file, ",(0,jsx_runtime.jsx)(_components.code,{children:"@mojawork/ui/styles/theme.css"}),". One import in the\napp's own Tailwind entry wires Tailwind into the library's design system:"]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-css",children:"@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n@import '@mojawork/ui/styles/theme.css';\n@source './app';\n@source '../node_modules/@mojawork/ui';\n"})}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Colors"})," mapped via ",(0,jsx_runtime.jsx)(_components.code,{children:"@theme"})," onto the runtime tokens — utilities like\n",(0,jsx_runtime.jsx)(_components.code,{children:"text-c-primary"})," automatically follow light/dark theme switching."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Breakpoints"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"ms1:"}),"–",(0,jsx_runtime.jsx)(_components.code,{children:"ms6:"})," — the same ladder the components use\ninternally."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Animation presets"})," (e.g. ",(0,jsx_runtime.jsx)(_components.code,{children:"loading"}),")."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.p,{children:"The theme carries the mapping and nothing else: no Tailwind import of its\nown, no source paths. The layer line stays in the app's file because it has\nto be the first statement there, before Tailwind declares its own layers —\nan import cannot put it in front of itself."}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["In short: ",(0,jsx_runtime.jsx)(_components.strong,{children:"shipped Tailwind-free, Tailwind-ready when wanted."})," Both paths are\nfirst-class; neither is forced."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Everything the library ships sits in the ",(0,jsx_runtime.jsx)(_components.code,{children:"ui"})," cascade layer, below Tailwind's\n",(0,jsx_runtime.jsx)(_components.code,{children:"utilities"})," — so a utility you write on a ui tag beats the component's own\ndefault, and your app's unlayered CSS beats both. One line on the Tailwind\nside makes the order explicit; see ",(0,jsx_runtime.jsx)(_components.a,{href:"?path=/docs/styling-layers--docs",children:"Styling › Layers"}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"for-contributors",children:"For contributors"}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Components in ",(0,jsx_runtime.jsx)(_components.code,{children:"src/lib"})," never use Tailwind utilities or ",(0,jsx_runtime.jsx)(_components.code,{children:"@apply"})," — plain CSS\nwith ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-*"})," tokens only; component-local classes carry a ",(0,jsx_runtime.jsx)(_components.code,{children:"_"})," prefix."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Storybook ",(0,jsx_runtime.jsx)(_components.strong,{children:"stories"})," (and the showcase components under ",(0,jsx_runtime.jsx)(_components.code,{children:".storybook/demos/"}),")\nexplicitly use Tailwind for their example layout."]}),"\n",(0,jsx_runtime.jsx)(_components.li,{children:"Breakpoints are never written as pixel literals — always via the ladder's\nnamed queries."}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"getting-started",children:"Getting Started"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["All components are standalone: import them directly from the barrel into the ",(0,jsx_runtime.jsx)(_components.code,{children:"imports"}),"\narray of your standalone component. Inside the monorepo the import path is mapped via\ntsconfig; external apps install the published npm package\n(",(0,jsx_runtime.jsx)("a",{href:"https://www.npmjs.com/package/@mojawork/ui",target:"_blank",rel:"noopener",children:"@mojawork/ui"}),")."]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-typescript",children:"import { Component } from '@angular/core';\nimport { UiInputComponent, UiCardComponent } from '@mojawork/ui';\n\n@Component({\n selector: 'app-my-feature',\n imports: [UiInputComponent, UiCardComponent],\n templateUrl: './my-feature.component.html',\n})\nexport class MyFeatureComponent {}\n"})}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"usage-principles",children:"Usage Principles"}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Principle"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Composition"}),(0,jsx_runtime.jsx)("td",{children:"Prefer composing smaller components into larger ones."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Consistency"}),(0,jsx_runtime.jsx)("td",{children:"Use the provided layouts to maintain a unified user experience across the application."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Signals & zoneless"}),(0,jsx_runtime.jsx)("td",{children:"Component state uses Angular Signals; all consumers run without Zone.js."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Translation"}),(0,jsx_runtime.jsx)("td",{children:"All text within components is managed via Transloco for easy localization."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
2
- //# sourceMappingURL=home-overview-mdx.9521137d.iframe.bundle.js.map