@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.
- package/README.md +2 -2
- package/catalog/atoms/image-grid.md +27 -13
- package/catalog/guide.json +6 -6
- package/catalog/manifest.json +4 -4
- package/catalog/version.json +2 -2
- package/package.json +1 -1
- package/storybook/2621.fdb0f39b.iframe.bundle.js +2 -0
- package/storybook/2621.fdb0f39b.iframe.bundle.js.map +1 -0
- package/storybook/{4555.767c4a26.iframe.bundle.js → 4555.755c5b81.iframe.bundle.js} +2 -2
- package/storybook/{4555.767c4a26.iframe.bundle.js.map → 4555.755c5b81.iframe.bundle.js.map} +1 -1
- package/storybook/atoms-image-grid-docs-mdx.66afba9a.iframe.bundle.js +2 -0
- package/storybook/atoms-image-grid-docs-mdx.66afba9a.iframe.bundle.js.map +1 -0
- package/storybook/atoms-image-grid-image-grid-component-stories.18152774.iframe.bundle.js +2 -0
- package/storybook/atoms-image-grid-image-grid-component-stories.18152774.iframe.bundle.js.map +1 -0
- package/storybook/home-overview-mdx.8b0a9768.iframe.bundle.js +2 -0
- package/storybook/{home-overview-mdx.9521137d.iframe.bundle.js.map → home-overview-mdx.8b0a9768.iframe.bundle.js.map} +1 -1
- package/storybook/iframe.html +1 -1
- package/storybook/project.json +1 -1
- package/storybook/{runtime~main.1fc884d5.iframe.bundle.js → runtime~main.299654f7.iframe.bundle.js} +2 -2
- package/storybook/{runtime~main.1fc884d5.iframe.bundle.js.map → runtime~main.299654f7.iframe.bundle.js.map} +1 -1
- package/storybook/version.json +2 -2
- package/version.json +2 -2
- package/storybook/2621.41931f1f.iframe.bundle.js +0 -2
- package/storybook/2621.41931f1f.iframe.bundle.js.map +0 -1
- package/storybook/atoms-image-grid-docs-mdx.884fa455.iframe.bundle.js +0 -2
- package/storybook/atoms-image-grid-docs-mdx.884fa455.iframe.bundle.js.map +0 -1
- package/storybook/atoms-image-grid-image-grid-component-stories.c2cb1e12.iframe.bundle.js +0 -2
- package/storybook/atoms-image-grid-image-grid-component-stories.c2cb1e12.iframe.bundle.js.map +0 -1
- package/storybook/home-overview-mdx.9521137d.iframe.bundle.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4555.5877ea9c.iframe.bundle.js","mappings":"AAAA","sources":["webpack://moja-work/./libs/ui/guide/ sync nonrecursive \\.json$","webpack://moja-work/./libs/ui/.storybook/blocks/guide.entries.js","webpack://moja-work/./libs/ui/.storybook/blocks/guide.model.mjs"],"sourcesContent":["const map = {\n\t\"./app-shell.json\": \"./libs/ui/guide/app-shell.json\",\n\t\"./burger-menu.json\": \"./libs/ui/guide/burger-menu.json\",\n\t\"./form-basics.json\": \"./libs/ui/guide/form-basics.json\",\n\t\"./image-gallery.json\": \"./libs/ui/guide/image-gallery.json\",\n\t\"./table-edit-focus.json\": \"./libs/ui/guide/table-edit-focus.json\",\n\t\"./translations.json\": \"./libs/ui/guide/translations.json\",\n\t\"./ui-autocomplete.json\": \"./libs/ui/guide/ui-autocomplete.json\",\n\t\"./ui-background.json\": \"./libs/ui/guide/ui-background.json\",\n\t\"./ui-barcode.json\": \"./libs/ui/guide/ui-barcode.json\",\n\t\"./ui-buzzer.json\": \"./libs/ui/guide/ui-buzzer.json\",\n\t\"./ui-card.json\": \"./libs/ui/guide/ui-card.json\",\n\t\"./ui-cdk-drag-drop-splitter.json\": \"./libs/ui/guide/ui-cdk-drag-drop-splitter.json\",\n\t\"./ui-cdk-table-wrapper.json\": \"./libs/ui/guide/ui-cdk-table-wrapper.json\",\n\t\"./ui-chart.json\": \"./libs/ui/guide/ui-chart.json\",\n\t\"./ui-checkbox.json\": \"./libs/ui/guide/ui-checkbox.json\",\n\t\"./ui-chip.json\": \"./libs/ui/guide/ui-chip.json\",\n\t\"./ui-clock.json\": \"./libs/ui/guide/ui-clock.json\",\n\t\"./ui-copy-value.json\": \"./libs/ui/guide/ui-copy-value.json\",\n\t\"./ui-image-editor.json\": \"./libs/ui/guide/ui-image-editor.json\",\n\t\"./ui-image-grid.json\": \"./libs/ui/guide/ui-image-grid.json\",\n\t\"./ui-image-slider.json\": \"./libs/ui/guide/ui-image-slider.json\",\n\t\"./ui-inline-spinner.json\": \"./libs/ui/guide/ui-inline-spinner.json\",\n\t\"./ui-input.json\": \"./libs/ui/guide/ui-input.json\",\n\t\"./ui-lang-selector.json\": \"./libs/ui/guide/ui-lang-selector.json\",\n\t\"./ui-layout-main.json\": \"./libs/ui/guide/ui-layout-main.json\",\n\t\"./ui-layout-media-screen.json\": \"./libs/ui/guide/ui-layout-media-screen.json\",\n\t\"./ui-layout-nav.json\": \"./libs/ui/guide/ui-layout-nav.json\",\n\t\"./ui-layout-overlay-header.json\": \"./libs/ui/guide/ui-layout-overlay-header.json\",\n\t\"./ui-layout-overlay.json\": \"./libs/ui/guide/ui-layout-overlay.json\",\n\t\"./ui-layout-spinner.json\": \"./libs/ui/guide/ui-layout-spinner.json\",\n\t\"./ui-layout-splitter.json\": \"./libs/ui/guide/ui-layout-splitter.json\",\n\t\"./ui-layout-tabs.json\": \"./libs/ui/guide/ui-layout-tabs.json\",\n\t\"./ui-layout-top-scroll-bottom.json\": \"./libs/ui/guide/ui-layout-top-scroll-bottom.json\",\n\t\"./ui-mosaic.json\": \"./libs/ui/guide/ui-mosaic.json\",\n\t\"./ui-placeholder.json\": \"./libs/ui/guide/ui-placeholder.json\",\n\t\"./ui-qr-code.json\": \"./libs/ui/guide/ui-qr-code.json\",\n\t\"./ui-rating.json\": \"./libs/ui/guide/ui-rating.json\",\n\t\"./ui-reader-doc.json\": \"./libs/ui/guide/ui-reader-doc.json\",\n\t\"./ui-slider.json\": \"./libs/ui/guide/ui-slider.json\",\n\t\"./ui-switch.json\": \"./libs/ui/guide/ui-switch.json\",\n\t\"./ui-text-animate.json\": \"./libs/ui/guide/ui-text-animate.json\",\n\t\"./ui-thumb.json\": \"./libs/ui/guide/ui-thumb.json\",\n\t\"./ui-timer.json\": \"./libs/ui/guide/ui-timer.json\",\n\t\"./ui-typewriter.json\": \"./libs/ui/guide/ui-typewriter.json\",\n\t\"libs/ui/guide/app-shell.json\": \"./libs/ui/guide/app-shell.json\",\n\t\"libs/ui/guide/burger-menu.json\": \"./libs/ui/guide/burger-menu.json\",\n\t\"libs/ui/guide/form-basics.json\": \"./libs/ui/guide/form-basics.json\",\n\t\"libs/ui/guide/image-gallery.json\": \"./libs/ui/guide/image-gallery.json\",\n\t\"libs/ui/guide/table-edit-focus.json\": \"./libs/ui/guide/table-edit-focus.json\",\n\t\"libs/ui/guide/translations.json\": \"./libs/ui/guide/translations.json\",\n\t\"libs/ui/guide/ui-autocomplete.json\": \"./libs/ui/guide/ui-autocomplete.json\",\n\t\"libs/ui/guide/ui-background.json\": \"./libs/ui/guide/ui-background.json\",\n\t\"libs/ui/guide/ui-barcode.json\": \"./libs/ui/guide/ui-barcode.json\",\n\t\"libs/ui/guide/ui-buzzer.json\": \"./libs/ui/guide/ui-buzzer.json\",\n\t\"libs/ui/guide/ui-card.json\": \"./libs/ui/guide/ui-card.json\",\n\t\"libs/ui/guide/ui-cdk-drag-drop-splitter.json\": \"./libs/ui/guide/ui-cdk-drag-drop-splitter.json\",\n\t\"libs/ui/guide/ui-cdk-table-wrapper.json\": \"./libs/ui/guide/ui-cdk-table-wrapper.json\",\n\t\"libs/ui/guide/ui-chart.json\": \"./libs/ui/guide/ui-chart.json\",\n\t\"libs/ui/guide/ui-checkbox.json\": \"./libs/ui/guide/ui-checkbox.json\",\n\t\"libs/ui/guide/ui-chip.json\": \"./libs/ui/guide/ui-chip.json\",\n\t\"libs/ui/guide/ui-clock.json\": \"./libs/ui/guide/ui-clock.json\",\n\t\"libs/ui/guide/ui-copy-value.json\": \"./libs/ui/guide/ui-copy-value.json\",\n\t\"libs/ui/guide/ui-image-editor.json\": \"./libs/ui/guide/ui-image-editor.json\",\n\t\"libs/ui/guide/ui-image-grid.json\": \"./libs/ui/guide/ui-image-grid.json\",\n\t\"libs/ui/guide/ui-image-slider.json\": \"./libs/ui/guide/ui-image-slider.json\",\n\t\"libs/ui/guide/ui-inline-spinner.json\": \"./libs/ui/guide/ui-inline-spinner.json\",\n\t\"libs/ui/guide/ui-input.json\": \"./libs/ui/guide/ui-input.json\",\n\t\"libs/ui/guide/ui-lang-selector.json\": \"./libs/ui/guide/ui-lang-selector.json\",\n\t\"libs/ui/guide/ui-layout-main.json\": \"./libs/ui/guide/ui-layout-main.json\",\n\t\"libs/ui/guide/ui-layout-media-screen.json\": \"./libs/ui/guide/ui-layout-media-screen.json\",\n\t\"libs/ui/guide/ui-layout-nav.json\": \"./libs/ui/guide/ui-layout-nav.json\",\n\t\"libs/ui/guide/ui-layout-overlay-header.json\": \"./libs/ui/guide/ui-layout-overlay-header.json\",\n\t\"libs/ui/guide/ui-layout-overlay.json\": \"./libs/ui/guide/ui-layout-overlay.json\",\n\t\"libs/ui/guide/ui-layout-spinner.json\": \"./libs/ui/guide/ui-layout-spinner.json\",\n\t\"libs/ui/guide/ui-layout-splitter.json\": \"./libs/ui/guide/ui-layout-splitter.json\",\n\t\"libs/ui/guide/ui-layout-tabs.json\": \"./libs/ui/guide/ui-layout-tabs.json\",\n\t\"libs/ui/guide/ui-layout-top-scroll-bottom.json\": \"./libs/ui/guide/ui-layout-top-scroll-bottom.json\",\n\t\"libs/ui/guide/ui-mosaic.json\": \"./libs/ui/guide/ui-mosaic.json\",\n\t\"libs/ui/guide/ui-placeholder.json\": \"./libs/ui/guide/ui-placeholder.json\",\n\t\"libs/ui/guide/ui-qr-code.json\": \"./libs/ui/guide/ui-qr-code.json\",\n\t\"libs/ui/guide/ui-rating.json\": \"./libs/ui/guide/ui-rating.json\",\n\t\"libs/ui/guide/ui-reader-doc.json\": \"./libs/ui/guide/ui-reader-doc.json\",\n\t\"libs/ui/guide/ui-slider.json\": \"./libs/ui/guide/ui-slider.json\",\n\t\"libs/ui/guide/ui-switch.json\": \"./libs/ui/guide/ui-switch.json\",\n\t\"libs/ui/guide/ui-text-animate.json\": \"./libs/ui/guide/ui-text-animate.json\",\n\t\"libs/ui/guide/ui-thumb.json\": \"./libs/ui/guide/ui-thumb.json\",\n\t\"libs/ui/guide/ui-timer.json\": \"./libs/ui/guide/ui-timer.json\",\n\t\"libs/ui/guide/ui-typewriter.json\": \"./libs/ui/guide/ui-typewriter.json\"\n};\n\n\nfunction webpackContext(req) {\n\tconst id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tconst e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./libs/ui/guide sync \\\\.json$\";","// Every guide entry, read from the folder at build time (tickets#265).\n//\n// `require.context` is webpack's way of importing a folder: the list of\n// files is fixed when Storybook builds, so an entry added to libs/ui/guide/\n// shows up on the overview without anyone registering it — and a folder\n// that yields nothing is an error, never an empty overview.\n//\n// The rule below wants an ESM import instead, and there is none that does\n// this: reading a folder is a bundler feature, not a language one. Storybook\n// builds this file with webpack, so the disable is the honest answer — not a\n// rewrite that would have to name every entry by hand and then go stale.\n// eslint-disable-next-line unicorn/prefer-module\nconst context = require.context('../../guide', false, /\\.json$/);\n\n// webpack lists every file under two keys ('./x.json' and 'x.json'); the\n// relative form is the canonical one, the other is the same module again.\nexport const guideEntries = context\n .keys()\n .filter((key) => key.startsWith('./'))\n .map((key) => {\n const entry = context(key);\n return entry.default ?? entry;\n });\n\nif (guideEntries.length === 0) {\n throw new Error('guide: libs/ui/guide/ holds no entries — an empty guide is a generator bug, not an empty page.');\n}\n\nconst subjects = guideEntries.map((entry) => entry.component ?? entry.situation);\nconst twice = subjects.find((subject, index) => subjects.indexOf(subject) !== index);\nif (twice) {\n throw new Error(`guide: \"${twice}\" is listed twice — one entry per subject, or the overview lies about the count.`);\n}\n","// The guide as Storybook shows it (tickets#265) — the pure half.\n//\n// The guide's source of record is libs/ui/guide/*.json (tickets#228). Nothing\n// here writes a word of guidance: this module turns an entry into links and\n// rows, and refuses loudly when what it is handed is not an entry. The MDX\n// block next door (guide.mdx) is only the view; this file is what the tests\n// exercise, in node, without a browser.\n\nimport { sanitize, storyNameFromExport, toId } from 'storybook/internal/csf';\n\n/** `Title/Export` → `?path=/story/<title-id>--<story-id>` */\nexport function storyHref(story) {\n const cut = story.lastIndexOf('/');\n if (cut <= 0 || cut === story.length - 1) {\n throw new Error(`guide: story reference \"${story}\" is not \"Title/Export\".`);\n }\n const title = story.slice(0, cut);\n const name = story.slice(cut + 1);\n return `?path=/story/${toId(title, storyNameFromExport(name))}`;\n}\n\n/** A story title → its docs page. */\nexport const docsHref = (title) => `?path=/docs/${sanitize(title)}--docs`;\n\n/** The subject an entry is about. */\nexport const subjectOf = (entry) => entry.component ?? entry.situation;\n\n/**\n * Where a subject's own page is, derived from its entry: the docs page of\n * the first story it is shown in. An entry is reached through its proof,\n * never through a hand-written map that would have to be kept in step.\n */\nexport function pageOf(entries, subject) {\n const entry = entries.find((e) => subjectOf(e) === subject);\n const story = entry?.shownIn.find((r) => r.story)?.story;\n return story ? docsHref(story.slice(0, story.lastIndexOf('/'))) : null;\n}\n\n/**\n * One entry, checked and resolved for the view: every story reference a\n * link, every `instead` a link to that component's page where one exists.\n * `of` is the subject the page claims — an entry for a different subject is\n * a wiring error and says so.\n */\nexport function guideModel(entry, entries, of) {\n if (!entry || typeof entry !== 'object') {\n throw new Error(`guide: no entry handed to the block for \"${of}\".`);\n }\n const subject = subjectOf(entry);\n if (of !== undefined && subject !== of) {\n throw new Error(`guide: the block on \"${of}\" was handed the entry of \"${subject}\" — wrong import.`);\n }\n for (const key of ['useFor', 'notFor', 'shownIn', 'sources']) {\n if (!Array.isArray(entry[key])) throw new Error(`guide: entry \"${subject}\" has no \"${key}\" list.`);\n }\n if (entry.shownIn.length === 0) throw new Error(`guide: entry \"${subject}\" shows nothing — no proof, no block.`);\n return {\n subject,\n kind: entry.component ? 'component' : 'situation',\n uses: (entry.uses ?? []).map((s) => ({ selector: s, href: pageOf(entries, s) })),\n useFor: entry.useFor,\n notFor: entry.notFor,\n instead: (entry.instead ?? []).map((s) => ({ selector: s, href: pageOf(entries, s) })),\n note: entry.note ?? null,\n shownIn: entry.shownIn.map((r) =>\n r.story ? { label: r.story, href: storyHref(r.story) } : { label: r.file, href: null },\n ),\n sources: entry.sources,\n reviewed: entry.reviewed,\n };\n}\n\n/** The rows of the overview page: subject, first useFor sentence, its page. */\nexport function indexRows(entries) {\n if (!Array.isArray(entries) || entries.length === 0) {\n throw new Error('guide: the overview has no entries — an empty guide is a generator bug, not an empty page.');\n }\n return entries\n .map((e) => ({\n subject: subjectOf(e),\n kind: e.component ? 'component' : 'situation',\n brief: e.useFor[0],\n href: pageOf(entries, subjectOf(e)),\n }))\n .sort((a, b) => (a.kind === b.kind ? a.subject.localeCompare(b.subject) : a.kind === 'situation' ? 1 : -1));\n}\n\n/** The `reviewed` stamps in use — one value when the guide is consistently stamped. */\nexport const reviewedStamps = (entries) => [...new Set(entries.map((e) => e.reviewed))];\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"4555.db1842a7.iframe.bundle.js","mappings":"AAAA","sources":["webpack://moja-work/./libs/ui/guide/ sync nonrecursive \\.json$","webpack://moja-work/./libs/ui/.storybook/blocks/guide.entries.js","webpack://moja-work/./libs/ui/.storybook/blocks/guide.model.mjs"],"sourcesContent":["const map = {\n\t\"./app-shell.json\": \"./libs/ui/guide/app-shell.json\",\n\t\"./burger-menu.json\": \"./libs/ui/guide/burger-menu.json\",\n\t\"./form-basics.json\": \"./libs/ui/guide/form-basics.json\",\n\t\"./image-gallery.json\": \"./libs/ui/guide/image-gallery.json\",\n\t\"./table-edit-focus.json\": \"./libs/ui/guide/table-edit-focus.json\",\n\t\"./translations.json\": \"./libs/ui/guide/translations.json\",\n\t\"./ui-autocomplete.json\": \"./libs/ui/guide/ui-autocomplete.json\",\n\t\"./ui-background.json\": \"./libs/ui/guide/ui-background.json\",\n\t\"./ui-barcode.json\": \"./libs/ui/guide/ui-barcode.json\",\n\t\"./ui-buzzer.json\": \"./libs/ui/guide/ui-buzzer.json\",\n\t\"./ui-card.json\": \"./libs/ui/guide/ui-card.json\",\n\t\"./ui-cdk-drag-drop-splitter.json\": \"./libs/ui/guide/ui-cdk-drag-drop-splitter.json\",\n\t\"./ui-cdk-table-wrapper.json\": \"./libs/ui/guide/ui-cdk-table-wrapper.json\",\n\t\"./ui-chart.json\": \"./libs/ui/guide/ui-chart.json\",\n\t\"./ui-checkbox.json\": \"./libs/ui/guide/ui-checkbox.json\",\n\t\"./ui-chip.json\": \"./libs/ui/guide/ui-chip.json\",\n\t\"./ui-clock.json\": \"./libs/ui/guide/ui-clock.json\",\n\t\"./ui-copy-value.json\": \"./libs/ui/guide/ui-copy-value.json\",\n\t\"./ui-image-editor.json\": \"./libs/ui/guide/ui-image-editor.json\",\n\t\"./ui-image-grid.json\": \"./libs/ui/guide/ui-image-grid.json\",\n\t\"./ui-image-slider.json\": \"./libs/ui/guide/ui-image-slider.json\",\n\t\"./ui-inline-spinner.json\": \"./libs/ui/guide/ui-inline-spinner.json\",\n\t\"./ui-input.json\": \"./libs/ui/guide/ui-input.json\",\n\t\"./ui-lang-selector.json\": \"./libs/ui/guide/ui-lang-selector.json\",\n\t\"./ui-layout-main.json\": \"./libs/ui/guide/ui-layout-main.json\",\n\t\"./ui-layout-media-screen.json\": \"./libs/ui/guide/ui-layout-media-screen.json\",\n\t\"./ui-layout-nav.json\": \"./libs/ui/guide/ui-layout-nav.json\",\n\t\"./ui-layout-overlay-header.json\": \"./libs/ui/guide/ui-layout-overlay-header.json\",\n\t\"./ui-layout-overlay.json\": \"./libs/ui/guide/ui-layout-overlay.json\",\n\t\"./ui-layout-spinner.json\": \"./libs/ui/guide/ui-layout-spinner.json\",\n\t\"./ui-layout-splitter.json\": \"./libs/ui/guide/ui-layout-splitter.json\",\n\t\"./ui-layout-tabs.json\": \"./libs/ui/guide/ui-layout-tabs.json\",\n\t\"./ui-layout-top-scroll-bottom.json\": \"./libs/ui/guide/ui-layout-top-scroll-bottom.json\",\n\t\"./ui-mosaic.json\": \"./libs/ui/guide/ui-mosaic.json\",\n\t\"./ui-placeholder.json\": \"./libs/ui/guide/ui-placeholder.json\",\n\t\"./ui-qr-code.json\": \"./libs/ui/guide/ui-qr-code.json\",\n\t\"./ui-rating.json\": \"./libs/ui/guide/ui-rating.json\",\n\t\"./ui-reader-doc.json\": \"./libs/ui/guide/ui-reader-doc.json\",\n\t\"./ui-slider.json\": \"./libs/ui/guide/ui-slider.json\",\n\t\"./ui-switch.json\": \"./libs/ui/guide/ui-switch.json\",\n\t\"./ui-text-animate.json\": \"./libs/ui/guide/ui-text-animate.json\",\n\t\"./ui-thumb.json\": \"./libs/ui/guide/ui-thumb.json\",\n\t\"./ui-timer.json\": \"./libs/ui/guide/ui-timer.json\",\n\t\"./ui-typewriter.json\": \"./libs/ui/guide/ui-typewriter.json\",\n\t\"libs/ui/guide/app-shell.json\": \"./libs/ui/guide/app-shell.json\",\n\t\"libs/ui/guide/burger-menu.json\": \"./libs/ui/guide/burger-menu.json\",\n\t\"libs/ui/guide/form-basics.json\": \"./libs/ui/guide/form-basics.json\",\n\t\"libs/ui/guide/image-gallery.json\": \"./libs/ui/guide/image-gallery.json\",\n\t\"libs/ui/guide/table-edit-focus.json\": \"./libs/ui/guide/table-edit-focus.json\",\n\t\"libs/ui/guide/translations.json\": \"./libs/ui/guide/translations.json\",\n\t\"libs/ui/guide/ui-autocomplete.json\": \"./libs/ui/guide/ui-autocomplete.json\",\n\t\"libs/ui/guide/ui-background.json\": \"./libs/ui/guide/ui-background.json\",\n\t\"libs/ui/guide/ui-barcode.json\": \"./libs/ui/guide/ui-barcode.json\",\n\t\"libs/ui/guide/ui-buzzer.json\": \"./libs/ui/guide/ui-buzzer.json\",\n\t\"libs/ui/guide/ui-card.json\": \"./libs/ui/guide/ui-card.json\",\n\t\"libs/ui/guide/ui-cdk-drag-drop-splitter.json\": \"./libs/ui/guide/ui-cdk-drag-drop-splitter.json\",\n\t\"libs/ui/guide/ui-cdk-table-wrapper.json\": \"./libs/ui/guide/ui-cdk-table-wrapper.json\",\n\t\"libs/ui/guide/ui-chart.json\": \"./libs/ui/guide/ui-chart.json\",\n\t\"libs/ui/guide/ui-checkbox.json\": \"./libs/ui/guide/ui-checkbox.json\",\n\t\"libs/ui/guide/ui-chip.json\": \"./libs/ui/guide/ui-chip.json\",\n\t\"libs/ui/guide/ui-clock.json\": \"./libs/ui/guide/ui-clock.json\",\n\t\"libs/ui/guide/ui-copy-value.json\": \"./libs/ui/guide/ui-copy-value.json\",\n\t\"libs/ui/guide/ui-image-editor.json\": \"./libs/ui/guide/ui-image-editor.json\",\n\t\"libs/ui/guide/ui-image-grid.json\": \"./libs/ui/guide/ui-image-grid.json\",\n\t\"libs/ui/guide/ui-image-slider.json\": \"./libs/ui/guide/ui-image-slider.json\",\n\t\"libs/ui/guide/ui-inline-spinner.json\": \"./libs/ui/guide/ui-inline-spinner.json\",\n\t\"libs/ui/guide/ui-input.json\": \"./libs/ui/guide/ui-input.json\",\n\t\"libs/ui/guide/ui-lang-selector.json\": \"./libs/ui/guide/ui-lang-selector.json\",\n\t\"libs/ui/guide/ui-layout-main.json\": \"./libs/ui/guide/ui-layout-main.json\",\n\t\"libs/ui/guide/ui-layout-media-screen.json\": \"./libs/ui/guide/ui-layout-media-screen.json\",\n\t\"libs/ui/guide/ui-layout-nav.json\": \"./libs/ui/guide/ui-layout-nav.json\",\n\t\"libs/ui/guide/ui-layout-overlay-header.json\": \"./libs/ui/guide/ui-layout-overlay-header.json\",\n\t\"libs/ui/guide/ui-layout-overlay.json\": \"./libs/ui/guide/ui-layout-overlay.json\",\n\t\"libs/ui/guide/ui-layout-spinner.json\": \"./libs/ui/guide/ui-layout-spinner.json\",\n\t\"libs/ui/guide/ui-layout-splitter.json\": \"./libs/ui/guide/ui-layout-splitter.json\",\n\t\"libs/ui/guide/ui-layout-tabs.json\": \"./libs/ui/guide/ui-layout-tabs.json\",\n\t\"libs/ui/guide/ui-layout-top-scroll-bottom.json\": \"./libs/ui/guide/ui-layout-top-scroll-bottom.json\",\n\t\"libs/ui/guide/ui-mosaic.json\": \"./libs/ui/guide/ui-mosaic.json\",\n\t\"libs/ui/guide/ui-placeholder.json\": \"./libs/ui/guide/ui-placeholder.json\",\n\t\"libs/ui/guide/ui-qr-code.json\": \"./libs/ui/guide/ui-qr-code.json\",\n\t\"libs/ui/guide/ui-rating.json\": \"./libs/ui/guide/ui-rating.json\",\n\t\"libs/ui/guide/ui-reader-doc.json\": \"./libs/ui/guide/ui-reader-doc.json\",\n\t\"libs/ui/guide/ui-slider.json\": \"./libs/ui/guide/ui-slider.json\",\n\t\"libs/ui/guide/ui-switch.json\": \"./libs/ui/guide/ui-switch.json\",\n\t\"libs/ui/guide/ui-text-animate.json\": \"./libs/ui/guide/ui-text-animate.json\",\n\t\"libs/ui/guide/ui-thumb.json\": \"./libs/ui/guide/ui-thumb.json\",\n\t\"libs/ui/guide/ui-timer.json\": \"./libs/ui/guide/ui-timer.json\",\n\t\"libs/ui/guide/ui-typewriter.json\": \"./libs/ui/guide/ui-typewriter.json\"\n};\n\n\nfunction webpackContext(req) {\n\tconst id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tconst e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./libs/ui/guide sync \\\\.json$\";","// Every guide entry, read from the folder at build time (tickets#265).\n//\n// `require.context` is webpack's way of importing a folder: the list of\n// files is fixed when Storybook builds, so an entry added to libs/ui/guide/\n// shows up on the overview without anyone registering it — and a folder\n// that yields nothing is an error, never an empty overview.\n//\n// The rule below wants an ESM import instead, and there is none that does\n// this: reading a folder is a bundler feature, not a language one. Storybook\n// builds this file with webpack, so the disable is the honest answer — not a\n// rewrite that would have to name every entry by hand and then go stale.\n// eslint-disable-next-line unicorn/prefer-module\nconst context = require.context('../../guide', false, /\\.json$/);\n\n// webpack lists every file under two keys ('./x.json' and 'x.json'); the\n// relative form is the canonical one, the other is the same module again.\nexport const guideEntries = context\n .keys()\n .filter((key) => key.startsWith('./'))\n .map((key) => {\n const entry = context(key);\n return entry.default ?? entry;\n });\n\nif (guideEntries.length === 0) {\n throw new Error('guide: libs/ui/guide/ holds no entries — an empty guide is a generator bug, not an empty page.');\n}\n\nconst subjects = guideEntries.map((entry) => entry.component ?? entry.situation);\nconst twice = subjects.find((subject, index) => subjects.indexOf(subject) !== index);\nif (twice) {\n throw new Error(`guide: \"${twice}\" is listed twice — one entry per subject, or the overview lies about the count.`);\n}\n","// The guide as Storybook shows it (tickets#265) — the pure half.\n//\n// The guide's source of record is libs/ui/guide/*.json (tickets#228). Nothing\n// here writes a word of guidance: this module turns an entry into links and\n// rows, and refuses loudly when what it is handed is not an entry. The MDX\n// block next door (guide.mdx) is only the view; this file is what the tests\n// exercise, in node, without a browser.\n\nimport { sanitize, storyNameFromExport, toId } from 'storybook/internal/csf';\n\n/** `Title/Export` → `?path=/story/<title-id>--<story-id>` */\nexport function storyHref(story) {\n const cut = story.lastIndexOf('/');\n if (cut <= 0 || cut === story.length - 1) {\n throw new Error(`guide: story reference \"${story}\" is not \"Title/Export\".`);\n }\n const title = story.slice(0, cut);\n const name = story.slice(cut + 1);\n return `?path=/story/${toId(title, storyNameFromExport(name))}`;\n}\n\n/** A story title → its docs page. */\nexport const docsHref = (title) => `?path=/docs/${sanitize(title)}--docs`;\n\n/** The subject an entry is about. */\nexport const subjectOf = (entry) => entry.component ?? entry.situation;\n\n/**\n * Where a subject's own page is, derived from its entry: the docs page of\n * the first story it is shown in. An entry is reached through its proof,\n * never through a hand-written map that would have to be kept in step.\n */\nexport function pageOf(entries, subject) {\n const entry = entries.find((e) => subjectOf(e) === subject);\n const story = entry?.shownIn.find((r) => r.story)?.story;\n return story ? docsHref(story.slice(0, story.lastIndexOf('/'))) : null;\n}\n\n/**\n * One entry, checked and resolved for the view: every story reference a\n * link, every `instead` a link to that component's page where one exists.\n * `of` is the subject the page claims — an entry for a different subject is\n * a wiring error and says so.\n */\nexport function guideModel(entry, entries, of) {\n if (!entry || typeof entry !== 'object') {\n throw new Error(`guide: no entry handed to the block for \"${of}\".`);\n }\n const subject = subjectOf(entry);\n if (of !== undefined && subject !== of) {\n throw new Error(`guide: the block on \"${of}\" was handed the entry of \"${subject}\" — wrong import.`);\n }\n for (const key of ['useFor', 'notFor', 'shownIn', 'sources']) {\n if (!Array.isArray(entry[key])) throw new Error(`guide: entry \"${subject}\" has no \"${key}\" list.`);\n }\n if (entry.shownIn.length === 0) throw new Error(`guide: entry \"${subject}\" shows nothing — no proof, no block.`);\n return {\n subject,\n kind: entry.component ? 'component' : 'situation',\n uses: (entry.uses ?? []).map((s) => ({ selector: s, href: pageOf(entries, s) })),\n useFor: entry.useFor,\n notFor: entry.notFor,\n instead: (entry.instead ?? []).map((s) => ({ selector: s, href: pageOf(entries, s) })),\n note: entry.note ?? null,\n shownIn: entry.shownIn.map((r) =>\n r.story ? { label: r.story, href: storyHref(r.story) } : { label: r.file, href: null },\n ),\n sources: entry.sources,\n reviewed: entry.reviewed,\n };\n}\n\n/** The rows of the overview page: subject, first useFor sentence, its page. */\nexport function indexRows(entries) {\n if (!Array.isArray(entries) || entries.length === 0) {\n throw new Error('guide: the overview has no entries — an empty guide is a generator bug, not an empty page.');\n }\n return entries\n .map((e) => ({\n subject: subjectOf(e),\n kind: e.component ? 'component' : 'situation',\n brief: e.useFor[0],\n href: pageOf(entries, subjectOf(e)),\n }))\n .sort((a, b) => (a.kind === b.kind ? a.subject.localeCompare(b.subject) : a.kind === 'situation' ? 1 : -1));\n}\n\n/** The `reviewed` stamps in use — one value when the guide is consistently stamped. */\nexport const reviewedStamps = (entries) => [...new Set(entries.map((e) => e.reviewed))];\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmoja_work=self.webpackChunkmoja_work||[]).push([[3146,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}},tileRows:{control:{type:"range",min:1,max:4,step:1}},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,tileRows:1,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 [tileRows]="tileRows"\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,tileRows:1,tileAspect:"16/9",imageFit:"cover",overlayType:"default"},render:args=>({props:{...args,pictures:(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]="pictures"\n [tileHeight]="tileHeight"\n [tileRows]="tileRows"\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 [tileRows]="tileRows"\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 tileRows: 1,\n tileAspect: \'16/9\',\n imageFit: \'cover\',\n overlayType: \'default\'\n },\n render: args => ({\n // Not `strip`: Storybook writes story props onto the component, and that\n // name would replace the grid\'s own `strip` signal.\n props: {\n ...args,\n pictures: 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]="pictures"\n [tileHeight]="tileHeight"\n [tileRows]="tileRows"\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:"Fixed-size tiles that scroll sideways — an episode strip. `tileHeight`\nalone switches it on. The tiles keep their height and shape whatever the\ncontainer's width; with more of them than fit, the strip overflows and\nscrolls instead of shrinking them. `tileRows` stacks it: the tiles fill\ncolumn by column, and the strip grows by one tile height and one gap per\nrow. `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__])},"./libs/ui/.storybook/blocks/guide.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Ay:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_guide_entries__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/.storybook/blocks/guide.entries.js"),_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.model.mjs");const Link=({href,children})=>href?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.zE,{href,children}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children}),Sentences=({items})=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul",{children:items.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("li",{children:s},i))}),Block=({of,entry})=>{const m=(0,_guide_model_mjs__WEBPACK_IMPORTED_MODULE_5__.Cc)(entry,_guide_entries__WEBPACK_IMPORTED_MODULE_4__.H,of);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("section",{className:"ui-guide",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("h4",{children:["Guide — a recommendation, not the truth",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[" · reviewed ",m.reviewed]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:["Written by an agent from the sources below, only for what runs in the house."," ","component"===m.kind?"The section above is what the component does; this is what to reach for it for.":"The pages of the parts say what each does; this is what they are for together."," ","Where the two disagree, the page wins."]}),m.uses.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Builds on"})," ",m.uses.map((u,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:u.href,children:u.selector})]},u.selector))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Use it for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.useFor}),m.notFor.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Not for"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Sentences,{items:m.notFor})]}),m.instead.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Instead"})," ",m.instead.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&", ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.selector})]},s.selector))]}),m.note&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Note"})," ",m.note]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("p",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Shown in"})," ",m.shownIn.map((s,i)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span",{children:[i>0&&" · ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Link,{href:s.href,children:s.label})]},s.label))]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("small",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("strong",{children:"Sources"})," ",m.sources.join(" · ")]})})]})};function _createMdxContent(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:["\n","\n","\n","\n","\n","\n","\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Block,{of:props.of,entry:props.entry})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}},"./libs/ui/src/lib/atoms/image-grid/docs.mdx"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>MDXContent});__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/addon-docs/dist/blocks.js"),_image_grid_component_stories__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./libs/ui/src/lib/atoms/image-grid/image-grid.component.stories.ts"),_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./libs/ui/.storybook/blocks/guide.mdx"),_guide_ui_image_grid_json__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./libs/ui/guide/ui-image-grid.json");function _createMdxContent(props){const _components={a:"a",code:"code",em:"em",h3:"h3",h4:"h4",h5:"h5",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_addon_docs_blocks__WEBPACK_IMPORTED_MODULE_3__.W8,{of:_image_grid_component_stories__WEBPACK_IMPORTED_MODULE_4__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"atoms-image-grid",children:"Atoms: Image Grid"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiImageGridComponent"})," is a versatile and responsive grid-based image display component. It allows for dynamic configuration of columns, gaps, and heights, making it suitable for galleries, portfolios, or any grouped image presentation."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"what-it-does-and-what-it-does-not",children:"What it does, and what it does not"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Lays pictures out in a fixed number of columns, with a gap, a height and an\noptional overlay per tile, and reports which tile is selected or clicked. It\nshares an index with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"ui-image-slider"})," (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"setIndex"}),"/",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"currentIndex"}),") so grid and\nslider can point at the same picture. It opens nothing itself: a click emits\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clickIndex"}),", and what follows — a slider in zoom, a route — is the host's\ndecision. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," must be set; the default ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"0"})," draws no columns."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["As a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"strip"})," (a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileHeight"})," is set) it is a band of equally sized tiles\nthat scrolls sideways once there are more than fit — a row of episode\nstills, a row of posters, two rows of thumbnails. Then ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height"}),"\nplay no part, nothing is padded, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileAspect"})," gives the tile its shape and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileRows"})," says how many rows the band stacks. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"imageFit"})," decides how a tile\nholds its picture in either mode: at its own size (the default), or filling\nthe tile, or fitted whole."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks_guide_mdx__WEBPACK_IMPORTED_MODULE_5__.Ay,{of:"ui-image-grid",entry:_guide_ui_image_grid_json__WEBPACK_IMPORTED_MODULE_6__}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"image-grid",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/atoms-image-grid--image-grid",children:"Image Grid"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"strip",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/atoms-image-grid--strip",children:"Strip"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Fixed-size tiles that scroll sideways — an episode strip, a row of posters.\nA ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileHeight"})," switches it on: every tile is that tall and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileHeight × tileAspect"})," wide, the strip holds exactly its items, and once\nthey are wider than the container it scrolls instead of shrinking them.\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," is not read. The pictures fill their tiles (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"imageFit: 'cover'"}),"), and\nthe click area names the tile — the story writes the item's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"alt"})," into it."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["Move ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileRows"})," to stack the strip. The tiles fill ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"column by column"})," —\nthe first on top, the second below it, the third on top again — so the\nreading order runs down, then right, and the last column may stay partly\nempty. The tiles keep their size; the strip grows by one tile height and one\ngap per row."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"features",children:"Features"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Responsive Grid"}),": Automatically adjusts to its container and supports configurable column counts."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Lazy Loading Support"}),": Integrated ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"loaded"})," state to manage image rendering."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Interactive Overlays"}),": Supports different overlay types (e.g., 'default', 'doors') for enhanced user interaction."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Click Area"}),": An ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<ng-template uiImageGridClickArea>"})," projected into the tag is stamped into every tile as the active tile's overlay — with the tile's item and index as context."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Action Mode"}),": Enable interactive selection with event emitting for current and clicked indices."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Dynamic Styling"}),": Configure gap, height, and image scaling per item."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"inputs",children:"Inputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"@Input"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Default"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"data"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"UiImageDisplayItemDataType[] | null"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"null"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Array of image objects containing source, alt text, and scaling info."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"cols"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"0"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Number of columns in the grid. The default ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"0"})," renders no columns — always set it."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"gap"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"0"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Gap between grid items in pixels."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"height"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"undefined"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Height of the grid container. If ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"singleRow"})," is false, this is the total height. If ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"singleRow"})," is true, this value is divided by ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"cols"})," to determine the row height. Falls back to 200px when no height is given."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"tileHeight"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"undefined"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Strip mode: the fixed tile height in pixels. Setting it is what makes the grid a strip — it then holds exactly its items at that size and scrolls sideways when they do not fit; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"cols"})," and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"height"})," are not read. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"singleRow"})," is not needed for it and changes nothing next to it."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"tileRows"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"1"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["The number of rows a strip stacks its tiles in, filled column by column. The strip is ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"tileRows × tileHeight"})," plus the gaps tall. The tile height is taken as it comes and never divided by the rows — a caller with a fixed block height does that division itself. Read only together with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"tileHeight"}),"; a value below one draws one row, a fraction is cut to the whole number."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"tileAspect"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"string"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'1/1'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["The strip tile's shape as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"width/height"})," — ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'16/9'"})," for stills, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'2/3'"})," for posters. Read only together with ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"tileHeight"}),"."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"imageFit"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'none' | 'cover' | 'contain'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'none'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["How a tile holds its picture. ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"none"})," draws it at its own size and lets the tile crop it; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"cover"})," fills the tile and crops what does not fit; ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"contain"})," shows the whole picture with bars where the shapes differ."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"singleRow"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["If true, the grid renders as a single row with horizontal scrolling. The row height is calculated as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"height / cols"}),". Not read once a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"tileHeight"})," is set — the strip brings its own rows."]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"setIndex"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"0"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Programmatically set the active/scrolled-to image index."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"action"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Enables click interactions and active state highlighting."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"loaded"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("td",{children:["Flag to trigger image rendering (useful for deferred loading). While it is false, every tile shows its title instead of its picture — the same branch a tile without a ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"src"}),' falls into, see "A tile without a picture".']})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"overlayType"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"'default' | 'doors'"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"'default'"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Visual style of the hover/active overlay."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"debug"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"boolean"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"false"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Shows internal state information (cols, indices, src) for debugging."})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"a-tile-without-a-picture",children:"A tile without a picture"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["A tile without a source draws ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"no image at all"}),": it shows an icon with the\nitem's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"title"})," underneath, gets the modifier class ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"._-no-image"}),", and is left\nout of the click area. Nothing is broken — this is what the component does\nwhen it has nothing to show."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["In the story above, the fourth tile is that case, and it says so: the entry\ncarries the title ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:'"no image on purpose"'}),". Give it whatever wording fits your\ncase — the component supplies the space, never the words."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"A picture that fails to load"})," is the other case, and it ends in the same\npicture: the tile keeps its surface and shows the item's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"alt"})," text, centred,\nwhatever the fit mode — a sized ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<img>"})," that failed would otherwise draw the\nbrowser's broken-image icon in a corner. The grid marks the tile on the\nimage's ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"error"})," event; new data clears the marks."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Two things worth knowing about the empty state:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["It is the same branch as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"loaded: false"}),"."]})," Turn ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"loaded"})," off and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.em,{children:"every"}),'\ntile shows its title. The component does not distinguish "not there yet" from\n"not there at all" — both mean "no picture to draw", and both look the same.']}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"The grid pads to a square."})," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"gridColsInternal"})," squares the column count,\nso a data set that does not fill the last row leaves empty tiles behind. With\nthe story's 25 items that is 49 tiles: 24 of them carry no data and render as\nthe same empty state."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"grid-logic",children:"Grid Logic"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The component uses internal computed signals to determine the grid layout and height."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h5,{id:"column-calculation-gridcolsinternal",children:["Column Calculation (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"gridColsInternal"}),")"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The number of columns is determined by the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," input and the total number of items (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"dataCount"}),"):"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["If ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"dataCount / cols > cols"}),', the grid becomes "square-ish" or expands to fit items, calculating columns as ',(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"Math.ceil(dataCount / cols)"}),"."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["Otherwise, it uses the fixed ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," value provided."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["With ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"cols"})," at ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"0"})," (the default) no expansion happens and the grid gets zero columns — a column count is part of using the component."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:["A ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"single row and a strip never expand and never pad"}),": they hold exactly their items. The square is the two-dimensional grid's shape; a strip's columns are simply as many as its items need in ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileRows"})," rows."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.h5,{id:"height-calculation-scrollerheight",children:["Height Calculation (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"scrollerHeight"}),")"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The height of the grid container is dynamically calculated:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["Standard Mode (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"singleRow"})," is false)"]}),": Uses the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height"})," input value in pixels. Falls back to ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"200px"})," when no ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height"})," is given."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["Single Row Mode (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"singleRow"})," is true)"]}),": The height is calculated as ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height / cols"})," (both must be set; otherwise the same ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height"}),"-or-",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"200px"})," fallback applies). This ensures that even in a horizontal scroll scenario, the items maintain a consistent aspect ratio based on the intended column count."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.strong,{children:["Strip Mode (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileHeight"})," is set)"]}),": The height is ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileRows × tileHeight"})," plus ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileRows − 1"})," gaps — with the default single row, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileHeight"})," itself. Each tile is ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileHeight"})," tall and ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileHeight × tileAspect"})," wide, and the column tracks are that width, so the strip overflows and scrolls instead of shrinking the tiles to fit. A tile that becomes active — by a click or through ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"setIndex"})," — is scrolled sideways into the middle of the visible strip, whichever row it stands in. See the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"?path=/story/atoms-image-grid--strip",children:"Strip"})," story."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.li,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"A strip and its scrollbar"}),": The height above is the height of the TILES. Where the browser draws a scrollbar that takes space — a mouse on macOS, most of Windows — the strip is taller by that bar, so the tiles keep their full ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"tileHeight"}),"; with a floating scrollbar nothing is added. Reserve the room by letting the strip set its own height, not by framing it from outside. The grid and the plain single row are framed instead: their ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"height"})," is the outer edge, and a scrollbar comes out of the tiles."]}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"outputs",children:"Outputs"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table",{class:"ui",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"@Output"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Type"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th",{children:"Description"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"currentIndex"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"output<number>"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Emitted when a new item becomes active or is clicked."})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("tr",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"clickIndex"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("code",{children:"output<number>"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td",{children:"Emitted when an already active item is clicked (only when a click-area template is projected)."})]})]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"the-click-area",children:"The click area"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The overlay that appears on the ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"active"})," tile, and whose second click\nemits ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"clickIndex"}),". It is an ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"<ng-template uiImageGridClickArea>"})," projected\ninto the tag: the grid stamps it into every tile, so everything Angular can\ndo inside a template works here — bindings, pipes, ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"(click)"})," handlers — and\nthe template is handed the tile's item (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"let-item"}),") and index\n(",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:'let-index="index"'}),")."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"A template rather than projected content, because content can be projected\nonce and the grid needs the area in every tile. It used to clone a projected\nelement's innerHTML per tile, which ran the markup through the sanitizer and\nleft a dead copy without events; a stamped template keeps all of that alive."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The marker is the directive ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"UiImageGridClickAreaDirective"})," — import it next\nto the grid. It is a marker and nothing else, so the grid finds the click\narea by name rather than taking the first template it meets; a caller may\nproject other templates (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"*ngIf"}),", a structural directive of their own)\nwithout one of those ending up in every tile."]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-html",children:'<ui-image-grid [data]="myData" [action]="true" (clickIndex)="open($event)">\n <ng-template uiImageGridClickArea let-item let-index="index">\n <div class="my-overlay">{{ index + 1 }}: {{ item.title }}</div>\n </ng-template>\n</ui-image-grid>\n'})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.hr,{}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"sizing",children:"Sizing"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.p,{children:["The host fills its container (",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"100%"})," / ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"100%"}),") by default. Give it a fixed size\nwithout a cascade fight through the named hooks ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-image-grid-width"})," and\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{children:"--ui-image-grid-height"}),"."]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,_Users_moja_projects_moja_code_mojawork_mono_node_modules_storybook_addon_docs_dist_mdx_react_shim_js__WEBPACK_IMPORTED_MODULE_2__.R)(),...props.components};return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,{...props,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
|
|
2
|
+
//# sourceMappingURL=atoms-image-grid-docs-mdx.66afba9a.iframe.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atoms-image-grid-docs-mdx.06f7a6e1.iframe.bundle.js","mappings":"AAMA","sources":["webpack://moja-work/./libs/ui/src/lib/atoms/image-grid/image-grid.component.stories.ts","webpack://moja-work/./libs/ui/.storybook/blocks/guide.mdx","webpack://moja-work/./libs/ui/src/lib/atoms/image-grid/docs.mdx"],"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 tileRows: { control: { type: 'range', min: 1, max: 4, step: 1 } },\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 tileRows: 1,\n tileAspect: '1/1',\n imageFit: 'none',\n data: uiImageMock(),\n },\n};\n/** The default story shows everything; the strip shows its own four 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 [tileRows]=\"tileRows\"\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 * Fixed-size tiles that scroll sideways — an episode strip. `tileHeight`\n * alone switches it on. The tiles keep their height and shape whatever the\n * container's width; with more of them than fit, the strip overflows and\n * scrolls instead of shrinking them. `tileRows` stacks it: the tiles fill\n * column by column, and the strip grows by one tile height and one gap per\n * row. `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 tileRows: 1,\n tileAspect: '16/9',\n imageFit: 'cover',\n overlayType: 'default',\n },\n render: (args) => ({\n // Not `strip`: Storybook writes story props onto the component, and that\n // name would replace the grid's own `strip` signal.\n props: { ...args, pictures: 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]=\"pictures\"\n [tileHeight]=\"tileHeight\"\n [tileRows]=\"tileRows\"\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","\nimport React from 'react';\n\n/*\nThe guide block (tickets#265): one entry of libs/ui/guide/, rendered.\nUsed from a docs page as\n\nimport Guide from '../../../../.storybook/blocks/guide.mdx';\nimport entry from '../../../../guide/ui-card.json';\n<Guide of=\"ui-card\" entry={entry} />\n\nThe JSON import is the loud part: a page whose entry does not exist fails\nthe build at the import, not at render. This file holds no guidance of its\nown — it is the view of what guide.model.mjs hands it.\n*/\n/*AnchorMdx is what markdown links on every docs page render through: it\nhands a `?path=` href to the manager instead of the docs iframe. A raw\n<a> would resolve against iframe.html and open a bare page.*/\nimport {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \"react/jsx-runtime\";\nimport {useMDXComponents as _provideComponents} from \"/Users/moja/projects/moja-code/mojawork/mono/node_modules/@storybook/addon-docs/dist/mdx-react-shim.js\";\nimport {AnchorMdx} from '@storybook/addon-docs/blocks';\nimport {guideEntries} from './guide.entries';\nimport {guideModel} from './guide.model.mjs';\nexport const Link = ({href, children}) => href ? _jsx(AnchorMdx, {\n href: href,\n children: children\n}) : _jsx(\"code\", {\n children: children\n});\nexport const Sentences = ({items}) => _jsx(\"ul\", {\n children: items.map((s, i) => _jsx(\"li\", {\n children: s\n }, i))\n});\nexport const Block = ({of, entry}) => {\n const m = guideModel(entry, guideEntries, of);\n return _jsxs(\"section\", {\n className: \"ui-guide\",\n children: [_jsxs(\"h4\", {\n children: [\"Guide — a recommendation, not the truth\", _jsxs(\"small\", {\n children: [\" · reviewed \", m.reviewed]\n })]\n }), _jsxs(\"p\", {\n children: [\"Written by an agent from the sources below, only for what runs in the house.\", ' ', m.kind === 'component' ? 'The section above is what the component does; this is what to reach for it for.' : 'The pages of the parts say what each does; this is what they are for together.', ' ', \"Where the two disagree, the page wins.\"]\n }), m.uses.length > 0 && _jsxs(\"p\", {\n children: [_jsx(\"strong\", {\n children: \"Builds on\"\n }), ' ', m.uses.map((u, i) => _jsxs(\"span\", {\n children: [i > 0 && ', ', _jsx(Link, {\n href: u.href,\n children: u.selector\n })]\n }, u.selector))]\n }), _jsx(\"strong\", {\n children: \"Use it for\"\n }), _jsx(Sentences, {\n items: m.useFor\n }), m.notFor.length > 0 && _jsxs(_Fragment, {\n children: [_jsx(\"strong\", {\n children: \"Not for\"\n }), _jsx(Sentences, {\n items: m.notFor\n })]\n }), m.instead.length > 0 && _jsxs(\"p\", {\n children: [_jsx(\"strong\", {\n children: \"Instead\"\n }), ' ', m.instead.map((s, i) => _jsxs(\"span\", {\n children: [i > 0 && ', ', _jsx(Link, {\n href: s.href,\n children: s.selector\n })]\n }, s.selector))]\n }), m.note && _jsxs(\"p\", {\n children: [_jsx(\"strong\", {\n children: \"Note\"\n }), \" \", m.note]\n }), _jsxs(\"p\", {\n children: [_jsx(\"strong\", {\n children: \"Shown in\"\n }), ' ', m.shownIn.map((s, i) => _jsxs(\"span\", {\n children: [i > 0 && ' · ', _jsx(Link, {\n href: s.href,\n children: s.label\n })]\n }, s.label))]\n }), _jsx(\"p\", {\n children: _jsxs(\"small\", {\n children: [_jsx(\"strong\", {\n children: \"Sources\"\n }), \" \", m.sources.join(' · ')]\n })\n })]\n });\n};\nfunction _createMdxContent(props) {\n return _jsxs(_Fragment, {\n children: [\"\\n\", \"\\n\", \"\\n\", \"\\n\", \"\\n\", \"\\n\", \"\\n\", _jsx(Block, {\n of: props.of,\n entry: props.entry\n })]\n });\n}\nexport default function MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\n","\nimport React from 'react';\n\nimport {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \"react/jsx-runtime\";\nimport {useMDXComponents as _provideComponents} from \"/Users/moja/projects/moja-code/mojawork/mono/node_modules/@storybook/addon-docs/dist/mdx-react-shim.js\";\nimport {Canvas, Meta} from '@storybook/addon-docs/blocks';\nimport * as story from './image-grid.component.stories';\nimport Guide from '../../../../.storybook/blocks/guide.mdx';\nimport guide from '../../../../guide/ui-image-grid.json';\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n em: \"em\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n hr: \"hr\",\n li: \"li\",\n p: \"p\",\n pre: \"pre\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(Meta, {\n of: story\n }), \"\\n\", _jsx(_components.h4, {\n id: \"atoms-image-grid\",\n children: \"Atoms: Image Grid\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The \", _jsx(_components.code, {\n children: \"UiImageGridComponent\"\n }), \" is a versatile and responsive grid-based image display component. It allows for dynamic configuration of columns, gaps, and heights, making it suitable for galleries, portfolios, or any grouped image presentation.\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h3, {\n id: \"what-it-does-and-what-it-does-not\",\n children: \"What it does, and what it does not\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Lays pictures out in a fixed number of columns, with a gap, a height and an\\noptional overlay per tile, and reports which tile is selected or clicked. It\\nshares an index with \", _jsx(_components.code, {\n children: \"ui-image-slider\"\n }), \" (\", _jsx(_components.code, {\n children: \"setIndex\"\n }), \"/\", _jsx(_components.code, {\n children: \"currentIndex\"\n }), \") so grid and\\nslider can point at the same picture. It opens nothing itself: a click emits\\n\", _jsx(_components.code, {\n children: \"clickIndex\"\n }), \", and what follows — a slider in zoom, a route — is the host's\\ndecision. \", _jsx(_components.code, {\n children: \"cols\"\n }), \" must be set; the default \", _jsx(_components.code, {\n children: \"0\"\n }), \" draws no columns.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"As a \", _jsx(_components.strong, {\n children: \"strip\"\n }), \" (a \", _jsx(_components.code, {\n children: \"tileHeight\"\n }), \" is set) it is a band of equally sized tiles\\nthat scrolls sideways once there are more than fit — a row of episode\\nstills, a row of posters, two rows of thumbnails. Then \", _jsx(_components.code, {\n children: \"cols\"\n }), \" and \", _jsx(_components.code, {\n children: \"height\"\n }), \"\\nplay no part, nothing is padded, \", _jsx(_components.code, {\n children: \"tileAspect\"\n }), \" gives the tile its shape and\\n\", _jsx(_components.code, {\n children: \"tileRows\"\n }), \" says how many rows the band stacks. \", _jsx(_components.code, {\n children: \"imageFit\"\n }), \" decides how a tile\\nholds its picture in either mode: at its own size (the default), or filling\\nthe tile, or fitted whole.\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(Guide, {\n of: \"ui-image-grid\",\n entry: guide\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h3, {\n id: \"image-grid\",\n children: _jsx(_components.a, {\n href: \"?path=/story/atoms-image-grid--image-grid\",\n children: \"Image Grid\"\n })\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h3, {\n id: \"strip\",\n children: _jsx(_components.a, {\n href: \"?path=/story/atoms-image-grid--strip\",\n children: \"Strip\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Fixed-size tiles that scroll sideways — an episode strip, a row of posters.\\nA \", _jsx(_components.code, {\n children: \"tileHeight\"\n }), \" switches it on: every tile is that tall and\\n\", _jsx(_components.code, {\n children: \"tileHeight × tileAspect\"\n }), \" wide, the strip holds exactly its items, and once\\nthey are wider than the container it scrolls instead of shrinking them.\\n\", _jsx(_components.code, {\n children: \"cols\"\n }), \" is not read. The pictures fill their tiles (\", _jsx(_components.code, {\n children: \"imageFit: 'cover'\"\n }), \"), and\\nthe click area names the tile — the story writes the item's \", _jsx(_components.code, {\n children: \"alt\"\n }), \" into it.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Move \", _jsx(_components.code, {\n children: \"tileRows\"\n }), \" to stack the strip. The tiles fill \", _jsx(_components.strong, {\n children: \"column by column\"\n }), \" —\\nthe first on top, the second below it, the third on top again — so the\\nreading order runs down, then right, and the last column may stay partly\\nempty. The tiles keep their size; the strip grows by one tile height and one\\ngap per row.\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"features\",\n children: \"Features\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Responsive Grid\"\n }), \": Automatically adjusts to its container and supports configurable column counts.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Lazy Loading Support\"\n }), \": Integrated \", _jsx(_components.code, {\n children: \"loaded\"\n }), \" state to manage image rendering.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Interactive Overlays\"\n }), \": Supports different overlay types (e.g., 'default', 'doors') for enhanced user interaction.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Click Area\"\n }), \": An \", _jsx(_components.code, {\n children: \"<ng-template uiImageGridClickArea>\"\n }), \" projected into the tag is stamped into every tile as the active tile's overlay — with the tile's item and index as context.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Action Mode\"\n }), \": Enable interactive selection with event emitting for current and clicked indices.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Dynamic Styling\"\n }), \": Configure gap, height, and image scaling per item.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"inputs\",\n children: \"Inputs\"\n }), \"\\n\", _jsxs(\"table\", {\n class: \"ui\",\n children: [_jsxs(\"tr\", {\n children: [_jsx(\"th\", {\n children: \"@Input\"\n }), _jsx(\"th\", {\n children: \"Type\"\n }), _jsx(\"th\", {\n children: \"Default\"\n }), _jsx(\"th\", {\n children: \"Description\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"data\"\n }), _jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"UiImageDisplayItemDataType[] | null\"\n })\n }), _jsx(\"td\", {\n children: \"null\"\n }), _jsx(\"td\", {\n children: \"Array of image objects containing source, alt text, and scaling info.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"cols\"\n }), _jsx(\"td\", {\n children: \"number\"\n }), _jsx(\"td\", {\n children: \"0\"\n }), _jsxs(\"td\", {\n children: [\"Number of columns in the grid. The default \", _jsx(\"code\", {\n children: \"0\"\n }), \" renders no columns — always set it.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"gap\"\n }), _jsx(\"td\", {\n children: \"number\"\n }), _jsx(\"td\", {\n children: \"0\"\n }), _jsx(\"td\", {\n children: \"Gap between grid items in pixels.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"height\"\n }), _jsx(\"td\", {\n children: \"number\"\n }), _jsx(\"td\", {\n children: \"undefined\"\n }), _jsxs(\"td\", {\n children: [\"Height of the grid container. If \", _jsx(\"code\", {\n children: \"singleRow\"\n }), \" is false, this is the total height. If \", _jsx(\"code\", {\n children: \"singleRow\"\n }), \" is true, this value is divided by \", _jsx(\"code\", {\n children: \"cols\"\n }), \" to determine the row height. Falls back to 200px when no height is given.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"tileHeight\"\n }), _jsx(\"td\", {\n children: \"number\"\n }), _jsx(\"td\", {\n children: \"undefined\"\n }), _jsxs(\"td\", {\n children: [\"Strip mode: the fixed tile height in pixels. Setting it is what makes the grid a strip — it then holds exactly its items at that size and scrolls sideways when they do not fit; \", _jsx(\"code\", {\n children: \"cols\"\n }), \" and \", _jsx(\"code\", {\n children: \"height\"\n }), \" are not read. \", _jsx(\"code\", {\n children: \"singleRow\"\n }), \" is not needed for it and changes nothing next to it.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"tileRows\"\n }), _jsx(\"td\", {\n children: \"number\"\n }), _jsx(\"td\", {\n children: \"1\"\n }), _jsxs(\"td\", {\n children: [\"The number of rows a strip stacks its tiles in, filled column by column. The strip is \", _jsx(\"code\", {\n children: \"tileRows × tileHeight\"\n }), \" plus the gaps tall. The tile height is taken as it comes and never divided by the rows — a caller with a fixed block height does that division itself. Read only together with \", _jsx(\"code\", {\n children: \"tileHeight\"\n }), \"; a value below one draws one row, a fraction is cut to the whole number.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"tileAspect\"\n }), _jsx(\"td\", {\n children: \"string\"\n }), _jsx(\"td\", {\n children: \"'1/1'\"\n }), _jsxs(\"td\", {\n children: [\"The strip tile's shape as \", _jsx(\"code\", {\n children: \"width/height\"\n }), \" — \", _jsx(\"code\", {\n children: \"'16/9'\"\n }), \" for stills, \", _jsx(\"code\", {\n children: \"'2/3'\"\n }), \" for posters. Read only together with \", _jsx(\"code\", {\n children: \"tileHeight\"\n }), \".\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"imageFit\"\n }), _jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"'none' | 'cover' | 'contain'\"\n })\n }), _jsx(\"td\", {\n children: \"'none'\"\n }), _jsxs(\"td\", {\n children: [\"How a tile holds its picture. \", _jsx(\"code\", {\n children: \"none\"\n }), \" draws it at its own size and lets the tile crop it; \", _jsx(\"code\", {\n children: \"cover\"\n }), \" fills the tile and crops what does not fit; \", _jsx(\"code\", {\n children: \"contain\"\n }), \" shows the whole picture with bars where the shapes differ.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"singleRow\"\n }), _jsx(\"td\", {\n children: \"boolean\"\n }), _jsx(\"td\", {\n children: \"false\"\n }), _jsxs(\"td\", {\n children: [\"If true, the grid renders as a single row with horizontal scrolling. The row height is calculated as \", _jsx(\"code\", {\n children: \"height / cols\"\n }), \". Not read once a \", _jsx(\"code\", {\n children: \"tileHeight\"\n }), \" is set — the strip brings its own rows.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"setIndex\"\n }), _jsx(\"td\", {\n children: \"number\"\n }), _jsx(\"td\", {\n children: \"0\"\n }), _jsx(\"td\", {\n children: \"Programmatically set the active/scrolled-to image index.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"action\"\n }), _jsx(\"td\", {\n children: \"boolean\"\n }), _jsx(\"td\", {\n children: \"false\"\n }), _jsx(\"td\", {\n children: \"Enables click interactions and active state highlighting.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"loaded\"\n }), _jsx(\"td\", {\n children: \"boolean\"\n }), _jsx(\"td\", {\n children: \"false\"\n }), _jsxs(\"td\", {\n children: [\"Flag to trigger image rendering (useful for deferred loading). While it is false, every tile shows its title instead of its picture — the same branch a tile without a \", _jsx(\"code\", {\n children: \"src\"\n }), \" falls into, see \\\"A tile without a picture\\\".\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"overlayType\"\n }), _jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"'default' | 'doors'\"\n })\n }), _jsx(\"td\", {\n children: \"'default'\"\n }), _jsx(\"td\", {\n children: \"Visual style of the hover/active overlay.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"debug\"\n }), _jsx(\"td\", {\n children: \"boolean\"\n }), _jsx(\"td\", {\n children: \"false\"\n }), _jsx(\"td\", {\n children: \"Shows internal state information (cols, indices, src) for debugging.\"\n })]\n })]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"a-tile-without-a-picture\",\n children: \"A tile without a picture\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"A tile without a source draws \", _jsx(_components.strong, {\n children: \"no image at all\"\n }), \": it shows an icon with the\\nitem's \", _jsx(_components.code, {\n children: \"title\"\n }), \" underneath, gets the modifier class \", _jsx(_components.code, {\n children: \"._-no-image\"\n }), \", and is left\\nout of the click area. Nothing is broken — this is what the component does\\nwhen it has nothing to show.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"In the story above, the fourth tile is that case, and it says so: the entry\\ncarries the title \", _jsx(_components.em, {\n children: \"\\\"no image on purpose\\\"\"\n }), \". Give it whatever wording fits your\\ncase — the component supplies the space, never the words.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"A picture that fails to load\"\n }), \" is the other case, and it ends in the same\\npicture: the tile keeps its surface and shows the item's \", _jsx(_components.code, {\n children: \"alt\"\n }), \" text, centred,\\nwhatever the fit mode — a sized \", _jsx(_components.code, {\n children: \"<img>\"\n }), \" that failed would otherwise draw the\\nbrowser's broken-image icon in a corner. The grid marks the tile on the\\nimage's \", _jsx(_components.code, {\n children: \"error\"\n }), \" event; new data clears the marks.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Two things worth knowing about the empty state:\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsxs(_components.strong, {\n children: [\"It is the same branch as \", _jsx(_components.code, {\n children: \"loaded: false\"\n }), \".\"]\n }), \" Turn \", _jsx(_components.code, {\n children: \"loaded\"\n }), \" off and \", _jsx(_components.em, {\n children: \"every\"\n }), \"\\ntile shows its title. The component does not distinguish \\\"not there yet\\\" from\\n\\\"not there at all\\\" — both mean \\\"no picture to draw\\\", and both look the same.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"The grid pads to a square.\"\n }), \" \", _jsx(_components.code, {\n children: \"gridColsInternal\"\n }), \" squares the column count,\\nso a data set that does not fill the last row leaves empty tiles behind. With\\nthe story's 25 items that is 49 tiles: 24 of them carry no data and render as\\nthe same empty state.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"grid-logic\",\n children: \"Grid Logic\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"The component uses internal computed signals to determine the grid layout and height.\"\n }), \"\\n\", _jsxs(_components.h5, {\n id: \"column-calculation-gridcolsinternal\",\n children: [\"Column Calculation (\", _jsx(_components.code, {\n children: \"gridColsInternal\"\n }), \")\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The number of columns is determined by the \", _jsx(_components.code, {\n children: \"cols\"\n }), \" input and the total number of items (\", _jsx(_components.code, {\n children: \"dataCount\"\n }), \"):\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"If \", _jsx(_components.code, {\n children: \"dataCount / cols > cols\"\n }), \", the grid becomes \\\"square-ish\\\" or expands to fit items, calculating columns as \", _jsx(_components.code, {\n children: \"Math.ceil(dataCount / cols)\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Otherwise, it uses the fixed \", _jsx(_components.code, {\n children: \"cols\"\n }), \" value provided.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"With \", _jsx(_components.code, {\n children: \"cols\"\n }), \" at \", _jsx(_components.code, {\n children: \"0\"\n }), \" (the default) no expansion happens and the grid gets zero columns — a column count is part of using the component.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"A \", _jsx(_components.strong, {\n children: \"single row and a strip never expand and never pad\"\n }), \": they hold exactly their items. The square is the two-dimensional grid's shape; a strip's columns are simply as many as its items need in \", _jsx(_components.code, {\n children: \"tileRows\"\n }), \" rows.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.h5, {\n id: \"height-calculation-scrollerheight\",\n children: [\"Height Calculation (\", _jsx(_components.code, {\n children: \"scrollerHeight\"\n }), \")\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"The height of the grid container is dynamically calculated:\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsxs(_components.strong, {\n children: [\"Standard Mode (\", _jsx(_components.code, {\n children: \"singleRow\"\n }), \" is false)\"]\n }), \": Uses the \", _jsx(_components.code, {\n children: \"height\"\n }), \" input value in pixels. Falls back to \", _jsx(_components.code, {\n children: \"200px\"\n }), \" when no \", _jsx(_components.code, {\n children: \"height\"\n }), \" is given.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsxs(_components.strong, {\n children: [\"Single Row Mode (\", _jsx(_components.code, {\n children: \"singleRow\"\n }), \" is true)\"]\n }), \": The height is calculated as \", _jsx(_components.code, {\n children: \"height / cols\"\n }), \" (both must be set; otherwise the same \", _jsx(_components.code, {\n children: \"height\"\n }), \"-or-\", _jsx(_components.code, {\n children: \"200px\"\n }), \" fallback applies). This ensures that even in a horizontal scroll scenario, the items maintain a consistent aspect ratio based on the intended column count.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsxs(_components.strong, {\n children: [\"Strip Mode (\", _jsx(_components.code, {\n children: \"tileHeight\"\n }), \" is set)\"]\n }), \": The height is \", _jsx(_components.code, {\n children: \"tileRows × tileHeight\"\n }), \" plus \", _jsx(_components.code, {\n children: \"tileRows − 1\"\n }), \" gaps — with the default single row, \", _jsx(_components.code, {\n children: \"tileHeight\"\n }), \" itself. Each tile is \", _jsx(_components.code, {\n children: \"tileHeight\"\n }), \" tall and \", _jsx(_components.code, {\n children: \"tileHeight × tileAspect\"\n }), \" wide, and the column tracks are that width, so the strip overflows and scrolls instead of shrinking the tiles to fit. A tile that becomes active — by a click or through \", _jsx(_components.code, {\n children: \"setIndex\"\n }), \" — is scrolled sideways into the middle of the visible strip, whichever row it stands in. See the \", _jsx(_components.a, {\n href: \"?path=/story/atoms-image-grid--strip\",\n children: \"Strip\"\n }), \" story.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"A strip and its scrollbar\"\n }), \": The height above is the height of the TILES. Where the browser draws a scrollbar that takes space — a mouse on macOS, most of Windows — the strip is taller by that bar, so the tiles keep their full \", _jsx(_components.code, {\n children: \"tileHeight\"\n }), \"; with a floating scrollbar nothing is added. Reserve the room by letting the strip set its own height, not by framing it from outside. The grid and the plain single row are framed instead: their \", _jsx(_components.code, {\n children: \"height\"\n }), \" is the outer edge, and a scrollbar comes out of the tiles.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"outputs\",\n children: \"Outputs\"\n }), \"\\n\", _jsxs(\"table\", {\n class: \"ui\",\n children: [_jsxs(\"tr\", {\n children: [_jsx(\"th\", {\n children: \"@Output\"\n }), _jsx(\"th\", {\n children: \"Type\"\n }), _jsx(\"th\", {\n children: \"Description\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"currentIndex\"\n }), _jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"output<number>\"\n })\n }), _jsx(\"td\", {\n children: \"Emitted when a new item becomes active or is clicked.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"clickIndex\"\n }), _jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"output<number>\"\n })\n }), _jsx(\"td\", {\n children: \"Emitted when an already active item is clicked (only when a click-area template is projected).\"\n })]\n })]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"the-click-area\",\n children: \"The click area\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The overlay that appears on the \", _jsx(_components.strong, {\n children: \"active\"\n }), \" tile, and whose second click\\nemits \", _jsx(_components.code, {\n children: \"clickIndex\"\n }), \". It is an \", _jsx(_components.code, {\n children: \"<ng-template uiImageGridClickArea>\"\n }), \" projected\\ninto the tag: the grid stamps it into every tile, so everything Angular can\\ndo inside a template works here — bindings, pipes, \", _jsx(_components.code, {\n children: \"(click)\"\n }), \" handlers — and\\nthe template is handed the tile's item (\", _jsx(_components.code, {\n children: \"let-item\"\n }), \") and index\\n(\", _jsx(_components.code, {\n children: \"let-index=\\\"index\\\"\"\n }), \").\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"A template rather than projected content, because content can be projected\\nonce and the grid needs the area in every tile. It used to clone a projected\\nelement's innerHTML per tile, which ran the markup through the sanitizer and\\nleft a dead copy without events; a stamped template keeps all of that alive.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The marker is the directive \", _jsx(_components.code, {\n children: \"UiImageGridClickAreaDirective\"\n }), \" — import it next\\nto the grid. It is a marker and nothing else, so the grid finds the click\\narea by name rather than taking the first template it meets; a caller may\\nproject other templates (\", _jsx(_components.code, {\n children: \"*ngIf\"\n }), \", a structural directive of their own)\\nwithout one of those ending up in every tile.\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-html\",\n children: \"<ui-image-grid [data]=\\\"myData\\\" [action]=\\\"true\\\" (clickIndex)=\\\"open($event)\\\">\\n <ng-template uiImageGridClickArea let-item let-index=\\\"index\\\">\\n <div class=\\\"my-overlay\\\">{{ index + 1 }}: {{ item.title }}</div>\\n </ng-template>\\n</ui-image-grid>\\n\"\n })\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h3, {\n id: \"sizing\",\n children: \"Sizing\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The host fills its container (\", _jsx(_components.code, {\n children: \"100%\"\n }), \" / \", _jsx(_components.code, {\n children: \"100%\"\n }), \") by default. Give it a fixed size\\nwithout a cascade fight through the named hooks \", _jsx(_components.code, {\n children: \"--ui-image-grid-width\"\n }), \" and\\n\", _jsx(_components.code, {\n children: \"--ui-image-grid-height\"\n }), \".\"]\n })]\n });\n}\nexport default function MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
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}},tileRows:{control:{type:"range",min:1,max:4,step:1}},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,tileRows:1,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 [tileRows]="tileRows"\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,tileRows:1,tileAspect:"16/9",imageFit:"cover",overlayType:"default"},render:args=>({props:{...args,pictures:(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]="pictures"\n [tileHeight]="tileHeight"\n [tileRows]="tileRows"\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 [tileRows]="tileRows"\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 tileRows: 1,\n tileAspect: \'16/9\',\n imageFit: \'cover\',\n overlayType: \'default\'\n },\n render: args => ({\n // Not `strip`: Storybook writes story props onto the component, and that\n // name would replace the grid\'s own `strip` signal.\n props: {\n ...args,\n pictures: 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]="pictures"\n [tileHeight]="tileHeight"\n [tileRows]="tileRows"\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:"Fixed-size tiles that scroll sideways — an episode strip. `tileHeight`\nalone switches it on. The tiles keep their height and shape whatever the\ncontainer's width; with more of them than fit, the strip overflows and\nscrolls instead of shrinking them. `tileRows` stacks it: the tiles fill\ncolumn by column, and the strip grows by one tile height and one gap per\nrow. `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.18152774.iframe.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atoms-image-grid-image-grid-component-stories.9a952e1b.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 tileRows: { control: { type: 'range', min: 1, max: 4, step: 1 } },\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 tileRows: 1,\n tileAspect: '1/1',\n imageFit: 'none',\n data: uiImageMock(),\n },\n};\n/** The default story shows everything; the strip shows its own four 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 [tileRows]=\"tileRows\"\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 * Fixed-size tiles that scroll sideways — an episode strip. `tileHeight`\n * alone switches it on. The tiles keep their height and shape whatever the\n * container's width; with more of them than fit, the strip overflows and\n * scrolls instead of shrinking them. `tileRows` stacks it: the tiles fill\n * column by column, and the strip grows by one tile height and one gap per\n * row. `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 tileRows: 1,\n tileAspect: '16/9',\n imageFit: 'cover',\n overlayType: 'default',\n },\n render: (args) => ({\n // Not `strip`: Storybook writes story props onto the component, and that\n // name would replace the grid's own `strip` signal.\n props: { ...args, pictures: 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]=\"pictures\"\n [tileHeight]=\"tileHeight\"\n [tileRows]=\"tileRows\"\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":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
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.10.1";function _createMdxContent(props){const _components={a:"a",code:"code",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,lib.R)(),...props.components};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(blocks.W8,{title:"Home/Introduction"}),"\n","\n","\n",(0,jsx_runtime.jsx)("h2",{style:{textAlign:"right",borderBottom:"none",marginBottom:0},children:"Built for developers and agents"}),"\n",(0,jsx_runtime.jsx)("h1",{style:{textAlign:"right",color:"var(--ui-c-focus)",paddingBottom:"1rem",borderBottom:"var(--ui-border-width) solid var(--ui-c-fourthly)"},children:"Customers just talk to the agent"}),"\n",(0,jsx_runtime.jsx)(_components.h3,{id:"ui-library-overview",children:"UI Library Overview"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This library provides a modular set of Angular components for building consistent user\ninterfaces. It follows an atomic design approach, categorized into Electrons, Atoms,\nMolecules, Layouts, and Forms. Everything is ",(0,jsx_runtime.jsx)(_components.strong,{children:"standalone"})," — there are no NgModules anymore (the\nTransloco configuration modules are the only exception). State is managed with ",(0,jsx_runtime.jsx)(_components.strong,{children:"Signals"}),"\nand all apps run ",(0,jsx_runtime.jsx)(_components.strong,{children:"zoneless"}),"."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["This documentation describes version ",(0,jsx_runtime.jsx)(_components.strong,{children:package_namespaceObject_rE})," of the library. To\ninstall exactly what is documented here:\n",(0,jsx_runtime.jsxs)("code",{children:["npm i @mojawork/ui@",package_namespaceObject_rE]}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"core-architecture",children:"Core Architecture"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The library is organized into the following categories (folders under ",(0,jsx_runtime.jsx)(_components.code,{children:"libs/ui/src/lib"}),").\nThe first three are layers, and they are told apart by ",(0,jsx_runtime.jsx)(_components.strong,{children:"composition and\nvisibility"}),", not by size: an atom may be large and a molecule small."]}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Category"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms/_electrons"})}),(0,jsx_runtime.jsxs)("td",{children:["Internal building blocks, ",(0,jsx_runtime.jsx)("strong",{children:"not exported"}),", selector ",(0,jsx_runtime.jsx)("code",{children:"ui-electron-*"}),". They exist only so ui components can build them in — an app never names one. Today: the form error message."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"atoms"})}),(0,jsx_runtime.jsx)("td",{children:"Exported building blocks that compose nothing else from this library (e.g., thumbs, typewriter, language selector, copy-value)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"molecules"})}),(0,jsx_runtime.jsxs)("td",{children:["Built from at least one other ui component — that single test is the whole definition, and the folder follows it. ",(0,jsx_runtime.jsx)("code",{children:"image-editor"})," is the only one: it builds in the crop box, the overlay, its header and the slider. Size plays no part; an atom may be a large class and a molecule twenty lines."]})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"cdk"})}),(0,jsx_runtime.jsx)("td",{children:"CDK-based building blocks (e.g., table wrapper, drag-and-drop splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"layout"})}),(0,jsx_runtime.jsx)("td",{children:"Structural components that define the page grid and navigation (e.g., main layout, spinner, splitter)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"forms"})}),(0,jsx_runtime.jsx)("td",{children:"Input elements and form validation components (inputs, checkboxes, validator directives)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsxs)("td",{children:[(0,jsx_runtime.jsx)("code",{children:"_directives"})," / ",(0,jsx_runtime.jsx)("code",{children:"_pipes"})]}),(0,jsx_runtime.jsx)("td",{children:"Utility directives and pipes for behavior modification (e.g., autofocus, intersection observer)."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:(0,jsx_runtime.jsx)("code",{children:"transloco-modules"})}),(0,jsx_runtime.jsxs)("td",{children:["Internationalization setup (",(0,jsx_runtime.jsx)("code",{children:"TranslocoRootModule"}),") — the only remaining NgModules, imported once at application level."]})]})]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"styling-concept",children:"Styling Concept"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Every component in this library ships ",(0,jsx_runtime.jsx)(_components.strong,{children:"fully self-contained"}),": plain CSS built\nexclusively on ",(0,jsx_runtime.jsx)(_components.strong,{children:"design tokens"})," — CSS custom properties such as ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-c-*"}),"\n(colors, theme-aware), ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-spacer"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-border-radius"})," and ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-time"}),".\nThere are no hidden dependencies on any CSS framework, utility system or build\ntool: the components coexist with whatever styling setup your project uses."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Responsiveness"})," follows a single canonical breakpoint ladder with six levels\n(",(0,jsx_runtime.jsx)(_components.code,{children:"ms1"})," 340px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms2"})," 375px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms3"})," 481px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms4"})," 769px · ",(0,jsx_runtime.jsx)(_components.code,{children:"ms5"})," 1025px ·\n",(0,jsx_runtime.jsx)(_components.code,{children:"ms6"})," 1901px). The ladder deliberately exists only once and serves every layer\nfrom the same source:"]}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"CSS"}),": via named media queries (",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--ms4)"}),", ",(0,jsx_runtime.jsx)(_components.code,{children:"@media (--below-ms5)"}),")\nthat are resolved into standard queries at build time — the published package\ncontains plain, universally working CSS."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"TypeScript"}),": via the ",(0,jsx_runtime.jsx)(_components.code,{children:"UiLayoutMediaScreenService"}),", which exposes the\ncurrent level as a signal (",(0,jsx_runtime.jsx)(_components.code,{children:"mediascreen: 1..6"}),") — logic and layout are\nguaranteed to switch at the same boundaries."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"tailwind--not-required-but-offered",children:"Tailwind — not required, but offered"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["The npm package ",(0,jsx_runtime.jsx)(_components.strong,{children:"does not require Tailwind"}),". Whether a project uses Tailwind\nis entirely that project's decision — the components work identically either\nway."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Projects that ",(0,jsx_runtime.jsx)(_components.strong,{children:"do want Tailwind (v4)"})," get a head start: the package ships a\nready-made theme file, ",(0,jsx_runtime.jsx)(_components.code,{children:"@mojawork/ui/styles/theme.css"}),". One import in the\napp's own Tailwind entry wires Tailwind into the library's design system:"]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-css",children:"@layer theme, base, cdk-resets, ui, components, utilities;\n@import 'tailwindcss';\n@import '@mojawork/ui/styles/theme.css';\n@source './app';\n@source '../node_modules/@mojawork/ui';\n"})}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Colors"})," mapped via ",(0,jsx_runtime.jsx)(_components.code,{children:"@theme"})," onto the runtime tokens — utilities like\n",(0,jsx_runtime.jsx)(_components.code,{children:"text-c-primary"})," automatically follow light/dark theme switching."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Breakpoints"})," ",(0,jsx_runtime.jsx)(_components.code,{children:"ms1:"}),"–",(0,jsx_runtime.jsx)(_components.code,{children:"ms6:"})," — the same ladder the components use\ninternally."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:[(0,jsx_runtime.jsx)(_components.strong,{children:"Animation presets"})," (e.g. ",(0,jsx_runtime.jsx)(_components.code,{children:"loading"}),")."]}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.p,{children:"The theme carries the mapping and nothing else: no Tailwind import of its\nown, no source paths. The layer line stays in the app's file because it has\nto be the first statement there, before Tailwind declares its own layers —\nan import cannot put it in front of itself."}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["In short: ",(0,jsx_runtime.jsx)(_components.strong,{children:"shipped Tailwind-free, Tailwind-ready when wanted."})," Both paths are\nfirst-class; neither is forced."]}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["Everything the library ships sits in the ",(0,jsx_runtime.jsx)(_components.code,{children:"ui"})," cascade layer, below Tailwind's\n",(0,jsx_runtime.jsx)(_components.code,{children:"utilities"})," — so a utility you write on a ui tag beats the component's own\ndefault, and your app's unlayered CSS beats both. One line on the Tailwind\nside makes the order explicit; see ",(0,jsx_runtime.jsx)(_components.a,{href:"?path=/docs/styling-layers--docs",children:"Styling › Layers"}),"."]}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"for-contributors",children:"For contributors"}),"\n",(0,jsx_runtime.jsxs)(_components.ul,{children:["\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Components in ",(0,jsx_runtime.jsx)(_components.code,{children:"src/lib"})," never use Tailwind utilities or ",(0,jsx_runtime.jsx)(_components.code,{children:"@apply"})," — plain CSS\nwith ",(0,jsx_runtime.jsx)(_components.code,{children:"--ui-*"})," tokens only; component-local classes carry a ",(0,jsx_runtime.jsx)(_components.code,{children:"_"})," prefix."]}),"\n",(0,jsx_runtime.jsxs)(_components.li,{children:["Storybook ",(0,jsx_runtime.jsx)(_components.strong,{children:"stories"})," (and the showcase components under ",(0,jsx_runtime.jsx)(_components.code,{children:".storybook/demos/"}),")\nexplicitly use Tailwind for their example layout."]}),"\n",(0,jsx_runtime.jsx)(_components.li,{children:"Breakpoints are never written as pixel literals — always via the ladder's\nnamed queries."}),"\n"]}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"getting-started",children:"Getting Started"}),"\n",(0,jsx_runtime.jsxs)(_components.p,{children:["All components are standalone: import them directly from the barrel into the ",(0,jsx_runtime.jsx)(_components.code,{children:"imports"}),"\narray of your standalone component. Inside the monorepo the import path is mapped via\ntsconfig; external apps install the published npm package\n(",(0,jsx_runtime.jsx)("a",{href:"https://www.npmjs.com/package/@mojawork/ui",target:"_blank",rel:"noopener",children:"@mojawork/ui"}),")."]}),"\n",(0,jsx_runtime.jsx)(_components.pre,{children:(0,jsx_runtime.jsx)(_components.code,{className:"language-typescript",children:"import { Component } from '@angular/core';\nimport { UiInputComponent, UiCardComponent } from '@mojawork/ui';\n\n@Component({\n selector: 'app-my-feature',\n imports: [UiInputComponent, UiCardComponent],\n templateUrl: './my-feature.component.html',\n})\nexport class MyFeatureComponent {}\n"})}),"\n",(0,jsx_runtime.jsx)(_components.hr,{}),"\n",(0,jsx_runtime.jsx)(_components.h4,{id:"usage-principles",children:"Usage Principles"}),"\n",(0,jsx_runtime.jsxs)("table",{class:"ui",children:[(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("th",{style:{width:"16rem"},children:"Principle"}),(0,jsx_runtime.jsx)("th",{children:"Description"})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Composition"}),(0,jsx_runtime.jsx)("td",{children:"Prefer composing smaller components into larger ones."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Consistency"}),(0,jsx_runtime.jsx)("td",{children:"Use the provided layouts to maintain a unified user experience across the application."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Signals & zoneless"}),(0,jsx_runtime.jsx)("td",{children:"Component state uses Angular Signals; all consumers run without Zone.js."})]}),(0,jsx_runtime.jsxs)("tr",{children:[(0,jsx_runtime.jsx)("td",{children:"Translation"}),(0,jsx_runtime.jsx)("td",{children:"All text within components is managed via Transloco for easy localization."})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...(0,lib.R)(),...props.components};return MDXLayout?(0,jsx_runtime.jsx)(MDXLayout,{...props,children:(0,jsx_runtime.jsx)(_createMdxContent,{...props})}):_createMdxContent(props)}}}]);
|
|
2
|
+
//# sourceMappingURL=home-overview-mdx.8b0a9768.iframe.bundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-overview-mdx.e9de5b1f.iframe.bundle.js","mappings":"AAWA","sources":["webpack://moja-work/./libs/ui/src/lib/home/overview.mdx"],"sourcesContent":["\nimport React from 'react';\n\n/*The h2 below draws its own bottom rule in the docs theme — no `---` here,\nor the page opens with two lines in a row.*/\n/*One line on purpose: broken across lines, MDX wraps the content in a <p>,\nand the paragraph's own size and colour win over the heading's.*/\nimport {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \"react/jsx-runtime\";\nimport {useMDXComponents as _provideComponents} from \"/Users/moja/projects/moja-code/mojawork/mono/node_modules/@storybook/addon-docs/dist/mdx-react-shim.js\";\nimport {Meta} from '@storybook/addon-docs/blocks';\nimport pkg from '../../../package.json';\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n h3: \"h3\",\n h4: \"h4\",\n hr: \"hr\",\n li: \"li\",\n p: \"p\",\n pre: \"pre\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(Meta, {\n title: \"Home/Introduction\"\n }), \"\\n\", \"\\n\", \"\\n\", _jsx(\"h2\", {\n style: {\n textAlign: 'right',\n borderBottom: 'none',\n marginBottom: 0\n },\n children: \"Built for developers and agents\"\n }), \"\\n\", _jsx(\"h1\", {\n style: {\n textAlign: 'right',\n color: 'var(--ui-c-focus)',\n paddingBottom: '1rem',\n borderBottom: 'var(--ui-border-width) solid var(--ui-c-fourthly)'\n },\n children: \"Customers just talk to the agent\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"ui-library-overview\",\n children: \"UI Library Overview\"\n }), \"\\n\", _jsxs(_components.p, {\n 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 \", _jsx(_components.strong, {\n children: \"standalone\"\n }), \" — there are no NgModules anymore (the\\nTransloco configuration modules are the only exception). State is managed with \", _jsx(_components.strong, {\n children: \"Signals\"\n }), \"\\nand all apps run \", _jsx(_components.strong, {\n children: \"zoneless\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This documentation describes version \", _jsx(_components.strong, {\n children: pkg.version\n }), \" of the library. To\\ninstall exactly what is documented here:\\n\", _jsxs(\"code\", {\n children: [\"npm i @mojawork/ui@\", pkg.version]\n }), \".\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"core-architecture\",\n children: \"Core Architecture\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The library is organized into the following categories (folders under \", _jsx(_components.code, {\n children: \"libs/ui/src/lib\"\n }), \").\\nThe first three are layers, and they are told apart by \", _jsx(_components.strong, {\n children: \"composition and\\nvisibility\"\n }), \", not by size: an atom may be large and a molecule small.\"]\n }), \"\\n\", _jsxs(\"table\", {\n class: \"ui\",\n children: [_jsxs(\"tr\", {\n children: [_jsx(\"th\", {\n style: {\n width: '16rem'\n },\n children: \"Category\"\n }), _jsx(\"th\", {\n children: \"Description\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"atoms/_electrons\"\n })\n }), _jsxs(\"td\", {\n children: [\"Internal building blocks, \", _jsx(\"strong\", {\n children: \"not exported\"\n }), \", selector \", _jsx(\"code\", {\n children: \"ui-electron-*\"\n }), \". They exist only so ui components can build them in — an app never names one. Today: the form error message.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"atoms\"\n })\n }), _jsx(\"td\", {\n children: \"Exported building blocks that compose nothing else from this library (e.g., thumbs, typewriter, language selector, copy-value).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"molecules\"\n })\n }), _jsxs(\"td\", {\n children: [\"Built from at least one other ui component — that single test is the whole definition, and the folder follows it. \", _jsx(\"code\", {\n children: \"image-editor\"\n }), \" 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.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"cdk\"\n })\n }), _jsx(\"td\", {\n children: \"CDK-based building blocks (e.g., table wrapper, drag-and-drop splitter).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"layout\"\n })\n }), _jsx(\"td\", {\n children: \"Structural components that define the page grid and navigation (e.g., main layout, spinner, splitter).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"forms\"\n })\n }), _jsx(\"td\", {\n children: \"Input elements and form validation components (inputs, checkboxes, validator directives).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsxs(\"td\", {\n children: [_jsx(\"code\", {\n children: \"_directives\"\n }), \" / \", _jsx(\"code\", {\n children: \"_pipes\"\n })]\n }), _jsx(\"td\", {\n children: \"Utility directives and pipes for behavior modification (e.g., autofocus, intersection observer).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"transloco-modules\"\n })\n }), _jsxs(\"td\", {\n children: [\"Internationalization setup (\", _jsx(\"code\", {\n children: \"TranslocoRootModule\"\n }), \") — the only remaining NgModules, imported once at application level.\"]\n })]\n })]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"styling-concept\",\n children: \"Styling Concept\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Every component in this library ships \", _jsx(_components.strong, {\n children: \"fully self-contained\"\n }), \": plain CSS built\\nexclusively on \", _jsx(_components.strong, {\n children: \"design tokens\"\n }), \" — CSS custom properties such as \", _jsx(_components.code, {\n children: \"--ui-c-*\"\n }), \"\\n(colors, theme-aware), \", _jsx(_components.code, {\n children: \"--ui-spacer\"\n }), \", \", _jsx(_components.code, {\n children: \"--ui-border-radius\"\n }), \" and \", _jsx(_components.code, {\n children: \"--ui-time\"\n }), \".\\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 }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Responsiveness\"\n }), \" follows a single canonical breakpoint ladder with six levels\\n(\", _jsx(_components.code, {\n children: \"ms1\"\n }), \" 340px · \", _jsx(_components.code, {\n children: \"ms2\"\n }), \" 375px · \", _jsx(_components.code, {\n children: \"ms3\"\n }), \" 481px · \", _jsx(_components.code, {\n children: \"ms4\"\n }), \" 769px · \", _jsx(_components.code, {\n children: \"ms5\"\n }), \" 1025px ·\\n\", _jsx(_components.code, {\n children: \"ms6\"\n }), \" 1901px). The ladder deliberately exists only once and serves every layer\\nfrom the same source:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"CSS\"\n }), \": via named media queries (\", _jsx(_components.code, {\n children: \"@media (--ms4)\"\n }), \", \", _jsx(_components.code, {\n children: \"@media (--below-ms5)\"\n }), \")\\nthat are resolved into standard queries at build time — the published package\\ncontains plain, universally working CSS.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"TypeScript\"\n }), \": via the \", _jsx(_components.code, {\n children: \"UiLayoutMediaScreenService\"\n }), \", which exposes the\\ncurrent level as a signal (\", _jsx(_components.code, {\n children: \"mediascreen: 1..6\"\n }), \") — logic and layout are\\nguaranteed to switch at the same boundaries.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"tailwind--not-required-but-offered\",\n children: \"Tailwind — not required, but offered\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The npm package \", _jsx(_components.strong, {\n children: \"does not require Tailwind\"\n }), \". Whether a project uses Tailwind\\nis entirely that project's decision — the components work identically either\\nway.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Projects that \", _jsx(_components.strong, {\n children: \"do want Tailwind (v4)\"\n }), \" get a head start: the package ships a\\nready-made theme file, \", _jsx(_components.code, {\n children: \"@mojawork/ui/styles/theme.css\"\n }), \". One import in the\\napp's own Tailwind entry wires Tailwind into the library's design system:\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-css\",\n 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 })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Colors\"\n }), \" mapped via \", _jsx(_components.code, {\n children: \"@theme\"\n }), \" onto the runtime tokens — utilities like\\n\", _jsx(_components.code, {\n children: \"text-c-primary\"\n }), \" automatically follow light/dark theme switching.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Breakpoints\"\n }), \" \", _jsx(_components.code, {\n children: \"ms1:\"\n }), \"–\", _jsx(_components.code, {\n children: \"ms6:\"\n }), \" — the same ladder the components use\\ninternally.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Animation presets\"\n }), \" (e.g. \", _jsx(_components.code, {\n children: \"loading\"\n }), \").\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n 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 }), \"\\n\", _jsxs(_components.p, {\n children: [\"In short: \", _jsx(_components.strong, {\n children: \"shipped Tailwind-free, Tailwind-ready when wanted.\"\n }), \" Both paths are\\nfirst-class; neither is forced.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Everything the library ships sits in the \", _jsx(_components.code, {\n children: \"ui\"\n }), \" cascade layer, below Tailwind's\\n\", _jsx(_components.code, {\n children: \"utilities\"\n }), \" — 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 \", _jsx(_components.a, {\n href: \"?path=/docs/styling-layers--docs\",\n children: \"Styling › Layers\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"for-contributors\",\n children: \"For contributors\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Components in \", _jsx(_components.code, {\n children: \"src/lib\"\n }), \" never use Tailwind utilities or \", _jsx(_components.code, {\n children: \"@apply\"\n }), \" — plain CSS\\nwith \", _jsx(_components.code, {\n children: \"--ui-*\"\n }), \" tokens only; component-local classes carry a \", _jsx(_components.code, {\n children: \"_\"\n }), \" prefix.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Storybook \", _jsx(_components.strong, {\n children: \"stories\"\n }), \" (and the showcase components under \", _jsx(_components.code, {\n children: \".storybook/demos/\"\n }), \")\\nexplicitly use Tailwind for their example layout.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Breakpoints are never written as pixel literals — always via the ladder's\\nnamed queries.\"\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"getting-started\",\n children: \"Getting Started\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"All components are standalone: import them directly from the barrel into the \", _jsx(_components.code, {\n children: \"imports\"\n }), \"\\narray of your standalone component. Inside the monorepo the import path is mapped via\\ntsconfig; external apps install the published npm package\\n(\", _jsx(\"a\", {\n href: \"https://www.npmjs.com/package/@mojawork/ui\",\n target: \"_blank\",\n rel: \"noopener\",\n children: \"@mojawork/ui\"\n }), \").\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-typescript\",\n 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 })\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"usage-principles\",\n children: \"Usage Principles\"\n }), \"\\n\", _jsxs(\"table\", {\n class: \"ui\",\n children: [_jsxs(\"tr\", {\n children: [_jsx(\"th\", {\n style: {\n width: '16rem'\n },\n children: \"Principle\"\n }), _jsx(\"th\", {\n children: \"Description\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"Composition\"\n }), _jsx(\"td\", {\n children: \"Prefer composing smaller components into larger ones.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"Consistency\"\n }), _jsx(\"td\", {\n children: \"Use the provided layouts to maintain a unified user experience across the application.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"Signals & zoneless\"\n }), _jsx(\"td\", {\n children: \"Component state uses Angular Signals; all consumers run without Zone.js.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"Translation\"\n }), _jsx(\"td\", {\n children: \"All text within components is managed via Transloco for easy localization.\"\n })]\n })]\n })]\n });\n}\nexport default function MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"home-overview-mdx.c844f7da.iframe.bundle.js","mappings":"AAWA","sources":["webpack://moja-work/./libs/ui/src/lib/home/overview.mdx"],"sourcesContent":["\nimport React from 'react';\n\n/*The h2 below draws its own bottom rule in the docs theme — no `---` here,\nor the page opens with two lines in a row.*/\n/*One line on purpose: broken across lines, MDX wraps the content in a <p>,\nand the paragraph's own size and colour win over the heading's.*/\nimport {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from \"react/jsx-runtime\";\nimport {useMDXComponents as _provideComponents} from \"/Users/moja/projects/moja-code/mojawork/mono/node_modules/@storybook/addon-docs/dist/mdx-react-shim.js\";\nimport {Meta} from '@storybook/addon-docs/blocks';\nimport pkg from '../../../package.json';\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n h3: \"h3\",\n h4: \"h4\",\n hr: \"hr\",\n li: \"li\",\n p: \"p\",\n pre: \"pre\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(Meta, {\n title: \"Home/Introduction\"\n }), \"\\n\", \"\\n\", \"\\n\", _jsx(\"h2\", {\n style: {\n textAlign: 'right',\n borderBottom: 'none',\n marginBottom: 0\n },\n children: \"Built for developers and agents\"\n }), \"\\n\", _jsx(\"h1\", {\n style: {\n textAlign: 'right',\n color: 'var(--ui-c-focus)',\n paddingBottom: '1rem',\n borderBottom: 'var(--ui-border-width) solid var(--ui-c-fourthly)'\n },\n children: \"Customers just talk to the agent\"\n }), \"\\n\", _jsx(_components.h3, {\n id: \"ui-library-overview\",\n children: \"UI Library Overview\"\n }), \"\\n\", _jsxs(_components.p, {\n 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 \", _jsx(_components.strong, {\n children: \"standalone\"\n }), \" — there are no NgModules anymore (the\\nTransloco configuration modules are the only exception). State is managed with \", _jsx(_components.strong, {\n children: \"Signals\"\n }), \"\\nand all apps run \", _jsx(_components.strong, {\n children: \"zoneless\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This documentation describes version \", _jsx(_components.strong, {\n children: pkg.version\n }), \" of the library. To\\ninstall exactly what is documented here:\\n\", _jsxs(\"code\", {\n children: [\"npm i @mojawork/ui@\", pkg.version]\n }), \".\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"core-architecture\",\n children: \"Core Architecture\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The library is organized into the following categories (folders under \", _jsx(_components.code, {\n children: \"libs/ui/src/lib\"\n }), \").\\nThe first three are layers, and they are told apart by \", _jsx(_components.strong, {\n children: \"composition and\\nvisibility\"\n }), \", not by size: an atom may be large and a molecule small.\"]\n }), \"\\n\", _jsxs(\"table\", {\n class: \"ui\",\n children: [_jsxs(\"tr\", {\n children: [_jsx(\"th\", {\n style: {\n width: '16rem'\n },\n children: \"Category\"\n }), _jsx(\"th\", {\n children: \"Description\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"atoms/_electrons\"\n })\n }), _jsxs(\"td\", {\n children: [\"Internal building blocks, \", _jsx(\"strong\", {\n children: \"not exported\"\n }), \", selector \", _jsx(\"code\", {\n children: \"ui-electron-*\"\n }), \". They exist only so ui components can build them in — an app never names one. Today: the form error message.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"atoms\"\n })\n }), _jsx(\"td\", {\n children: \"Exported building blocks that compose nothing else from this library (e.g., thumbs, typewriter, language selector, copy-value).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"molecules\"\n })\n }), _jsxs(\"td\", {\n children: [\"Built from at least one other ui component — that single test is the whole definition, and the folder follows it. \", _jsx(\"code\", {\n children: \"image-editor\"\n }), \" 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.\"]\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"cdk\"\n })\n }), _jsx(\"td\", {\n children: \"CDK-based building blocks (e.g., table wrapper, drag-and-drop splitter).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"layout\"\n })\n }), _jsx(\"td\", {\n children: \"Structural components that define the page grid and navigation (e.g., main layout, spinner, splitter).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"forms\"\n })\n }), _jsx(\"td\", {\n children: \"Input elements and form validation components (inputs, checkboxes, validator directives).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsxs(\"td\", {\n children: [_jsx(\"code\", {\n children: \"_directives\"\n }), \" / \", _jsx(\"code\", {\n children: \"_pipes\"\n })]\n }), _jsx(\"td\", {\n children: \"Utility directives and pipes for behavior modification (e.g., autofocus, intersection observer).\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: _jsx(\"code\", {\n children: \"transloco-modules\"\n })\n }), _jsxs(\"td\", {\n children: [\"Internationalization setup (\", _jsx(\"code\", {\n children: \"TranslocoRootModule\"\n }), \") — the only remaining NgModules, imported once at application level.\"]\n })]\n })]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"styling-concept\",\n children: \"Styling Concept\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Every component in this library ships \", _jsx(_components.strong, {\n children: \"fully self-contained\"\n }), \": plain CSS built\\nexclusively on \", _jsx(_components.strong, {\n children: \"design tokens\"\n }), \" — CSS custom properties such as \", _jsx(_components.code, {\n children: \"--ui-c-*\"\n }), \"\\n(colors, theme-aware), \", _jsx(_components.code, {\n children: \"--ui-spacer\"\n }), \", \", _jsx(_components.code, {\n children: \"--ui-border-radius\"\n }), \" and \", _jsx(_components.code, {\n children: \"--ui-time\"\n }), \".\\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 }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Responsiveness\"\n }), \" follows a single canonical breakpoint ladder with six levels\\n(\", _jsx(_components.code, {\n children: \"ms1\"\n }), \" 340px · \", _jsx(_components.code, {\n children: \"ms2\"\n }), \" 375px · \", _jsx(_components.code, {\n children: \"ms3\"\n }), \" 481px · \", _jsx(_components.code, {\n children: \"ms4\"\n }), \" 769px · \", _jsx(_components.code, {\n children: \"ms5\"\n }), \" 1025px ·\\n\", _jsx(_components.code, {\n children: \"ms6\"\n }), \" 1901px). The ladder deliberately exists only once and serves every layer\\nfrom the same source:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"CSS\"\n }), \": via named media queries (\", _jsx(_components.code, {\n children: \"@media (--ms4)\"\n }), \", \", _jsx(_components.code, {\n children: \"@media (--below-ms5)\"\n }), \")\\nthat are resolved into standard queries at build time — the published package\\ncontains plain, universally working CSS.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"TypeScript\"\n }), \": via the \", _jsx(_components.code, {\n children: \"UiLayoutMediaScreenService\"\n }), \", which exposes the\\ncurrent level as a signal (\", _jsx(_components.code, {\n children: \"mediascreen: 1..6\"\n }), \") — logic and layout are\\nguaranteed to switch at the same boundaries.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"tailwind--not-required-but-offered\",\n children: \"Tailwind — not required, but offered\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The npm package \", _jsx(_components.strong, {\n children: \"does not require Tailwind\"\n }), \". Whether a project uses Tailwind\\nis entirely that project's decision — the components work identically either\\nway.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Projects that \", _jsx(_components.strong, {\n children: \"do want Tailwind (v4)\"\n }), \" get a head start: the package ships a\\nready-made theme file, \", _jsx(_components.code, {\n children: \"@mojawork/ui/styles/theme.css\"\n }), \". One import in the\\napp's own Tailwind entry wires Tailwind into the library's design system:\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-css\",\n 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 })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Colors\"\n }), \" mapped via \", _jsx(_components.code, {\n children: \"@theme\"\n }), \" onto the runtime tokens — utilities like\\n\", _jsx(_components.code, {\n children: \"text-c-primary\"\n }), \" automatically follow light/dark theme switching.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Breakpoints\"\n }), \" \", _jsx(_components.code, {\n children: \"ms1:\"\n }), \"–\", _jsx(_components.code, {\n children: \"ms6:\"\n }), \" — the same ladder the components use\\ninternally.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Animation presets\"\n }), \" (e.g. \", _jsx(_components.code, {\n children: \"loading\"\n }), \").\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n 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 }), \"\\n\", _jsxs(_components.p, {\n children: [\"In short: \", _jsx(_components.strong, {\n children: \"shipped Tailwind-free, Tailwind-ready when wanted.\"\n }), \" Both paths are\\nfirst-class; neither is forced.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Everything the library ships sits in the \", _jsx(_components.code, {\n children: \"ui\"\n }), \" cascade layer, below Tailwind's\\n\", _jsx(_components.code, {\n children: \"utilities\"\n }), \" — 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 \", _jsx(_components.a, {\n href: \"?path=/docs/styling-layers--docs\",\n children: \"Styling › Layers\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h4, {\n id: \"for-contributors\",\n children: \"For contributors\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Components in \", _jsx(_components.code, {\n children: \"src/lib\"\n }), \" never use Tailwind utilities or \", _jsx(_components.code, {\n children: \"@apply\"\n }), \" — plain CSS\\nwith \", _jsx(_components.code, {\n children: \"--ui-*\"\n }), \" tokens only; component-local classes carry a \", _jsx(_components.code, {\n children: \"_\"\n }), \" prefix.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Storybook \", _jsx(_components.strong, {\n children: \"stories\"\n }), \" (and the showcase components under \", _jsx(_components.code, {\n children: \".storybook/demos/\"\n }), \")\\nexplicitly use Tailwind for their example layout.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Breakpoints are never written as pixel literals — always via the ladder's\\nnamed queries.\"\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"getting-started\",\n children: \"Getting Started\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"All components are standalone: import them directly from the barrel into the \", _jsx(_components.code, {\n children: \"imports\"\n }), \"\\narray of your standalone component. Inside the monorepo the import path is mapped via\\ntsconfig; external apps install the published npm package\\n(\", _jsx(\"a\", {\n href: \"https://www.npmjs.com/package/@mojawork/ui\",\n target: \"_blank\",\n rel: \"noopener\",\n children: \"@mojawork/ui\"\n }), \").\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-typescript\",\n 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 })\n }), \"\\n\", _jsx(_components.hr, {}), \"\\n\", _jsx(_components.h4, {\n id: \"usage-principles\",\n children: \"Usage Principles\"\n }), \"\\n\", _jsxs(\"table\", {\n class: \"ui\",\n children: [_jsxs(\"tr\", {\n children: [_jsx(\"th\", {\n style: {\n width: '16rem'\n },\n children: \"Principle\"\n }), _jsx(\"th\", {\n children: \"Description\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"Composition\"\n }), _jsx(\"td\", {\n children: \"Prefer composing smaller components into larger ones.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"Consistency\"\n }), _jsx(\"td\", {\n children: \"Use the provided layouts to maintain a unified user experience across the application.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"Signals & zoneless\"\n }), _jsx(\"td\", {\n children: \"Component state uses Angular Signals; all consumers run without Zone.js.\"\n })]\n }), _jsxs(\"tr\", {\n children: [_jsx(\"td\", {\n children: \"Translation\"\n }), _jsx(\"td\", {\n children: \"All text within components is managed via Transloco for easy localization.\"\n })]\n })]\n })]\n });\n}\nexport default function MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\n"],"names":[],"sourceRoot":""}
|
package/storybook/iframe.html
CHANGED
package/storybook/project.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1796144754371,"userSince":1772191366759,"hasCustomBabel":false,"hasCustomWebpack":true,"hasCustomVite":false,"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"},"rendererPackages":{"@angular/core":"22.2.3","@angular-devkit/build-angular":"22.2.4"}},"hasRouterPackage":true,"hasModuleFederation":false,"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.6.3","storybookVersionSpecifier":"10.6.3","language":"typescript","storybookPackages":{"@nx/storybook":{"version":"23.3.1"},"@storybook/angular":{"version":"10.6.3"},"eslint-plugin-storybook":{"version":"10.4.6"},"storybook":{"version":"10.6.3"}},"addons":{"@storybook/addon-docs":{"version":"10.6.3"}},"packageJsonType":"unknown"}
|