@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,210 @@
|
|
|
1
|
+
### Buzzer
|
|
2
|
+
|
|
3
|
+
A reusable and customizable buzzer component for Angular.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
A big round button that answers a press with shadow, not outlines — optionally
|
|
10
|
+
pulsing or rotating, and able to fill its parent. It is a button and nothing
|
|
11
|
+
more: it shows what is projected into it, its tint comes from
|
|
12
|
+
`--ui-buzzer-color` rather than an input, and what a press means is decided
|
|
13
|
+
where it is used. It carries no label, icon or state of its own.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
> **Guide:** recommendations for `ui-buzzer` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-buzzer`). The section above is the truth; the guide is the offer.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Overview
|
|
22
|
+
|
|
23
|
+
The `UiBuzzerComponent` is an interactive buzzer button with an optional looping animation and the ability to fill its parent; its tint is set through the `--ui-buzzer-color` CSS variable. Its focus halo is a keyboard mark (`:focus-visible`): a pointer press leaves no lasting focus styling, while a keyboard focus keeps its position and its halo.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### Properties
|
|
28
|
+
|
|
29
|
+
The following properties can be used to configure the buzzer:
|
|
30
|
+
|
|
31
|
+
- `animate`: (Input) The type of animation to apply. Available options: 'pulse', 'rotate', or null.
|
|
32
|
+
- `fillParent`: (Input) When true, the buzzer takes the size of its parent instead of its own 12rem minimum. The parent needs a size of its own.
|
|
33
|
+
|
|
34
|
+
### The three states
|
|
35
|
+
|
|
36
|
+
The buzzer answers in shadow, not in outlines — the same halo throughout, only
|
|
37
|
+
its colour and its size change. Measured:
|
|
38
|
+
|
|
39
|
+
<table class="ui">
|
|
40
|
+
<thead>
|
|
41
|
+
<tr>
|
|
42
|
+
<th>State</th>
|
|
43
|
+
<th>box-shadow</th>
|
|
44
|
+
<th>Reads as</th>
|
|
45
|
+
</tr>
|
|
46
|
+
</thead>
|
|
47
|
+
<tbody>
|
|
48
|
+
<tr>
|
|
49
|
+
<td>resting</td>
|
|
50
|
+
<td><code>0 0 0.25rem 1rem rgba(0,0,0,0.1)</code></td>
|
|
51
|
+
<td>Sitting above the surface.</td>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td>focused (keyboard)</td>
|
|
55
|
+
<td><code>0 0 0.25rem 1rem rgba(var(--ui-c-focus-value), 0.2)</code></td>
|
|
56
|
+
<td>Same shape, tinted — keyboard-focused without losing its depth.</td>
|
|
57
|
+
</tr>
|
|
58
|
+
<tr>
|
|
59
|
+
<td>pressed</td>
|
|
60
|
+
<td><code>0 0 0.25rem 0.25rem rgba(0,0,0,0.4)</code></td>
|
|
61
|
+
<td>Halo pulled in and darkened: pushed down.</td>
|
|
62
|
+
</tr>
|
|
63
|
+
</tbody>
|
|
64
|
+
</table>
|
|
65
|
+
|
|
66
|
+
The focus rule carries `:not(:active)`, and that is not decoration. It sits
|
|
67
|
+
after the pressed rule at equal specificity, so without it a focused buzzer
|
|
68
|
+
would keep the focus halo while being pressed and stop reacting to the press
|
|
69
|
+
altogether — which is exactly what happened once.
|
|
70
|
+
|
|
71
|
+
The halo is the only focus mark there is: the library's global button rule
|
|
72
|
+
(`forms.css`, `:focus-visible:is([class^='ui'])`) removes the outline, and the
|
|
73
|
+
class `ui-buzzer` starts with `ui`, so it is caught by that rule too. Both rules
|
|
74
|
+
answer `:focus-visible`, so the halo shows for a keyboard focus and a pointer
|
|
75
|
+
press leaves nothing behind — the buzzer no longer blurs itself to wipe a ring.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### CSS variables
|
|
80
|
+
|
|
81
|
+
The tint is a CSS variable, not an input — set it from the outside:
|
|
82
|
+
|
|
83
|
+
- `--ui-buzzer-color`: the fill behind the translucent sheen. Any CSS color or
|
|
84
|
+
token (e.g. `#ff0000`, `var(--ui-c-primary)`). Defaults to `transparent`.
|
|
85
|
+
|
|
86
|
+
The story below sets it per buzzer (`[style.--ui-buzzer-color]="…"`), so the
|
|
87
|
+
colour you see is the example.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Basic Example
|
|
92
|
+
|
|
93
|
+
In this example the `animate` and `fillParent` controls drive all five buzzers. The
|
|
94
|
+
colors are fixed — they are the point of this example, and each buzzer sets its
|
|
95
|
+
own through the CSS variable.
|
|
96
|
+
|
|
97
|
+
Note what `fillParent` needs to work: a parent with a size of its own. Each buzzer
|
|
98
|
+
here sits in a cell of a fixed width and height, because "fill the parent" is a
|
|
99
|
+
question a parent sized by its own content cannot answer.
|
|
100
|
+
|
|
101
|
+
#### Story: Buzzer
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
export const Buzzer: Story = {
|
|
105
|
+
render: (args) => {
|
|
106
|
+
return {
|
|
107
|
+
props: {
|
|
108
|
+
...args,
|
|
109
|
+
colors: data.colors,
|
|
110
|
+
},
|
|
111
|
+
template: `
|
|
112
|
+
<ui-intern-header theme="theme-light"></ui-intern-header>
|
|
113
|
+
<section class="relative flex flex-col">
|
|
114
|
+
<div class="grid gap-16 grid-cols-1 m-4 !grid-cols-[auto_auto_auto_auto_auto_1fr]">
|
|
115
|
+
@for (item of colors; track item; let i = $index) {
|
|
116
|
+
<!-- The bordered box is the point of the \`fillParent\` control: it is
|
|
117
|
+
deliberately larger than the buzzer's own 12rem, so the
|
|
118
|
+
switch reads as the buzzer growing into its outline.
|
|
119
|
+
|
|
120
|
+
The centering classes belong on the HOST, not on this box.
|
|
121
|
+
\`fillParent\` sets min-width/min-height to 100%, which needs a
|
|
122
|
+
parent with a size of its own; making the BOX a flex
|
|
123
|
+
container turns the host into an auto-sized flex item, the
|
|
124
|
+
percentage has nothing to resolve against, and the buzzer
|
|
125
|
+
collapses to 27px. With h-full/w-full on the host the size
|
|
126
|
+
is definite and the same flex centering works. -->
|
|
127
|
+
<div class="h-72 w-72 border border-[var(--ui-c-default)]">
|
|
128
|
+
<ui-buzzer
|
|
129
|
+
class="flex h-full w-full items-center justify-center"
|
|
130
|
+
[title]="item"
|
|
131
|
+
[style.--ui-buzzer-color]="item"
|
|
132
|
+
[animate]="animate"
|
|
133
|
+
[fillParent]="fillParent"
|
|
134
|
+
>{{i}}</ui-buzzer>
|
|
135
|
+
</div>
|
|
136
|
+
}
|
|
137
|
+
</div>
|
|
138
|
+
</section>
|
|
139
|
+
`,
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Both looping animations side by side. They are named in the template, not
|
|
146
|
+
* taken from the args, so the Controls panel is removed here rather than left
|
|
147
|
+
* standing with settings that move nothing — the interactive one is the story
|
|
148
|
+
* above.
|
|
149
|
+
*/
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
***Usage***
|
|
155
|
+
|
|
156
|
+
```html
|
|
157
|
+
<ui-buzzer style="--ui-buzzer-color: #ffcdff" [animate]="'pulse'">0</ui-buzzer>
|
|
158
|
+
|
|
159
|
+
<!-- fillParent needs a parent that has a size -->
|
|
160
|
+
<div style="width: 18rem; height: 18rem">
|
|
161
|
+
<ui-buzzer [fillParent]="true">0</ui-buzzer>
|
|
162
|
+
</div>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### Animation Overview
|
|
168
|
+
|
|
169
|
+
This overview shows available buzzer animations.
|
|
170
|
+
|
|
171
|
+
#### Story: BuzzerAnimate
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
export const BuzzerAnimate: Story = {
|
|
175
|
+
parameters: {
|
|
176
|
+
controls: { disable: true },
|
|
177
|
+
},
|
|
178
|
+
render: (args) => {
|
|
179
|
+
return {
|
|
180
|
+
props: {
|
|
181
|
+
...args,
|
|
182
|
+
colors: data.colors,
|
|
183
|
+
},
|
|
184
|
+
template: `
|
|
185
|
+
<ui-intern-header theme="theme-light"></ui-intern-header>
|
|
186
|
+
<section class="relative flex flex-col">
|
|
187
|
+
<div class="grid gap-16 grid-cols-1 m-4 !grid-cols-[auto_auto_1fr]">
|
|
188
|
+
<ui-buzzer [style.--ui-buzzer-color]="colors[0]" [animate]="'pulse'">pulse</ui-buzzer>
|
|
189
|
+
<ui-buzzer [style.--ui-buzzer-color]="colors[1]" [animate]="'rotate'">rotate</ui-buzzer>
|
|
190
|
+
</div>
|
|
191
|
+
</section>
|
|
192
|
+
`,
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
### Component Details
|
|
201
|
+
|
|
202
|
+
- **Selector:** `ui-buzzer`
|
|
203
|
+
- **Encapsulation:** `ViewEncapsulation.Emulated` (default)
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
### Type: UiBuzzerAnimateTypes
|
|
208
|
+
|
|
209
|
+
Available animations:
|
|
210
|
+
`'pulse' | 'rotate' | null`
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
### Card
|
|
2
|
+
|
|
3
|
+
A reusable and customizable card component for Angular.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
A presentational container: an optional headline and icon above projected
|
|
10
|
+
content, coloured through `--ui-card-bg` and `--ui-card-text`. It is an atom
|
|
11
|
+
and composes nothing — it does not copy, link, expand or collapse. A card that
|
|
12
|
+
should copy a value on click is wrapped in `ui-copy-value`; a card that should
|
|
13
|
+
be a link is placed inside one.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
> **Guide:** recommendations for `ui-card` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-card`). The section above is the truth; the guide is the offer.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Overview
|
|
22
|
+
|
|
23
|
+
The `UiCardComponent` provides a container for content with support for headlines and icons; its background and text colours come from the `--ui-card-bg` and `--ui-card-text` CSS variables. It is designed to be a flexible building block for any UI layout.
|
|
24
|
+
|
|
25
|
+
The card is presentational: headline, icon and projected content, nothing
|
|
26
|
+
else. Colour and icon variant are CSS variables rather than inputs. It no longer copies. Click-to-copy used to be a second
|
|
27
|
+
job baked in here — which meant anyone who wanted it around something that was
|
|
28
|
+
not a card had to reach for a card anyway. That behaviour lives in
|
|
29
|
+
`ui-copy-value` alone now. For a copyable card, wrap one:
|
|
30
|
+
`<ui-copy-value [value]="…"><ui-card …></ui-card></ui-copy-value>`.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### Properties
|
|
35
|
+
|
|
36
|
+
The following properties can be used to configure the card:
|
|
37
|
+
|
|
38
|
+
<table class="ui">
|
|
39
|
+
<thead>
|
|
40
|
+
<tr>
|
|
41
|
+
<th>Property</th>
|
|
42
|
+
<th>Type</th>
|
|
43
|
+
<th>Description</th>
|
|
44
|
+
</tr>
|
|
45
|
+
</thead>
|
|
46
|
+
<tbody>
|
|
47
|
+
<tr>
|
|
48
|
+
<td><code>headline</code></td>
|
|
49
|
+
<td><code>Input</code></td>
|
|
50
|
+
<td>An optional headline string to display at the top of the card.</td>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<td><code>icon</code></td>
|
|
54
|
+
<td><code>Input</code></td>
|
|
55
|
+
<td>An optional icon name string to display next to the headline.</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr>
|
|
58
|
+
<td><code>iconSize</code></td>
|
|
59
|
+
<td><code>UiCardIconSize | null</code></td>
|
|
60
|
+
<td>The icon size: 'x1', 'x2', 'x3', or 'x4'. Default <code>null</code>, which renders as 'x4'.</td>
|
|
61
|
+
</tr>
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
|
|
65
|
+
### CSS variables
|
|
66
|
+
|
|
67
|
+
Colours are CSS variables, not inputs — set them from the outside; both
|
|
68
|
+
default to their `--ui-c-*` token:
|
|
69
|
+
|
|
70
|
+
- `--ui-card-bg`: the card background. Any CSS color or token. Default
|
|
71
|
+
`transparent`.
|
|
72
|
+
- `--ui-card-text`: the icon and headline colour. Default `var(--ui-c-default)`.
|
|
73
|
+
|
|
74
|
+
- `--ui-icon-font`: the icon's ligature font — `'Material Icons'` (default) or
|
|
75
|
+
`'Material Icons Outlined'`.
|
|
76
|
+
|
|
77
|
+
The story below binds them per card, so the colours you see are the example.
|
|
78
|
+
|
|
79
|
+
This used to be an `outline` input, and that name was wrong twice: it never
|
|
80
|
+
outlined the CARD, it only swapped the icon's font, and which icon font to use
|
|
81
|
+
is a property of icons rather than of cards. As a variable it also **inherits**
|
|
82
|
+
— set it once on a container and every icon inside follows, instead of
|
|
83
|
+
repeating a boolean on each card.
|
|
84
|
+
|
|
85
|
+
Worth knowing before reaching for it: the two fonts differ only where an icon
|
|
86
|
+
has a fill to leave out. Line-drawn glyphs — `search`, `star`, `check`,
|
|
87
|
+
`close`, `arrow_back`, `menu`, `add`, `refresh`, `favorite` — are
|
|
88
|
+
pixel-identical in both, so the variable appears to do nothing on them. The
|
|
89
|
+
control in the story therefore offers icons that do change: `home`, `lock`,
|
|
90
|
+
`visibility`, `mail`, `delete`.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### Sizing
|
|
95
|
+
|
|
96
|
+
The tag itself has no box. `ui-card` is `display: contents`, so the element the
|
|
97
|
+
grid places is the inner surface, not the tag — and a size set on `ui-card`
|
|
98
|
+
from outside changes the computed value while moving no layout at all
|
|
99
|
+
(measured: `getBoundingClientRect()` on the tag is 0x0, whatever you set).
|
|
100
|
+
|
|
101
|
+
Size the **cell** the card sits in, not the card:
|
|
102
|
+
|
|
103
|
+
```html
|
|
104
|
+
<div class="h-64 w-64">
|
|
105
|
+
<ui-card [icon]="'home'"></ui-card>
|
|
106
|
+
</div>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
For the same reason the card cannot clip: `overflow` on a tag with no box does
|
|
110
|
+
nothing. Content that must not spill is the caller's job — the headline is the
|
|
111
|
+
one exception, it is cut with an ellipsis by the card itself.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### Basic Example
|
|
116
|
+
|
|
117
|
+
In this example you can change headline, icon, icon size, text colour and the
|
|
118
|
+
icon font. The background colours are fixed — they are the point of this
|
|
119
|
+
example, and each card sets its own through `--ui-card-bg`.
|
|
120
|
+
|
|
121
|
+
#### Story: Card
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
export const Card: Story = {
|
|
125
|
+
render: (args) => {
|
|
126
|
+
return {
|
|
127
|
+
props: {
|
|
128
|
+
...args,
|
|
129
|
+
colors: ['#ffcdff', '#cfcfff', '#cfffcf', '#ffcfcf', '#cfcfcf'],
|
|
130
|
+
},
|
|
131
|
+
template: `
|
|
132
|
+
<ui-intern-header theme="theme-light"></ui-intern-header>
|
|
133
|
+
<section class="relative flex flex-col">
|
|
134
|
+
<div class="grid gap-16 grid-cols-1 !grid-cols-[1fr_1fr_1fr_1fr_1fr]">
|
|
135
|
+
@for (item of colors; track item; let i = $index) {
|
|
136
|
+
<ui-card
|
|
137
|
+
[style.--ui-card-bg]="item"
|
|
138
|
+
[style.--ui-card-text]="textColor"
|
|
139
|
+
[style.--ui-icon-font]="iconFont"
|
|
140
|
+
[headline]="headline"
|
|
141
|
+
[icon]="icon"
|
|
142
|
+
[iconSize]="iconSize">
|
|
143
|
+
<span>Content {{i}}</span>
|
|
144
|
+
</ui-card>
|
|
145
|
+
}
|
|
146
|
+
</div>
|
|
147
|
+
</section>
|
|
148
|
+
`,
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
**Usage**
|
|
157
|
+
|
|
158
|
+
```html
|
|
159
|
+
<ui-card
|
|
160
|
+
style="--ui-card-bg: #ffcdff; --ui-card-text: #000000; --ui-icon-font: 'Material Icons Outlined'"
|
|
161
|
+
[headline]="'Card Title'"
|
|
162
|
+
[icon]="'home'"
|
|
163
|
+
[iconSize]="'x4'">
|
|
164
|
+
<span>Card content goes here.</span>
|
|
165
|
+
</ui-card>
|
|
166
|
+
```
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### Component Details
|
|
170
|
+
|
|
171
|
+
- **Selector:** `ui-card`
|
|
172
|
+
- **Encapsulation:** `ViewEncapsulation.None`
|
|
173
|
+
|
|
174
|
+
The component uses `ViewEncapsulation.None`, which means its styles are applied globally and can affect elements outside the component's scope if not properly scoped.
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
### Chart
|
|
2
|
+
|
|
3
|
+
A flexible and customizable chart component for Angular.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
Draws one value set as a pie, a donut or a linear bar from up to three segment
|
|
10
|
+
boundaries and their colours — CSS gradients, no chart library, no axes, no
|
|
11
|
+
legend, no tooltips. It draws what it is handed: the values are boundaries in
|
|
12
|
+
percent, the number of colours decides the number of rings, and it neither sums,
|
|
13
|
+
sorts nor labels anything. A series with more than three parts, or one that
|
|
14
|
+
needs a scale, is not its job.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
> **Guide:** recommendations for `ui-chart` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-chart`). The section above is the truth; the guide is the offer.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### Overview
|
|
23
|
+
|
|
24
|
+
The `UiChartComponent` provides various chart types like pie, donut, and linear charts. It allows for detailed configuration of values, colors, and sizing to visualize data effectively.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
### Properties
|
|
29
|
+
|
|
30
|
+
The following properties can be used to configure the chart:
|
|
31
|
+
|
|
32
|
+
- `type`: (Input) The type of chart to display ('pie', 'donut', 'linear-vertical', 'linear-horizontal').
|
|
33
|
+
- `size`: (Input) The size of the chart in rem units.
|
|
34
|
+
- `valueFirst`, `valueSecond`, `valueThird`: (Input) The **end** of each segment in percent (0-100), not its width — see "One ring, two, or three" below.
|
|
35
|
+
- `colorFirst`, `colorSecond`, `colorThird`: (Input) Colors for the respective segments. Left unset, every segment after the first is transparent.
|
|
36
|
+
- `colorBackground`: (Input) Colour of the remainder after the third segment. Unset, it stays transparent and the circle is left open.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
### Basic Example
|
|
41
|
+
|
|
42
|
+
In this example, you can interactively change the chart type and its data values.
|
|
43
|
+
|
|
44
|
+
#### Story: Chart
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
export const Chart: Story = {
|
|
48
|
+
render: (args) => {
|
|
49
|
+
return {
|
|
50
|
+
props: {
|
|
51
|
+
...args,
|
|
52
|
+
},
|
|
53
|
+
template: `
|
|
54
|
+
<ui-intern-header theme="theme-light"></ui-intern-header>
|
|
55
|
+
<section class="relative flex flex-col">
|
|
56
|
+
<ui-chart
|
|
57
|
+
[type]="type"
|
|
58
|
+
[size]="size"
|
|
59
|
+
[valueFirst]="valueFirst"
|
|
60
|
+
[valueSecond]="valueSecond"
|
|
61
|
+
[valueThird]="valueThird"
|
|
62
|
+
[colorFirst]="colorFirst"
|
|
63
|
+
[colorSecond]="colorSecond"
|
|
64
|
+
[colorThird]="colorThird"
|
|
65
|
+
[colorBackground]="colorBackground"
|
|
66
|
+
>
|
|
67
|
+
</ui-chart>
|
|
68
|
+
</section>
|
|
69
|
+
`,
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* All four variants side by side. Every one of them takes its `type` from the
|
|
76
|
+
* list, so that control is removed from the panel entirely — the others still
|
|
77
|
+
* drive all four charts at once.
|
|
78
|
+
*/
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### One ring, two, or three
|
|
84
|
+
|
|
85
|
+
Leaving a colour out is a **feature**, not an omission: every segment after the
|
|
86
|
+
first falls back to `transparent`, so the number of colours you hand over is
|
|
87
|
+
the number of rings you get. The same component draws a single arc, a two-part
|
|
88
|
+
ring or a full circle — nothing needs to be switched on for it.
|
|
89
|
+
|
|
90
|
+
#### Story: Rings
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
export const Rings: Story = {
|
|
94
|
+
parameters: {
|
|
95
|
+
controls: { disable: true },
|
|
96
|
+
},
|
|
97
|
+
render: () => ({
|
|
98
|
+
props: {
|
|
99
|
+
rings: [
|
|
100
|
+
{ first: '#00c853', second: '', third: '', background: '' },
|
|
101
|
+
{ first: '#00c853', second: '#ffe000', third: '', background: '' },
|
|
102
|
+
{ first: '#00c853', second: '#ffe000', third: '#ff3d00', background: '' },
|
|
103
|
+
{ first: '#00c853', second: '#ffe000', third: '#ff3d00', background: '#cfcfcf' },
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
template: `
|
|
107
|
+
<ui-intern-header theme="theme-light"></ui-intern-header>
|
|
108
|
+
<section class="relative flex flex-row flex-wrap gap-16 p-4">
|
|
109
|
+
@for (ring of rings; track ring.first + ring.second + ring.third + ring.background) {
|
|
110
|
+
<ui-chart
|
|
111
|
+
[type]="'donut'"
|
|
112
|
+
[size]="10"
|
|
113
|
+
[valueFirst]="25"
|
|
114
|
+
[valueSecond]="50"
|
|
115
|
+
[valueThird]="75"
|
|
116
|
+
[colorFirst]="ring.first"
|
|
117
|
+
[colorSecond]="ring.second"
|
|
118
|
+
[colorThird]="ring.third"
|
|
119
|
+
[colorBackground]="ring.background"
|
|
120
|
+
></ui-chart>
|
|
121
|
+
}
|
|
122
|
+
</section>
|
|
123
|
+
`,
|
|
124
|
+
}),
|
|
125
|
+
};
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
All four above use the same values (`25 / 50 / 75`); only the number of colours
|
|
129
|
+
differs. The last one hands over `colorBackground` as well and therefore closes
|
|
130
|
+
the circle.
|
|
131
|
+
|
|
132
|
+
Two things are worth knowing before relying on it:
|
|
133
|
+
|
|
134
|
+
**The values are boundaries, not sizes.** `valueFirst` is where the first
|
|
135
|
+
segment *ends*, `valueSecond` where the second ends, and so on — so `25/50/75`
|
|
136
|
+
gives four equal quarters, while `25/25/25` gives one quarter and nothing else.
|
|
137
|
+
|
|
138
|
+
**Do not pass an empty string where you mean "no colour" — pass nothing.** The
|
|
139
|
+
component leaves an unset colour out of the style it writes, and that is what
|
|
140
|
+
makes the fallback work. Writing the property with an empty value would make
|
|
141
|
+
`var()` substitute *emptiness* into the gradient, which invalidates the whole
|
|
142
|
+
`background` declaration: the chart then draws nothing at all, not even the
|
|
143
|
+
segments that do have a colour.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
**Usage**
|
|
148
|
+
|
|
149
|
+
```html
|
|
150
|
+
<!-- three rings -->
|
|
151
|
+
<ui-chart
|
|
152
|
+
[type]="'donut'"
|
|
153
|
+
[size]="10"
|
|
154
|
+
[valueFirst]="20"
|
|
155
|
+
[valueSecond]="50"
|
|
156
|
+
[valueThird]="80"
|
|
157
|
+
[colorFirst]="'#ff0000'">
|
|
158
|
+
</ui-chart>
|
|
159
|
+
|
|
160
|
+
<!-- one ring: give one colour, leave the rest alone -->
|
|
161
|
+
<ui-chart [type]="'donut'" [valueFirst]="35" [colorFirst]="'#00c853'"></ui-chart>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Type Overview
|
|
167
|
+
|
|
168
|
+
This overview shows all available chart types with the current configuration.
|
|
169
|
+
|
|
170
|
+
#### Story: ChartOverview
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
export const ChartOverview: Story = {
|
|
174
|
+
argTypes: {
|
|
175
|
+
type: { table: { disable: true } },
|
|
176
|
+
},
|
|
177
|
+
render: (args) => {
|
|
178
|
+
return {
|
|
179
|
+
props: {
|
|
180
|
+
...args,
|
|
181
|
+
},
|
|
182
|
+
template: `
|
|
183
|
+
<ui-intern-header theme="theme-light"></ui-intern-header>
|
|
184
|
+
<section class="relative flex flex-col">
|
|
185
|
+
<div class="grid gap-16 grid-cols-1 !grid-cols-[1fr_1fr_1fr_1fr]">
|
|
186
|
+
@for (value of types; track value) {
|
|
187
|
+
<div class="flex flex-col items-center">
|
|
188
|
+
<h3>{{value}}</h3>
|
|
189
|
+
<ui-chart
|
|
190
|
+
[type]="value"
|
|
191
|
+
[size]="size"
|
|
192
|
+
[valueFirst]="valueFirst"
|
|
193
|
+
[valueSecond]="valueSecond"
|
|
194
|
+
[valueThird]="valueThird"
|
|
195
|
+
[colorFirst]="colorFirst"
|
|
196
|
+
[colorSecond]="colorSecond"
|
|
197
|
+
[colorThird]="colorThird"
|
|
198
|
+
[colorBackground]="colorBackground"
|
|
199
|
+
>
|
|
200
|
+
</ui-chart>
|
|
201
|
+
</div>
|
|
202
|
+
}
|
|
203
|
+
</div>
|
|
204
|
+
</section>
|
|
205
|
+
`,
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* One ring, two, or three — decided by how many colours you hand over.
|
|
212
|
+
*
|
|
213
|
+
* Every segment after the first falls back to `transparent`, so a colour you
|
|
214
|
+
* do not give is a ring that is not there. The values still mark the same
|
|
215
|
+
* boundaries; only the paint stops earlier. The rightmost chart hands over all
|
|
216
|
+
* four and closes the circle with a background colour.
|
|
217
|
+
*
|
|
218
|
+
* The colours are the example here, so concrete values are allowed.
|
|
219
|
+
*/
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
### Component Details
|
|
225
|
+
|
|
226
|
+
- **Selector:** `ui-chart`
|
|
227
|
+
- **Encapsulation:** `ViewEncapsulation.Emulated` (default)
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
### Types
|
|
232
|
+
|
|
233
|
+
#### UiChartType
|
|
234
|
+
|
|
235
|
+
Available chart types:
|
|
236
|
+
`'pie' | 'donut' | 'linear-vertical' | 'linear-horizontal'`
|