@mojawork/ui-docs 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @mojawork/ui-docs
2
2
 
3
- The documentation of `@mojawork/ui` 2.3.0, version-true and offline:
3
+ The documentation of `@mojawork/ui` 2.4.0, version-true and offline:
4
4
  the built Storybook plus the cooked catalog. Install nothing — start it:
5
5
 
6
6
  ```bash
7
- npx @mojawork/ui-docs@2.3.0
7
+ npx @mojawork/ui-docs@2.4.0
8
8
  ```
9
9
 
10
10
  and open the printed URL. The Storybook you see is exactly the one this
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "author": "an agent — the Claude Code session of the library workspace, writing from the sources each entry names; not a person",
3
3
  "disclaimer": "Recommendations, not truth. Every entry was written by an agent from the sources it names, and only for what demonstrably runs somewhere in the house (shownIn). The component page — get_component_doc — is the truth; where the two disagree, the page wins. The house rules are read verbatim from the usage contract of the library (usage.md).",
4
- "uiVersion": "2.3.0",
5
- "commit": "0d00b07f",
4
+ "uiVersion": "2.4.0",
5
+ "commit": "ec1a590a",
6
6
  "entries": [
7
7
  {
8
8
  "kind": "situation",
@@ -1179,31 +1179,5 @@
1179
1179
  "reviewed": "69197b72"
1180
1180
  }
1181
1181
  ],
1182
- "houseRules": [
1183
- {
1184
- "heading": "Signals and zoneless change detection",
1185
- "markdown": "- Use Angular Signals (`signal()`, `computed()`, `effect()`) for state and\n reactive logic instead of manual state or plain observables.\n- The library and its reference applications run **zoneless**\n (`provideZonelessChangeDetection()`, no `zone.js` polyfill). Any\n template-bound state that is updated from an async source\n (`setTimeout`/`setInterval`, RxJS `subscribe`, `Promise`,\n `requestAnimationFrame`) MUST be a signal (or use the `async` pipe /\n `toSignal()`); a plain field written from such a callback will not trigger\n change detection. Imperative DOM writes (e.g. `element.setAttribute`, CSS\n custom properties) do not need this."
1186
- },
1187
- {
1188
- "heading": "Forms",
1189
- "markdown": "Form inputs follow one fixed format:\n\n```html\n<ui-input [label]=\"'Label'\">\n <input ui-tag [(ngModel)]=\"model\" ... />\n</ui-input>\n```"
1190
- },
1191
- {
1192
- "heading": "Styling and tokens",
1193
- "markdown": "- Components are styled with plain CSS on the design tokens\n (`var(--ui-spacer)`, `var(--ui-border-radius)`, the `--ui-c-*` colours).\n No CSS framework is required, and no Sass.\n- Host geometry is a named hook with a fallback, never a pinned value —\n e.g. `width: var(--ui-background-width, 100%)`. A consumer without\n Tailwind sets the variable; one with Tailwind puts a utility on the tag,\n and the cascade layers below make it win. Each component documents its\n hooks in its story.\n- The package itself is Tailwind-free; its templates carry no utility\n classes. Tailwind is optional at the consumer: the package ships a\n ready-made Tailwind v4 theme that maps the utilities onto the tokens,\n including light/dark switching and the `ms1:`–`ms6:` breakpoint ladder."
1194
- },
1195
- {
1196
- "heading": "Cascade layers — the library sits below the utilities",
1197
- "markdown": "A utility you write on a ui tag must win against the component's own\ndefault. Tailwind v4 puts everything in cascade layers, and **unlayered CSS\nbeats layered CSS regardless of specificity** — the order of layers, not\nspecificity, decides who wins.\n\nThe library's styles live in the `ui` layer, declared before Tailwind's:\n\n```css\n@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n```\n\n**Every consumer with its own Tailwind entry declares the same line before\nits import.** A layer nobody names is appended behind all named ones and\nwould beat the whole library. `cdk-resets` is part of the line so the\nAngular CDK's drag-preview reset sits below the library instead of\nstripping every preview of its surface.\n\nWhat this means in practice: a Tailwind utility on a ui tag wins over the\ncomponent's default, and unlayered consumer CSS wins over both. A `!` on a\nutility against a ui tag is a symptom, not a fix — it means the layer line\nis missing somewhere."
1198
- },
1199
- {
1200
- "heading": "Disabled controls and the keyboard",
1201
- "markdown": "`disabled` is not only a visual state — it changes where the focus can live,\nand it does so retroactively. Two failure modes come out of that, and both\nhave already cost real debugging time.\n\n**A control that disables itself throws the focus away.** The moment an\nelement becomes `disabled`, the browser removes the focus from it and drops it\non `<body>`. So a button whose own activation makes it inert — a reset that\nhas nothing left to undo, a save that dies once everything is saved, a \"load\nmore\" at the end of a list — leaves a keyboard user with no place at all. The\nrow they were working in is gone from under them, and the next Tab starts over\nat the top of the document.\n\nNo navigation logic can repair this. It happens **after** the activation, so\nby the time anything notices, the previous position no longer exists.\n\n**Custom keyboard navigation and the browser disagree about who counts.** The\nbrowser skips disabled controls in the tab order; hand-written navigation that\ncollects controls with a plain `'input, select, textarea, button, a'` counts\nthem. The two sets drift apart: a remembered position points into a different\nlist than the one the focus actually walks, and `focus()` on a disabled\nelement does nothing at all — the focus stays put and the next key press picks\nthe very same dead target again. The navigation jams, silently, with no error\nanywhere.\n\n**Preferred pattern: do not disable at all.** Keep the control **enabled** and\nlet its action be a no-op when there is nothing to do. Express unavailability\nthrough styling plus `aria-disabled=\"true\"` — that keeps the control\nfocusable and reachable while screen readers still announce it as\nunavailable. A dimmed control without `aria-disabled` is, to anyone who only\nlistens, an ordinary control: the look carries the message, and nobody hears a\nlook.\n\n**If a control genuinely must be disabled**, move the focus somewhere\ndeliberate **before** disabling it — the neighbouring control, the container,\nthe element that replaces it. Never leave that decision to the browser.\n\n**And when you write navigation yourself**, derive the control list from the\nDOM on every key press and filter it to what can actually take focus\n(`:not(:disabled):not([hidden]):not([tabindex=\"-1\"])`), so it can never\ndisagree with the native tab order. Never cache the list and never store\npositions as constants: a cell may hold a different number of stations from\none moment to the next."
1202
- },
1203
- {
1204
- "heading": "Where the documentation lives",
1205
- "markdown": "The component page is the truth — the fixed section \"What it does, and what\nit does not\" on every page. The guide is the offer next to it: use for, not\nfor, instead, with proof. Where the two disagree, the page wins.\n\n- **Storybook** — `https://moja.work/storybook`: every component, every\n story, the guide entries next to the truth sections. It describes the\n current line (behaviour can change within 2.x) — pin an exact version of\n the package rather than a `^` range.\n- **MCP catalog for agents** — `https://moja.work/ui/mcp`: the tools\n `list_components` (the shelf), `get_component_doc` (one page, verbatim)\n and `get_guide` (the recommendations plus these rules). If you know a\n component's selector, ask for it directly instead of fetching the whole\n guide and filtering it yourself.\n- **`llms.txt`** — `https://moja.work/llms.txt`: the catalog for crawlers\n and plain-text readers.\n- **API reference** — the `.d.ts` files in the installed package are the\n version-true API; the hosted Compodoc at `https://moja.work/compodoc/ui`\n describes the line."
1206
- }
1207
- ],
1208
1182
  "missing": []
