@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,193 @@
|
|
|
1
|
+
### Input
|
|
2
|
+
|
|
3
|
+
A reusable and customizable input wrapper component for Angular.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
A wrapper around a projected native text-based control — `input`, `textarea`,
|
|
10
|
+
`select` — that adds the label, the validation display (`uiError`) and an
|
|
11
|
+
optional clear button. The control stays native: value binding, validation and
|
|
12
|
+
the `type` are written on the projected element, and the wrapper neither reads
|
|
13
|
+
nor rewrites the value. Ranges, checkboxes and switches have wrappers of their
|
|
14
|
+
own.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
> **Guide:** recommendations for `ui-input` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-input`). The section above is the truth; the guide is the offer.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### Overview
|
|
23
|
+
|
|
24
|
+
The `UiInputComponent` provides a styled wrapper for standard text-based input elements. It handles labels and visual validation states, and integrates seamlessly with Angular's `ngModel` and form validation.
|
|
25
|
+
|
|
26
|
+
### Properties
|
|
27
|
+
|
|
28
|
+
The following properties can be used to configure the input component:
|
|
29
|
+
|
|
30
|
+
- `label`: (Input) The text label above the field. It is tied to the field:
|
|
31
|
+
a projected input keeps its own `id` if it has one, otherwise the component
|
|
32
|
+
hands it one and points the label at it — a click on the label focuses the
|
|
33
|
+
field, a screen reader names it.
|
|
34
|
+
- `uiError`: (Input) Whether to enable visual validation states based on the input's validity (default: true).
|
|
35
|
+
- `clearable`: (Input, boolean) When set, shows a clear (×) button at the right edge of the field once it holds a value; clicking it empties the input (default: false).
|
|
36
|
+
- `clearLabel`: (Input) Accessible label for the clear button; override for localisation (default: `'Clear'`).
|
|
37
|
+
- `errorLabel`: (Input) Accessible label for the error button that opens the
|
|
38
|
+
overlay; override for localisation (default: `'Errors'`).
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### Basic Example
|
|
43
|
+
|
|
44
|
+
In this example, you can interactively change the input properties and see how the validation state reacts.
|
|
45
|
+
|
|
46
|
+
#### Story: Input
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
export const Input: Story = {
|
|
50
|
+
render: (args) => {
|
|
51
|
+
return {
|
|
52
|
+
props: {
|
|
53
|
+
...args,
|
|
54
|
+
},
|
|
55
|
+
template: `
|
|
56
|
+
<ui-intern-header theme="theme-light"></ui-intern-header>
|
|
57
|
+
<section class="relative flex flex-col">
|
|
58
|
+
<ui-input [label]="label" [clearable]="clearable">
|
|
59
|
+
<input
|
|
60
|
+
ui-tag
|
|
61
|
+
[(ngModel)]="value"
|
|
62
|
+
class="ui"
|
|
63
|
+
type="text"
|
|
64
|
+
/>
|
|
65
|
+
</ui-input>
|
|
66
|
+
</section>
|
|
67
|
+
`,
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Usage
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<ui-input [label]="'Username'">
|
|
77
|
+
<input ui-tag type="text" class="ui" [(ngModel)]="value" />
|
|
78
|
+
</ui-input>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The projected input can also use the standalone flat look — `class="ui-flat"`
|
|
82
|
+
**instead of** `class="ui"` (invisible at rest, no hover effect; focus and
|
|
83
|
+
error render as a 8% color surface without border or shadow; see
|
|
84
|
+
[Styling/Forms](?path=/docs/styling-forms--docs)):
|
|
85
|
+
|
|
86
|
+
```html
|
|
87
|
+
<ui-input [label]="'Username'">
|
|
88
|
+
<input ui-tag type="text" class="ui-flat" [(ngModel)]="value" />
|
|
89
|
+
</ui-input>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
#### Clearable Input
|
|
95
|
+
|
|
96
|
+
Set `clearable` to render a clear (×) button at the right edge of the field.
|
|
97
|
+
It appears only while the input holds a value and empties it on click
|
|
98
|
+
(notifying `ngModel`). The button is positioned like the search affix — 24×24,
|
|
99
|
+
right-aligned and vertically centred over the input.
|
|
100
|
+
|
|
101
|
+
[Open story: Clearable](?path=/story/forms-input--input-clearable)
|
|
102
|
+
|
|
103
|
+
```html
|
|
104
|
+
<ui-input [label]="'Username'" clearable>
|
|
105
|
+
<input ui-tag type="text" class="ui" [(ngModel)]="value" />
|
|
106
|
+
</ui-input>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
#### Textarea and Select
|
|
112
|
+
|
|
113
|
+
Any form control carrying the `ui-tag` attribute can be projected — textareas
|
|
114
|
+
and selects receive the same full width as inputs, so mixed forms line up
|
|
115
|
+
flush (they would otherwise shrink to their intrinsic width).
|
|
116
|
+
|
|
117
|
+
[Open story: Textarea](?path=/story/forms-input--input-textarea)
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<ui-input [label]="'Description'">
|
|
121
|
+
<textarea ui-tag class="ui" rows="5" [(ngModel)]="value"></textarea>
|
|
122
|
+
</ui-input>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
[Open story: Select](?path=/story/forms-input--input-select)
|
|
126
|
+
|
|
127
|
+
```html
|
|
128
|
+
<ui-input [label]="'Format'">
|
|
129
|
+
<select ui-tag class="ui" [(ngModel)]="value">
|
|
130
|
+
<option value="A">A</option>
|
|
131
|
+
</select>
|
|
132
|
+
</ui-input>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
#### Password Input
|
|
138
|
+
|
|
139
|
+
[Open story: Password](?path=/story/forms-input--input-password)
|
|
140
|
+
|
|
141
|
+
```html
|
|
142
|
+
<ui-input [label]="'Password'">
|
|
143
|
+
<input
|
|
144
|
+
ui-tag
|
|
145
|
+
type="password"
|
|
146
|
+
class="ui"
|
|
147
|
+
[(ngModel)]="value"
|
|
148
|
+
[placeholder]="'form.placeholder.enterPassword' | transloco"
|
|
149
|
+
/>
|
|
150
|
+
</ui-input>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### Validation Overview
|
|
156
|
+
|
|
157
|
+
This overview shows how the component handles validation states.
|
|
158
|
+
|
|
159
|
+
The red border and the error icon always reflect the current validation
|
|
160
|
+
state. The icon is a **button** — a keyboard user reaches it with Tab and
|
|
161
|
+
opens the overlay with Enter; it carries `aria-expanded` — and an affix
|
|
162
|
+
inside the field, right-aligned like the clear button — every icon a field can carry sits in the same place; the error
|
|
163
|
+
icon keeps the edge so it always appears at the same spot, and where the
|
|
164
|
+
clear button stands too, that one moves one box inward. Clicking the error icon opens a floating error overlay with the
|
|
165
|
+
validation messages; the icon switches to a close icon while the overlay is
|
|
166
|
+
open. Only one error overlay is open at a time across all form fields —
|
|
167
|
+
opening one closes any other open overlay (coordinated by the shared
|
|
168
|
+
`UiFormErrorOverlayService`).
|
|
169
|
+
|
|
170
|
+
[Open story: Validation](?path=/story/forms-input--input-validation)
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### Error Overlay Behavior
|
|
175
|
+
|
|
176
|
+
The story arrives submitted; click through the error icons: opening one
|
|
177
|
+
field's overlay closes any other open overlay — only one is visible at a time.
|
|
178
|
+
|
|
179
|
+
[Open story: Error Overlay](?path=/story/forms-input--input-error-overlay)
|
|
180
|
+
|
|
181
|
+
```html
|
|
182
|
+
<ui-input [label]="'Required Field'" [uiError]="true">
|
|
183
|
+
<input
|
|
184
|
+
ui-tag
|
|
185
|
+
type="text"
|
|
186
|
+
class="ui"
|
|
187
|
+
[(ngModel)]="value"
|
|
188
|
+
required
|
|
189
|
+
name="req"
|
|
190
|
+
[placeholder]="'form.placeholder.required' | transloco"
|
|
191
|
+
/>
|
|
192
|
+
</ui-input>
|
|
193
|
+
```
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
### Slider
|
|
2
|
+
|
|
3
|
+
A form wrapper around one or two native `<input type="range">` elements, with a label,
|
|
4
|
+
a live value read-out and a highlighted track fill.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
### What it does, and what it does not
|
|
9
|
+
|
|
10
|
+
A wrapper around one or two native `<input type="range">` elements: label,
|
|
11
|
+
live value read-out and a filled track, in `single` or `range` mode where two
|
|
12
|
+
thumbs cannot cross. Value binding stays native on the projected input. It has
|
|
13
|
+
no validation or error state, because a range input always holds a value inside
|
|
14
|
+
`[min, max]` — there is nothing to be invalid.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
> **Guide:** recommendations for `ui-slider` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-slider`). The section above is the truth; the guide is the offer.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### Overview
|
|
23
|
+
|
|
24
|
+
`UiSliderComponent` styles the native range input(s) via `var(--ui-*)` design tokens.
|
|
25
|
+
Value binding stays native: place `[(ngModel)]` directly on the projected
|
|
26
|
+
`<input type="range">`. In `range` mode two inputs (first = low, second = high) form a
|
|
27
|
+
min–max span; the component keeps them from crossing. A range input always holds a value
|
|
28
|
+
inside `[min, max]`, so the slider has no validation/error state.
|
|
29
|
+
|
|
30
|
+
### Properties
|
|
31
|
+
|
|
32
|
+
<table class="ui">
|
|
33
|
+
<thead>
|
|
34
|
+
<tr>
|
|
35
|
+
<th>Property</th>
|
|
36
|
+
<th>Type</th>
|
|
37
|
+
<th>Default</th>
|
|
38
|
+
<th>Description</th>
|
|
39
|
+
</tr>
|
|
40
|
+
</thead>
|
|
41
|
+
<tbody>
|
|
42
|
+
<tr>
|
|
43
|
+
<td><code>label</code></td>
|
|
44
|
+
<td><code>string | null</code></td>
|
|
45
|
+
<td><code>null</code></td>
|
|
46
|
+
<td>Text label above the slider, tied to the (first) projected input: it keeps its own <code>id</code> or is handed one, and the label points at it.</td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td><code>sliderType</code></td>
|
|
50
|
+
<td><code>'single' | 'range'</code></td>
|
|
51
|
+
<td><code>'single'</code></td>
|
|
52
|
+
<td>One thumb (single value) or two thumbs (min–max span).</td>
|
|
53
|
+
</tr>
|
|
54
|
+
<tr>
|
|
55
|
+
<td><code>showValue</code></td>
|
|
56
|
+
<td><code>boolean</code></td>
|
|
57
|
+
<td><code>true</code></td>
|
|
58
|
+
<td>Whether the current numeric value is rendered next to the slider.</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</tbody>
|
|
61
|
+
</table>
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### Single value
|
|
66
|
+
|
|
67
|
+
The default story holds the whole panel — switch `sliderType` to see the
|
|
68
|
+
second thumb arrive:
|
|
69
|
+
|
|
70
|
+
#### Story: Slider
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
export const Slider: Story = {
|
|
74
|
+
render: (args) => ({
|
|
75
|
+
props: { ...args },
|
|
76
|
+
template: `
|
|
77
|
+
<ui-intern-header theme="theme-light"></ui-intern-header>
|
|
78
|
+
<section class="relative flex flex-col w-96">
|
|
79
|
+
@if (sliderType === 'range') {
|
|
80
|
+
<ui-slider [label]="label" sliderType="range" [showValue]="showValue">
|
|
81
|
+
<input ui-tag type="range" class="ui" [(ngModel)]="low" [min]="min" [max]="max" [step]="step" />
|
|
82
|
+
<input ui-tag type="range" class="ui" [(ngModel)]="high" [min]="min" [max]="max" [step]="step" />
|
|
83
|
+
</ui-slider>
|
|
84
|
+
} @else {
|
|
85
|
+
<ui-slider [label]="label" [showValue]="showValue">
|
|
86
|
+
<input ui-tag type="range" class="ui" [(ngModel)]="value" [min]="min" [max]="max" [step]="step" />
|
|
87
|
+
</ui-slider>
|
|
88
|
+
}
|
|
89
|
+
</section>
|
|
90
|
+
`,
|
|
91
|
+
}),
|
|
92
|
+
};
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
```html
|
|
96
|
+
<ui-slider [label]="'Volume'">
|
|
97
|
+
<input ui-tag type="range" class="ui" [(ngModel)]="value" min="0" max="100" step="1" />
|
|
98
|
+
</ui-slider>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### Range (two thumbs)
|
|
104
|
+
|
|
105
|
+
The first projected input is the low bound, the second is the high bound. The component
|
|
106
|
+
keeps `low ≤ high` by clamping whichever thumb crosses the other, and the read-out shows
|
|
107
|
+
`low – high`.
|
|
108
|
+
|
|
109
|
+
[Open story: Range](?path=/story/forms-slider--range)
|
|
110
|
+
|
|
111
|
+
```html
|
|
112
|
+
<ui-slider [label]="'Price'" sliderType="range">
|
|
113
|
+
<input ui-tag type="range" class="ui" [(ngModel)]="low" min="0" max="100" step="1" />
|
|
114
|
+
<input ui-tag type="range" class="ui" [(ngModel)]="high" min="0" max="100" step="1" />
|
|
115
|
+
</ui-slider>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
### Steps
|
|
121
|
+
|
|
122
|
+
`min`, `max` and `step` are set on the projected native input.
|
|
123
|
+
|
|
124
|
+
[Open story: Steps](?path=/story/forms-slider--with-steps)
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### Without value read-out
|
|
129
|
+
|
|
130
|
+
[Open story: Without value read-out](?path=/story/forms-slider--value-hidden)
|
|
131
|
+
|
|
132
|
+
```html
|
|
133
|
+
<ui-slider [label]="'Volume'" [showValue]="false">
|
|
134
|
+
<input ui-tag type="range" class="ui" [(ngModel)]="value" min="0" max="100" step="1" />
|
|
135
|
+
</ui-slider>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Disabled
|
|
141
|
+
|
|
142
|
+
[Open story: Disabled](?path=/story/forms-slider--disabled)
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
### Switch
|
|
2
|
+
|
|
3
|
+
A toggle switch built on a native checkbox.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### What it does, and what it does not
|
|
8
|
+
|
|
9
|
+
A switch represents a **deliberate user decision**: both states are always
|
|
10
|
+
valid and the change takes effect immediately. There is no invalid state,
|
|
11
|
+
therefore the component has **no validation support** — no error input, no
|
|
12
|
+
error icon, no error overlay. If you need to enforce a choice (e.g. a required
|
|
13
|
+
consent), use `ui-checkbox` with validation instead.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
> **Guide:** recommendations for `ui-switch` — use for, not for, instead, shown in — are served by `get_guide` (name: `ui-switch`). The section above is the truth; the guide is the offer.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Overview
|
|
22
|
+
|
|
23
|
+
The `UiSwitchComponent` wraps a projected native checkbox (`ui-tag`) and styles
|
|
24
|
+
it as a track-and-knob toggle switch — purely with CSS on the input itself, so
|
|
25
|
+
semantics, keyboard handling and form integration come from the real checkbox.
|
|
26
|
+
It follows the same anatomy as the other form components: control on the left,
|
|
27
|
+
label alongside. The track matches the rendered height of `ui-checkbox`, so
|
|
28
|
+
mixed forms keep an even rhythm.
|
|
29
|
+
|
|
30
|
+
Give the projected input `role="switch"` so assistive technology announces a
|
|
31
|
+
switch instead of a checkbox.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### Properties
|
|
36
|
+
|
|
37
|
+
- `label`: (Input) The text label next to the switch. It is tied to the
|
|
38
|
+
switch: the projected input keeps its own `id` if it has one, otherwise the
|
|
39
|
+
component hands it one and points the label at it — a click on the label
|
|
40
|
+
flips the switch, a screen reader names it.
|
|
41
|
+
|
|
42
|
+
Colours are CSS custom properties, not inputs — see below. The knob carries
|
|
43
|
+
the position, so a coloured track says something about the switch itself (one
|
|
44
|
+
that guards data, for instance), not about whether it is on.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### Basic Example
|
|
49
|
+
|
|
50
|
+
The story binds the label to the model, so it reads the current state
|
|
51
|
+
(`on` / `off`):
|
|
52
|
+
|
|
53
|
+
#### Story: Switch
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
export const Switch: Story = {
|
|
57
|
+
render: (args) => {
|
|
58
|
+
return {
|
|
59
|
+
props: {
|
|
60
|
+
...args,
|
|
61
|
+
},
|
|
62
|
+
template: `
|
|
63
|
+
<ui-intern-header theme="theme-light"></ui-intern-header>
|
|
64
|
+
<section class="relative flex flex-col">
|
|
65
|
+
<ui-switch [label]="on ? 'on' : 'off'" [style.--switch-knob-on-color]="knobColor || null" [style.--switch-track-color]="trackColor || null">
|
|
66
|
+
<input
|
|
67
|
+
class="ui"
|
|
68
|
+
ui-tag
|
|
69
|
+
type="checkbox"
|
|
70
|
+
role="switch"
|
|
71
|
+
[(ngModel)]="on"
|
|
72
|
+
/>
|
|
73
|
+
</ui-switch>
|
|
74
|
+
</section>
|
|
75
|
+
`,
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Usage:**
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<ui-switch [label]="on ? 'on' : 'off'">
|
|
85
|
+
<input class="ui" ui-tag type="checkbox" role="switch" [(ngModel)]="on" />
|
|
86
|
+
</ui-switch>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Custom knob color
|
|
92
|
+
|
|
93
|
+
In the "on" state the knob takes `--switch-knob-on-color`; the track itself
|
|
94
|
+
stays neutral:
|
|
95
|
+
|
|
96
|
+
[Open story: Custom knob color](?path=/story/forms-switch--custom-knob-color)
|
|
97
|
+
|
|
98
|
+
**Usage:**
|
|
99
|
+
|
|
100
|
+
```html
|
|
101
|
+
<ui-switch [label]="'Pink'" [style.--switch-knob-on-color]="'#e91e63'">
|
|
102
|
+
<input class="ui" ui-tag type="checkbox" role="switch" [(ngModel)]="on" />
|
|
103
|
+
</ui-switch>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### Flat
|
|
109
|
+
|
|
110
|
+
The projected input carries `ui-flat` instead of `ui`: the rim disappears
|
|
111
|
+
into the track and the knob drops its lift, leaving two plain surfaces. Focus
|
|
112
|
+
is the one moment the rim returns — as a focus-colored border, never a glow,
|
|
113
|
+
because flat controls in this house do not use shadows.
|
|
114
|
+
|
|
115
|
+
[Open story: Flat](?path=/story/forms-switch--flat)
|
|
116
|
+
|
|
117
|
+
**Usage:**
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<ui-switch [label]="'Locked'" [style.--switch-knob-on-color]="'#f5a623'">
|
|
121
|
+
<input class="ui-flat" ui-tag type="checkbox" role="switch" [(ngModel)]="on" />
|
|
122
|
+
</ui-switch>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### Custom properties
|
|
128
|
+
|
|
129
|
+
Every surface the switch paints is a hook, so an app can dress it without
|
|
130
|
+
out-specifying the component's rules. Set them on the element or anywhere
|
|
131
|
+
above it — they inherit: the component declares none of them on its own
|
|
132
|
+
host, it only reads them with a token fallback, so a value set on a
|
|
133
|
+
container reaches every switch below. (It used to declare them on the host,
|
|
134
|
+
which beat anything inherited and made "set it once above" a claim the page
|
|
135
|
+
made and the component broke.)
|
|
136
|
+
|
|
137
|
+
<table class="ui">
|
|
138
|
+
<thead>
|
|
139
|
+
<tr>
|
|
140
|
+
<th>Name</th>
|
|
141
|
+
<th>Default</th>
|
|
142
|
+
<th>Description</th>
|
|
143
|
+
</tr>
|
|
144
|
+
</thead>
|
|
145
|
+
<tbody>
|
|
146
|
+
<tr>
|
|
147
|
+
<td><code>--switch-track-color</code></td>
|
|
148
|
+
<td><code>var(--ui-c-fourthly)</code></td>
|
|
149
|
+
<td>The track, in both states.</td>
|
|
150
|
+
</tr>
|
|
151
|
+
<tr>
|
|
152
|
+
<td><code>--switch-rim-color</code></td>
|
|
153
|
+
<td><code>var(--switch-track-color)</code></td>
|
|
154
|
+
<td>
|
|
155
|
+
The track's border — follows the track by default, so the rim is
|
|
156
|
+
invisible unless it is given a color of its own.
|
|
157
|
+
</td>
|
|
158
|
+
</tr>
|
|
159
|
+
<tr>
|
|
160
|
+
<td><code>--switch-knob-color</code></td>
|
|
161
|
+
<td><code>var(--ui-c-background)</code></td>
|
|
162
|
+
<td>The knob in the "off" state.</td>
|
|
163
|
+
</tr>
|
|
164
|
+
<tr>
|
|
165
|
+
<td><code>--switch-knob-on-color</code></td>
|
|
166
|
+
<td><code>#2196f3</code></td>
|
|
167
|
+
<td>The knob in the "on" state.</td>
|
|
168
|
+
</tr>
|
|
169
|
+
<tr>
|
|
170
|
+
<td><code>--switch-focus-color</code></td>
|
|
171
|
+
<td><code>var(--ui-c-focus)</code></td>
|
|
172
|
+
<td>
|
|
173
|
+
Border and glow while focused. The focus itself stays the library's
|
|
174
|
+
business — apps recolor it, they do not rebuild it.
|
|
175
|
+
</td>
|
|
176
|
+
</tr>
|
|
177
|
+
</tbody>
|
|
178
|
+
</table>
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### Animation
|
|
183
|
+
|
|
184
|
+
The knob squashes in travel direction while pressed (`:active`) and settles
|
|
185
|
+
with a small overshoot on release (a springy `cubic-bezier` on the `translate`
|
|
186
|
+
transition); its color cross-fades to `--switch-knob-on-color`. All of it is plain CSS
|
|
187
|
+
timed in quarters of the `--ui-time` token. With `prefers-reduced-motion` the
|
|
188
|
+
knob slides plainly without squash or overshoot.
|