@cscfi/csc-ui 4.0.0-alpha.9 → 4.0.0-rc.2
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 +36 -2
- package/dist/csc-ui.js +22771 -14908
- package/dist/custom-elements.json +8943 -5632
- package/dist/docs/c-accordion/usage.md +60 -0
- package/dist/docs/c-accordion-item/usage.md +1 -0
- package/dist/docs/c-alert/usage.md +5 -5
- package/dist/docs/c-autocomplete/usage.md +156 -0
- package/dist/docs/c-badge/usage.md +50 -0
- package/dist/docs/c-breadcrumb/usage.md +104 -0
- package/dist/docs/c-breadcrumb-item/usage.md +1 -0
- package/dist/docs/c-button/usage.md +13 -0
- package/dist/docs/c-button-group/usage.md +16 -2
- package/dist/docs/c-card/usage.md +55 -0
- package/dist/docs/c-card-actions/usage.md +1 -0
- package/dist/docs/c-card-content/usage.md +1 -0
- package/dist/docs/c-card-title/usage.md +3 -0
- package/dist/docs/c-checkbox/usage.md +37 -5
- package/dist/docs/c-color-picker/usage.md +160 -0
- package/dist/docs/c-csc-logo/usage.md +25 -0
- package/dist/docs/c-data-table/usage.md +180 -0
- package/dist/docs/c-date-picker/usage.md +224 -0
- package/dist/docs/c-divider/usage.md +36 -0
- package/dist/docs/c-file-upload/usage.md +189 -0
- package/dist/docs/c-icon/usage.md +51 -0
- package/dist/docs/c-icon-button/usage.md +80 -0
- package/dist/docs/c-link/usage.md +45 -1
- package/dist/docs/c-list/usage.md +50 -0
- package/dist/docs/c-list-item/usage.md +1 -0
- package/dist/docs/c-list-item-title/usage.md +1 -0
- package/dist/docs/c-loader/usage.md +52 -1
- package/dist/docs/c-login-button/usage.md +1 -0
- package/dist/docs/c-login-buttons/usage.md +48 -0
- package/dist/docs/c-login-card/usage.md +45 -0
- package/dist/docs/c-login-card-actions/usage.md +1 -0
- package/dist/docs/c-login-card-content/usage.md +1 -0
- package/dist/docs/c-login-card-title/usage.md +3 -0
- package/dist/docs/c-main/usage.md +21 -1
- package/dist/docs/c-menu/usage.md +15 -0
- package/dist/docs/c-menu-item/usage.md +11 -0
- package/dist/docs/c-message/usage.md +56 -0
- package/dist/docs/c-modal/usage.md +18 -12
- package/dist/docs/c-navigation-button/usage.md +32 -0
- package/dist/docs/c-number-field/usage.md +114 -0
- package/dist/docs/c-option/usage.md +1 -0
- package/dist/docs/c-option-value/usage.md +1 -0
- package/dist/docs/c-otp-input/usage.md +95 -0
- package/dist/docs/c-page/usage.md +44 -0
- package/dist/docs/c-pagination/usage.md +69 -0
- package/dist/docs/c-popover/usage.md +1 -1
- package/dist/docs/c-progress-bar/usage.md +1 -1
- package/dist/docs/c-progress-circle/usage.md +1 -1
- package/dist/docs/c-radio/usage.md +9 -6
- package/dist/docs/c-radio-group/usage.md +5 -6
- package/dist/docs/c-select/usage.md +131 -0
- package/dist/docs/c-side-navigation/usage.md +70 -0
- package/dist/docs/c-side-navigation-item/usage.md +1 -0
- package/dist/docs/c-side-navigation-title/usage.md +1 -0
- package/dist/docs/c-slider/usage.md +78 -0
- package/dist/docs/c-spinner/usage.md +1 -1
- package/dist/docs/c-status/usage.md +46 -0
- package/dist/docs/c-step/usage.md +1 -0
- package/dist/docs/c-steps/usage.md +35 -0
- package/dist/docs/c-sub-navigation-item/usage.md +1 -0
- package/dist/docs/c-switch/usage.md +10 -3
- package/dist/docs/c-tab/usage.md +1 -0
- package/dist/docs/c-tab-buttons/usage.md +15 -0
- package/dist/docs/c-tab-item/usage.md +1 -0
- package/dist/docs/c-tab-items/usage.md +1 -0
- package/dist/docs/c-table/usage.md +1 -1
- package/dist/docs/c-tabs/usage.md +77 -0
- package/dist/docs/c-tag/usage.md +1 -0
- package/dist/docs/c-tags/usage.md +85 -0
- package/dist/docs/c-text-field/usage.md +109 -0
- package/dist/docs/c-time-picker/usage.md +170 -0
- package/dist/docs/c-toasts/usage.md +27 -3
- package/dist/docs/c-toolbar/usage.md +17 -0
- package/dist/docs/c-tree-select/usage.md +156 -0
- package/dist/floating-ui.dom-DvzxEaDJ.js +1292 -0
- package/dist/styles/css/tailwind-theme.css +2 -1
- package/dist/styles/css/tokens.css +609 -178
- package/dist/vscode.css-custom-data.json +556 -99
- package/dist/vscode.html-custom-data.json +1050 -480
- package/dist/web-types.json +3303 -1707
- package/dist-types/components/c-accordion/CAccordion.vue.d.ts +21 -25
- package/dist-types/components/c-accordion-item/CAccordionItem.vue.d.ts +13 -12
- package/dist-types/components/c-alert/CAlert.vue.d.ts +12 -17
- package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +124 -31
- package/dist-types/components/c-breadcrumb/CBreadcrumb.vue.d.ts +35 -0
- package/dist-types/components/c-breadcrumb/fit.d.ts +29 -0
- package/dist-types/components/c-breadcrumb-item/CBreadcrumbItem.vue.d.ts +31 -0
- package/dist-types/components/c-button/CButton.vue.d.ts +52 -63
- package/dist-types/components/c-button-group/CButtonGroup.vue.d.ts +16 -14
- package/dist-types/components/c-card/CCard.vue.d.ts +2 -3
- package/dist-types/components/c-card-actions/CCardActions.vue.d.ts +5 -7
- package/dist-types/components/c-card-title/CCardTitle.vue.d.ts +11 -1
- package/dist-types/components/c-checkbox/CCheckbox.vue.d.ts +33 -52
- package/dist-types/components/c-color-picker/CColorPicker.vue.d.ts +189 -0
- package/dist-types/components/c-color-picker/colors.d.ts +66 -0
- package/dist-types/components/c-csc-logo/CCscLogo.vue.d.ts +1 -3
- package/dist-types/components/c-data-table/CDataTable.vue.d.ts +75 -51
- package/dist-types/components/c-date-picker/CDatePicker.vue.d.ts +277 -0
- package/dist-types/components/c-date-picker/dates.d.ts +119 -0
- package/dist-types/components/c-dropdown/CDropdown.vue.d.ts +51 -8
- package/dist-types/components/c-file-upload/CFileUpload.vue.d.ts +204 -0
- package/dist-types/components/c-file-upload/files.d.ts +99 -0
- package/dist-types/components/c-icon-button/CIconButton.vue.d.ts +23 -36
- package/dist-types/components/c-input/CInput.vue.d.ts +21 -43
- package/dist-types/components/c-link/CLink.vue.d.ts +6 -14
- package/dist-types/components/c-list/CList.vue.d.ts +4 -6
- package/dist-types/components/c-list-item/CListItem.vue.d.ts +14 -19
- package/dist-types/components/c-list-item-title/CListItemTitle.vue.d.ts +3 -2
- package/dist-types/components/c-loader/CLoader.vue.d.ts +13 -29
- package/dist-types/components/c-login-button/CLoginButton.vue.d.ts +9 -9
- package/dist-types/components/c-login-card/CLoginCard.vue.d.ts +11 -16
- package/dist-types/components/c-login-card-actions/CLoginCardActions.vue.d.ts +5 -7
- package/dist-types/components/c-login-card-title/CLoginCardTitle.vue.d.ts +11 -1
- package/dist-types/components/c-main/CMain.vue.d.ts +12 -5
- package/dist-types/components/c-menu/CMenu.vue.d.ts +17 -16
- package/dist-types/components/c-menu-item/CMenuItem.vue.d.ts +27 -35
- package/dist-types/components/c-message/CMessage.vue.d.ts +5 -15
- package/dist-types/components/c-modal/CModal.vue.d.ts +3 -3
- package/dist-types/components/c-navigation-button/CNavigationButton.vue.d.ts +20 -1
- package/dist-types/components/c-number-field/CNumberField.vue.d.ts +169 -0
- package/dist-types/components/c-number-field/numbers.d.ts +58 -0
- package/dist-types/components/c-option/COption.vue.d.ts +1 -1
- package/dist-types/components/c-otp-input/COtpInput.vue.d.ts +16 -30
- package/dist-types/components/c-page/CPage.vue.d.ts +2 -3
- package/dist-types/components/c-pagination/CPagination.vue.d.ts +56 -26
- package/dist-types/components/c-popover/CPopover.vue.d.ts +11 -7
- package/dist-types/components/c-progress-bar/CProgressBar.vue.d.ts +10 -14
- package/dist-types/components/c-progress-circle/CProgressCircle.vue.d.ts +7 -7
- package/dist-types/components/c-radio-group/CRadioGroup.vue.d.ts +11 -8
- package/dist-types/components/c-select/CSelect.vue.d.ts +119 -35
- package/dist-types/components/c-side-navigation/CSideNavigation.vue.d.ts +10 -18
- package/dist-types/components/c-side-navigation-item/CSideNavigationItem.vue.d.ts +22 -14
- package/dist-types/components/c-slider/CSlider.vue.d.ts +29 -73
- package/dist-types/components/c-spinner/CSpinner.vue.d.ts +4 -8
- package/dist-types/components/c-status/CStatus.vue.d.ts +8 -9
- package/dist-types/components/c-step/CStep.vue.d.ts +6 -4
- package/dist-types/components/c-steps/CSteps.vue.d.ts +3 -7
- package/dist-types/components/c-sub-navigation-item/CSubNavigationItem.vue.d.ts +23 -17
- package/dist-types/components/c-switch/CSwitch.vue.d.ts +17 -30
- package/dist-types/components/c-tab/CTab.vue.d.ts +11 -28
- package/dist-types/components/c-tab-buttons/CTabButtons.vue.d.ts +11 -13
- package/dist-types/components/c-tab-item/CTabItem.vue.d.ts +4 -5
- package/dist-types/components/c-tab-items/CTabItems.vue.d.ts +5 -4
- package/dist-types/components/c-table/CTable.vue.d.ts +7 -7
- package/dist-types/components/c-tabs/CTabs.vue.d.ts +13 -20
- package/dist-types/components/c-tag/CTag.vue.d.ts +22 -21
- package/dist-types/components/c-tags/CTags.vue.d.ts +9 -10
- package/dist-types/components/c-text-field/CTextField.vue.d.ts +74 -77
- package/dist-types/components/c-time-picker/CTimePicker.vue.d.ts +205 -0
- package/dist-types/components/c-time-picker/times.d.ts +82 -0
- package/dist-types/components/c-toast/CToast.vue.d.ts +3 -4
- package/dist-types/components/c-toast/swipe.d.ts +40 -0
- package/dist-types/components/c-toasts/CToasts.vue.d.ts +14 -16
- package/dist-types/components/c-toolbar/CToolbar.vue.d.ts +10 -1
- package/dist-types/components/c-tooltip/CTooltip.vue.d.ts +12 -8
- package/dist-types/components/c-tree-select/CTreeSelect.vue.d.ts +257 -0
- package/dist-types/index.d.ts +41 -32
- package/dist-types/registry.d.ts +9 -0
- package/dist-types/shared/FieldMessage.vue.d.ts +8 -5
- package/dist-types/shared/PanelHeadingRow.vue.d.ts +13 -0
- package/dist-types/shared/SelectionIndicator.vue.d.ts +21 -0
- package/dist-types/shared/TypedField.vue.d.ts +48 -0
- package/dist-types/shared/appDefaults.d.ts +75 -0
- package/dist-types/shared/defineElement.d.ts +1 -0
- package/dist-types/shared/inputMask.d.ts +106 -0
- package/dist-types/shared/lightDismiss.d.ts +35 -0
- package/dist-types/shared/modalStack.d.ts +4 -3
- package/dist-types/shared/navigationDrawer.d.ts +4 -0
- package/dist-types/shared/optionLabel.d.ts +18 -0
- package/dist-types/shared/pageLock.d.ts +26 -0
- package/dist-types/shared/peekCap.d.ts +35 -0
- package/dist-types/shared/popoverChain.d.ts +13 -10
- package/dist-types/shared/positionArea.d.ts +9 -4
- package/dist-types/shared/reducedMotion.d.ts +10 -0
- package/dist-types/shared/selectAll.d.ts +29 -0
- package/dist-types/shared/splitMatches.d.ts +18 -0
- package/dist-types/shared/useAnchoredPanel.d.ts +107 -0
- package/dist-types/shared/useControlAttrs.d.ts +8 -0
- package/dist-types/shared/useDesignatedTrigger.d.ts +5 -4
- package/dist-types/shared/useFallbackPosition.d.ts +71 -0
- package/dist-types/shared/useHostEmit.d.ts +38 -0
- package/dist-types/shared/useIdReferences.d.ts +39 -0
- package/dist-types/shared/useKeyboardModality.d.ts +7 -0
- package/dist-types/shared/useNarrowViewport.d.ts +19 -0
- package/dist-types/shared/useScrollStrip.d.ts +39 -0
- package/dist-types/shared/useStatusAnnouncer.d.ts +33 -0
- package/dist-types/shared/useTypedField.d.ts +108 -0
- package/dist-types/shared/valueEvents.d.ts +41 -0
- package/dist-types/shared/visualViewport.d.ts +51 -0
- package/dist-types/tag-name-map.d.ts +1572 -672
- package/dist-types/theme/applyTheme.d.ts +6 -6
- package/dist-types/theme/chart-data.d.ts +51 -0
- package/dist-types/theme/ramp.d.ts +38 -0
- package/dist-types/theme/themeMode.d.ts +51 -0
- package/dist-types/types.d.ts +7 -11
- package/package.json +32 -21
- package/dist/css-anchor-positioning-fn-RTxo68pt.js +0 -6447
- package/dist/docs/c-toast/usage.md +0 -1
- package/dist-types/shared/anchorPolyfill.d.ts +0 -24
- package/dist-types/shared/emitModelValue.d.ts +0 -37
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
A single line of text under a form control: a neutral hint, or an error
|
|
2
|
+
message that takes its place while the control is invalid.
|
|
3
|
+
|
|
4
|
+
The library's form fields draw this line themselves from their own `hint`,
|
|
5
|
+
`error-message` and `invalid` props, so a field never needs a `c-message`
|
|
6
|
+
beside it. Use `c-message` under a control that has no message line of its
|
|
7
|
+
own, such as a native input or a control you build, to give it the same hint
|
|
8
|
+
and error presentation:
|
|
9
|
+
|
|
10
|
+
```html
|
|
11
|
+
<c-message hint="Use your organization email address"></c-message>
|
|
12
|
+
<c-message error-message="Email is required" invalid></c-message>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## When to use
|
|
16
|
+
|
|
17
|
+
- Under a control of your own that needs a hint or an error message matching
|
|
18
|
+
the library's fields.
|
|
19
|
+
- Not under a `c-*` field — set the field's `hint` and `error-message`
|
|
20
|
+
instead.
|
|
21
|
+
- Not for the status of a page or section — use `c-alert`; for transient
|
|
22
|
+
feedback on an action, use `c-toasts`.
|
|
23
|
+
|
|
24
|
+
## Hint and error message
|
|
25
|
+
|
|
26
|
+
`hint` shows in muted text whenever it is set. While `invalid` is set and
|
|
27
|
+
`error-message` is not empty, the error message replaces the hint, in the
|
|
28
|
+
error colour and with an error icon. `invalid` without an `error-message`
|
|
29
|
+
keeps showing the hint as a hint. Deciding validity and wording the message
|
|
30
|
+
stay yours. When the text changes, the new one slides in.
|
|
31
|
+
|
|
32
|
+
With neither a hint nor an error message to show, the element renders nothing
|
|
33
|
+
and takes no height. A field's own message area keeps its height instead, so
|
|
34
|
+
an error appearing there does not shift the layout; reserve the space
|
|
35
|
+
yourself where that matters.
|
|
36
|
+
|
|
37
|
+
## Accessibility
|
|
38
|
+
|
|
39
|
+
The text carries a visually hidden "Hint:" or "Error:" prefix (fixed English
|
|
40
|
+
strings), and the icon is hidden from assistive technology. `c-message` is
|
|
41
|
+
not a live region and does not associate itself with any control, so a new
|
|
42
|
+
error message is not announced; if it must be heard when it appears, announce
|
|
43
|
+
it from your own live region.
|
|
44
|
+
|
|
45
|
+
## Customization
|
|
46
|
+
|
|
47
|
+
`::part(root)` is the message row. Its colours come from the muted
|
|
48
|
+
on-surface role for the hint and the error role for the error message. It
|
|
49
|
+
has the same 12px inline padding as the message line under the library's
|
|
50
|
+
fields; remove it to align with a control that has none:
|
|
51
|
+
|
|
52
|
+
```css
|
|
53
|
+
c-message::part(root) {
|
|
54
|
+
padding-inline: 0;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
@@ -2,7 +2,8 @@ Modals interrupt the page for a task that must be completed (or explicitly
|
|
|
2
2
|
cancelled) before continuing — confirmations, short forms, destructive-action
|
|
3
3
|
warnings. The slotted content is typically a `c-card`.
|
|
4
4
|
|
|
5
|
-
Open state is controlled: bind `value` (v-model) and
|
|
5
|
+
Open state is controlled: bind `value` (v-model), or set it and listen for
|
|
6
|
+
`change`, which carries `false` when the modal dismisses itself.
|
|
6
7
|
Modals may be stacked — opening a second modal makes it the active one; the
|
|
7
8
|
one beneath is dimmed and inert until it becomes topmost again.
|
|
8
9
|
|
|
@@ -14,24 +15,29 @@ one beneath is dimmed and inert until it becomes topmost again.
|
|
|
14
15
|
## When not to use
|
|
15
16
|
|
|
16
17
|
- Passive notifications — use `c-toasts`, which stays visible and clickable
|
|
17
|
-
|
|
18
|
+
_above_ any open modal.
|
|
18
19
|
- Large multi-step flows — prefer a dedicated page.
|
|
19
20
|
|
|
20
21
|
## Dismissal
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
the
|
|
23
|
+
Escape closes every modal, as it closes a native dialog: it is the keyboard
|
|
24
|
+
user's way out. Escape peels overlays innermost-first: with a menu or select
|
|
25
|
+
open inside the modal, the first press closes that overlay, the next one
|
|
26
|
+
reaches the modal.
|
|
27
|
+
|
|
28
|
+
`dismissable` governs the backdrop: a dismissable modal also closes on a
|
|
29
|
+
click outside its dialog, while a non-dismissable one (the default) responds
|
|
30
|
+
to that click with a nudge animation instead of closing.
|
|
31
|
+
|
|
32
|
+
Because Escape closes any modal, a page that sets `value` must also hear
|
|
33
|
+
`change` (or bind `v-model`): otherwise its own state still says open, and
|
|
34
|
+
setting it to `true` again does nothing.
|
|
28
35
|
|
|
29
36
|
## Accessibility
|
|
30
37
|
|
|
31
|
-
- **Always set `aria-label` on the `c-modal` element
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Opening an unlabeled modal logs a console warning.
|
|
38
|
+
- **Always name the dialog:** set `aria-label` on the `c-modal` element, or
|
|
39
|
+
`aria-labelledby` with the id of the title in your content. Opening an
|
|
40
|
+
unnamed modal logs a console warning.
|
|
35
41
|
- Focus moves to the first `[autofocus]` element in your content if present,
|
|
36
42
|
else the first focusable element, else the dialog itself. Put `autofocus`
|
|
37
43
|
on the least destructive action of a confirmation dialog.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
The hamburger menu button that opens and closes the mobile drawer of a `c-side-navigation`.
|
|
2
|
+
|
|
3
|
+
Place it where the user expects the menu — typically at the end of the `c-toolbar` — and show it only while the navigation is `mobile`. No wiring is needed: each `c-side-navigation` toggles its drawer when any `c-navigation-button` on the page is clicked, and fires `change:open` with the new state.
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<c-toolbar>
|
|
7
|
+
…
|
|
8
|
+
<c-navigation-button v-if="isMobile" />
|
|
9
|
+
</c-toolbar>
|
|
10
|
+
|
|
11
|
+
<c-side-navigation :mobile="isMobile">…</c-side-navigation>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## How the navigation hears it
|
|
15
|
+
|
|
16
|
+
The navigation listens on `document.body` for a click whose target is a `c-navigation-button`. Keep the button in the page's own DOM rather than inside another component's shadow root, and let its click reach the body: a listener that stops the click's propagation keeps the drawer from toggling. Every `c-side-navigation` on the page responds to every navigation button.
|
|
17
|
+
|
|
18
|
+
The button fires no event of its own. To follow the drawer's state, listen to `change:open` on the navigation, which also covers the drawer's close button, the backdrop and item activation.
|
|
19
|
+
|
|
20
|
+
## Accessibility
|
|
21
|
+
|
|
22
|
+
The button is a native `<button>`, reached with Tab and pressed with Enter or Space. Its accessible name is "Menu", from `texts.label`; an `aria-label` on the element does not reach the inner button. Beside a `mobile` `c-side-navigation` it reports the drawer as expanded or collapsed (`aria-expanded`). Translate it per element:
|
|
23
|
+
|
|
24
|
+
```vue
|
|
25
|
+
<c-navigation-button :texts="{ label: 'Valikko' }" />
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
or for every navigation button at once with `applyDefaults({ 'c-navigation-button': { texts } })` (Customization → App-wide prop defaults).
|
|
29
|
+
|
|
30
|
+
## Customization
|
|
31
|
+
|
|
32
|
+
`::part(root)` is the inner icon button's box, for placement such as margins.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
A field for a number — an integer, or one with decimals — shown with thousands separators as it is typed.
|
|
2
|
+
|
|
3
|
+
## Value
|
|
4
|
+
|
|
5
|
+
The value is a number, or `null` while the field holds no digit. What the
|
|
6
|
+
field shows is grouped text — `1 234 567,89` — but the value is always the
|
|
7
|
+
plain number (`1234567.89`), so it needs no parsing. Bind it with `v-model`,
|
|
8
|
+
or listen for `update:value`:
|
|
9
|
+
|
|
10
|
+
```vue
|
|
11
|
+
<c-number-field v-model="amount" label="Amount" />
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The value follows the text on every keystroke: typing `1234,` gives `1234`,
|
|
15
|
+
a lone `-` gives `null`. Only typing and stepping emit; setting `value` shows
|
|
16
|
+
the number without emitting it. `change` fires when the number is committed:
|
|
17
|
+
Enter or leaving the field after typing, each arrow-key or step-button step,
|
|
18
|
+
and the release that ends a held step button.
|
|
19
|
+
|
|
20
|
+
Unlike `c-text-field type="number"`, the native number input, the field shows
|
|
21
|
+
separators and never changes the number on a scroll.
|
|
22
|
+
|
|
23
|
+
## Separators
|
|
24
|
+
|
|
25
|
+
The thousands and decimal separators follow the page's `lang`: a space and
|
|
26
|
+
`,` under `lang="fi"`, `,` and `.` under `lang="en"`. Set `group-separator`
|
|
27
|
+
and `decimal-separator` to fix them for one field, or for the whole app with
|
|
28
|
+
`applyDefaults({ 'c-number-field': { groupSeparator: ' ', decimalSeparator: ',' } })`.
|
|
29
|
+
|
|
30
|
+
The field inserts the group separators itself, and typed or pasted ones are
|
|
31
|
+
ignored. Either `.` or `,` typed is read as the decimal separator — unless
|
|
32
|
+
it is the group separator — so the decimal key of any keyboard works. A
|
|
33
|
+
pasted `1,234.56` or `1.234,56` reads as `1234.56` either way.
|
|
34
|
+
|
|
35
|
+
## Decimals
|
|
36
|
+
|
|
37
|
+
`decimals` is the most fraction digits the field takes. By default it is
|
|
38
|
+
`0`, an integer field that ignores the decimal key:
|
|
39
|
+
|
|
40
|
+
```vue
|
|
41
|
+
<c-number-field
|
|
42
|
+
v-model="price"
|
|
43
|
+
:decimals="2"
|
|
44
|
+
fixed-decimals
|
|
45
|
+
label="Price"
|
|
46
|
+
min="0"
|
|
47
|
+
>
|
|
48
|
+
<span slot="post">€</span>
|
|
49
|
+
</c-number-field>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Typing never pads the fraction. With `fixed-decimals` the field pads it to
|
|
53
|
+
exactly `decimals` digits when the user leaves it — `12,5` shows as `12,50` —
|
|
54
|
+
while the value stays `12.5`. A value set with more fraction digits than
|
|
55
|
+
`decimals` is shown rounded.
|
|
56
|
+
|
|
57
|
+
The integer part takes up to 15 digits, the most a JavaScript number holds
|
|
58
|
+
exactly.
|
|
59
|
+
|
|
60
|
+
## Range
|
|
61
|
+
|
|
62
|
+
`min` and `max` never change what the user typed. A number outside them is
|
|
63
|
+
kept and emitted, and the host exposes the `out-of-range` custom state and a
|
|
64
|
+
read-only `outOfRange` property. The field shows no error of its own:
|
|
65
|
+
|
|
66
|
+
```vue
|
|
67
|
+
<c-number-field
|
|
68
|
+
v-model="count"
|
|
69
|
+
:error-message="error"
|
|
70
|
+
:invalid="!!error"
|
|
71
|
+
label="Participants"
|
|
72
|
+
max="50"
|
|
73
|
+
min="1"
|
|
74
|
+
@change="error = $event.target.outOfRange ? 'Enter 1 to 50' : ''"
|
|
75
|
+
/>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
With `min` at `0` or above, the minus key is ignored.
|
|
79
|
+
|
|
80
|
+
## Step
|
|
81
|
+
|
|
82
|
+
The buttons at the end of the field move the number one `step` up or down
|
|
83
|
+
(`1` by default); holding one repeats. The arrow keys do the same, and Page Up
|
|
84
|
+
and Page Down move ten steps:
|
|
85
|
+
|
|
86
|
+
```vue
|
|
87
|
+
<c-number-field v-model="volume" label="Volume" max="100" min="0" step="5" />
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
A step lands on the grid of `step` counted from `min` (or `0`): from a typed
|
|
91
|
+
`12`, a step of `5` goes up to `15` or down to `10`. A typed number off the
|
|
92
|
+
grid stays as typed.
|
|
93
|
+
|
|
94
|
+
Stepping never leaves `min` and `max`: it stops on the bound, and the button
|
|
95
|
+
for that direction is disabled there. From an out-of-range number, a step
|
|
96
|
+
goes back to the nearest bound. An empty field counts from `0`.
|
|
97
|
+
|
|
98
|
+
A stepped number is rounded to `decimals`, so a `step` finer than `decimals`
|
|
99
|
+
allows (`0.5` on an integer field) does not step as written; keep the two
|
|
100
|
+
in line.
|
|
101
|
+
|
|
102
|
+
The buttons stay out of the tab order and never take focus, so tapping one
|
|
103
|
+
on a phone does not open the keyboard. To translate their accessible labels,
|
|
104
|
+
set `texts`: `{ stepUp: 'Lisää', stepDown: 'Vähennä' }`, or app-wide with
|
|
105
|
+
`applyDefaults`.
|
|
106
|
+
|
|
107
|
+
## Keyboard
|
|
108
|
+
|
|
109
|
+
On a phone the field asks for the numeric keyboard, or a decimal one when
|
|
110
|
+
`decimals` is set. Numeric keyboards on iOS have no minus key: there, a
|
|
111
|
+
negative number is reached by stepping below zero.
|
|
112
|
+
|
|
113
|
+
Use the `pre` and `post` slots for a currency sign or a unit; the step
|
|
114
|
+
buttons follow the `post` content.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
One option of a `c-select` or `c-autocomplete`: `value` is what the field reports when the option is picked, and the option's label is its `name`, else the text of a `c-option-value` inside it, else its whole text. `disabled` keeps it from being picked, and `selected` sets the field's initial value once, silently, while that value is empty — with a bound `v-model`, initialise the model instead.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The label region of a `c-option`: wraps the text that c-select and c-autocomplete use as the option's label — in the closed field, its tag and the autocomplete filter — so the option can carry a description or an icon beside its label, and the region in which c-autocomplete marks the runs equal to the query (`::part(match)`).
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
A one-time-code field: a row of single-digit boxes, filled in order as the
|
|
2
|
+
user types or pastes a code, under a group label and above a hint or error
|
|
3
|
+
message.
|
|
4
|
+
|
|
5
|
+
Set `length` to the number of digits (six by default), name the field with
|
|
6
|
+
`label`, and listen for `completion` to act as soon as every box is filled:
|
|
7
|
+
|
|
8
|
+
```vue
|
|
9
|
+
<c-otp-input
|
|
10
|
+
v-model="code"
|
|
11
|
+
:error-message="error"
|
|
12
|
+
:invalid="!!error"
|
|
13
|
+
hint="Enter the 6-digit code we sent you"
|
|
14
|
+
label="Verification code"
|
|
15
|
+
@completion="verify"
|
|
16
|
+
/>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## When to use
|
|
20
|
+
|
|
21
|
+
- Entering a short numeric code sent by text message or email, or shown by an
|
|
22
|
+
authenticator app.
|
|
23
|
+
- Not for other numbers — use `c-number-field`. For a code with letters or a
|
|
24
|
+
fixed format, use `c-text-field` with a `mask`.
|
|
25
|
+
|
|
26
|
+
## Value
|
|
27
|
+
|
|
28
|
+
The value is the digits entered so far, joined into one string: `'12'` after
|
|
29
|
+
two digits, `''` when none. It is the same string everywhere — the `value`
|
|
30
|
+
property, `update:value` and `change`. Every change fires `update:value` and
|
|
31
|
+
`input`; `change` fires when the code is committed, on Enter or when focus
|
|
32
|
+
leaves the boxes after a change (moving between the boxes does not count).
|
|
33
|
+
|
|
34
|
+
The digits run from the first box up to the first empty one: clearing a box in
|
|
35
|
+
the middle ends the value there, and the digits after it count again once it
|
|
36
|
+
is filled.
|
|
37
|
+
|
|
38
|
+
`completion` fires with the whole code whenever a change leaves every box
|
|
39
|
+
filled, so editing a complete code fires it again with the new code.
|
|
40
|
+
|
|
41
|
+
Setting `value` fills the boxes from the first one and fires nothing; set it
|
|
42
|
+
to `''` to clear them.
|
|
43
|
+
|
|
44
|
+
## Typing and pasting
|
|
45
|
+
|
|
46
|
+
Each box takes one digit and brings up the numeric keyboard on a phone.
|
|
47
|
+
Typing a digit moves focus to the next box, and focusing a box selects its
|
|
48
|
+
digit, so typing replaces it. Backspace in an empty box moves back to the
|
|
49
|
+
previous one. Anything but a digit — a letter, a space, punctuation — is
|
|
50
|
+
dropped as it is typed.
|
|
51
|
+
|
|
52
|
+
Pasting a code into the first box fills the boxes in order, up to `length`
|
|
53
|
+
digits, and moves focus to the last box filled. Spaces and line breaks in the
|
|
54
|
+
pasted text are skipped; a paste with any other character that is not a digit
|
|
55
|
+
is ignored. The boxes opt out of browser and password-manager autofill.
|
|
56
|
+
|
|
57
|
+
## Label and validation
|
|
58
|
+
|
|
59
|
+
The `label` prop names the group; for richer label content, put it in the
|
|
60
|
+
default slot instead (the prop wins when both are set). `required` adds the
|
|
61
|
+
required marker to the label; enforcing it is your form logic's job.
|
|
62
|
+
|
|
63
|
+
Validation is yours too: set `invalid` and an `error-message` explaining why.
|
|
64
|
+
The boxes take the error colour and the message replaces the `hint`. While
|
|
65
|
+
invalid without an `error-message`, the boxes are still coloured but the hint
|
|
66
|
+
keeps rendering as a hint. Checking the code on `completion` or `change` fits
|
|
67
|
+
most flows. `hide-details` hides the hint and the error message.
|
|
68
|
+
|
|
69
|
+
## Accessibility
|
|
70
|
+
|
|
71
|
+
- The boxes form a `role="group"` named by the label. Without a `label` or
|
|
72
|
+
slotted label the group has no name, so always give it one.
|
|
73
|
+
- Each box is its own input and Tab stop, labelled with its position ("Enter
|
|
74
|
+
code - digit number - 2 of 6") and described by the hint or error message.
|
|
75
|
+
`required` marks every box `aria-required`, and `invalid` every box
|
|
76
|
+
`aria-invalid`.
|
|
77
|
+
- About 1.4 seconds after the digits stop changing, a polite live region reads
|
|
78
|
+
what has been entered ("Currently entered - 1 - 2 - 3"), prefixed with the
|
|
79
|
+
error message while one is shown.
|
|
80
|
+
- The box labels and the announcement are fixed English strings.
|
|
81
|
+
- `autofocus` focuses the first box when the field mounts. Use it where
|
|
82
|
+
entering the code is the page's only task.
|
|
83
|
+
|
|
84
|
+
## Customization
|
|
85
|
+
|
|
86
|
+
Restyle via CSS parts: `::part(root)` wraps the label, the boxes and the
|
|
87
|
+
message; `::part(label)` is the group label; `::part(digits)` is the row of
|
|
88
|
+
boxes; `::part(input)` is each box; `::part(message)` is the hint or error
|
|
89
|
+
message.
|
|
90
|
+
|
|
91
|
+
```css
|
|
92
|
+
c-otp-input::part(input) {
|
|
93
|
+
font-family: monospace;
|
|
94
|
+
}
|
|
95
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
The routed-content region of the dashboard layout: inside `c-main` it fills the area beside the side navigation and below the toolbar, pads the current view's content and keeps an optional footer at its bottom edge.
|
|
2
|
+
|
|
3
|
+
Put the view's content in the default slot. The page is a plain region: it grows with its content and never scrolls on its own; the document does.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<c-main>
|
|
7
|
+
<c-toolbar>…</c-toolbar>
|
|
8
|
+
<c-side-navigation>…</c-side-navigation>
|
|
9
|
+
|
|
10
|
+
<c-page>
|
|
11
|
+
<h1>Reports</h1>
|
|
12
|
+
…
|
|
13
|
+
<footer slot="footer">CSC – IT Center for Science</footer>
|
|
14
|
+
</c-page>
|
|
15
|
+
</c-main>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Placement
|
|
19
|
+
|
|
20
|
+
Slot the page as a direct child of `c-main`, which places it in the dashboard layout's page area; a layout has one page, and the router swaps the content inside it. With `disable-layout`, `c-main` still stretches the page down to the bottom of the viewport. Outside `c-main` the page is as tall as its content, unless you give it a height.
|
|
21
|
+
|
|
22
|
+
## Content area
|
|
23
|
+
|
|
24
|
+
The default slot sits in a container up to 1280px wide, aligned to the start edge of the page area rather than centred. Its padding grows with the viewport: 12px, 16px from 640px wide and 24px from 768px.
|
|
25
|
+
|
|
26
|
+
## Footer
|
|
27
|
+
|
|
28
|
+
Content in the `footer` slot goes below the container, outside its padding and width limit. Inside `c-main` the page fills at least the rest of the viewport, so the footer sits at the bottom edge of a short page and follows the content of a long one. The footer element is only as wide as its own content; give it `width: 100%` to span the page area.
|
|
29
|
+
|
|
30
|
+
## Scroll indicator
|
|
31
|
+
|
|
32
|
+
`scroll-indicator` adds a 4px primary bar fixed to the top edge of the viewport, whose length shows how far the document has been scrolled. It is visual only and is not announced.
|
|
33
|
+
|
|
34
|
+
## Customization
|
|
35
|
+
|
|
36
|
+
`::part(container)` is the content wrapper, where the width limit and padding live:
|
|
37
|
+
|
|
38
|
+
```css
|
|
39
|
+
c-page::part(container) {
|
|
40
|
+
margin-inline: auto;
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`::part(scroll-indicator)` is the scroll indicator's bar. The page has no `root` part; style the `c-page` element itself for its own box.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
A page navigation bar for a list split into pages: previous and next buttons around a window of page buttons, with a page-size menu and the range of items shown.
|
|
2
|
+
|
|
3
|
+
Its `value` is one object holding the item count, the current page and the page size. Bind it with `v-model`, or set it and listen for `change`. Objects have no attribute form, so `value` is a DOM property: `v-model` or `:value` in Vue, the React wrapper's `value`, property assignment in plain JavaScript.
|
|
4
|
+
|
|
5
|
+
```vue
|
|
6
|
+
<c-pagination v-model="pagination" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Paging through a list or a table you render yourself — a `c-table`, a list of cards — that would be too long to show at once.
|
|
12
|
+
- Not with `c-data-table`: it renders its own pagination once its `page-size` is set.
|
|
13
|
+
|
|
14
|
+
## Value
|
|
15
|
+
|
|
16
|
+
`value` is a `CPaginationOptions` object:
|
|
17
|
+
|
|
18
|
+
- `itemCount` (required) — the number of items to page through. The buttons, previous and next included, appear only while it is above 0.
|
|
19
|
+
- `page` — the current page, counting from 1. Default 1.
|
|
20
|
+
- `pageSize` — items per page. Default 25.
|
|
21
|
+
- `pageSizes` — the sizes the page-size menu offers. Default `[5, 25, 50, 100]`.
|
|
22
|
+
- `totalVisible` — the most page buttons shown at once, ellipses included. Default 7. With more pages than that, the first and last page stay in view and an ellipsis stands for the pages left out.
|
|
23
|
+
|
|
24
|
+
Each pick — a page button, previous, next, a page size — emits a new object: your fields, the picked `page` and `pageSize`, and `startFrom` and `endTo`, the 0-based indices of the page's first and last item. A new page size returns to page 1. `startFrom` and `endTo` are set only on emitted values; on a short last page `endTo` is the last item, so `items.slice(startFrom, endTo + 1)` gives the page's items.
|
|
25
|
+
|
|
26
|
+
The pagination never writes into your object, and setting `value` emits nothing: it only moves the controls to the new value. A new object does that even when its fields are unchanged, so write the emitted value back (as `v-model` does) or keep the object stable between renders. An object literal re-created on every React render resets the page each time.
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
`c-pagination` is a value control: each pick fires `change` with the new value, along with `update:value` carrying the same value and a bubbling `input`. In Vue, `v-model` rides these; in React, `onChange` receives the value as `event.detail`.
|
|
31
|
+
|
|
32
|
+
## Layout
|
|
33
|
+
|
|
34
|
+
- `hide-details` hides the page-size menu and the range text, leaving the buttons.
|
|
35
|
+
- `hide-range` hides only the range text.
|
|
36
|
+
- `simple` drops the page buttons and moves previous and next to the bar's end; the range text is then the only sign of position. With `hide-details simple`, previous and next are all that remain.
|
|
37
|
+
- `size="small"` renders compact buttons.
|
|
38
|
+
|
|
39
|
+
While both fit, the page-size menu and the range text share a row, the range at its right edge; in a narrow container the range moves under the menu.
|
|
40
|
+
|
|
41
|
+
## Texts
|
|
42
|
+
|
|
43
|
+
Every built-in string can be replaced through `texts`, merged key by key over the English defaults: `pagination` (the landmark's name, "Pagination"), `pageSize` (the menu's label, "Items per page:"), `previousPage` and `nextPage` (the arrow buttons' names), `page` (a page button's name, from the page and the page count: "page 3 of 10") and `range` (the range text, from the first and last item, counting from 1, and the item count: "11 - 20 of 96 items"). Some keys are functions, so bind the object as a DOM property:
|
|
44
|
+
|
|
45
|
+
```vue
|
|
46
|
+
<c-pagination
|
|
47
|
+
v-model="pagination"
|
|
48
|
+
:texts="{
|
|
49
|
+
nextPage: 'Seuraava sivu',
|
|
50
|
+
page: (page, pageCount) => `sivu ${page} / ${pageCount}`,
|
|
51
|
+
pageSize: 'Kohteita sivulla:',
|
|
52
|
+
pagination: 'Sivutus',
|
|
53
|
+
previousPage: 'Edellinen sivu',
|
|
54
|
+
range: (start, end, count) => `${start}–${end} / ${count}`,
|
|
55
|
+
}"
|
|
56
|
+
/>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
To translate every pagination at once, set `texts` app-wide with `applyDefaults({ 'c-pagination': { texts } })` (Customization → App-wide prop defaults); a per-instance `texts` still wins key by key. The app-wide texts also reach the pager inside `c-data-table`, except for keys the table's own `texts` set.
|
|
60
|
+
|
|
61
|
+
## Accessibility
|
|
62
|
+
|
|
63
|
+
- The bar is a `<nav>` landmark named by `texts.pagination`. With several on a page, give each its own name.
|
|
64
|
+
- The current page's button carries `aria-current="page"`. Page buttons are named by `texts.page`, the arrows by `texts.previousPage` and `texts.nextPage`, and the arrows are disabled on the first and last page. The page-size button is named by `texts.pageSize` followed by the current size ("Items per page: 25"). The ellipses are hidden from assistive technology and out of the tab order.
|
|
65
|
+
- A page change is not announced. When the paged content updates elsewhere on the page, move focus to it, or announce the change, where the user needs to follow it.
|
|
66
|
+
|
|
67
|
+
## Customization
|
|
68
|
+
|
|
69
|
+
Restyle through the parts: `::part(root)` (the `<nav>`), `::part(details)` (the page-size menu and the range text), `::part(items-per-page)` (the menu's label and button) and `::part(pages)` (the list of arrow and page buttons). The buttons are `c-icon-button`s whose own parts are not forwarded. Colours come from the semantic tokens; override the tokens to re-theme.
|
|
@@ -22,7 +22,7 @@ Popovers nest: a control inside one popover's panel can open another. The open p
|
|
|
22
22
|
|
|
23
23
|
## Accessibility
|
|
24
24
|
|
|
25
|
-
The panel is a non-modal `role="dialog"` and needs an accessible name: the `heading` prop provides one, or set `aria-label` on the `c-popover` element
|
|
25
|
+
The panel is a non-modal `role="dialog"` and needs an accessible name: the `heading` prop provides one, or set `aria-label` on the `c-popover` element, or `aria-labelledby` with the id of a heading in your content. The component warns in the console when it opens unnamed. `aria-haspopup="dialog"` and `aria-expanded` are mirrored onto the slotted trigger.
|
|
26
26
|
|
|
27
27
|
## Layering
|
|
28
28
|
|
|
@@ -16,7 +16,7 @@ The details line shows the raw `value` even when the fill clamps it, and a negat
|
|
|
16
16
|
|
|
17
17
|
## Accessibility
|
|
18
18
|
|
|
19
|
-
The bar is a native `<progress>` element exposing `role="progressbar"` with `aria-valuenow` while determinate; in indeterminate mode no value is exposed. The host mirrors `aria-busy` (true while indeterminate) and a `title` tooltip with the current percentage.
|
|
19
|
+
The bar is a native `<progress>` element exposing `role="progressbar"` with `aria-valuenow` while determinate; in indeterminate mode no value is exposed. The host mirrors `aria-busy` (true while indeterminate) and a `title` tooltip with the current percentage. The bar is named by `label`, or, where a visible label would be redundant (a table cell), by an `aria-label` on the element. Name every bar.
|
|
20
20
|
|
|
21
21
|
## Customization
|
|
22
22
|
|
|
@@ -22,4 +22,4 @@ Slotted center content is presentational to assistive technology (the value is a
|
|
|
22
22
|
|
|
23
23
|
## Customization
|
|
24
24
|
|
|
25
|
-
Restyle via the parts: `::part(track)` and `::part(bar)` accept any stroke colour (the defaults are the muted surface track and the primary arc), and `::part(content)` styles the centered slot wrapper. Keep stroke
|
|
25
|
+
Restyle via the parts: `::part(track)` and `::part(bar)` accept any stroke colour (the defaults are the muted surface track and the primary arc), and `::part(content)` styles the centered slot wrapper. Keep stroke _width_ on the `width` prop — the radius math depends on it.
|
|
@@ -15,16 +15,19 @@ operable.
|
|
|
15
15
|
|
|
16
16
|
## Events
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`c-radio-group`, or further up — with the radio as the event target.
|
|
18
|
+
A radio fires no event of its own: listen on the `c-radio-group`, whose
|
|
19
|
+
`change` carries the picked value.
|
|
21
20
|
|
|
22
21
|
## Standalone
|
|
23
22
|
|
|
24
23
|
Outside a group a radio still renders and operates — it can be selected but
|
|
25
|
-
never unselected, like a native radio without siblings
|
|
26
|
-
(exclusivity, arrow-key navigation,
|
|
27
|
-
`c-radio-group`.
|
|
24
|
+
never unselected, like a native radio without siblings — but reports nothing.
|
|
25
|
+
Grouping behavior (exclusivity, arrow-key navigation, value events) requires
|
|
26
|
+
the parent `c-radio-group`.
|
|
27
|
+
|
|
28
|
+
## Accessibility
|
|
29
|
+
|
|
30
|
+
Each radio is a native input named by its label; an `aria-label` on the element names it instead where there is no visible one.
|
|
28
31
|
|
|
29
32
|
## Customization
|
|
30
33
|
|
|
@@ -27,7 +27,7 @@ needs:
|
|
|
27
27
|
</c-radio-group>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Text placed
|
|
30
|
+
Text placed _next to_ a radio instead of inside it renders, but is not
|
|
31
31
|
click-associated or announced — put the label content in the radio's slot.
|
|
32
32
|
|
|
33
33
|
## Value
|
|
@@ -38,9 +38,8 @@ solely through the group — radios carry no checked state of their own.
|
|
|
38
38
|
Giving two radios the same `value` is a consumer error: every matching
|
|
39
39
|
radio will show as checked.
|
|
40
40
|
|
|
41
|
-
In Vue, bind with a plain `v-model
|
|
42
|
-
|
|
43
|
-
event target.
|
|
41
|
+
In Vue, bind with a plain `v-model`; elsewhere, listen for `change`, which
|
|
42
|
+
carries the picked value.
|
|
44
43
|
|
|
45
44
|
## Label
|
|
46
45
|
|
|
@@ -51,8 +50,8 @@ label.
|
|
|
51
50
|
|
|
52
51
|
## Validation
|
|
53
52
|
|
|
54
|
-
Validation is your job: set `
|
|
55
|
-
|
|
53
|
+
Validation is your job: set `invalid` and supply an `error-message`
|
|
54
|
+
explaining why. While invalid without an `error-message`,
|
|
56
55
|
the `hint` keeps rendering as a hint. The message area reserves its height
|
|
57
56
|
(unless `hide-details`), so an error appearing at runtime doesn't shift the
|
|
58
57
|
layout.
|