@mojawork/ui-docs 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/bin/serve.mjs +73 -0
- package/catalog/atoms/background.md +130 -0
- package/catalog/atoms/barcode.md +285 -0
- package/catalog/atoms/buzzer.md +210 -0
- package/catalog/atoms/card.md +174 -0
- package/catalog/atoms/chart.md +236 -0
- package/catalog/atoms/clock.md +252 -0
- package/catalog/atoms/copy-value.md +203 -0
- package/catalog/atoms/image-grid.md +208 -0
- package/catalog/atoms/image-slider.md +216 -0
- package/catalog/atoms/lang-selector.md +237 -0
- package/catalog/atoms/mosaic.md +366 -0
- package/catalog/atoms/placeholder.md +157 -0
- package/catalog/atoms/qr-code.md +334 -0
- package/catalog/atoms/rating.md +176 -0
- package/catalog/atoms/reader-doc.md +404 -0
- package/catalog/atoms/text-animate.md +122 -0
- package/catalog/atoms/thumb.md +153 -0
- package/catalog/atoms/timer.md +111 -0
- package/catalog/atoms/typewriter.md +132 -0
- package/catalog/cdk/splitter.md +63 -0
- package/catalog/cdk/table.md +188 -0
- package/catalog/forms/autocomplete.md +304 -0
- package/catalog/forms/checkbox.md +218 -0
- package/catalog/forms/input.md +193 -0
- package/catalog/forms/slider.md +142 -0
- package/catalog/forms/switch.md +188 -0
- package/catalog/guide.json +1209 -0
- package/catalog/layout/header.md +167 -0
- package/catalog/layout/main.md +158 -0
- package/catalog/layout/media-screen.md +163 -0
- package/catalog/layout/nav.md +181 -0
- package/catalog/layout/overlay.md +256 -0
- package/catalog/layout/spinner.md +94 -0
- package/catalog/layout/splitter.md +331 -0
- package/catalog/layout/tabs.md +144 -0
- package/catalog/layout/top-scroll-bottom.md +98 -0
- package/catalog/manifest.json +482 -0
- package/catalog/mcp.json +44 -0
- package/catalog/molecules/image-editor.md +285 -0
- package/catalog/usage.md +137 -0
- package/catalog/version.json +4 -0
- package/package.json +10 -0
- package/storybook/1183.da25800b.iframe.bundle.js +1 -0
- package/storybook/1255.2abec879.iframe.bundle.js +2 -0
- package/storybook/1255.2abec879.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/1516.52d2dae7.iframe.bundle.js +2 -0
- package/storybook/1516.52d2dae7.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/2033.c705a7ce.iframe.bundle.js +1 -0
- package/storybook/2089.32694489.iframe.bundle.js +1 -0
- package/storybook/2096.431fc8f5.iframe.bundle.js +1 -0
- package/storybook/2127.29f153d2.iframe.bundle.js +2 -0
- package/storybook/2127.29f153d2.iframe.bundle.js.LICENSE.txt +7 -0
- package/storybook/2228.77650ef1.iframe.bundle.js +2 -0
- package/storybook/2228.77650ef1.iframe.bundle.js.LICENSE.txt +1 -0
- package/storybook/2249.6e6782ab.iframe.bundle.js +1 -0
- package/storybook/2639.29baa8af.iframe.bundle.js +1 -0
- package/storybook/2844.c9f47654.iframe.bundle.js +1 -0
- package/storybook/2971.edb202b4.iframe.bundle.js +1 -0
- package/storybook/3899.55560628.iframe.bundle.js +2 -0
- package/storybook/3899.55560628.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/3968.69b812e4.iframe.bundle.js +1 -0
- package/storybook/4255.eeeaf087.iframe.bundle.js +111 -0
- package/storybook/4255.eeeaf087.iframe.bundle.js.LICENSE.txt +49 -0
- package/storybook/4255.eeeaf087.iframe.bundle.js.map +1 -0
- package/storybook/4425.368129b3.iframe.bundle.js +2 -0
- package/storybook/4425.368129b3.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/4476.f8e4115f.iframe.bundle.js +1 -0
- package/storybook/4495.d1c8cc8d.iframe.bundle.js +1 -0
- package/storybook/4555.066c242d.iframe.bundle.js +1 -0
- package/storybook/4755.e4656207.iframe.bundle.js +23 -0
- package/storybook/4755.e4656207.iframe.bundle.js.LICENSE.txt +14 -0
- package/storybook/4755.e4656207.iframe.bundle.js.map +1 -0
- package/storybook/4935.8959522b.iframe.bundle.js +1 -0
- package/storybook/5568.c6172f92.iframe.bundle.js +1 -0
- package/storybook/5944.810cb147.iframe.bundle.js +1 -0
- package/storybook/6115.7f1470ef.iframe.bundle.js +1 -0
- package/storybook/6169.eaeed989.iframe.bundle.js +2 -0
- package/storybook/6169.eaeed989.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/6202.b8ca0e90.iframe.bundle.js +2 -0
- package/storybook/6202.b8ca0e90.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/660.18f0458e.iframe.bundle.js +1 -0
- package/storybook/6824.f5eb8bb7.iframe.bundle.js +1 -0
- package/storybook/7316.5b024e94.iframe.bundle.js +1 -0
- package/storybook/7749.2a853795.iframe.bundle.js +1 -0
- package/storybook/8051.719eb790.iframe.bundle.js +1 -0
- package/storybook/813.805c1e5f.iframe.bundle.js +1 -0
- package/storybook/8448.1baeb046.iframe.bundle.js +1 -0
- package/storybook/871.428deceb.iframe.bundle.js +1 -0
- package/storybook/8819.220ca21d.iframe.bundle.js +1 -0
- package/storybook/9045.a50616e9.iframe.bundle.js +2 -0
- package/storybook/9045.a50616e9.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/9560.668052f3.iframe.bundle.js +7 -0
- package/storybook/9560.668052f3.iframe.bundle.js.map +1 -0
- package/storybook/973.67f44bb0.iframe.bundle.js +1 -0
- package/storybook/9850.28367747.iframe.bundle.js +1 -0
- package/storybook/9946.36014b4e.iframe.bundle.js +1 -0
- package/storybook/MaterialIcons-Regular.woff2 +0 -0
- package/storybook/MaterialIconsOutlined-Regular.woff2 +0 -0
- package/storybook/PetMe64.ttf +0 -0
- package/storybook/_external-mwork-banner-docs-mdx.0d5549a0.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-banner-mwork-banner-stories.d44f6917.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-basic-interpreter-docs-mdx.03c6205c.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-basic-interpreter-mwork-basic-interpreter-stories.3252a9b8.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-music-player-docs-mdx.6f943768.iframe.bundle.js +1 -0
- package/storybook/_external-mwork-music-player-mwork-music-player-stories.08fbf651.iframe.bundle.js +1 -0
- package/storybook/assets/fonts/PETME64-LICENSE.txt +20 -0
- package/storybook/assets/fonts/PetMe64.ttf +0 -0
- package/storybook/assets/fonts/icons/MaterialIcons-Regular.woff2 +0 -0
- package/storybook/assets/fonts/icons/MaterialIconsOutlined-Regular.woff2 +0 -0
- package/storybook/assets/ui/documents/demo.pdf +42 -0
- package/storybook/assets/ui/i18n/de-DE.json +1 -0
- package/storybook/assets/ui/i18n/en-EN.json +2 -0
- package/storybook/assets/ui/i18n/ui/de-DE.json +95 -0
- package/storybook/assets/ui/i18n/ui/en-EN.json +95 -0
- package/storybook/assets/ui/images/600x600.png +0 -0
- package/storybook/assets/ui/images/600x800.png +0 -0
- package/storybook/assets/ui/images/800x600.png +0 -0
- package/storybook/assets/ui/images/unknown.gif +0 -0
- package/storybook/atoms-_electrons-form-error-message-docs-mdx.5b9e78fe.iframe.bundle.js +1 -0
- package/storybook/atoms-_electrons-form-error-message-form-error-message-component-stories.7f749acc.iframe.bundle.js +1 -0
- package/storybook/atoms-background-background-component-stories.b6b50c0c.iframe.bundle.js +1 -0
- package/storybook/atoms-background-docs-mdx.4f102c17.iframe.bundle.js +1 -0
- package/storybook/atoms-barcode-barcode-component-stories.dc462559.iframe.bundle.js +1 -0
- package/storybook/atoms-barcode-docs-mdx.b74c501b.iframe.bundle.js +1 -0
- package/storybook/atoms-buzzer-buzzer-component-stories.13ee130d.iframe.bundle.js +1 -0
- package/storybook/atoms-buzzer-docs-mdx.23eb1913.iframe.bundle.js +1 -0
- package/storybook/atoms-card-card-component-stories.065b34e9.iframe.bundle.js +1 -0
- package/storybook/atoms-card-docs-mdx.7d276114.iframe.bundle.js +1 -0
- package/storybook/atoms-chart-chart-component-stories.5247b7cb.iframe.bundle.js +1 -0
- package/storybook/atoms-chart-docs-mdx.204609d4.iframe.bundle.js +1 -0
- package/storybook/atoms-clock-clock-component-stories.d1464731.iframe.bundle.js +1 -0
- package/storybook/atoms-clock-docs-mdx.501e6780.iframe.bundle.js +1 -0
- package/storybook/atoms-copy-value-copy-value-component-stories.58d3956a.iframe.bundle.js +1 -0
- package/storybook/atoms-copy-value-docs-mdx.f404dcd2.iframe.bundle.js +1 -0
- package/storybook/atoms-image-grid-docs-mdx.18b4df2a.iframe.bundle.js +1 -0
- package/storybook/atoms-image-grid-image-grid-component-stories.a0a92d9e.iframe.bundle.js +1 -0
- package/storybook/atoms-image-slider-docs-mdx.c616bb37.iframe.bundle.js +1 -0
- package/storybook/atoms-image-slider-image-slider-component-stories.484b9c41.iframe.bundle.js +1 -0
- package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js +2 -0
- package/storybook/atoms-lang-selector-docs-mdx.a327a27f.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js +2 -0
- package/storybook/atoms-lang-selector-lang-selector-component-stories.41d7efd1.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/atoms-mosaic-docs-mdx.1aebfbdf.iframe.bundle.js +1 -0
- package/storybook/atoms-mosaic-mosaic-component-stories.0a6bc043.iframe.bundle.js +1 -0
- package/storybook/atoms-placeholder-docs-mdx.cd2f3976.iframe.bundle.js +1 -0
- package/storybook/atoms-placeholder-placeholder-component-stories.bc221534.iframe.bundle.js +1 -0
- package/storybook/atoms-qr-code-docs-mdx.4202568d.iframe.bundle.js +1 -0
- package/storybook/atoms-qr-code-qr-code-component-stories.5018e2b0.iframe.bundle.js +1 -0
- package/storybook/atoms-rating-docs-mdx.32fa4104.iframe.bundle.js +1 -0
- package/storybook/atoms-rating-rating-component-stories.982db47d.iframe.bundle.js +1 -0
- package/storybook/atoms-reader-doc-docs-mdx.0688c3b9.iframe.bundle.js +1 -0
- package/storybook/atoms-reader-doc-reader-doc-component-stories.a6fec57d.iframe.bundle.js +1 -0
- package/storybook/atoms-text-animate-docs-mdx.05e1baf4.iframe.bundle.js +1 -0
- package/storybook/atoms-text-animate-text-animate-component-stories.8041c0f1.iframe.bundle.js +1 -0
- package/storybook/atoms-thumb-docs-mdx.2143ad01.iframe.bundle.js +1 -0
- package/storybook/atoms-thumb-thumb-component-stories.06f51d03.iframe.bundle.js +1 -0
- package/storybook/atoms-timer-docs-mdx.6f724cc8.iframe.bundle.js +1 -0
- package/storybook/atoms-timer-timer-component-stories.9bee1037.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-docs-mdx.3b1088c0.iframe.bundle.js +1 -0
- package/storybook/atoms-typewriter-typewriter-component-stories.4fefc019.iframe.bundle.js +1 -0
- package/storybook/cdk-components-drag-and-drop-splitter-docs-mdx.f12088fd.iframe.bundle.js +1 -0
- package/storybook/cdk-components-drag-and-drop-splitter-splitter-component-stories.286b5171.iframe.bundle.js +1 -0
- package/storybook/cdk-components-table-docs-mdx.cc2c11e7.iframe.bundle.js +1 -0
- package/storybook/cdk-components-table-table-component-stories.db9212fd.iframe.bundle.js +1 -0
- package/storybook/examples-burger-menu-stories.0a083a75.iframe.bundle.js +1 -0
- package/storybook/examples-docs-mdx.3111f2c6.iframe.bundle.js +1 -0
- package/storybook/examples-image-grid-slider-docs-mdx.9e38157e.iframe.bundle.js +1 -0
- package/storybook/examples-image-grid-slider-image-grid-slider-stories.028c8c2b.iframe.bundle.js +1 -0
- package/storybook/examples-layout-docs-mdx.bbacdfd2.iframe.bundle.js +1 -0
- package/storybook/examples-layout-layout-stories.05cd891f.iframe.bundle.js +1 -0
- package/storybook/examples-table-edit-focus-docs-mdx.3c0d1611.iframe.bundle.js +1 -0
- package/storybook/examples-table-edit-focus-table-edit-focus-stories.c79e214a.iframe.bundle.js +1 -0
- package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js +2 -0
- package/storybook/examples-transloco-docs-mdx.97df7022.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js +2 -0
- package/storybook/examples-transloco-transloco-component-stories.5baea2e2.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/favicon-wrapper.svg +46 -0
- package/storybook/favicon.svg +1 -0
- package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js +2 -0
- package/storybook/forms-autocomplete-autocomplete-component-stories.443544e0.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js +2 -0
- package/storybook/forms-autocomplete-docs-mdx.09beba1b.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/forms-autofocus-autofocus-stories.2e94d887.iframe.bundle.js +1 -0
- package/storybook/forms-autofocus-docs-mdx.39611362.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-checkbox-component-stories.d45b4f0d.iframe.bundle.js +1 -0
- package/storybook/forms-checkbox-docs-mdx.74036eb7.iframe.bundle.js +1 -0
- package/storybook/forms-input-docs-mdx.72d0e99a.iframe.bundle.js +1 -0
- package/storybook/forms-input-input-component-stories.609db3f0.iframe.bundle.js +1 -0
- package/storybook/forms-slider-docs-mdx.120cefc6.iframe.bundle.js +1 -0
- package/storybook/forms-slider-slider-component-stories.058fb9b1.iframe.bundle.js +1 -0
- package/storybook/forms-switch-docs-mdx.9d58a341.iframe.bundle.js +1 -0
- package/storybook/forms-switch-switch-component-stories.bf67d7c9.iframe.bundle.js +1 -0
- package/storybook/forms-validators-docs-mdx.ebb47a43.iframe.bundle.js +1 -0
- package/storybook/forms-validators-validators-component-stories.9525f97b.iframe.bundle.js +1 -0
- package/storybook/home-guide-mdx.1a176b15.iframe.bundle.js +1 -0
- package/storybook/home-overview-mdx.d0cf448a.iframe.bundle.js +1 -0
- package/storybook/home-tips-mdx.26df81d8.iframe.bundle.js +1 -0
- package/storybook/home-usage-mdx.7ba89dd0.iframe.bundle.js +1 -0
- package/storybook/iframe.html +558 -0
- package/storybook/index.html +155 -0
- package/storybook/index.json +1 -0
- package/storybook/layout-main-docs-mdx.4c9208c5.iframe.bundle.js +1 -0
- package/storybook/layout-main-main-component-stories.788c0c54.iframe.bundle.js +1 -0
- package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js +2 -0
- package/storybook/layout-media-screen-docs-mdx.b0ca9a06.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js +2 -0
- package/storybook/layout-media-screen-media-screen-component-stories.7941c064.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook/layout-nav-docs-mdx.cc919f94.iframe.bundle.js +1 -0
- package/storybook/layout-nav-nav-component-stories.766738fc.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-docs-mdx.823351e0.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-header-docs-mdx.394033ca.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-header-header-component-stories.5eaef192.iframe.bundle.js +1 -0
- package/storybook/layout-overlay-overlay-component-stories.01f6cd84.iframe.bundle.js +1 -0
- package/storybook/layout-spinner-docs-mdx.4be572c0.iframe.bundle.js +1 -0
- package/storybook/layout-spinner-spinner-component-stories.ab8245c6.iframe.bundle.js +1 -0
- package/storybook/layout-splitter-docs-mdx.bf161b39.iframe.bundle.js +1 -0
- package/storybook/layout-splitter-splitter-component-stories.46b8b112.iframe.bundle.js +1 -0
- package/storybook/layout-tabs-docs-mdx.89d83606.iframe.bundle.js +1 -0
- package/storybook/layout-tabs-tabs-component-stories.8602cefa.iframe.bundle.js +1 -0
- package/storybook/layout-top-scroll-bottom-docs-mdx.ddc061f8.iframe.bundle.js +1 -0
- package/storybook/layout-top-scroll-bottom-top-scroll-bottom-component-stories.9ee7055f.iframe.bundle.js +1 -0
- package/storybook/main.2d116a57.iframe.bundle.js +1 -0
- package/storybook/main.a402659c6a0734088d14.css +2101 -0
- package/storybook/mocker-runtime-injected.js +1 -0
- package/storybook/molecules-image-editor-docs-mdx.119ea12a.iframe.bundle.js +1 -0
- package/storybook/molecules-image-editor-image-editor-component-stories.56467f17.iframe.bundle.js +1 -0
- package/storybook/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook/nunito-sans-bold.woff2 +0 -0
- package/storybook/nunito-sans-italic.woff2 +0 -0
- package/storybook/nunito-sans-regular.woff2 +0 -0
- package/storybook/project.json +1 -0
- package/storybook/runtime~main.a9b8ab83.iframe.bundle.js +1 -0
- package/storybook/sb-addons/docs-1/manager-bundle.js +3 -0
- package/storybook/sb-addons/libs-ui-storybook-2/manager-bundle.js +3 -0
- package/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +630 -0
- package/storybook/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook/sb-common-assets/favicon.svg +1 -0
- package/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook/sb-manager/globals-runtime.js +76714 -0
- package/storybook/sb-manager/globals.js +24 -0
- package/storybook/sb-manager/manager-stores.js +23 -0
- package/storybook/sb-manager/runtime.js +27451 -0
- package/storybook/sb-preview/globals.js +20 -0
- package/storybook/sb-preview/runtime.js +35491 -0
- package/storybook/styling-colors-colors-component-stories.58031f40.iframe.bundle.js +1 -0
- package/storybook/styling-colors-docs-mdx.95c504e4.iframe.bundle.js +1 -0
- package/storybook/styling-css-variables-docs-mdx.48afb4f3.iframe.bundle.js +1 -0
- package/storybook/styling-forms-docs-mdx.943e72f2.iframe.bundle.js +1 -0
- package/storybook/styling-forms-forms-component-stories.8af76278.iframe.bundle.js +1 -0
- package/storybook/styling-icons-docs-mdx.e1001dfd.iframe.bundle.js +1 -0
- package/storybook/styling-icons-icons-component-stories.2dd8c6f8.iframe.bundle.js +1 -0
- package/storybook/styling-layers-docs-mdx.5039dc45.iframe.bundle.js +1 -0
- package/storybook/styling-tags-docs-mdx.23ab2316.iframe.bundle.js +1 -0
- package/storybook/styling-tags-tags-component-stories.7a64bd20.iframe.bundle.js +1 -0
- package/storybook/styling-ui-tags-docs-mdx.8f75631d.iframe.bundle.js +1 -0
- package/storybook/styling-ui-tags-ui-tags-component-stories.2ec3109b.iframe.bundle.js +1 -0
- package/storybook/version.json +4 -0
- package/version.json +4 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
### Layout: Overlay
|
|
2
|
+
|
|
3
|
+
A versatile modal/drawer component for displaying content over the main application interface.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
A panel over the page — from the centre or any edge, up to a chosen width —
|
|
10
|
+
with backdrop, <kbd>Escape</kbd>, a focus trap and a scroll-lock on the page
|
|
11
|
+
behind, all built in. It shows what is projected into its slots and reports
|
|
12
|
+
every close through `activeOutput`; whether it is open is the host's state,
|
|
13
|
+
bound in. It belongs at the top level of the app, next to the layout, never
|
|
14
|
+
inside it. It carries no header of its own: that is `ui-layout-overlay-header`,
|
|
15
|
+
placed in the `overlay-header` slot.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
> **Guide:** recommendations for `ui-layout-overlay` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-layout-overlay`). The section above is the truth; the guide is the offer.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### Overview
|
|
24
|
+
|
|
25
|
+
The `UiLayoutOverlayComponent` provides a flexible way to present information or actions. It supports multiple entry directions (center, top, bottom, left, right) and various maximum widths. It's often used in conjunction with `UiLayoutOverlayHeaderComponent`.
|
|
26
|
+
|
|
27
|
+
**Dismissing:** the overlay closes on a click outside the panel (the backdrop) and by pressing <kbd>Escape</kbd> while it is open. Both run the leave animation and then emit `activeOutput` = `false`, so keep the bound `active` state in sync with that output. The output reports exactly one close per close that actually happened — nothing on the initial binding round, and a reopen during the leave animation cancels the pending report instead of being shot down by it.
|
|
28
|
+
|
|
29
|
+
**Keyboard:** the overlay is a modal dialog and keeps the keyboard inside. Opening moves the focus to the first focusable element in the panel (or the panel itself), <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> cycle within it instead of walking the page behind, and closing returns the focus to whatever opened the overlay. Without this the focus ring lands on elements the user cannot see — it reads as "no focus at all".
|
|
30
|
+
|
|
31
|
+
**Scroll containment:** while any overlay is visible, the page behind it is
|
|
32
|
+
scroll-locked — purely declaratively via
|
|
33
|
+
`body:has(.ui-overlay._-visible) { overflow: hidden }` in the component styles,
|
|
34
|
+
no JavaScript bookkeeping involved. The lock holds as long as at least one
|
|
35
|
+
visible panel is in the DOM (nested/parallel overlays included, and through the
|
|
36
|
+
close animation) and falls automatically with the panel — whatever removes it:
|
|
37
|
+
a regular close, a component destroy, or a hot-reload/Storybook teardown that
|
|
38
|
+
skips the Angular lifecycle. A stuck lock is impossible by construction. The
|
|
39
|
+
panel's scroll containers additionally use `overscroll-behavior: contain`, so
|
|
40
|
+
scrolling inside the overlay never chains to the page underneath; the page
|
|
41
|
+
keeps its scroll position throughout.
|
|
42
|
+
|
|
43
|
+
**Caveat:** the rule carries `!important`, because the lock is the overlay's
|
|
44
|
+
contract — while a panel is visible it also beats **inline** `overflow` styles
|
|
45
|
+
that apps set on the `<body>` themselves (the website, for example, manages
|
|
46
|
+
`body.style.overflowY` for its own purposes; without `!important` that inline
|
|
47
|
+
longhand would win and the page would scroll behind the overlay). The one thing
|
|
48
|
+
that still defeats it is an app setting an inline `overflow` with `!important`
|
|
49
|
+
— don't do that; while an overlay is up, the page is locked, no exceptions.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### Where to place it — read this first
|
|
54
|
+
|
|
55
|
+
This overlay renders **where it stands in the template**. It is not moved into a
|
|
56
|
+
container at the end of `<body>`, the way Angular Material's CDK overlay does.
|
|
57
|
+
That keeps it simple — no portals, no position strategies, content projection
|
|
58
|
+
and forms behave normally — but it has one consequence that costs an afternoon
|
|
59
|
+
if you learn it the hard way:
|
|
60
|
+
|
|
61
|
+
**Put the overlay at the top level of the app, next to the layout — not inside
|
|
62
|
+
it.** Anything above it in the DOM that establishes a containing block takes the
|
|
63
|
+
panel hostage, because the panel is `position: fixed`:
|
|
64
|
+
|
|
65
|
+
<table class="ui">
|
|
66
|
+
<thead>
|
|
67
|
+
<tr>
|
|
68
|
+
<th>Property on an ancestor</th>
|
|
69
|
+
<th>What it does to the panel</th>
|
|
70
|
+
</tr>
|
|
71
|
+
</thead>
|
|
72
|
+
<tbody>
|
|
73
|
+
<tr>
|
|
74
|
+
<td><code>transform</code>, <code>perspective</code>, <code>filter</code></td>
|
|
75
|
+
<td>
|
|
76
|
+
Becomes the containing block: <code>top/left/right/bottom</code> and
|
|
77
|
+
percentage sizes resolve against that box instead of the window. In a
|
|
78
|
+
long page the panel can end up as tall as the whole document.
|
|
79
|
+
</td>
|
|
80
|
+
</tr>
|
|
81
|
+
<tr>
|
|
82
|
+
<td><code>contain: paint</code> (or <code>content</code>/<code>strict</code>)</td>
|
|
83
|
+
<td>
|
|
84
|
+
Clips the panel to that element — the sheet is measured at full size but
|
|
85
|
+
drawn cut off, which looks like a styling bug and is not one.
|
|
86
|
+
</td>
|
|
87
|
+
</tr>
|
|
88
|
+
<tr>
|
|
89
|
+
<td><code>overflow</code> other than <code>visible</code></td>
|
|
90
|
+
<td>Clips the panel once the same ancestor is also a containing block.</td>
|
|
91
|
+
</tr>
|
|
92
|
+
<tr>
|
|
93
|
+
<td>A <code>transition</code> on width/left/transform</td>
|
|
94
|
+
<td>
|
|
95
|
+
The panel rides along with it: opening the overlay then looks as if the
|
|
96
|
+
whole page slides sideways.
|
|
97
|
+
</td>
|
|
98
|
+
</tr>
|
|
99
|
+
</tbody>
|
|
100
|
+
</table>
|
|
101
|
+
|
|
102
|
+
Safari adds a painting hazard on top of the geometry problems: under a
|
|
103
|
+
transformed ancestor it can mispaint **native form controls** — most visibly
|
|
104
|
+
a checked checkbox that simply disappears. An identity transform such as
|
|
105
|
+
`translateX(0)` or `scale(1)` triggers this exactly like a real one, which is
|
|
106
|
+
why the library keeps every resting state at `transform: none`: the centered
|
|
107
|
+
`ui-layout-main` drops its translate outside the centered breakpoints, and the
|
|
108
|
+
`center` panel finishes its open animation on `none` instead of `scale(1)`.
|
|
109
|
+
Follow the same rule in app code.
|
|
110
|
+
|
|
111
|
+
If the overlay genuinely has to live inside such a subtree, `viewportHeight`
|
|
112
|
+
is the escape hatch: it references the height to the browser window and counters
|
|
113
|
+
the displaced fixed origin. Treat it as a patch, not as the normal case — moving
|
|
114
|
+
the overlay out is always the better fix.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### [Example: Overlay](?path=/story/layout-overlay--overlay)
|
|
119
|
+
|
|
120
|
+
### [Example: Scroll containment](?path=/story/layout-overlay--scroll-containment)
|
|
121
|
+
|
|
122
|
+
### [Example: Content height](?path=/story/layout-overlay--fit-content)
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
### Inputs
|
|
127
|
+
|
|
128
|
+
<table class="ui">
|
|
129
|
+
<thead>
|
|
130
|
+
<tr>
|
|
131
|
+
<th>@Input</th>
|
|
132
|
+
<th>Type</th>
|
|
133
|
+
<th>Default</th>
|
|
134
|
+
<th>Description</th>
|
|
135
|
+
</tr>
|
|
136
|
+
</thead>
|
|
137
|
+
<tbody>
|
|
138
|
+
<tr>
|
|
139
|
+
<td><code>active</code></td>
|
|
140
|
+
<td><code>boolean</code></td>
|
|
141
|
+
<td><code>false</code></td>
|
|
142
|
+
<td>Controls the visibility of the overlay.</td>
|
|
143
|
+
</tr>
|
|
144
|
+
<tr>
|
|
145
|
+
<td><code>direction</code></td>
|
|
146
|
+
<td><code>UILayoutOverlayDirectionsType | null</code></td>
|
|
147
|
+
<td><code>null</code> (renders as <code>'center'</code>)</td>
|
|
148
|
+
<td>The entry direction of the overlay (<code>'center'</code>, <code>'top'</code>, <code>'bottom'</code>, <code>'left'</code>, <code>'right'</code>).</td>
|
|
149
|
+
</tr>
|
|
150
|
+
<tr>
|
|
151
|
+
<td><code>maxWidth</code></td>
|
|
152
|
+
<td><code>UILayoutOverlayMaxWidthType | null</code></td>
|
|
153
|
+
<td><code>null</code> (renders as <code>'max'</code>)</td>
|
|
154
|
+
<td>
|
|
155
|
+
Sets the overlay’s maximum width. Available values are <code>'max'</code> (default),
|
|
156
|
+
<code>'ms-1'</code> (<code>374px</code>), <code>'ms-2'</code> (<code>480px</code>),
|
|
157
|
+
<code>'ms-3'</code> (<code>768px</code>), <code>'ms-4'</code> (<code>1024px</code>), and
|
|
158
|
+
<code>'ms-5'</code> (<code>1900px</code>).
|
|
159
|
+
</td>
|
|
160
|
+
</tr>
|
|
161
|
+
<tr>
|
|
162
|
+
<td><code>viewportHeight</code></td>
|
|
163
|
+
<td><code>boolean</code></td>
|
|
164
|
+
<td><code>false</code></td>
|
|
165
|
+
<td>
|
|
166
|
+
References the overlay height to the browser viewport
|
|
167
|
+
(<code>100dvh</code>) instead of the containing block. Use this when a
|
|
168
|
+
transformed ancestor (e.g. the centered <code>ui-layout-main</code>)
|
|
169
|
+
hijacks <code>position: fixed</code> — the default percent heights
|
|
170
|
+
would span the whole document there. The component also counters the
|
|
171
|
+
displaced fixed origin, so the panel always opens inside the visible
|
|
172
|
+
window.
|
|
173
|
+
</td>
|
|
174
|
+
</tr>
|
|
175
|
+
<tr>
|
|
176
|
+
<td><code>fitContent</code></td>
|
|
177
|
+
<td><code>boolean</code></td>
|
|
178
|
+
<td><code>false</code></td>
|
|
179
|
+
<td>
|
|
180
|
+
Sizes the panel to its content instead of filling the available height,
|
|
181
|
+
capped at 80% of the window. Without it a sheet with little content
|
|
182
|
+
stands there as a tall, mostly empty column. Combines with
|
|
183
|
+
<code>viewportHeight</code>.
|
|
184
|
+
<br />
|
|
185
|
+
<br />
|
|
186
|
+
A cap, no floor: a two-field form ends up two fields tall. If a panel
|
|
187
|
+
needs a minimum, write it where that decision belongs — the library
|
|
188
|
+
cannot know whether a small sheet wants room or wants to be small.
|
|
189
|
+
<br />
|
|
190
|
+
<br />
|
|
191
|
+
It changes <strong>height and nothing else</strong>. Where a panel sits
|
|
192
|
+
and how it slides in stays the business of <code>direction</code>, so
|
|
193
|
+
the entrance animation is identical with and without it. An earlier
|
|
194
|
+
version also positioned the panel here, which overwrote the offset a{' '}
|
|
195
|
+
<code>top</code> sheet slides in from — it then stood in place instead
|
|
196
|
+
of entering.
|
|
197
|
+
</td>
|
|
198
|
+
</tr>
|
|
199
|
+
</tbody>
|
|
200
|
+
</table>
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### Outputs
|
|
205
|
+
|
|
206
|
+
<table class="ui">
|
|
207
|
+
<thead>
|
|
208
|
+
<tr>
|
|
209
|
+
<th>@Output</th>
|
|
210
|
+
<th>Type</th>
|
|
211
|
+
<th>Description</th>
|
|
212
|
+
</tr>
|
|
213
|
+
</thead>
|
|
214
|
+
<tbody>
|
|
215
|
+
<tr>
|
|
216
|
+
<td><code>activeOutput</code></td>
|
|
217
|
+
<td><code>boolean</code></td>
|
|
218
|
+
<td>Emits <code>false</code> when the overlay is dismissed (e.g., closed).</td>
|
|
219
|
+
</tr>
|
|
220
|
+
</tbody>
|
|
221
|
+
</table>
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
### Content Slots (ng-content)
|
|
226
|
+
|
|
227
|
+
- `[overlay-header]`: Slot for the header (usually containing the title and close button).
|
|
228
|
+
- `[overlay-content]`: Main content area.
|
|
229
|
+
- `[overlay-footer]`: Optional footer area.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
***usage***
|
|
234
|
+
|
|
235
|
+
```html
|
|
236
|
+
<ui-layout-overlay
|
|
237
|
+
[direction]="'right'"
|
|
238
|
+
[maxWidth]="'ms-2'"
|
|
239
|
+
[active]="isOverlayActive"
|
|
240
|
+
(activeOutput)="isOverlayActive = $event">
|
|
241
|
+
|
|
242
|
+
<ui-layout-overlay-header overlay-header
|
|
243
|
+
[headline]="'Settings'"
|
|
244
|
+
(activeOutput)="isOverlayActive = $event">
|
|
245
|
+
</ui-layout-overlay-header>
|
|
246
|
+
|
|
247
|
+
<div overlay-content>
|
|
248
|
+
<!-- Your content here -->
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
<div overlay-footer>
|
|
252
|
+
<button class="ui-success">Save</button>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
</ui-layout-overlay>
|
|
256
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
### Layout: Spinner
|
|
2
|
+
|
|
3
|
+
A global loading indicator that provides visual feedback during asynchronous operations.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
A global loading indicator, placed once at the application root and switched
|
|
10
|
+
through `UiLayoutSpinnerService` from anywhere — an HTTP interceptor, typically.
|
|
11
|
+
It shows, animates out and hides; it does not count requests, time out or block
|
|
12
|
+
input on its own, and it is not the spinner for one component's own loading
|
|
13
|
+
state.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
> **Guide:** recommendations for `ui-layout-spinner` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-layout-spinner`). The section above is the truth; the guide is the offer.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Overview
|
|
22
|
+
|
|
23
|
+
The `UiLayoutSpinnerComponent` is a singleton component typically placed at the application root (e.g., `app.component.html`). It's controlled via the `UiLayoutSpinnerService`, making it easy to trigger from anywhere in the app, such as an HTTP interceptor.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### [Example: Spinner](?path=/story/layout-spinner--spinner)
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### Arguments (Props)
|
|
32
|
+
|
|
33
|
+
#### Inputs
|
|
34
|
+
|
|
35
|
+
<table class="ui">
|
|
36
|
+
<thead>
|
|
37
|
+
<tr>
|
|
38
|
+
<th>@Input</th>
|
|
39
|
+
<th>Type</th>
|
|
40
|
+
<th>Default</th>
|
|
41
|
+
<th>Description</th>
|
|
42
|
+
</tr>
|
|
43
|
+
</thead>
|
|
44
|
+
<tbody>
|
|
45
|
+
<tr>
|
|
46
|
+
<td><code>debug</code></td>
|
|
47
|
+
<td><code>boolean</code></td>
|
|
48
|
+
<td><code>false</code></td>
|
|
49
|
+
<td>If <code>true</code>, displays a debug navigation to manually test spinner states.</td>
|
|
50
|
+
</tr>
|
|
51
|
+
<tr>
|
|
52
|
+
<td><code>close</code></td>
|
|
53
|
+
<td><code>boolean</code></td>
|
|
54
|
+
<td><code>false</code></td>
|
|
55
|
+
<td>If <code>true</code>, shows a close button to manually dismiss the spinner.</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr>
|
|
58
|
+
<td><code>type</code></td>
|
|
59
|
+
<td><code>'ring' | 'linear' | 'disco'</code></td>
|
|
60
|
+
<td><code>'ring'</code></td>
|
|
61
|
+
<td>Selects the loading animation: <code>ring</code> (rotating gradient ring), <code>linear</code> (indeterminate sliding bar), or <code>disco</code> (spinning rainbow ring with hue rotation and a blinking sparkle in the centre).</td>
|
|
62
|
+
</tr>
|
|
63
|
+
</tbody>
|
|
64
|
+
</table>
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### Service: `UiLayoutSpinnerService`
|
|
69
|
+
|
|
70
|
+
Use this service to control the spinner's state:
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
// Start the spinner
|
|
74
|
+
spinnerService.startSpinner();
|
|
75
|
+
|
|
76
|
+
// Mark operation as successful (animates out and hides). A visible
|
|
77
|
+
// message state is NOT auto-dismissed by this call.
|
|
78
|
+
spinnerService.successSpinner();
|
|
79
|
+
|
|
80
|
+
// Show a message within the spinner (stays until dismissed)
|
|
81
|
+
spinnerService.messageSpinner('Loading your data...');
|
|
82
|
+
|
|
83
|
+
// Dismiss unconditionally — also clears a message state (used by the
|
|
84
|
+
// overlay's OK button when [close] is enabled)
|
|
85
|
+
spinnerService.dismissSpinner();
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
**Usage: Add to Template** Place the component in your main application template.
|
|
91
|
+
```html
|
|
92
|
+
<ui-layout-spinner [close]="true" [debug]="true"></ui-layout-spinner>
|
|
93
|
+
```
|
|
94
|
+
---
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
### Layout: Splitter
|
|
2
|
+
|
|
3
|
+
A versatile layout component that divides the view into a header and two side-by-side panels (left and right).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
Divides a view into a header and two side-by-side panels (`[splitter-header]`,
|
|
10
|
+
`[splitter-left]`, `[splitter-right]`), with buttons to change the direction,
|
|
11
|
+
zoom and go fullscreen; given an `id`, it remembers that layout per instance
|
|
12
|
+
and restores it without animation. It arranges the three slots and nothing
|
|
13
|
+
else — no resizing by drag, no collapsing of a panel, no content of its own.
|
|
14
|
+
Drag and drop between two lists is `ui-cdk-drag-drop-splitter`, a different
|
|
15
|
+
thing with a similar name.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
> **Guide:** recommendations for `ui-layout-splitter` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-layout-splitter`). The section above is the truth; the guide is the offer.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### Overview
|
|
24
|
+
|
|
25
|
+
The `UiLayoutSplitterComponent` is designed for complex interfaces requiring a header and dual-pane content. Theme toggling is delegated to the `UiLayoutService`. When an `id` is provided, the splitter persists its **direction, zoom and fullscreen** per instance via `@ngx-pwa/local-storage` and restores them on init — so several splitters each remember their own last layout independently (zoom/fullscreen are re-applied through the shared layout service).
|
|
26
|
+
|
|
27
|
+
The restored layout is applied **without animation** so it appears instantly on load; the direction transition only plays in response to a user clicking one of the layout buttons.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### [Example: Splitter](?path=/story/layout-splitter--splitter)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### Arguments (Props)
|
|
36
|
+
|
|
37
|
+
#### Inputs
|
|
38
|
+
|
|
39
|
+
<table class="ui">
|
|
40
|
+
<thead>
|
|
41
|
+
<tr>
|
|
42
|
+
<th>@Input</th>
|
|
43
|
+
<th>Type</th>
|
|
44
|
+
<th>Default</th>
|
|
45
|
+
<th>Description</th>
|
|
46
|
+
</tr>
|
|
47
|
+
</thead>
|
|
48
|
+
<tbody>
|
|
49
|
+
<tr>
|
|
50
|
+
<td><code>id</code></td>
|
|
51
|
+
<td><code>string</code></td>
|
|
52
|
+
<td><code>undefined</code></td>
|
|
53
|
+
<td>Unique key used to persist and restore this splitter's direction. Without it the direction is not saved.</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr>
|
|
56
|
+
<td><code>defaultDirection</code></td>
|
|
57
|
+
<td><code>'left' | 'center' | 'right' | 'split'</code></td>
|
|
58
|
+
<td><code>'center'</code></td>
|
|
59
|
+
<td>Initial direction used before any persisted value is restored.</td>
|
|
60
|
+
</tr>
|
|
61
|
+
<tr>
|
|
62
|
+
<td><code>defaultPanelOrder</code></td>
|
|
63
|
+
<td><code>'left-first' | 'right-first'</code></td>
|
|
64
|
+
<td><code>'left-first'</code></td>
|
|
65
|
+
<td>Which panel comes first before the user says otherwise, and before a persisted order is restored.</td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<td><code>layoutAction</code></td>
|
|
69
|
+
<td><code>boolean</code></td>
|
|
70
|
+
<td><code>true</code></td>
|
|
71
|
+
<td>Show/hide layout management buttons (zoom, fullscreen).</td>
|
|
72
|
+
</tr>
|
|
73
|
+
<tr>
|
|
74
|
+
<td><code>themeAction</code></td>
|
|
75
|
+
<td><code>boolean</code></td>
|
|
76
|
+
<td><code>true</code></td>
|
|
77
|
+
<td>Show/hide the theme toggle button.</td>
|
|
78
|
+
</tr>
|
|
79
|
+
</tbody>
|
|
80
|
+
</table>
|
|
81
|
+
|
|
82
|
+
#### Outputs
|
|
83
|
+
|
|
84
|
+
<table class="ui">
|
|
85
|
+
<thead>
|
|
86
|
+
<tr>
|
|
87
|
+
<th>@Output</th>
|
|
88
|
+
<th>Type</th>
|
|
89
|
+
<th>Description</th>
|
|
90
|
+
</tr>
|
|
91
|
+
</thead>
|
|
92
|
+
<tbody>
|
|
93
|
+
<tr>
|
|
94
|
+
<td><code>animating</code></td>
|
|
95
|
+
<td><code>boolean</code></td>
|
|
96
|
+
<td>
|
|
97
|
+
<code>true</code> when a direction change starts animating,
|
|
98
|
+
<code>false</code> once it has settled (a <code>transitionend</code> on
|
|
99
|
+
the panel row, with a timeout as a fallback for changes that animate
|
|
100
|
+
nothing). Use it to lighten heavy panel content for the duration.
|
|
101
|
+
</td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td><code>directionChange</code></td>
|
|
105
|
+
<td><code>UiLayoutSplitterDirectionsType</code></td>
|
|
106
|
+
<td>
|
|
107
|
+
The active split direction: emitted once after initialisation (the
|
|
108
|
+
default or the restored persisted state) and again on every direction
|
|
109
|
+
change. Lets a consumer adapt its layout to the state — e.g. relocate
|
|
110
|
+
a panel while the splitter is stacked (<code>split</code>) — without
|
|
111
|
+
reaching into the component.
|
|
112
|
+
</td>
|
|
113
|
+
</tr>
|
|
114
|
+
</tbody>
|
|
115
|
+
</table>
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### Swapping the panels
|
|
120
|
+
|
|
121
|
+
The **Swap panels** button turns the two panels around. Side by side they trade
|
|
122
|
+
sides; stacked — below `ms5`, or in `split` at any width — they trade top and
|
|
123
|
+
bottom. It is one action with one meaning, and the button lights up while the
|
|
124
|
+
right panel is the one in front.
|
|
125
|
+
|
|
126
|
+
**The panels are moved, not painted elsewhere.** The two `<section>` elements
|
|
127
|
+
change places in the document, so the reading order, the screen-reader order
|
|
128
|
+
and the tab order are the same order in both layouts. Shifting them with CSS
|
|
129
|
+
`order` would have been a line of stylesheet and a lie: it moves pixels and
|
|
130
|
+
leaves the focus where it was.
|
|
131
|
+
|
|
132
|
+
Moving has a price, and it is worth knowing before a heavy panel goes in. In
|
|
133
|
+
the DOM a move is a removal followed by an insertion, so anything the browser
|
|
134
|
+
attached to those nodes starts over: an `<iframe>` reloads, a playing `<video>`
|
|
135
|
+
resets, a scrolled panel is back at the top. Angular rebuilds nothing —
|
|
136
|
+
component state and typed-in values survive. The focus is put back where it
|
|
137
|
+
was. The price is paid on a deliberate press, not on every resize.
|
|
138
|
+
|
|
139
|
+
Like the direction, the order is remembered per `id` and ignored while the
|
|
140
|
+
controls are locked; `swapPanels()` stays callable either way. Where a page
|
|
141
|
+
knows its own better starting point, `defaultPanelOrder` sets it — a mask whose
|
|
142
|
+
form matters more than its list can open with the form in front, on the phone
|
|
143
|
+
as well as on the desk.
|
|
144
|
+
|
|
145
|
+
### Published panel widths (CSS variables)
|
|
146
|
+
|
|
147
|
+
The grid sizes both panels in `fr` units, so their pixel widths exist only at
|
|
148
|
+
runtime. Since a variable set on the host would reach descendants only, the
|
|
149
|
+
component publishes the measured widths on `<body>` — that way content
|
|
150
|
+
**outside** the splitter (an overlay that lines up with a panel, a ruler, an
|
|
151
|
+
inspector) can use them too. A `ResizeObserver` keeps them in sync with
|
|
152
|
+
direction changes, zoom, fullscreen and window resizing.
|
|
153
|
+
|
|
154
|
+
<table class="ui">
|
|
155
|
+
<thead>
|
|
156
|
+
<tr>
|
|
157
|
+
<th>Variable</th>
|
|
158
|
+
<th>Value</th>
|
|
159
|
+
<th>When</th>
|
|
160
|
+
</tr>
|
|
161
|
+
</thead>
|
|
162
|
+
<tbody>
|
|
163
|
+
<tr>
|
|
164
|
+
<td><code>--ui-splitter-left-width</code></td>
|
|
165
|
+
<td>Width of the left panel in px</td>
|
|
166
|
+
<td>Always</td>
|
|
167
|
+
</tr>
|
|
168
|
+
<tr>
|
|
169
|
+
<td><code>--ui-splitter-right-width</code></td>
|
|
170
|
+
<td>Width of the right panel in px</td>
|
|
171
|
+
<td>Always</td>
|
|
172
|
+
</tr>
|
|
173
|
+
<tr>
|
|
174
|
+
<td><code>--ui-splitter-<id>-left-width</code></td>
|
|
175
|
+
<td>Same value, scoped to this instance</td>
|
|
176
|
+
<td>Only with an <code>id</code></td>
|
|
177
|
+
</tr>
|
|
178
|
+
<tr>
|
|
179
|
+
<td><code>--ui-splitter-<id>-right-width</code></td>
|
|
180
|
+
<td>Same value, scoped to this instance</td>
|
|
181
|
+
<td>Only with an <code>id</code></td>
|
|
182
|
+
</tr>
|
|
183
|
+
</tbody>
|
|
184
|
+
</table>
|
|
185
|
+
|
|
186
|
+
The unscoped names always carry the **last measured** splitter. With more than
|
|
187
|
+
one instance on a page, give each an `id` and read the scoped names.
|
|
188
|
+
|
|
189
|
+
While a direction change is animating, measuring pauses and a single reading is
|
|
190
|
+
taken at the end (a `transitionend` on the panel row, with a timeout as a
|
|
191
|
+
fallback). Publishing a new value on every frame would invalidate the styles of
|
|
192
|
+
the whole page each time and make the change stutter — and nobody needs the
|
|
193
|
+
intermediate widths.
|
|
194
|
+
|
|
195
|
+
The same state is announced through the `animating` output: `true` when the
|
|
196
|
+
change starts, `false` when it has settled. What else should happen meanwhile is
|
|
197
|
+
the consumer's decision — a panel holding a long table may want to drop its
|
|
198
|
+
content for the duration (laying it out on every frame is the expensive part of
|
|
199
|
+
the change), a light panel can ignore the event entirely. The component itself
|
|
200
|
+
only pauses its own measuring; it never touches projected content.
|
|
201
|
+
|
|
202
|
+
They are written to `<body>` rather than `:root` on purpose: the config wrapper
|
|
203
|
+
regenerates the entire `:root` style attribute and would wipe them.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
### Control buttons & tooltips
|
|
208
|
+
|
|
209
|
+
The button bar exposes the layout controls. Each button carries a `title`
|
|
210
|
+
tooltip resolved through Transloco (namespace `splitter.*`), so the labels are
|
|
211
|
+
translatable and stay in sync across languages.
|
|
212
|
+
|
|
213
|
+
<table class="ui">
|
|
214
|
+
<thead>
|
|
215
|
+
<tr>
|
|
216
|
+
<th>Icon</th>
|
|
217
|
+
<th>Action</th>
|
|
218
|
+
<th>Transloco key</th>
|
|
219
|
+
<th>Tooltip (EN)</th>
|
|
220
|
+
</tr>
|
|
221
|
+
</thead>
|
|
222
|
+
<tbody>
|
|
223
|
+
<tr>
|
|
224
|
+
<td><code>border_left</code></td>
|
|
225
|
+
<td>Direction <code>left</code> (left panel wide)</td>
|
|
226
|
+
<td><code>splitter.direction.left</code></td>
|
|
227
|
+
<td>Enlarge left panel</td>
|
|
228
|
+
</tr>
|
|
229
|
+
<tr>
|
|
230
|
+
<td><code>border_vertical</code></td>
|
|
231
|
+
<td>Direction <code>center</code> (equal panels)</td>
|
|
232
|
+
<td><code>splitter.direction.center</code></td>
|
|
233
|
+
<td>Split evenly</td>
|
|
234
|
+
</tr>
|
|
235
|
+
<tr>
|
|
236
|
+
<td><code>border_right</code></td>
|
|
237
|
+
<td>Direction <code>right</code> (right panel wide)</td>
|
|
238
|
+
<td><code>splitter.direction.right</code></td>
|
|
239
|
+
<td>Enlarge right panel</td>
|
|
240
|
+
</tr>
|
|
241
|
+
<tr>
|
|
242
|
+
<td><code>border_horizontal</code></td>
|
|
243
|
+
<td>Direction <code>split</code> (panels stacked)</td>
|
|
244
|
+
<td><code>splitter.direction.split</code></td>
|
|
245
|
+
<td>Stack panels</td>
|
|
246
|
+
</tr>
|
|
247
|
+
<tr>
|
|
248
|
+
<td><code>swap_horiz</code></td>
|
|
249
|
+
<td>Swap the two panels (lit while the right one is in front)</td>
|
|
250
|
+
<td><code>splitter.swap</code></td>
|
|
251
|
+
<td>Swap panels</td>
|
|
252
|
+
</tr>
|
|
253
|
+
<tr>
|
|
254
|
+
<td><code>zoom_out_map</code></td>
|
|
255
|
+
<td>Toggle fullscreen (<code>layoutAction</code>)</td>
|
|
256
|
+
<td><code>splitter.fullscreen</code></td>
|
|
257
|
+
<td>Toggle fullscreen</td>
|
|
258
|
+
</tr>
|
|
259
|
+
<tr>
|
|
260
|
+
<td><code>center_focus_strong</code></td>
|
|
261
|
+
<td>Toggle zoom (<code>layoutAction</code>)</td>
|
|
262
|
+
<td><code>splitter.zoom</code></td>
|
|
263
|
+
<td>Toggle zoom</td>
|
|
264
|
+
</tr>
|
|
265
|
+
<tr>
|
|
266
|
+
<td><code>invert_colors</code></td>
|
|
267
|
+
<td>Toggle theme (<code>themeAction</code>)</td>
|
|
268
|
+
<td><code>splitter.theme</code></td>
|
|
269
|
+
<td>Switch theme</td>
|
|
270
|
+
</tr>
|
|
271
|
+
</tbody>
|
|
272
|
+
</table>
|
|
273
|
+
|
|
274
|
+
The library ships these keys in its own i18n assets
|
|
275
|
+
(`static/assets/ui/i18n/ui/*.json`) — a consuming app only has to load the ui
|
|
276
|
+
translation files into its Transloco setup. Where they are not loaded, the raw
|
|
277
|
+
key is shown as the tooltip.
|
|
278
|
+
|
|
279
|
+
#### Active state
|
|
280
|
+
|
|
281
|
+
The buttons reflect the current layout state: the button of the **active
|
|
282
|
+
direction** is always highlighted, and the **fullscreen** and **zoom** buttons
|
|
283
|
+
are highlighted while their mode is switched on. Highlighted buttons carry the
|
|
284
|
+
class `active` and are colored with the theme-aware token `var(--ui-c-focus)`.
|
|
285
|
+
The theme button has no active state — light and dark are equal peers, neither
|
|
286
|
+
counts as "on". The highlighting is driven by signals (the zoom/fullscreen
|
|
287
|
+
state of the layout service is mirrored into the component), so it also stays
|
|
288
|
+
in sync when the public methods `setDirection()`, `fullscreen()` or `zoom()`
|
|
289
|
+
are called programmatically.
|
|
290
|
+
|
|
291
|
+
#### Locking the controls
|
|
292
|
+
|
|
293
|
+
The public signal `locked` (default `false`) mutes the button bar: while
|
|
294
|
+
`locked()` is `true`, clicks on the control buttons do nothing. Only the
|
|
295
|
+
**buttons** are locked — the public methods (`setDirection()`, `fullscreen()`,
|
|
296
|
+
`zoom()`, `theme()`) stay callable, so a programmatic driver (e.g. an intro
|
|
297
|
+
choreography) can steer the splitter while the visitor cannot. The buttons
|
|
298
|
+
keep their normal look and their active highlighting; deliberately no
|
|
299
|
+
`disabled` attribute is used, because a disabled button swallows all pointer
|
|
300
|
+
events and would hide the interaction from listeners further up the page.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
### Content Slots (ng-content)
|
|
305
|
+
|
|
306
|
+
The component uses named slots for organization:
|
|
307
|
+
|
|
308
|
+
- `[splitter-header]`: Content for the header area of the splitter.
|
|
309
|
+
- `[splitter-left]`: Content for the left panel.
|
|
310
|
+
- `[splitter-right]`: Content for the right panel.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
### Example Integration
|
|
315
|
+
|
|
316
|
+
```html
|
|
317
|
+
<ui-layout-main>
|
|
318
|
+
<div main-header>Application Header</div>
|
|
319
|
+
|
|
320
|
+
<ui-layout-splitter main-content [layoutAction]="false">
|
|
321
|
+
<div splitter-header>
|
|
322
|
+
<button class="ui-icon">star</button>
|
|
323
|
+
<span>Header - Component Actions</span>
|
|
324
|
+
</div>
|
|
325
|
+
<div splitter-left>Left Side Content</div>
|
|
326
|
+
<div splitter-right>Right Side Content</div>
|
|
327
|
+
</ui-layout-splitter>
|
|
328
|
+
|
|
329
|
+
<div main-footer>Application Footer</div>
|
|
330
|
+
</ui-layout-main>
|
|
331
|
+
```
|