1209
1183
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "uiVersion": "2.3.0",
3
- "commit": "0d00b07f",
4
- "builtAt": "2026-08-23T21:21:38.173Z",
2
+ "uiVersion": "2.4.0",
3
+ "commit": "ec1a590a",
4
+ "builtAt": "2026-08-23T22:16:26.611Z",
5
5
  "guide": "guide.json",
6
6
  "usage": "usage.md",
7
7
  "mcp": "mcp.json",
package/catalog/mcp.json CHANGED
@@ -29,7 +29,7 @@
29
29
  {
30
30
  "name": "get_guide",
31
31
  "title": "Get the usage guide",
32
- "description": "The usage guide: recommendations — use for, not for, instead, shown in — written by an agent from named sources. The component page (get_component_doc) is the truth; this is the offer. Without \"component\" the whole guide: \"entries\" is ONE list holding TWO kinds of entry, told apart by the \"kind\" field — kind \"component\" (per-component recommendations) and kind \"situation\" (named situations whose \"uses\" lists the selectors they combine). Filter on \"kind\" — or better, if you know a selector or a situation name, pass it and get its entry plus every situation that uses it. The full answer also carries the house rules read from the usage contract of the library (usage.md) and the list of components without an entry. Every \"shownIn\" story reference carries its Storybook URL.",
32
+ "description": "The usage guide: recommendations — use for, not for, instead, shown in — written by an agent from named sources. The component page (get_component_doc) is the truth; this is the offer. Without \"component\" the whole guide: \"entries\" is ONE list holding TWO kinds of entry, told apart by the \"kind\" field — kind \"component\" (per-component recommendations) and kind \"situation\" (named situations whose \"uses\" lists the selectors they combine). Filter on \"kind\" — or better, if you know a selector or a situation name, pass it and get its entry plus every situation that uses it. The full answer also carries the house rules read from the usage contract of the library (usage.md) and the list of components without an entry. Every \"shownIn\" story reference carries its Storybook URL. The rules that hold across ALL components — the forms format, the cascade-layer line, the keyboard rules — are not here: they have a door of their own, get_usage.",
33
33
  "input": {
34
34
  "type": "object",
35
35
  "properties": {
@@ -39,6 +39,15 @@
39
39
  }
40
40
  }
41
41
  }
42
+ },
43
+ {
44
+ "name": "get_usage",
45
+ "title": "Get the usage contract",
46
+ "description": "The usage contract of @mojawork/ui: the rules that hold for EVERY component, not for one — Angular signals and zoneless change detection, the one fixed forms format, styling on the design tokens, the cascade-layer line a consumer with Tailwind must declare or lose every utility on a ui tag, the keyboard rules around disabled controls, and where the rest of the documentation lives. Read this FIRST: these are the rules a consumer breaks before ever reaching a single component. No argument — the contract is not per component. Served as the file itself, with the ui version and commit it belongs to. The hosted catalog may add server-side notes beside it; those are marked as such and carry no version.",
47
+ "input": {
48
+ "type": "object",
49
+ "properties": {}
50
+ }
42
51
  }
43
52
  ]
44
53
  }
package/catalog/usage.md CHANGED
@@ -3,8 +3,8 @@
3
3
  The usage contract of the library: the rules that hold for every application
4
4
  consuming `@mojawork/ui`, inside or outside the workspace it is built in.
5
5
  This file is the single source for these rules — the catalog serves it to
6
- agents as the house rules of `get_guide`, and the workspace's shared agent
7
- rules point here instead of restating it. The component pages remain the
6
+ agents through `get_usage`, and the workspace's shared agent rules point
7
+ here instead of restating it. The component pages remain the
8
8
  truth about each component; this file holds what is true across all of them.
9
9
 
10
10
  ## Signals and zoneless change detection
