@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,216 @@
|
|
|
1
|
+
### Molecules: Image Slider
|
|
2
|
+
|
|
3
|
+
The `UiImageSliderComponent` is a highly configurable and interactive image slider. It supports various navigation methods (touch, mouse, buttons), dynamic zooming, and responsive height adjustments.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
Shows one picture of a set at a time and moves between them — touch swipe with
|
|
10
|
+
native momentum and snap, mouse drag, buttons, and a zoom mode that closes on a
|
|
11
|
+
drag down. It reads and writes an index (`setIndex` in, `currentIndex` out) so
|
|
12
|
+
another component can share the selection. It does not load, sort or describe
|
|
13
|
+
the pictures, and it is not the overview of a set — that is `ui-image-grid`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
> **Guide:** recommendations for `ui-image-slider` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-image-slider`). The section above is the truth; the guide is the offer.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### [Image Slider](?path=/story/atoms-image-slider--image-slider)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
#### Features
|
|
26
|
+
|
|
27
|
+
- **Photos-App Gestures**: Native touch swipe with finger-follow, momentum and snapping; mouse drag with rubber-banding; swipe-down-to-close in zoom mode.
|
|
28
|
+
- **Dynamic Zoom**: Built-in zoom functionality with host-level class application for styling.
|
|
29
|
+
- **Lazy Loading & Preloading**: Efficient image handling with preloading support.
|
|
30
|
+
- **Responsive Sizing**: Configurable height via CSS variables, adapting to its container.
|
|
31
|
+
- **Full-Screen Capability**: Easily integrates with overlays for a full-screen viewing experience.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
#### Gestures
|
|
36
|
+
|
|
37
|
+
The slider uses the platform scroller (CSS scroll-snap) for touch, so
|
|
38
|
+
finger-follow, momentum and snapping feel native; a pointer layer adds the
|
|
39
|
+
desktop and dismiss gestures on top.
|
|
40
|
+
|
|
41
|
+
**To try them**, open the story and switch the browser dev tools to touch
|
|
42
|
+
emulation, then swipe horizontally (finger-follow with snap). On desktop, drag
|
|
43
|
+
with the mouse — it rubber-bands at the ends, and a flick advances one slide.
|
|
44
|
+
In zoom mode, drag downwards to close.
|
|
45
|
+
|
|
46
|
+
<table class="ui">
|
|
47
|
+
<tr>
|
|
48
|
+
<th>Gesture</th>
|
|
49
|
+
<th>Input</th>
|
|
50
|
+
<th>Action</th>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<td>Horizontal swipe</td>
|
|
54
|
+
<td>Touch</td>
|
|
55
|
+
<td>
|
|
56
|
+
Image follows the finger; native momentum and snap; exactly one slide per
|
|
57
|
+
gesture (<code>scroll-snap-stop: always</code>); rubber-banding at the
|
|
58
|
+
ends on iOS.
|
|
59
|
+
</td>
|
|
60
|
+
</tr>
|
|
61
|
+
<tr>
|
|
62
|
+
<td>Horizontal drag</td>
|
|
63
|
+
<td>Mouse (primary button)</td>
|
|
64
|
+
<td>
|
|
65
|
+
Image follows the pointer, snapping suspended; past the ends the grid
|
|
66
|
+
rubber-bands with resistance; a flick (> 0.5 px/ms) advances one
|
|
67
|
+
slide, a slow release settles on the nearest slide; the trailing ghost
|
|
68
|
+
click is swallowed.
|
|
69
|
+
</td>
|
|
70
|
+
</tr>
|
|
71
|
+
<tr>
|
|
72
|
+
<td>Swipe down</td>
|
|
73
|
+
<td>Touch or mouse, zoom mode only</td>
|
|
74
|
+
<td>
|
|
75
|
+
The view follows the pointer, shrinking and fading; beyond 120 px (or
|
|
76
|
+
a quick downward flick) it slides out and closes, otherwise it springs
|
|
77
|
+
back.
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
<tr>
|
|
81
|
+
<td>Keys</td>
|
|
82
|
+
<td>Keyboard, zoom mode only</td>
|
|
83
|
+
<td>
|
|
84
|
+
<code>ArrowLeft</code>/<code>ArrowRight</code> navigate, <code>Home</code>
|
|
85
|
+
/<code>End</code> jump to the first/last slide, <code>Escape</code> closes
|
|
86
|
+
the zoom.
|
|
87
|
+
</td>
|
|
88
|
+
</tr>
|
|
89
|
+
<tr>
|
|
90
|
+
<td>Buttons</td>
|
|
91
|
+
<td>Any</td>
|
|
92
|
+
<td>
|
|
93
|
+
First/previous/next/last controls below the slider (hidden in single-item
|
|
94
|
+
mode).
|
|
95
|
+
</td>
|
|
96
|
+
</tr>
|
|
97
|
+
</table>
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
#### Inputs
|
|
102
|
+
|
|
103
|
+
Everything except `data` is a **two-way `model()`** — bindable with
|
|
104
|
+
`[(...)]`, readable and writable from outside. `data` is a plain one-way
|
|
105
|
+
input.
|
|
106
|
+
|
|
107
|
+
<table class="ui">
|
|
108
|
+
<tr>
|
|
109
|
+
<th>Name</th>
|
|
110
|
+
<th>Type</th>
|
|
111
|
+
<th>Default</th>
|
|
112
|
+
<th>Description</th>
|
|
113
|
+
</tr>
|
|
114
|
+
<tr>
|
|
115
|
+
<td>data</td>
|
|
116
|
+
<td>
|
|
117
|
+
<code>UiImageDisplayItemDataType[] | null</code>
|
|
118
|
+
</td>
|
|
119
|
+
<td>null</td>
|
|
120
|
+
<td>Array of image objects to be displayed in the slider.</td>
|
|
121
|
+
</tr>
|
|
122
|
+
<tr>
|
|
123
|
+
<td>display</td>
|
|
124
|
+
<td>boolean</td>
|
|
125
|
+
<td>true</td>
|
|
126
|
+
<td>Controls the visibility of navigation elements.</td>
|
|
127
|
+
</tr>
|
|
128
|
+
<tr>
|
|
129
|
+
<td>height</td>
|
|
130
|
+
<td>
|
|
131
|
+
<code>string | null</code>
|
|
132
|
+
</td>
|
|
133
|
+
<td>'30rem'</td>
|
|
134
|
+
<td>Defines the height of the slider images.</td>
|
|
135
|
+
</tr>
|
|
136
|
+
<tr>
|
|
137
|
+
<td>setIndex</td>
|
|
138
|
+
<td>
|
|
139
|
+
<code>number | null</code>
|
|
140
|
+
</td>
|
|
141
|
+
<td>null</td>
|
|
142
|
+
<td>Programmatically sets the active image index.</td>
|
|
143
|
+
</tr>
|
|
144
|
+
<tr>
|
|
145
|
+
<td>onlyOneItem</td>
|
|
146
|
+
<td>
|
|
147
|
+
<code>number | null</code>
|
|
148
|
+
</td>
|
|
149
|
+
<td>null</td>
|
|
150
|
+
<td>If set, restricts the view to a single item and hides navigation.</td>
|
|
151
|
+
</tr>
|
|
152
|
+
<tr>
|
|
153
|
+
<td>zoom</td>
|
|
154
|
+
<td>boolean</td>
|
|
155
|
+
<td>false</td>
|
|
156
|
+
<td>Enables or disables the zoom mode.</td>
|
|
157
|
+
</tr>
|
|
158
|
+
<tr>
|
|
159
|
+
<td>dataModel</td>
|
|
160
|
+
<td>
|
|
161
|
+
<code>UiImageDisplayItemDataType[]</code>
|
|
162
|
+
</td>
|
|
163
|
+
<td>[]</td>
|
|
164
|
+
<td>
|
|
165
|
+
The working copy the slider actually shows, derived from{' '}
|
|
166
|
+
<code>data</code> and possibly narrowed by <code>onlyOneItem</code> —
|
|
167
|
+
usually it is left alone, since setting it directly bypasses the
|
|
168
|
+
filtering that fills it.
|
|
169
|
+
</td>
|
|
170
|
+
</tr>
|
|
171
|
+
</table>
|
|
172
|
+
|
|
173
|
+
##### Outputs
|
|
174
|
+
|
|
175
|
+
<table class="ui">
|
|
176
|
+
<tr>
|
|
177
|
+
<th>@Output</th>
|
|
178
|
+
<th>Type</th>
|
|
179
|
+
<th>Description</th>
|
|
180
|
+
</tr>
|
|
181
|
+
<tr>
|
|
182
|
+
<td>currentIndex</td>
|
|
183
|
+
<td>
|
|
184
|
+
<code>output<number></code>
|
|
185
|
+
</td>
|
|
186
|
+
<td>Emitted when the slider moves to a new image.</td>
|
|
187
|
+
</tr>
|
|
188
|
+
<tr>
|
|
189
|
+
<td>currentZoom</td>
|
|
190
|
+
<td>
|
|
191
|
+
<code>output<boolean></code>
|
|
192
|
+
</td>
|
|
193
|
+
<td>Emitted when the zoom state changes.</td>
|
|
194
|
+
</tr>
|
|
195
|
+
</table>
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
**usage**
|
|
200
|
+
|
|
201
|
+
```html
|
|
202
|
+
<ui-image-slider
|
|
203
|
+
[data]="images"
|
|
204
|
+
[height]="'400px'"
|
|
205
|
+
(currentIndex)="onImageChange($event)"
|
|
206
|
+
>
|
|
207
|
+
</ui-image-slider>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### Sizing
|
|
213
|
+
|
|
214
|
+
The host fills its container (`100%` / `100%`) by default. Give it a fixed size
|
|
215
|
+
without a cascade fight through the named hooks `--ui-image-slider-width` and
|
|
216
|
+
`--ui-image-slider-height`.
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
### Lang Selector
|
|
2
|
+
|
|
3
|
+
One button that switches the interface language between English and German.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
Switching a language is three jobs, and only the first one is interesting to
|
|
10
|
+
look at. The second is applying the choice to the translation service, the
|
|
11
|
+
third is remembering it so a reload does not throw the reader back into a
|
|
12
|
+
language they just left. The component does all three, and a host that only
|
|
13
|
+
wants a language switch writes one tag and nothing else — no service call, no
|
|
14
|
+
storage key, no restore on startup.
|
|
15
|
+
|
|
16
|
+
#### Story: Default
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
export const Default: Story = {
|
|
20
|
+
render: () => ({
|
|
21
|
+
template: `
|
|
22
|
+
<section class="flex items-center gap-4">
|
|
23
|
+
<ui-lang-selector></ui-lang-selector>
|
|
24
|
+
<ui-placeholder class="h-16 w-48"></ui-placeholder>
|
|
25
|
+
</section>
|
|
26
|
+
`,
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The same component twice: on the left as it comes, on the right with content
|
|
32
|
+
* projected into it. The left one brings its own label and icon, the right one
|
|
33
|
+
* shows only what was put inside — projected content REPLACES the built-in
|
|
34
|
+
* pair, it does not join it. Both still switch the language; only the face
|
|
35
|
+
* differs.
|
|
36
|
+
*
|
|
37
|
+
* That is why there is no input for the two cases. Note also WHAT is
|
|
38
|
+
* projected: content, not a control. The component already renders the button,
|
|
39
|
+
* and a button inside a button is two tab stops for one action.
|
|
40
|
+
*/
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The placeholder next to it is translated like everything else in the library,
|
|
44
|
+
so it moves along on every click. That is what the button actually does — it
|
|
45
|
+
does not switch itself, it switches the page. Reload the story afterwards and
|
|
46
|
+
the language is still the one you picked, without a line of code on the host
|
|
47
|
+
side.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
> **Guide:** recommendations for `ui-lang-selector` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-lang-selector`). The section above is the truth; the guide is the offer.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### Your own content
|
|
56
|
+
|
|
57
|
+
What the button looks like is deliberately **not** its decision. Whatever you
|
|
58
|
+
project replaces the built-in label; project nothing and you get the built-in
|
|
59
|
+
one. There is no input for the two cases, because there is nothing to choose:
|
|
60
|
+
content is either there or it is not.
|
|
61
|
+
|
|
62
|
+
#### Story: OwnContent
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
export const OwnContent: Story = {
|
|
66
|
+
render: () => ({
|
|
67
|
+
template: `
|
|
68
|
+
<section class="flex items-center gap-12">
|
|
69
|
+
<ui-lang-selector></ui-lang-selector>
|
|
70
|
+
<ui-lang-selector>Your own text</ui-lang-selector>
|
|
71
|
+
</section>
|
|
72
|
+
`,
|
|
73
|
+
}),
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Two of them, and only one gets clicked: the other follows immediately. Each
|
|
78
|
+
* selector READS the active language instead of keeping a copy of it, so
|
|
79
|
+
* neither can fall behind the other — or behind a host that switches the
|
|
80
|
+
* language on its own.
|
|
81
|
+
*
|
|
82
|
+
* With a remembered language this is where it would show: the second one would
|
|
83
|
+
* still say what it said before, and its next click would set the language it
|
|
84
|
+
* is already on.
|
|
85
|
+
*/
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The same component twice. Left as it comes, right with content of its own —
|
|
89
|
+
and the EN/DE label is gone there, because what you project takes the place of
|
|
90
|
+
the built-in label **and** its icon. It is a replacement, not an addition.
|
|
91
|
+
Click either one: both switch the language, they only wear a different face.
|
|
92
|
+
|
|
93
|
+
Project content, not a control. The component already renders the `<button>`,
|
|
94
|
+
so a projected `<button>` sits inside another one: invalid HTML, and two tab
|
|
95
|
+
stops for a single action. Text, an icon, a `<span>` — those are what belongs
|
|
96
|
+
in there.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### More than one on a page
|
|
101
|
+
|
|
102
|
+
#### Story: TwoOfThem
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
export const TwoOfThem: Story = {
|
|
106
|
+
render: () => ({
|
|
107
|
+
template: `
|
|
108
|
+
<section class="flex items-center gap-8">
|
|
109
|
+
<ui-lang-selector></ui-lang-selector>
|
|
110
|
+
<ui-lang-selector></ui-lang-selector>
|
|
111
|
+
</section>
|
|
112
|
+
`,
|
|
113
|
+
}),
|
|
114
|
+
};
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Click one of them; the other follows in the same moment. Neither keeps a copy
|
|
118
|
+
of the active language — both read it from the translation service — so they
|
|
119
|
+
cannot drift apart, and neither can fall behind a host that switches the
|
|
120
|
+
language on its own.
|
|
121
|
+
|
|
122
|
+
The failure this rules out is quiet: a remembered language stays right until
|
|
123
|
+
something else changes it, and from then on the next click computes from a
|
|
124
|
+
language that is no longer active. The button then appears to do nothing at
|
|
125
|
+
all, once.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### Telling the host about it
|
|
130
|
+
|
|
131
|
+
The component does not need a host to work — it applies, persists and restores
|
|
132
|
+
the language by itself. The `langChange` output exists for the case where the
|
|
133
|
+
host keeps language state of its own anyway: a store that also drives content
|
|
134
|
+
fetching, for example, which has to reload in the new language. Write it as
|
|
135
|
+
`(langChange)="onLangChange($event)"`; the value is the new language code.
|
|
136
|
+
|
|
137
|
+
It fires twice over and stays quiet twice over, and that difference is the
|
|
138
|
+
whole contract:
|
|
139
|
+
|
|
140
|
+
- **On every toggle by the reader.** That is a decision, and the host hears it.
|
|
141
|
+
- **Once during init, when `local` picked up a system language.** The host
|
|
142
|
+
never asked for that one, so it has to be told.
|
|
143
|
+
- **Not while restoring a persisted language.** The host asked for it in an
|
|
144
|
+
earlier session and already knows; emitting here would turn every reload into
|
|
145
|
+
a user decision and re-trigger whatever hangs off the output.
|
|
146
|
+
- **Not when a detected language matches the active one.** Nothing changed, so
|
|
147
|
+
nothing is announced — a store reset or a data reload for a non-event is the
|
|
148
|
+
expensive kind of harmless.
|
|
149
|
+
|
|
150
|
+
There is no story for this, and a story would not help: an output has no
|
|
151
|
+
appearance. What it produces is a value inside the host, not something to look
|
|
152
|
+
at. The four cases above are pinned by the component's unit tests instead.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
### Where the first language comes from
|
|
157
|
+
|
|
158
|
+
On startup the selector resolves the language in this order:
|
|
159
|
+
|
|
160
|
+
1. **The persisted choice** — always wins, whatever else is set.
|
|
161
|
+
2. **The system language**, but only with `[local]="true"` and only when
|
|
162
|
+
nothing is persisted: `navigator.language` starting with `de` becomes
|
|
163
|
+
`de-DE`, everything else `en-EN`. It is applied and announced via
|
|
164
|
+
`langChange`, and deliberately **not** persisted — so the selector keeps
|
|
165
|
+
following the system until the reader actually toggles it. Only a toggle
|
|
166
|
+
writes to the store.
|
|
167
|
+
3. **Nothing** — without `local` the translation service's own default
|
|
168
|
+
language stands, and the selector leaves the startup alone entirely.
|
|
169
|
+
|
|
170
|
+
There is no story for this, and there cannot be a useful one: the case only
|
|
171
|
+
occurs while nothing is stored, and one click on any story above stores
|
|
172
|
+
something for good. It is covered by the component's unit tests instead.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### Notes
|
|
177
|
+
|
|
178
|
+
- **It needs the translation service and the local store.** The component
|
|
179
|
+
injects `TranslocoService` and `StorageMap` (`@ngx-pwa/local-storage`) and
|
|
180
|
+
expects the library's translation files to be loaded alongside the
|
|
181
|
+
application's own. Without those providers it does not fall back to a plain
|
|
182
|
+
button — it throws while being constructed.
|
|
183
|
+
- **`local` is read once, during init.** Changing it afterwards has no effect;
|
|
184
|
+
it answers the question "what language do we start in", and that question is
|
|
185
|
+
asked exactly once.
|
|
186
|
+
- **The choice is persisted under <code>{LANG_STORAGE_KEY}</code>** in the
|
|
187
|
+
local store. This page reads the key from the exported constant rather than
|
|
188
|
+
restating it, so the two cannot drift apart.
|
|
189
|
+
- **The button is `type="button"`.** Placed inside a form it would otherwise
|
|
190
|
+
submit it, because a `<button>` without a type is a submit button.
|
|
191
|
+
- **Styling hook: `.ui-lang-selector`** on the button. It carries no
|
|
192
|
+
appearance of its own beyond the layout — no surface and no focus ring — so
|
|
193
|
+
a header gives it the same treatment as the controls next to it.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### Properties
|
|
198
|
+
|
|
199
|
+
<table>
|
|
200
|
+
<thead>
|
|
201
|
+
<tr>
|
|
202
|
+
<th>Name</th>
|
|
203
|
+
<th>Type</th>
|
|
204
|
+
<th>Default</th>
|
|
205
|
+
<th>Description</th>
|
|
206
|
+
</tr>
|
|
207
|
+
</thead>
|
|
208
|
+
<tbody>
|
|
209
|
+
<tr>
|
|
210
|
+
<td><code>local</code></td>
|
|
211
|
+
<td><code>boolean</code></td>
|
|
212
|
+
<td><code>false</code></td>
|
|
213
|
+
<td>
|
|
214
|
+
Start in the detected system language when nothing is persisted yet.
|
|
215
|
+
Read once during init.
|
|
216
|
+
</td>
|
|
217
|
+
</tr>
|
|
218
|
+
<tr>
|
|
219
|
+
<td><code>langChange</code></td>
|
|
220
|
+
<td><code>output<'en-EN' | 'de-DE'></code></td>
|
|
221
|
+
<td>—</td>
|
|
222
|
+
<td>
|
|
223
|
+
The newly selected language. For hosts that keep language state of
|
|
224
|
+
their own — see <em>Telling the host about it</em> above for when it
|
|
225
|
+
fires and when it deliberately does not.
|
|
226
|
+
</td>
|
|
227
|
+
</tr>
|
|
228
|
+
<tr>
|
|
229
|
+
<td>projected content</td>
|
|
230
|
+
<td>—</td>
|
|
231
|
+
<td>label + <code>language</code> icon</td>
|
|
232
|
+
<td>
|
|
233
|
+
Replaces the built-in label and icon. Content, never a control.
|
|
234
|
+
</td>
|
|
235
|
+
</tr>
|
|
236
|
+
</tbody>
|
|
237
|
+
</table>
|