@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,111 @@
|
|
|
1
|
+
### Timer
|
|
2
|
+
|
|
3
|
+
A countdown that counts from a start value to zero at a configurable speed
|
|
4
|
+
and reports when it gets there.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
### What it does, and what it does not
|
|
9
|
+
|
|
10
|
+
Counts down from `count` to zero at the pace `speed` sets and fires `finished`
|
|
11
|
+
once when it gets there. It brings no words of its own — what stands at zero is
|
|
12
|
+
whatever is projected into the tag — and no control surface: there is no start,
|
|
13
|
+
pause or reset button; a new `count` starts it, `null` stops it. A clock it is
|
|
14
|
+
not; that is `ui-clock`.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
> **Guide:** recommendations for `ui-timer` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-timer`). The section above is the truth; the guide is the offer.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### Overview
|
|
23
|
+
|
|
24
|
+
The `UiTimerComponent` takes a start value (`count`) and an interval
|
|
25
|
+
(`speed`) in milliseconds, shows the current value, and fires `finished`
|
|
26
|
+
once at zero. It brings no words of its own: what stands at zero is whatever
|
|
27
|
+
you project into the tag — your words, in your language — and nothing
|
|
28
|
+
projected means nothing but the 0.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
### Properties
|
|
33
|
+
|
|
34
|
+
<table class="ui">
|
|
35
|
+
<thead>
|
|
36
|
+
<tr>
|
|
37
|
+
<th>Property</th>
|
|
38
|
+
<th>Type</th>
|
|
39
|
+
<th>Description</th>
|
|
40
|
+
</tr>
|
|
41
|
+
</thead>
|
|
42
|
+
<tbody>
|
|
43
|
+
<tr>
|
|
44
|
+
<td><code>count</code></td>
|
|
45
|
+
<td><code>Input<number | null></code></td>
|
|
46
|
+
<td>The start value for the countdown; <code>null</code> stops and resets it to 0.</td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td><code>speed</code></td>
|
|
50
|
+
<td><code>Input<number></code></td>
|
|
51
|
+
<td>The interval in milliseconds (default: 1000).</td>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td><code>finished</code></td>
|
|
55
|
+
<td><code>Output<void></code></td>
|
|
56
|
+
<td>Fires once when the countdown reaches 0.</td>
|
|
57
|
+
</tr>
|
|
58
|
+
</tbody>
|
|
59
|
+
</table>
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### Restarting
|
|
64
|
+
|
|
65
|
+
Any input change restarts the countdown from `count`. A `count` that does
|
|
66
|
+
not change does not restart it — a signal does not fire for the same value —
|
|
67
|
+
so to run the same number again, set `null` and then the number.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### Accessibility
|
|
72
|
+
|
|
73
|
+
The tag carries `role="timer"`: a live region that is quiet by default, so a
|
|
74
|
+
screen reader is not told every second. Announce the end yourself where it
|
|
75
|
+
matters — the `finished` output is the moment.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### Basic Example
|
|
80
|
+
|
|
81
|
+
#### Story: Timer
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
export const Timer: Story = {};
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### Fast Example
|
|
90
|
+
|
|
91
|
+
#### Story: Fast
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
export const Fast: Story = {
|
|
95
|
+
argTypes: {
|
|
96
|
+
count: { table: { disable: true } },
|
|
97
|
+
},
|
|
98
|
+
args: {
|
|
99
|
+
count: 100,
|
|
100
|
+
speed: 100,
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
**Usage**
|
|
108
|
+
|
|
109
|
+
```html
|
|
110
|
+
<ui-timer [count]="60" [speed]="1000" (finished)="onTimeUp()">Time's up!</ui-timer>
|
|
111
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
### Typewriter
|
|
2
|
+
|
|
3
|
+
A reusable Angular component that creates a typewriter effect, displaying text character by character.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
Reveals a text one character at a time, with an optional keystroke sound. Text
|
|
10
|
+
and speed restart the run when they change; the sound, its source and the volume
|
|
11
|
+
do not. It types what it is handed and stops at the end — there is no loop and
|
|
12
|
+
no queue of sentences; a second text is a new run.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
> **Guide:** recommendations for `ui-typewriter` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-typewriter`). The section above is the truth; the guide is the offer.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
### Overview
|
|
21
|
+
|
|
22
|
+
The `UiTypewriterComponent` reveals a text one character at a time, with an
|
|
23
|
+
optional keystroke sound. The text and the speed restart the run when they
|
|
24
|
+
change; the sound, its source and the volume do not — switching the sound on
|
|
25
|
+
mid-sentence leaves the sentence where it is. That matters to real callers: a
|
|
26
|
+
page that starts silent and clacks only after the first Play must not jump
|
|
27
|
+
back to its first letter the moment it is allowed to.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### Properties
|
|
32
|
+
|
|
33
|
+
The following properties can be used to configure the typewriter:
|
|
34
|
+
|
|
35
|
+
<table class="ui">
|
|
36
|
+
<thead>
|
|
37
|
+
<tr>
|
|
38
|
+
<th>Property</th>
|
|
39
|
+
<th>Type</th>
|
|
40
|
+
<th>Description</th>
|
|
41
|
+
</tr>
|
|
42
|
+
</thead>
|
|
43
|
+
<tbody>
|
|
44
|
+
<tr>
|
|
45
|
+
<td><code>text</code></td>
|
|
46
|
+
<td><code>input.required<string></code></td>
|
|
47
|
+
<td>The text to be displayed with the typewriter effect; a change restarts the run.</td>
|
|
48
|
+
</tr>
|
|
49
|
+
<tr>
|
|
50
|
+
<td><code>speed</code></td>
|
|
51
|
+
<td><code>input<number></code></td>
|
|
52
|
+
<td>The delay between characters in milliseconds (default: 50); a change restarts the run.</td>
|
|
53
|
+
</tr>
|
|
54
|
+
<tr>
|
|
55
|
+
<td><code>volume</code></td>
|
|
56
|
+
<td><code>input<number></code></td>
|
|
57
|
+
<td>The volume of the typing sound, 0.0 to 1.0 (default: 0.2) — the range <code>HTMLMediaElement.volume</code> takes; the browser throws on anything else, and so does this.</td>
|
|
58
|
+
</tr>
|
|
59
|
+
<tr>
|
|
60
|
+
<td><code>sound</code></td>
|
|
61
|
+
<td><code>input<boolean></code></td>
|
|
62
|
+
<td>Whether to play a sound on each keystroke (default: true). The clip is fetched the moment this is on, not before.</td>
|
|
63
|
+
</tr>
|
|
64
|
+
<tr>
|
|
65
|
+
<td><code>src</code></td>
|
|
66
|
+
<td><code>input<string></code></td>
|
|
67
|
+
<td>
|
|
68
|
+
URL of the keystroke audio file. Defaults to the house sound on{' '}
|
|
69
|
+
<code>moja.work</code>, so it only needs setting for a different one —
|
|
70
|
+
or when the component has to run without reaching that host.
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
<tr>
|
|
74
|
+
<td><code>typingFinish</code></td>
|
|
75
|
+
<td><code>output<void></code></td>
|
|
76
|
+
<td>Emitted when the typewriter effect has finished displaying all text.</td>
|
|
77
|
+
</tr>
|
|
78
|
+
</tbody>
|
|
79
|
+
</table>
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### Basic Example
|
|
84
|
+
|
|
85
|
+
In this example, you can see the typewriter effect in action. You can adjust the text and speed using the controls.
|
|
86
|
+
|
|
87
|
+
#### Story: Typewriter
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
export const Typewriter: Story = {
|
|
91
|
+
args: {
|
|
92
|
+
speed: 120,
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
render: (args) => ({
|
|
96
|
+
props: args,
|
|
97
|
+
template: `
|
|
98
|
+
<div class="p-4">
|
|
99
|
+
<ui-typewriter
|
|
100
|
+
[text]="text"
|
|
101
|
+
[speed]="speed"
|
|
102
|
+
[volume]="volume"
|
|
103
|
+
[sound]="sound">
|
|
104
|
+
</ui-typewriter>
|
|
105
|
+
</div>
|
|
106
|
+
`,
|
|
107
|
+
}),
|
|
108
|
+
};
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### Accessibility
|
|
114
|
+
|
|
115
|
+
The revealed part is hidden from assistive technology — a reader would get
|
|
116
|
+
the sentence in pieces, once per character. The whole text stands once in
|
|
117
|
+
the tag, visually hidden, so a reader gets the sentence and a viewer gets
|
|
118
|
+
the animation.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
**Usage**
|
|
123
|
+
|
|
124
|
+
```html
|
|
125
|
+
<ui-typewriter
|
|
126
|
+
[text]="'404: Internet not found'"
|
|
127
|
+
[speed]="100"
|
|
128
|
+
[volume]="0.5"
|
|
129
|
+
[sound]="true"
|
|
130
|
+
(typingFinish)="onFinish()">
|
|
131
|
+
</ui-typewriter>
|
|
132
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
### CDK Drag and Drop Splitter
|
|
2
|
+
|
|
3
|
+
The `ui-cdk-drag-drop-splitter` is a versatile component designed to facilitate moving items between two lists (e.g., "To Do" and "Done") using Angular CDK Drag and Drop.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
Two lists side by side with drag and drop between them, each in a `list` or
|
|
10
|
+
`cards` theme. It owns no state: it shows the two arrays it is given and, on
|
|
11
|
+
every drop, emits both as new arrays — the consumer hands them back, or nothing
|
|
12
|
+
moves. It does not persist, filter or sort, and it is not a layout splitter with
|
|
13
|
+
panels; that is `ui-layout-splitter`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
> **Guide:** recommendations for `ui-cdk-drag-drop-splitter` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-cdk-drag-drop-splitter`). The section above is the truth; the guide is the offer.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
In this example, you can drag items between the two columns and switch between `list` and `cards` themes.
|
|
22
|
+
|
|
23
|
+
### [Open Interactive Drag and Drop Splitter](?path=/story/cdk-drag-and-drop-splitter--drag-and-drop-splitter)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
- **Drag & Drop:** Seamlessly move items between two data sets.
|
|
30
|
+
- **Themeable Views:** Support for different visual representations like `list` and `cards` for each side independently.
|
|
31
|
+
- **Output Events:** Emits both updated lists after every drop — reorder within a pane or transfer between panes.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### It owns no state — bind both outputs
|
|
36
|
+
|
|
37
|
+
The component shows what it is given and reports what a drop would do. It
|
|
38
|
+
changes neither of the two arrays it receives: every drop produces **new**
|
|
39
|
+
arrays and emits both sides, and the next render comes from whatever the
|
|
40
|
+
consumer hands back.
|
|
41
|
+
|
|
42
|
+
Bind both outputs, or nothing moves. That is not a quirk to work around: an
|
|
43
|
+
array changed in place is the same array, a signal handed its own reference
|
|
44
|
+
has nothing to report, and the dropped item snaps back to where it was picked
|
|
45
|
+
up while the data behind it has already moved. Which is worse than not moving
|
|
46
|
+
at all — the picture and the model disagree, and only one of them is visible.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
The component requires two input arrays and provides themes for both sides:
|
|
51
|
+
|
|
52
|
+
**Usage:**
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<ui-cdk-drag-drop-splitter
|
|
56
|
+
[todo]="todoList"
|
|
57
|
+
[done]="doneList"
|
|
58
|
+
[themeTodo]="'list'"
|
|
59
|
+
[themeDone]="'cards'"
|
|
60
|
+
(todoOutput)="onTodoUpdate($event)"
|
|
61
|
+
(doneOutput)="onDoneUpdate($event)">
|
|
62
|
+
</ui-cdk-drag-drop-splitter>
|
|
63
|
+
```
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
### CDK Table Wrapper
|
|
2
|
+
|
|
3
|
+
The `ui-cdk-table-wrapper` is a layout component that extends standard CDK tables with essential features like loading states, interactive rows, and fixed layouts.
|
|
4
|
+
|
|
5
|
+
----
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
A wrapper around a `cdk-table` that adds what the CDK leaves out: a loading
|
|
10
|
+
skeleton, row hover and focus states, the header colours, a `fixed` or
|
|
11
|
+
`content` layout, column measurement for drag previews, and the `inline` editor
|
|
12
|
+
mode in which text and field share one box and the focused control is scrolled
|
|
13
|
+
into view. It renders no columns and holds no data — the table inside it is
|
|
14
|
+
yours. Keyboard movement between cells is not in here either: that is the
|
|
15
|
+
`uiTableEditFocus` directive, which it is built to be paired with.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
> **Guide:** recommendations for `ui-cdk-table-wrapper` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-cdk-table-wrapper`). The section above is the truth; the guide is the offer.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
- **Boolean Attributes:** Supports simple use of boolean inputs as attributes (e.g., `loading` instead of `[loading]="true"`).
|
|
26
|
+
- **Loading State:** Integrated skeleton animations for table rows.
|
|
27
|
+
- **Interactivity:** Hover and focus states for table rows.
|
|
28
|
+
- **Header row:** `--ui-c-secondary` as background with the theme-independent `--ui-c-static` text color.
|
|
29
|
+
- **Drag & Drop Support:** Measures the columns when a row is grabbed and publishes them as CSS variables, so the detached drag preview mirrors the table it came from (see below).
|
|
30
|
+
- **Flexible Layouts:** Options for content adaptation (`content`) and fixed column widths (`fixed`).
|
|
31
|
+
- **Edge padding:** the first column (left) and the last column (right) get 1.5× the cell padding against the table edge.
|
|
32
|
+
- **Inline Editor Mode:** `inline` removes the outer frame and the wrapper padding and keeps only the horizontal row separators; the host itself scrolls horizontally and smoothly centers focused controls (form fields, buttons, links — the `uiTableEditFocus` control set) for keyboard, mouse and programmatic focus alike. The focused row additionally stays visible **vertically**: the page scrolls just enough to keep it in view (nearest edge, no centering), honouring the row's CSS `scroll-margin-top`/`-bottom` — set those to the height of any sticky chrome (nav, detached header, footer) the row must stay clear of. The wrapper is the single source of truth for the cell metrics: display texts and edit fields share the exact same box (no layout shifts when a cell toggles between text and field), header texts align to the same content inset, and the outer columns keep the 1.5× edge padding of the default mode. Pair it with the `uiTableEditFocus` directive for clicked-cell focusing, Shift+Arrow cell navigation and select-all suppression.
|
|
33
|
+
- **Only reachable controls are navigation stations:** the `uiTableEditFocus` control set counts a form field, button or link only while it can actually take focus — `disabled`, `hidden` and `tabindex="-1"` are skipped, exactly as the browser skips them. A cell may therefore hold a different number of stations from one moment to the next (a button gated on pending changes, say) without anything having to be registered: the list is derived from the DOM on every key press. Counting unreachable controls would let the directive and the native tab order drift apart — `focus()` on a disabled control does nothing, so the focus would stay put and the next key press would pick the same dead target again.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
The component is used as a wrapper around a `cdk-table`:
|
|
38
|
+
|
|
39
|
+
### [Open Default Table](?path=/story/cdk-table--default)
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
**Usage**
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<ui-cdk-table-wrapper loading content interactive>
|
|
47
|
+
<table cdk-table [dataSource]="dataSource">
|
|
48
|
+
<!-- Your column definitions -->
|
|
49
|
+
</table>
|
|
50
|
+
</ui-cdk-table-wrapper>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### Keyboard navigation (`uiTableEditFocus`)
|
|
56
|
+
|
|
57
|
+
The directive knows one chain of stations per row: every control a cell holds,
|
|
58
|
+
in DOM order, filtered to what can actually take focus. Tab and Shift+Arrow
|
|
59
|
+
walk that same chain — they differ only in how far they reach.
|
|
60
|
+
|
|
61
|
+
<table>
|
|
62
|
+
<thead>
|
|
63
|
+
<tr><th>Key</th><th>Does</th><th>At the edge</th></tr>
|
|
64
|
+
</thead>
|
|
65
|
+
<tbody>
|
|
66
|
+
<tr>
|
|
67
|
+
<td><kbd>Shift</kbd> + <kbd>←</kbd> / <kbd>→</kbd></td>
|
|
68
|
+
<td>Offers the step to the app as <code>uiRowStep</code> (before moving), then walks the controls of the current row — the remaining ones in the cell, then the nearest cell that has any, entered from the approached side.</td>
|
|
69
|
+
<td><strong>Stops.</strong> The row is never left sideways.</td>
|
|
70
|
+
</tr>
|
|
71
|
+
<tr>
|
|
72
|
+
<td><kbd>Tab</kbd> / <kbd>Shift</kbd> + <kbd>Tab</kbd></td>
|
|
73
|
+
<td>Same chain, same order.</td>
|
|
74
|
+
<td><strong>Wraps</strong> to the neighbour row via <code>uiRowNavigate</code> — forwards into its first control, backwards into its last, never into the middle.</td>
|
|
75
|
+
</tr>
|
|
76
|
+
<tr>
|
|
77
|
+
<td><kbd>Shift</kbd> + <kbd>↑</kbd> / <kbd>↓</kbd></td>
|
|
78
|
+
<td>Emits <code>uiRowNavigate</code> with the current column. The <em>app</em> decides what happens — which rows are eligible is domain knowledge the directive does not have.</td>
|
|
79
|
+
<td>Whatever the app does with it.</td>
|
|
80
|
+
</tr>
|
|
81
|
+
</tbody>
|
|
82
|
+
</table>
|
|
83
|
+
|
|
84
|
+
Because left/right and Tab share one chain, a user only has to learn a single
|
|
85
|
+
order. Left/right is then the tool for working **inside** a row, Tab the tool
|
|
86
|
+
for travelling through the table — and stopping at the edge is itself feedback:
|
|
87
|
+
you notice the row has ended without losing your place.
|
|
88
|
+
|
|
89
|
+
**The focus has to be in the table first.** The arrows have no row to count
|
|
90
|
+
from otherwise, so the keys go to the page instead — it scrolls, or nothing
|
|
91
|
+
happens at all. That is indistinguishable from a defect for the person at the
|
|
92
|
+
keyboard, and it is the single most common reason for "the arrow keys don't
|
|
93
|
+
work". Get in by clicking a cell, or by tabbing into the table.
|
|
94
|
+
|
|
95
|
+
**A sideways step is offered before it is taken.** A row rendered as plain text
|
|
96
|
+
may well be an editable row that is simply closed — and the directive cannot
|
|
97
|
+
know. So every Shift+Left/Right is announced as `uiRowStep` first, carrying the
|
|
98
|
+
direction and the control it starts from. An app that ignores the event sees no
|
|
99
|
+
change at all. An app that sets `handled = true` takes the step over: the
|
|
100
|
+
directive leaves the focus alone, and the app can open the row and put the
|
|
101
|
+
focus where the step was heading. That is what turns a closed row from a
|
|
102
|
+
detour through its buttons into a door.
|
|
103
|
+
|
|
104
|
+
**Where the line runs:** the directive owns the mechanics — which controls are
|
|
105
|
+
reachable, in what order, where the cell ends. The app owns the policy — which
|
|
106
|
+
row may be entered at all. Exactly two signals cross that line,
|
|
107
|
+
`uiRowNavigate` and `uiRowStep`. Concepts like "locked" or "signed in" belong
|
|
108
|
+
to the application, never in here.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### Inputs
|
|
113
|
+
|
|
114
|
+
The component uses Angular Signals and the `booleanAttribute` transformer for a clean API.
|
|
115
|
+
|
|
116
|
+
| Input | Declaration | Description |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| `draggable` | `input(true, { transform: booleanAttribute })` | Whether this table takes part in dragging at all — it switches the column measurement on, nothing else. The name says drag because the drag preview is what needed the measurement first; anything else that has to align with the columns lives off the same two variables and therefore off this input. Switched off, the wrapper measures nothing and publishes nothing. |
|
|
119
|
+
| `loading` | `input(false, { transform: booleanAttribute })` | Applies the loading state class to communicate that data is being fetched. |
|
|
120
|
+
| `content` | `input(false, { transform: booleanAttribute })` | Applies the content state class, typically used to toggle row-content visibility. |
|
|
121
|
+
| `fixed` | `input(false, { transform: booleanAttribute })` | Fixes the table layout so column widths remain stable during drag operations. |
|
|
122
|
+
| `interactive` | `input(false, { transform: booleanAttribute })` | Enables row-selection interaction styling. |
|
|
123
|
+
| `inline` | `input(false, { transform: booleanAttribute })` | Editor mode: removes the wrapper border/padding and all cell padding and borders, and smoothly centers focused form fields horizontally inside the (scrollable) wrapper. |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### [Inline Editor Mode](?path=/story/cdk-table--inline)
|
|
128
|
+
The default example table in inline mode: frameless, padding-free, horizontal row separators only. A fully editable table pairs this mode with the `uiTableEditFocus` directive (click-to-edit, Shift+Arrow, auto-centering).
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### [Combined Tables (Cross-Table Drag & Drop)](?path=/story/cdk-table--content-inter-active-drag-and-drop-combine)
|
|
133
|
+
Demonstrates the interaction between multiple tables within a `cdkDropListGroup`.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### What is checked in a browser
|
|
138
|
+
|
|
139
|
+
A drag is the one interaction no other net here can see: nobody photographs a
|
|
140
|
+
preview hanging on the pointer, and a unit test has neither layout nor cascade
|
|
141
|
+
layers. `npm run e2e:storybook` builds the Storybook and drags in a real
|
|
142
|
+
browser, asking the two questions a screenshot cannot — does the flying thing
|
|
143
|
+
have a surface, and does it carry the columns of the table it came from. It
|
|
144
|
+
carries the row across a NEIGHBOURING table on the way, because that is where
|
|
145
|
+
the geometry used to be rewritten under it.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### The column geometry
|
|
150
|
+
|
|
151
|
+
A drag preview is a clone the CDK hangs on the pointer, outside the table it
|
|
152
|
+
came from — so it has no columns of its own. It gets them from two CSS
|
|
153
|
+
variables the wrapper publishes:
|
|
154
|
+
|
|
155
|
+
<table class="ui">
|
|
156
|
+
<thead>
|
|
157
|
+
<tr>
|
|
158
|
+
<th>Variable</th>
|
|
159
|
+
<th>What it holds</th>
|
|
160
|
+
</tr>
|
|
161
|
+
</thead>
|
|
162
|
+
<tbody>
|
|
163
|
+
<tr>
|
|
164
|
+
<td><code>--preview-grid-cols</code></td>
|
|
165
|
+
<td>The column widths, one after another, ready for <code>grid-template-columns</code>.</td>
|
|
166
|
+
</tr>
|
|
167
|
+
<tr>
|
|
168
|
+
<td><code>--table-width</code></td>
|
|
169
|
+
<td>The table's rendered width — the drag placeholder uses it too.</td>
|
|
170
|
+
</tr>
|
|
171
|
+
</tbody>
|
|
172
|
+
</table>
|
|
173
|
+
|
|
174
|
+
Both are written on the host **and** on `:root`, because the things that
|
|
175
|
+
align to a table do not all live inside it: a detached sticky header sits
|
|
176
|
+
above the wrapper and reads them from the document.
|
|
177
|
+
|
|
178
|
+
**They are measured when a row is grabbed, and the grabbed row is what gets
|
|
179
|
+
measured.** That matters as soon as two tables share a page, which is what
|
|
180
|
+
the combined example is about: the variables are global, so a measurement
|
|
181
|
+
taken while the pointer crosses a neighbouring table would rewrite them under
|
|
182
|
+
a preview that is already in the air — and the flying row would re-lay itself
|
|
183
|
+
out on foreign columns. So the publication freezes for as long as a preview
|
|
184
|
+
exists, and a resize during a drag cannot move it either.
|
|
185
|
+
|
|
186
|
+
A row that does not span the whole table — an expanded detail row across a
|
|
187
|
+
single cell — is not asked; the header answers instead. Otherwise its one
|
|
188
|
+
wide track would land on everything else that aligns to these variables.
|