@@ -1,4 +1,4 @@
1
1
  {
2
- "commit": "0d00b07f",
3
- "uiVersion": "2.3.0"
2
+ "commit": "ec1a590a",
3
+ "uiVersion": "2.4.0"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojawork/ui-docs",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "The documentation of @mojawork/ui, version-true: the built Storybook plus the cooked catalog (truth pages, guide, usage contract, tool definitions). npx-startable.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[128],{"./libs/ui/src/lib/home/overview.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),blocks=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");const package_namespaceObject_rE="2.3.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/tailwind.css"}),"). A single import\nwires Tailwind into the library's design system:"]}),"\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.jsxs)(_components.p,{children:["In short: ",(0,jsx_runtime.jsx)(_components.strong,{children:"shipped Tailwind-free, Tailwind-ready when wanted."})," Both paths are\nfirst-class; neither is forced."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Everything the library ships sits in the ",(0,jsx_runtime.jsx)(_components.code,{children:"ui"})," cascade layer, below Tailwind's\n",(0,jsx_runtime.jsx)(_components.code,{children:"utilities"})," — so a utility you write on a ui tag beats the component's own\ndefault, and your app's unlayered CSS beats both. One line on the Tailwind\nside makes the order explicit; see ",(0,jsx_runtime.jsx)(_components.a,{href:"?path=/docs/styling-layers--docs",children:"Styling › Layers"}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"for-contributors",children:"For contributors"}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Components in ",(0,jsx_runtime.jsx)(_components.code,{children:"src/lib"})," never use Tailwind utilities or ",(0,jsx_runtime.jsx)(_components.code,{children:"@apply"})," — plain CSS\nwith ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-*"})," tokens only; component-local classes carry a ",(0,jsx_runtime.jsx)(_components.code,{children:"_"})," prefix."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Storybook ",(0,jsx_runtime.jsx)(_components.strong,{children:"stories"})," (and the showcase components under ",(0,jsx_runtime.jsx)(_components.code,{children:".storybook/demos/"}),")\nexplicitly use Tailwind for their example layout."]}),"\n",(0,jsx_runtime.jsx)(_components.li,{children:"Breakpoints are never written as pixel literals — always via the ladder's\nnamed queries."}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"getting-started",children:"Getting Started"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["All components are standalone: import them directly from the barrel into the ",(0,jsx_runtime.jsx)(_components.code,{children:"imports"}),"\narray of your standalone component. Inside the monorepo the import path is mapped via\ntsconfig; external apps install the published npm package\n(",(0,jsx_runtime.jsx)("a",{href:"https://www.npmjs.com/package/@mojawork/ui",target:"_blank",rel:"noopener",children:"@mojawork/ui"}),")."]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-typescript",children:"import { Component } from '@angular/core';\nimport { UiInputComponent, UiCardComponent } from '@mojawork/ui';\n\n@Component({\n selector: 'app-my-feature',\n imports: [UiInputComponent, UiCardComponent],\n templateUrl: './my-feature.component.html',\n})\nexport class MyFeatureComponent {}\n"})}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"usage-principles",children:"Usage Principles"}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Principle"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Composition"}),(0,jsx_runtime.jsx)("td",{children:"Prefer composing smaller components into larger ones."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Consistency"}),(0,jsx_runtime.jsx)("td",{children:"Use the provided layouts to maintain a unified user experience across the application."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Signals & zoneless"}),(0,jsx_runtime.jsx)("td",{children:"Component state uses Angular Signals; all consumers run without Zone.js."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Translation"}),(0,jsx_runtime.jsx)("td",{children:"All text within components is managed via Transloco for easy localization."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[128],{"./libs/ui/src/lib/home/overview.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),lib=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),blocks=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js");const package_namespaceObject_rE="2.4.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/tailwind.css"}),"). A single import\nwires Tailwind into the library's design system:"]}),"\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.jsxs)(_components.p,{children:["In short: ",(0,jsx_runtime.jsx)(_components.strong,{children:"shipped Tailwind-free, Tailwind-ready when wanted."})," Both paths are\nfirst-class; neither is forced."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Everything the library ships sits in the ",(0,jsx_runtime.jsx)(_components.code,{children:"ui"})," cascade layer, below Tailwind's\n",(0,jsx_runtime.jsx)(_components.code,{children:"utilities"})," — so a utility you write on a ui tag beats the component's own\ndefault, and your app's unlayered CSS beats both. One line on the Tailwind\nside makes the order explicit; see ",(0,jsx_runtime.jsx)(_components.a,{href:"?path=/docs/styling-layers--docs",children:"Styling › Layers"}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"for-contributors",children:"For contributors"}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Components in ",(0,jsx_runtime.jsx)(_components.code,{children:"src/lib"})," never use Tailwind utilities or ",(0,jsx_runtime.jsx)(_components.code,{children:"@apply"})," — plain CSS\nwith ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-*"})," tokens only; component-local classes carry a ",(0,jsx_runtime.jsx)(_components.code,{children:"_"})," prefix."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Storybook ",(0,jsx_runtime.jsx)(_components.strong,{children:"stories"})," (and the showcase components under ",(0,jsx_runtime.jsx)(_components.code,{children:".storybook/demos/"}),")\nexplicitly use Tailwind for their example layout."]}),"\n",(0,jsx_runtime.jsx)(_components.li,{children:"Breakpoints are never written as pixel literals — always via the ladder's\nnamed queries."}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"getting-started",children:"Getting Started"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["All components are standalone: import them directly from the barrel into the ",(0,jsx_runtime.jsx)(_components.code,{children:"imports"}),"\narray of your standalone component. Inside the monorepo the import path is mapped via\ntsconfig; external apps install the published npm package\n(",(0,jsx_runtime.jsx)("a",{href:"https://www.npmjs.com/package/@mojawork/ui",target:"_blank",rel:"noopener",children:"@mojawork/ui"}),")."]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-typescript",children:"import { Component } from '@angular/core';\nimport { UiInputComponent, UiCardComponent } from '@mojawork/ui';\n\n@Component({\n selector: 'app-my-feature',\n imports: [UiInputComponent, UiCardComponent],\n templateUrl: './my-feature.component.html',\n})\nexport class MyFeatureComponent {}\n"})}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"usage-principles",children:"Usage Principles"}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Principle"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Composition"}),(0,jsx_runtime.jsx)("td",{children:"Prefer composing smaller components into larger ones."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Consistency"}),(0,jsx_runtime.jsx)("td",{children:"Use the provided layouts to maintain a unified user experience across the application."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Signals & zoneless"}),(0,jsx_runtime.jsx)("td",{children:"Component state uses Angular Signals; all consumers run without Zone.js."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Translation"}),(0,jsx_runtime.jsx)("td",{children:"All text within components is managed via Transloco for easy localization."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3842],{"./libs/ui/src/lib/home/usage.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 usage_namespaceObject="# Using @mojawork/ui\n\nThe usage contract of the library: the rules that hold for every application\nconsuming `@mojawork/ui`, inside or outside the workspace it is built in.\nThis file is the single source for these rules — the catalog serves it to\nagents through `get_usage`, and the workspace's shared agent rules point\nhere instead of restating it. The component pages remain the\ntruth about each component; this file holds what is true across all of them.\n\n## Signals and zoneless change detection\n\n- Use Angular Signals (`signal()`, `computed()`, `effect()`) for state and\n reactive logic instead of manual state or plain observables.\n- The library and its reference applications run **zoneless**\n (`provideZonelessChangeDetection()`, no `zone.js` polyfill). Any\n template-bound state that is updated from an async source\n (`setTimeout`/`setInterval`, RxJS `subscribe`, `Promise`,\n `requestAnimationFrame`) MUST be a signal (or use the `async` pipe /\n `toSignal()`); a plain field written from such a callback will not trigger\n change detection. Imperative DOM writes (e.g. `element.setAttribute`, CSS\n custom properties) do not need this.\n\n## Forms\n\nForm inputs follow one fixed format:\n\n```html\n<ui-input [label]=\"'Label'\">\n <input ui-tag [(ngModel)]=\"model\" ... />\n</ui-input>\n```\n\n## Styling and tokens\n\n- Components are styled with plain CSS on the design tokens\n (`var(--ui-spacer)`, `var(--ui-border-radius)`, the `--ui-c-*` colours).\n No CSS framework is required, and no Sass.\n- Host geometry is a named hook with a fallback, never a pinned value —\n e.g. `width: var(--ui-background-width, 100%)`. A consumer without\n Tailwind sets the variable; one with Tailwind puts a utility on the tag,\n and the cascade layers below make it win. Each component documents its\n hooks in its story.\n- The package itself is Tailwind-free; its templates carry no utility\n classes. Tailwind is optional at the consumer: the package ships a\n ready-made Tailwind v4 theme that maps the utilities onto the tokens,\n including light/dark switching and the `ms1:`–`ms6:` breakpoint ladder.\n\n## Cascade layers — the library sits below the utilities\n\nA utility you write on a ui tag must win against the component's own\ndefault. Tailwind v4 puts everything in cascade layers, and **unlayered CSS\nbeats layered CSS regardless of specificity** — the order of layers, not\nspecificity, decides who wins.\n\nThe library's styles live in the `ui` layer, declared before Tailwind's:\n\n```css\n@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n```\n\n**Every consumer with its own Tailwind entry declares the same line before\nits import.** A layer nobody names is appended behind all named ones and\nwould beat the whole library. `cdk-resets` is part of the line so the\nAngular CDK's drag-preview reset sits below the library instead of\nstripping every preview of its surface.\n\nWhat this means in practice: a Tailwind utility on a ui tag wins over the\ncomponent's default, and unlayered consumer CSS wins over both. A `!` on a\nutility against a ui tag is a symptom, not a fix — it means the layer line\nis missing somewhere.\n\n## Disabled controls and the keyboard\n\n`disabled` is not only a visual state — it changes where the focus can live,\nand it does so retroactively. Two failure modes come out of that, and both\nhave already cost real debugging time.\n\n**A control that disables itself throws the focus away.** The moment an\nelement becomes `disabled`, the browser removes the focus from it and drops it\non `<body>`. So a button whose own activation makes it inert — a reset that\nhas nothing left to undo, a save that dies once everything is saved, a \"load\nmore\" at the end of a list — leaves a keyboard user with no place at all. The\nrow they were working in is gone from under them, and the next Tab starts over\nat the top of the document.\n\nNo navigation logic can repair this. It happens **after** the activation, so\nby the time anything notices, the previous position no longer exists.\n\n**Custom keyboard navigation and the browser disagree about who counts.** The\nbrowser skips disabled controls in the tab order; hand-written navigation that\ncollects controls with a plain `'input, select, textarea, button, a'` counts\nthem. The two sets drift apart: a remembered position points into a different\nlist than the one the focus actually walks, and `focus()` on a disabled\nelement does nothing at all — the focus stays put and the next key press picks\nthe very same dead target again. The navigation jams, silently, with no error\nanywhere.\n\n**Preferred pattern: do not disable at all.** Keep the control **enabled** and\nlet its action be a no-op when there is nothing to do. Express unavailability\nthrough styling plus `aria-disabled=\"true\"` — that keeps the control\nfocusable and reachable while screen readers still announce it as\nunavailable. A dimmed control without `aria-disabled` is, to anyone who only\nlistens, an ordinary control: the look carries the message, and nobody hears a\nlook.\n\n**If a control genuinely must be disabled**, move the focus somewhere\ndeliberate **before** disabling it — the neighbouring control, the container,\nthe element that replaces it. Never leave that decision to the browser.\n\n**And when you write navigation yourself**, derive the control list from the\nDOM on every key press and filter it to what can actually take focus\n(`:not(:disabled):not([hidden]):not([tabindex=\"-1\"])`), so it can never\ndisagree with the native tab order. Never cache the list and never store\npositions as constants: a cell may hold a different number of stations from\none moment to the next.\n\n## Where the documentation lives\n\nThe component page is the truth — the fixed section \"What it does, and what\nit does not\" on every page. The guide is the offer next to it: use for, not\nfor, instead, with proof. Where the two disagree, the page wins.\n\n- **Storybook** — `https://moja.work/storybook`: every component, every\n story, the guide entries next to the truth sections. It describes the\n current line (behaviour can change within 2.x) — pin an exact version of\n the package rather than a `^` range.\n- **MCP catalog for agents** — `https://moja.work/ui/mcp`: the tools\n `list_components` (the shelf), `get_component_doc` (one page, verbatim)\n and `get_guide` (the recommendations plus these rules). If you know a\n component's selector, ask for it directly instead of fetching the whole\n guide and filtering it yourself.\n- **`llms.txt`** — `https://moja.work/llms.txt`: the catalog for crawlers\n and plain-text readers.\n- **API reference** — the `.d.ts` files in the installed package are the\n version-true API; the hosted Compodoc at `https://moja.work/compodoc/ui`\n describes the line.\n",usageMarkdown=(usage_namespaceObject.default??usage_namespaceObject).trim();if(""===usageMarkdown)throw new Error("usage: libs/ui/usage.md is empty — an empty contract is a generator bug, not an empty page.");function _createMdxContent(props){const _components={code:"code",p:"p",strong:"strong",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Usage"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This page ",(0,jsx_runtime.jsx)(_components.strong,{children:"reads"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/usage.md"})," — the usage contract of the library.\nThe npm package ships the same file verbatim as ",(0,jsx_runtime.jsx)(_components.code,{children:"usage.md"}),", and the\ncatalog serves it to agents through ",(0,jsx_runtime.jsx)(_components.code,{children:"get_usage"}),"; what stands here cannot\ndrift from either."]}),"\n",(0,jsx_runtime.jsx)(blocks.oz,{children:usageMarkdown})]})}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)}}}]);
@@ -551,7 +551,7 @@
551
551
 
552
552
  import './mocker-runtime-injected.js';
553
553
 
554
- import './runtime~main.a9b8ab83.iframe.bundle.js';
554
+ import './runtime~main.2f1f203b.iframe.bundle.js';
555
555
 
556
556
  import './4755.e4656207.iframe.bundle.js';
557
557
 
@@ -1 +1 @@
1
- {"generatedAt":1787520085460,"userSince":1772191366759,"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"knownPackages":{"testPackages":{"@ngneat/spectator":"22.1.0","@playwright/test":"1.61.1","@vitest/coverage-v8":"4.1.10","vitest":"4.1.10"},"stylingPackages":{"tailwindcss":"^4.3.2"}},"hasRouterPackage":true,"monorepo":"Nx","packageManager":{"type":"npm","agent":"npm","nodeLinker":"node_modules"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/angular","options":{}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/angular","portableStoriesFileCount":0,"applicationFileCount":6,"storybookVersion":"10.4.6","storybookVersionSpecifier":"^10.4.6","language":"typescript","storybookPackages":{"@nx/storybook":{"version":"23.0.1"},"@storybook/angular":{"version":"10.4.6"},"eslint-plugin-storybook":{"version":"10.4.6"},"storybook":{}},"addons":{"@storybook/addon-docs":{"version":"10.4.6"}},"packageJsonType":"unknown"}
1
+ {"generatedAt":1787523436462,"userSince":1772191366759,"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"knownPackages":{"testPackages":{"@ngneat/spectator":"22.1.0","@playwright/test":"1.61.1","@vitest/coverage-v8":"4.1.10","vitest":"4.1.10"},"stylingPackages":{"tailwindcss":"^4.3.2"}},"hasRouterPackage":true,"monorepo":"Nx","packageManager":{"type":"npm","agent":"npm","nodeLinker":"node_modules"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/angular","options":{}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/angular","portableStoriesFileCount":0,"applicationFileCount":6,"storybookVersion":"10.4.6","storybookVersionSpecifier":"^10.4.6","language":"typescript","storybookPackages":{"@nx/storybook":{"version":"23.0.1"},"@storybook/angular":{"version":"10.4.6"},"eslint-plugin-storybook":{"version":"10.4.6"},"storybook":{}},"addons":{"@storybook/addon-docs":{"version":"10.4.6"}},"packageJsonType":"unknown"}
@@ -1 +1 @@
1
- (()=>{"use strict";var deferred,leafPrototypes,getProto,inProgress,__webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},deferred=[],__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(!chunkIds){var notFulfilled=1/0;for(i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(!1&priority||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority]},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode)return value;if("object"==typeof value&&value){if(4&mode&&value.__esModule)return value;if(16&mode&&"function"==typeof value.then)return value}var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;("object"==typeof current||"function"==typeof current)&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>(({128:"home-overview-mdx",166:"forms-autofocus-docs-mdx",365:"layout-spinner-docs-mdx",943:"examples-image-grid-slider-docs-mdx",947:"layout-splitter-docs-mdx",977:"forms-switch-docs-mdx",1043:"layout-spinner-spinner-component-stories",1165:"styling-tags-tags-component-stories",1296:"examples-docs-mdx",1322:"atoms-_electrons-form-error-message-form-error-message-component-stories",1327:"cdk-components-drag-and-drop-splitter-docs-mdx",1365:"_external-mwork-music-player-mwork-music-player-stories",1461:"atoms-image-slider-image-slider-component-stories",1481:"examples-layout-docs-mdx",1686:"forms-input-input-component-stories",1809:"atoms-clock-clock-component-stories",1838:"styling-colors-docs-mdx",1860:"forms-autocomplete-autocomplete-component-stories",1927:"styling-tags-docs-mdx",1954:"atoms-mosaic-docs-mdx",1977:"styling-forms-forms-component-stories",2006:"atoms-background-docs-mdx",2074:"atoms-_electrons-form-error-message-docs-mdx",2168:"layout-overlay-docs-mdx",2193:"atoms-qr-code-docs-mdx",2379:"_external-mwork-basic-interpreter-mwork-basic-interpreter-stories",2425:"atoms-chart-chart-component-stories",2831:"atoms-mosaic-mosaic-component-stories",2960:"atoms-lang-selector-docs-mdx",3007:"atoms-copy-value-docs-mdx",3045:"atoms-placeholder-placeholder-component-stories",3048:"forms-switch-switch-component-stories",3073:"layout-top-scroll-bottom-docs-mdx",3143:"home-tips-mdx",3146:"atoms-image-grid-docs-mdx",3151:"layout-media-screen-docs-mdx",3190:"molecules-image-editor-docs-mdx",3260:"_external-mwork-music-player-docs-mdx",3277:"atoms-lang-selector-lang-selector-component-stories",3338:"styling-ui-tags-docs-mdx",3550:"atoms-reader-doc-docs-mdx",3651:"layout-media-screen-media-screen-component-stories",3678:"forms-checkbox-checkbox-component-stories",3685:"atoms-rating-rating-component-stories",3752:"_external-mwork-basic-interpreter-docs-mdx",3767:"home-guide-mdx",3837:"layout-main-docs-mdx",3842:"home-usage-mdx",3853:"atoms-copy-value-copy-value-component-stories",3857:"styling-forms-docs-mdx",3925:"atoms-thumb-thumb-component-stories",3999:"atoms-reader-doc-reader-doc-component-stories",4067:"atoms-text-animate-docs-mdx",4271:"cdk-components-drag-and-drop-splitter-splitter-component-stories",4320:"atoms-buzzer-docs-mdx",4365:"atoms-qr-code-qr-code-component-stories",4447:"atoms-timer-docs-mdx",4713:"atoms-typewriter-typewriter-component-stories",4806:"atoms-typewriter-docs-mdx",4855:"atoms-background-background-component-stories",4939:"forms-input-docs-mdx",4947:"atoms-card-card-component-stories",5084:"atoms-clock-docs-mdx",5233:"styling-ui-tags-ui-tags-component-stories",5370:"atoms-thumb-docs-mdx",5493:"examples-table-edit-focus-docs-mdx",5684:"examples-layout-layout-stories",5995:"styling-colors-colors-component-stories",6189:"atoms-timer-timer-component-stories",6203:"atoms-placeholder-docs-mdx",6212:"cdk-components-table-table-component-stories",6252:"forms-slider-docs-mdx",6331:"layout-splitter-splitter-component-stories",6354:"forms-validators-validators-component-stories",6501:"_external-mwork-banner-docs-mdx",6569:"cdk-components-table-docs-mdx",6659:"layout-overlay-overlay-component-stories",6768:"examples-transloco-docs-mdx",6892:"layout-tabs-docs-mdx",6922:"forms-slider-slider-component-stories",6978:"atoms-chart-docs-mdx",7419:"atoms-buzzer-buzzer-component-stories",7586:"forms-validators-docs-mdx",7600:"styling-layers-docs-mdx",7653:"styling-icons-icons-component-stories",7683:"layout-main-main-component-stories",7819:"atoms-rating-docs-mdx",7837:"forms-autocomplete-docs-mdx",7867:"_external-mwork-banner-mwork-banner-stories",7877:"atoms-text-animate-text-animate-component-stories",7893:"styling-css-variables-docs-mdx",7947:"atoms-image-slider-docs-mdx",8039:"atoms-image-grid-image-grid-component-stories",8092:"styling-icons-docs-mdx",8108:"forms-checkbox-docs-mdx",8180:"molecules-image-editor-image-editor-component-stories",8753:"layout-tabs-tabs-component-stories",8852:"atoms-card-docs-mdx",8938:"examples-image-grid-slider-image-grid-slider-stories",9042:"layout-overlay-header-docs-mdx",9044:"examples-transloco-transloco-component-stories",9217:"atoms-barcode-barcode-component-stories",9236:"forms-autofocus-autofocus-stories",9240:"layout-overlay-header-header-component-stories",9475:"layout-nav-nav-component-stories",9652:"examples-burger-menu-stories",9653:"layout-nav-docs-mdx",9779:"layout-top-scroll-bottom-top-scroll-bottom-component-stories",9836:"examples-table-edit-focus-table-edit-focus-stories",9918:"atoms-barcode-docs-mdx"}[chunkId]||chunkId)+"."+{128:"d0cf448a",166:"39611362",365:"4be572c0",660:"18f0458e",813:"805c1e5f",871:"428deceb",943:"9e38157e",947:"bf161b39",973:"67f44bb0",977:"9d58a341",1043:"ab8245c6",1165:"7a64bd20",1183:"da25800b",1255:"2abec879",1296:"3111f2c6",1322:"7f749acc",1327:"f12088fd",1365:"08fbf651",1461:"484b9c41",1481:"bbacdfd2",1516:"52d2dae7",1686:"609db3f0",1809:"d1464731",1838:"95c504e4",1860:"443544e0",1927:"23ab2316",1954:"1aebfbdf",1977:"8af76278",2006:"4f102c17",2033:"c705a7ce",2074:"5b9e78fe",2089:"32694489",2096:"431fc8f5",2127:"29f153d2",2168:"823351e0",2193:"4202568d",2228:"77650ef1",2249:"6e6782ab",2379:"3252a9b8",2425:"5247b7cb",2639:"29baa8af",2831:"0a6bc043",2844:"c9f47654",2960:"a327a27f",2971:"edb202b4",3007:"f404dcd2",3045:"bc221534",3048:"bf67d7c9",3073:"ddc061f8",3143:"26df81d8",3146:"18b4df2a",3151:"b0ca9a06",3190:"119ea12a",3260:"6f943768",3277:"41d7efd1",3338:"8f75631d",3550:"0688c3b9",3651:"7941c064",3678:"d45b4f0d",3685:"982db47d",3752:"03c6205c",3767:"1a176b15",3837:"4c9208c5",3842:"7ba89dd0",3853:"58d3956a",3857:"943e72f2",3899:"55560628",3925:"06f51d03",3968:"69b812e4",3999:"a6fec57d",4067:"05e1baf4",4255:"eeeaf087",4271:"286b5171",4320:"23eb1913",4365:"5018e2b0",4425:"368129b3",4447:"6f724cc8",4476:"f8e4115f",4495:"d1c8cc8d",4555:"066c242d",4713:"4fefc019",4806:"3b1088c0",4855:"b6b50c0c",4935:"8959522b",4939:"72d0e99a",4947:"065b34e9",5084:"501e6780",5233:"2ec3109b",5370:"2143ad01",5493:"3c0d1611",5568:"c6172f92",5684:"05cd891f",5944:"810cb147",5995:"58031f40",6115:"7f1470ef",6169:"eaeed989",6189:"9bee1037",6202:"b8ca0e90",6203:"cd2f3976",6212:"db9212fd",6252:"120cefc6",6331:"46b8b112",6354:"9525f97b",6501:"0d5549a0",6569:"cc2c11e7",6659:"01f6cd84",6768:"97df7022",6824:"f5eb8bb7",6892:"89d83606",6922:"058fb9b1",6978:"204609d4",7316:"5b024e94",7419:"13ee130d",7586:"ebb47a43",7600:"5039dc45",7653:"2dd8c6f8",7683:"788c0c54",7749:"2a853795",7819:"32fa4104",7837:"09beba1b",7867:"d44f6917",7877:"8041c0f1",7893:"48afb4f3",7947:"c616bb37",8039:"a0a92d9e",8051:"719eb790",8092:"e1001dfd",8108:"74036eb7",8180:"56467f17",8448:"1baeb046",8753:"8602cefa",8819:"220ca21d",8852:"7d276114",8938:"028c8c2b",9042:"394033ca",9044:"5baea2e2",9045:"a50616e9",9217:"dc462559",9236:"2e94d887",9240:"5eaef192",9475:"766738fc",9560:"668052f3",9652:"0a083a75",9653:"cc919f94",9779:"9ee7055f",9836:"c79e214a",9850:"28367747",9918:"b74c501b",9946:"36014b4e"}[chunkId]+".iframe.bundle.js"),__webpack_require__.miniCssF=chunkId=>{},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),inProgress={},__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url])inProgress[url].push(done);else{var script,needAttach;if(void 0!==key)for(var scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")=="moja-work:"+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack","moja-work:"+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}},__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.p="",(()=>{var installedChunks={5354:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData)if(installedChunkData)promises.push(installedChunkData[2]);else if(5354!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=new Error;__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,[chunkIds,moreModules,runtime]=data,i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkmoja_work=self.webpackChunkmoja_work||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
1
+ (()=>{"use strict";var deferred,leafPrototypes,getProto,inProgress,__webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},deferred=[],__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(!chunkIds){var notFulfilled=1/0;for(i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(!1&priority||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority]},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode)return value;if("object"==typeof value&&value){if(4&mode&&value.__esModule)return value;if(16&mode&&"function"==typeof value.then)return value}var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;("object"==typeof current||"function"==typeof current)&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>(({128:"home-overview-mdx",166:"forms-autofocus-docs-mdx",365:"layout-spinner-docs-mdx",943:"examples-image-grid-slider-docs-mdx",947:"layout-splitter-docs-mdx",977:"forms-switch-docs-mdx",1043:"layout-spinner-spinner-component-stories",1165:"styling-tags-tags-component-stories",1296:"examples-docs-mdx",1322:"atoms-_electrons-form-error-message-form-error-message-component-stories",1327:"cdk-components-drag-and-drop-splitter-docs-mdx",1365:"_external-mwork-music-player-mwork-music-player-stories",1461:"atoms-image-slider-image-slider-component-stories",1481:"examples-layout-docs-mdx",1686:"forms-input-input-component-stories",1809:"atoms-clock-clock-component-stories",1838:"styling-colors-docs-mdx",1860:"forms-autocomplete-autocomplete-component-stories",1927:"styling-tags-docs-mdx",1954:"atoms-mosaic-docs-mdx",1977:"styling-forms-forms-component-stories",2006:"atoms-background-docs-mdx",2074:"atoms-_electrons-form-error-message-docs-mdx",2168:"layout-overlay-docs-mdx",2193:"atoms-qr-code-docs-mdx",2379:"_external-mwork-basic-interpreter-mwork-basic-interpreter-stories",2425:"atoms-chart-chart-component-stories",2831:"atoms-mosaic-mosaic-component-stories",2960:"atoms-lang-selector-docs-mdx",3007:"atoms-copy-value-docs-mdx",3045:"atoms-placeholder-placeholder-component-stories",3048:"forms-switch-switch-component-stories",3073:"layout-top-scroll-bottom-docs-mdx",3143:"home-tips-mdx",3146:"atoms-image-grid-docs-mdx",3151:"layout-media-screen-docs-mdx",3190:"molecules-image-editor-docs-mdx",3260:"_external-mwork-music-player-docs-mdx",3277:"atoms-lang-selector-lang-selector-component-stories",3338:"styling-ui-tags-docs-mdx",3550:"atoms-reader-doc-docs-mdx",3651:"layout-media-screen-media-screen-component-stories",3678:"forms-checkbox-checkbox-component-stories",3685:"atoms-rating-rating-component-stories",3752:"_external-mwork-basic-interpreter-docs-mdx",3767:"home-guide-mdx",3837:"layout-main-docs-mdx",3842:"home-usage-mdx",3853:"atoms-copy-value-copy-value-component-stories",3857:"styling-forms-docs-mdx",3925:"atoms-thumb-thumb-component-stories",3999:"atoms-reader-doc-reader-doc-component-stories",4067:"atoms-text-animate-docs-mdx",4271:"cdk-components-drag-and-drop-splitter-splitter-component-stories",4320:"atoms-buzzer-docs-mdx",4365:"atoms-qr-code-qr-code-component-stories",4447:"atoms-timer-docs-mdx",4713:"atoms-typewriter-typewriter-component-stories",4806:"atoms-typewriter-docs-mdx",4855:"atoms-background-background-component-stories",4939:"forms-input-docs-mdx",4947:"atoms-card-card-component-stories",5084:"atoms-clock-docs-mdx",5233:"styling-ui-tags-ui-tags-component-stories",5370:"atoms-thumb-docs-mdx",5493:"examples-table-edit-focus-docs-mdx",5684:"examples-layout-layout-stories",5995:"styling-colors-colors-component-stories",6189:"atoms-timer-timer-component-stories",6203:"atoms-placeholder-docs-mdx",6212:"cdk-components-table-table-component-stories",6252:"forms-slider-docs-mdx",6331:"layout-splitter-splitter-component-stories",6354:"forms-validators-validators-component-stories",6501:"_external-mwork-banner-docs-mdx",6569:"cdk-components-table-docs-mdx",6659:"layout-overlay-overlay-component-stories",6768:"examples-transloco-docs-mdx",6892:"layout-tabs-docs-mdx",6922:"forms-slider-slider-component-stories",6978:"atoms-chart-docs-mdx",7419:"atoms-buzzer-buzzer-component-stories",7586:"forms-validators-docs-mdx",7600:"styling-layers-docs-mdx",7653:"styling-icons-icons-component-stories",7683:"layout-main-main-component-stories",7819:"atoms-rating-docs-mdx",7837:"forms-autocomplete-docs-mdx",7867:"_external-mwork-banner-mwork-banner-stories",7877:"atoms-text-animate-text-animate-component-stories",7893:"styling-css-variables-docs-mdx",7947:"atoms-image-slider-docs-mdx",8039:"atoms-image-grid-image-grid-component-stories",8092:"styling-icons-docs-mdx",8108:"forms-checkbox-docs-mdx",8180:"molecules-image-editor-image-editor-component-stories",8753:"layout-tabs-tabs-component-stories",8852:"atoms-card-docs-mdx",8938:"examples-image-grid-slider-image-grid-slider-stories",9042:"layout-overlay-header-docs-mdx",9044:"examples-transloco-transloco-component-stories",9217:"atoms-barcode-barcode-component-stories",9236:"forms-autofocus-autofocus-stories",9240:"layout-overlay-header-header-component-stories",9475:"layout-nav-nav-component-stories",9652:"examples-burger-menu-stories",9653:"layout-nav-docs-mdx",9779:"layout-top-scroll-bottom-top-scroll-bottom-component-stories",9836:"examples-table-edit-focus-table-edit-focus-stories",9918:"atoms-barcode-docs-mdx"}[chunkId]||chunkId)+"."+{128:"02c51683",166:"39611362",365:"4be572c0",660:"18f0458e",813:"805c1e5f",871:"428deceb",943:"9e38157e",947:"bf161b39",973:"67f44bb0",977:"9d58a341",1043:"ab8245c6",1165:"7a64bd20",1183:"da25800b",1255:"2abec879",1296:"3111f2c6",1322:"7f749acc",1327:"f12088fd",1365:"08fbf651",1461:"484b9c41",1481:"bbacdfd2",1516:"52d2dae7",1686:"609db3f0",1809:"d1464731",1838:"95c504e4",1860:"443544e0",1927:"23ab2316",1954:"1aebfbdf",1977:"8af76278",2006:"4f102c17",2033:"c705a7ce",2074:"5b9e78fe",2089:"32694489",2096:"431fc8f5",2127:"29f153d2",2168:"823351e0",2193:"4202568d",2228:"77650ef1",2249:"6e6782ab",2379:"3252a9b8",2425:"5247b7cb",2639:"29baa8af",2831:"0a6bc043",2844:"c9f47654",2960:"a327a27f",2971:"edb202b4",3007:"f404dcd2",3045:"bc221534",3048:"bf67d7c9",3073:"ddc061f8",3143:"26df81d8",3146:"18b4df2a",3151:"b0ca9a06",3190:"119ea12a",3260:"6f943768",3277:"41d7efd1",3338:"8f75631d",3550:"0688c3b9",3651:"7941c064",3678:"d45b4f0d",3685:"982db47d",3752:"03c6205c",3767:"1a176b15",3837:"4c9208c5",3842:"b908934f",3853:"58d3956a",3857:"943e72f2",3899:"55560628",3925:"06f51d03",3968:"69b812e4",3999:"a6fec57d",4067:"05e1baf4",4255:"eeeaf087",4271:"286b5171",4320:"23eb1913",4365:"5018e2b0",4425:"368129b3",4447:"6f724cc8",4476:"f8e4115f",4495:"d1c8cc8d",4555:"066c242d",4713:"4fefc019",4806:"3b1088c0",4855:"b6b50c0c",4935:"8959522b",4939:"72d0e99a",4947:"065b34e9",5084:"501e6780",5233:"2ec3109b",5370:"2143ad01",5493:"3c0d1611",5568:"c6172f92",5684:"05cd891f",5944:"810cb147",5995:"58031f40",6115:"7f1470ef",6169:"eaeed989",6189:"9bee1037",6202:"b8ca0e90",6203:"cd2f3976",6212:"db9212fd",6252:"120cefc6",6331:"46b8b112",6354:"9525f97b",6501:"0d5549a0",6569:"cc2c11e7",6659:"01f6cd84",6768:"97df7022",6824:"f5eb8bb7",6892:"89d83606",6922:"058fb9b1",6978:"204609d4",7316:"5b024e94",7419:"13ee130d",7586:"ebb47a43",7600:"5039dc45",7653:"2dd8c6f8",7683:"788c0c54",7749:"2a853795",7819:"32fa4104",7837:"09beba1b",7867:"d44f6917",7877:"8041c0f1",7893:"48afb4f3",7947:"c616bb37",8039:"a0a92d9e",8051:"719eb790",8092:"e1001dfd",8108:"74036eb7",8180:"56467f17",8448:"1baeb046",8753:"8602cefa",8819:"220ca21d",8852:"7d276114",8938:"028c8c2b",9042:"394033ca",9044:"5baea2e2",9045:"a50616e9",9217:"dc462559",9236:"2e94d887",9240:"5eaef192",9475:"766738fc",9560:"668052f3",9652:"0a083a75",9653:"cc919f94",9779:"9ee7055f",9836:"c79e214a",9850:"28367747",9918:"b74c501b",9946:"36014b4e"}[chunkId]+".iframe.bundle.js"),__webpack_require__.miniCssF=chunkId=>{},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),inProgress={},__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url])inProgress[url].push(done);else{var script,needAttach;if(void 0!==key)for(var scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")=="moja-work:"+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack","moja-work:"+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}},__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.p="",(()=>{var installedChunks={5354:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData)if(installedChunkData)promises.push(installedChunkData[2]);else if(5354!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=new Error;__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,[chunkIds,moreModules,runtime]=data,i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkmoja_work=self.webpackChunkmoja_work||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
@@ -1,4 +1,4 @@
1
1
  {
2
- "commit": "0d00b07f",
3
- "uiVersion": "2.3.0"
2
+ "commit": "ec1a590a",
3
+ "uiVersion": "2.4.0"
4
4
  }
package/version.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "uiVersion": "2.3.0",
3
- "commit": "0d00b07f"
2
+ "uiVersion": "2.4.0",
3
+ "commit": "ec1a590a"
4
4
  }
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3842],{"./libs/ui/src/lib/home/usage.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 usage_namespaceObject="# Using @mojawork/ui\n\nThe usage contract of the library: the rules that hold for every application\nconsuming `@mojawork/ui`, inside or outside the workspace it is built in.\nThis file is the single source for these rules — the catalog serves it to\nagents as the house rules of `get_guide`, and the workspace's shared agent\nrules point here instead of restating it. The component pages remain the\ntruth about each component; this file holds what is true across all of them.\n\n## Signals and zoneless change detection\n\n- Use Angular Signals (`signal()`, `computed()`, `effect()`) for state and\n reactive logic instead of manual state or plain observables.\n- The library and its reference applications run **zoneless**\n (`provideZonelessChangeDetection()`, no `zone.js` polyfill). Any\n template-bound state that is updated from an async source\n (`setTimeout`/`setInterval`, RxJS `subscribe`, `Promise`,\n `requestAnimationFrame`) MUST be a signal (or use the `async` pipe /\n `toSignal()`); a plain field written from such a callback will not trigger\n change detection. Imperative DOM writes (e.g. `element.setAttribute`, CSS\n custom properties) do not need this.\n\n## Forms\n\nForm inputs follow one fixed format:\n\n```html\n<ui-input [label]=\"'Label'\">\n <input ui-tag [(ngModel)]=\"model\" ... />\n</ui-input>\n```\n\n## Styling and tokens\n\n- Components are styled with plain CSS on the design tokens\n (`var(--ui-spacer)`, `var(--ui-border-radius)`, the `--ui-c-*` colours).\n No CSS framework is required, and no Sass.\n- Host geometry is a named hook with a fallback, never a pinned value —\n e.g. `width: var(--ui-background-width, 100%)`. A consumer without\n Tailwind sets the variable; one with Tailwind puts a utility on the tag,\n and the cascade layers below make it win. Each component documents its\n hooks in its story.\n- The package itself is Tailwind-free; its templates carry no utility\n classes. Tailwind is optional at the consumer: the package ships a\n ready-made Tailwind v4 theme that maps the utilities onto the tokens,\n including light/dark switching and the `ms1:`–`ms6:` breakpoint ladder.\n\n## Cascade layers — the library sits below the utilities\n\nA utility you write on a ui tag must win against the component's own\ndefault. Tailwind v4 puts everything in cascade layers, and **unlayered CSS\nbeats layered CSS regardless of specificity** — the order of layers, not\nspecificity, decides who wins.\n\nThe library's styles live in the `ui` layer, declared before Tailwind's:\n\n```css\n@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n```\n\n**Every consumer with its own Tailwind entry declares the same line before\nits import.** A layer nobody names is appended behind all named ones and\nwould beat the whole library. `cdk-resets` is part of the line so the\nAngular CDK's drag-preview reset sits below the library instead of\nstripping every preview of its surface.\n\nWhat this means in practice: a Tailwind utility on a ui tag wins over the\ncomponent's default, and unlayered consumer CSS wins over both. A `!` on a\nutility against a ui tag is a symptom, not a fix — it means the layer line\nis missing somewhere.\n\n## Disabled controls and the keyboard\n\n`disabled` is not only a visual state — it changes where the focus can live,\nand it does so retroactively. Two failure modes come out of that, and both\nhave already cost real debugging time.\n\n**A control that disables itself throws the focus away.** The moment an\nelement becomes `disabled`, the browser removes the focus from it and drops it\non `<body>`. So a button whose own activation makes it inert — a reset that\nhas nothing left to undo, a save that dies once everything is saved, a \"load\nmore\" at the end of a list — leaves a keyboard user with no place at all. The\nrow they were working in is gone from under them, and the next Tab starts over\nat the top of the document.\n\nNo navigation logic can repair this. It happens **after** the activation, so\nby the time anything notices, the previous position no longer exists.\n\n**Custom keyboard navigation and the browser disagree about who counts.** The\nbrowser skips disabled controls in the tab order; hand-written navigation that\ncollects controls with a plain `'input, select, textarea, button, a'` counts\nthem. The two sets drift apart: a remembered position points into a different\nlist than the one the focus actually walks, and `focus()` on a disabled\nelement does nothing at all — the focus stays put and the next key press picks\nthe very same dead target again. The navigation jams, silently, with no error\nanywhere.\n\n**Preferred pattern: do not disable at all.** Keep the control **enabled** and\nlet its action be a no-op when there is nothing to do. Express unavailability\nthrough styling plus `aria-disabled=\"true\"` — that keeps the control\nfocusable and reachable while screen readers still announce it as\nunavailable. A dimmed control without `aria-disabled` is, to anyone who only\nlistens, an ordinary control: the look carries the message, and nobody hears a\nlook.\n\n**If a control genuinely must be disabled**, move the focus somewhere\ndeliberate **before** disabling it — the neighbouring control, the container,\nthe element that replaces it. Never leave that decision to the browser.\n\n**And when you write navigation yourself**, derive the control list from the\nDOM on every key press and filter it to what can actually take focus\n(`:not(:disabled):not([hidden]):not([tabindex=\"-1\"])`), so it can never\ndisagree with the native tab order. Never cache the list and never store\npositions as constants: a cell may hold a different number of stations from\none moment to the next.\n\n## Where the documentation lives\n\nThe component page is the truth — the fixed section \"What it does, and what\nit does not\" on every page. The guide is the offer next to it: use for, not\nfor, instead, with proof. Where the two disagree, the page wins.\n\n- **Storybook** — `https://moja.work/storybook`: every component, every\n story, the guide entries next to the truth sections. It describes the\n current line (behaviour can change within 2.x) — pin an exact version of\n the package rather than a `^` range.\n- **MCP catalog for agents** — `https://moja.work/ui/mcp`: the tools\n `list_components` (the shelf), `get_component_doc` (one page, verbatim)\n and `get_guide` (the recommendations plus these rules). If you know a\n component's selector, ask for it directly instead of fetching the whole\n guide and filtering it yourself.\n- **`llms.txt`** — `https://moja.work/llms.txt`: the catalog for crawlers\n and plain-text readers.\n- **API reference** — the `.d.ts` files in the installed package are the\n version-true API; the hosted Compodoc at `https://moja.work/compodoc/ui`\n describes the line.\n",usageMarkdown=(usage_namespaceObject.default??usage_namespaceObject).trim();if(""===usageMarkdown)throw new Error("usage: libs/ui/usage.md is empty — an empty contract is a generator bug, not an empty page.");function _createMdxContent(props){const _components={code:"code",p:"p",strong:"strong",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Usage"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This page ",(0,jsx_runtime.jsx)(_components.strong,{children:"reads"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/usage.md"})," — the usage contract of the library.\nThe npm package ships the same file verbatim as ",(0,jsx_runtime.jsx)(_components.code,{children:"usage.md"}),", and the\ncatalog's ",(0,jsx_runtime.jsx)(_components.code,{children:"get_guide"})," tool serves its sections as the house rules; what\nstands here cannot drift from either."]}),"\n",(0,jsx_runtime.jsx)(blocks.oz,{children:usageMarkdown})]})}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)}}}]);