@central-design-system/components 4.0.0-alpha.11 → 4.0.0-alpha.12
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/dist/browser/entry.js +2 -2
- package/dist/cds.d.ts +1 -1
- package/dist/cjs/entry.js +3 -3
- package/dist/es/entry.css +3 -2
- package/dist/es/entry.js +1 -1
- package/dist/es/src/cds.js +5 -5
- package/dist/es/src/components/CdsApp/CdsApp.css +2 -2
- package/dist/es/src/components/CdsApp/CdsApp.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsApp/api/CdsApp.props.js +1 -1
- package/dist/es/src/components/CdsAvatar/CdsAvatar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsAvatar/api/CdsAvatar.props.js +1 -1
- package/dist/es/src/components/CdsBadge/CdsBadge.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsBadge/api/CdsBadge.props.js +1 -1
- package/dist/es/src/components/CdsButton/CdsButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsButton/api/CdsButton.props.js +1 -1
- package/dist/es/src/components/CdsButtonGroup/CdsButtonGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsButtonGroup/api/CdsButtonGroup.props.js +1 -1
- package/dist/es/src/components/CdsCard/CdsCard.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsCard/CdsCardGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsCard/api/CdsCard.props.js +1 -1
- package/dist/es/src/components/CdsDatePicker/CdsDatePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsDatePicker/api/CdsDatePicker.props.js +1 -1
- package/dist/es/src/components/CdsDivider/CdsDivider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsDrawer/CdsDrawer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/src/components/CdsDrawer/api/CdsDrawer.props.js +1 -1
- package/dist/es/src/components/CdsEmptyState/CdsEmptyState.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/src/components/CdsEmptyState/api/CdsEmptyState.props.js +1 -1
- package/dist/es/src/components/CdsExpandablePanel/CdsExpandablePanels.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsExpandablePanel/api/CdsExpandablePanel.props.js +1 -1
- package/dist/es/src/components/CdsField/CdsField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsField/api/CdsField.props.js +1 -1
- package/dist/es/src/components/CdsFooter/CdsFooter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/src/components/CdsFooter/api/CdsFooter.props.js +1 -1
- package/dist/es/src/components/CdsFunctionalButton/api/CdsFunctionalButton.props.js +1 -1
- package/dist/es/src/components/CdsGrid/CdsCol.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsHeader/CdsHeader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsHeader/api/CdsHeader.props.js +1 -1
- package/dist/es/src/components/CdsIcon/CdsIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsIcon/api/CdsIcon.props.js +1 -1
- package/dist/es/src/components/CdsImage/CdsImage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsImage/api/CdsImage.props.js +1 -1
- package/dist/es/src/components/CdsInput/CdsInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsInput/api/CdsInput.props.js +1 -1
- package/dist/es/src/components/CdsLayout/CdsLayout.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/src/components/CdsLayout/api/CdsLayout.props.js +1 -1
- package/dist/es/src/components/CdsLink/CdsLink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsLink/api/CdsLink.props.js +1 -1
- package/dist/es/src/components/CdsList/CdsList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsList/CdsListItem.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsList/api/CdsList.props.js +1 -1
- package/dist/es/src/components/CdsLoader/CdsLoader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsNotification/CdsNotification.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsNotification/api/CdsNotification.props.js +1 -1
- package/dist/es/src/components/CdsOtpInput/CdsOtpInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsOtpInput/api/CdsOtpInput.props.js +1 -1
- package/dist/es/src/components/CdsOverlay/CdsOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsOverlay/api/CdsOverlay.props.js +1 -1
- package/dist/es/src/components/CdsPage/CdsPage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsPagination/CdsPagination.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/src/components/CdsPagination/api/CdsPagination.props.js +1 -1
- package/dist/es/src/components/CdsProgressBar/CdsProgressBar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsProgressBar/api/CdsProgressBar.props.js +1 -1
- package/dist/es/src/components/CdsProgressCircle/CdsProgressCircle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsProgressCircle/api/CdsProgressCircle.props.js +1 -1
- package/dist/es/src/components/CdsSkeletonLoader/CdsSkeletonLoader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsSkeletonLoader/api/CdsSkeletonLoader.props.js +1 -1
- package/dist/es/src/components/CdsSlideGroup/CdsSlideGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsSlideGroup/api/CdsSlideGroup.props.js +1 -1
- package/dist/es/src/components/CdsSlideView/api/CdsSlideView.props.js +1 -1
- package/dist/es/src/components/CdsStages/CdsStages.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsStages/api/CdsStages.props.js +1 -1
- package/dist/es/src/components/CdsStatus/CdsStatus.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsStatus/api/CdsStatus.props.js +1 -1
- package/dist/es/src/components/CdsSteps/api/CdsSteps.props.js +1 -1
- package/dist/es/src/components/CdsSurface/CdsSurface.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsSurface/api/CdsSurface.props.js +1 -1
- package/dist/es/src/components/CdsTable/api/CdsTable.props.js +1 -1
- package/dist/es/src/components/CdsTable/components/TableProvider.js +2 -2
- package/dist/es/src/components/CdsTag/CdsTag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsTagGroup/CdsTagGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsTagGroup/api/CdsTagGroup.props.js +1 -1
- package/dist/es/src/components/CdsTimePicker/CdsTimePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsTimePicker/api/CdsTimePicker.props.js +1 -1
- package/dist/es/src/components/CdsToast/CdsToast.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsToolbar/CdsToolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsToolbar/api/CdsToolbar.props.js +1 -1
- package/dist/es/src/components/CdsTree/CdsTree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/components/CdsTree/api/CdsTree.props.js +1 -1
- package/dist/es/src/components/CdsUploader/CdsUploader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/src/composables/useDisabled/index.js +1 -1
- package/dist/es/src/composables/useHydration/useHydration.js +1 -1
- package/dist/es/src/composables/useLayout/useLayout.js +1 -1
- package/dist/es/src/composables/useLoader/index.js +1 -1
- package/dist/es/src/composables/useLocation/index.js +1 -1
- package/dist/es/src/composables/useReadonly/index.js +1 -1
- package/dist/es/src/composables/useVirtual/useVirtual.js +1 -1
- package/dist/esm-node/entry.css +3 -2
- package/dist/esm-node/entry.mjs +1 -1
- package/dist/esm-node/src/cds.mjs +1 -1
- package/dist/esm-node/src/components/CdsApp/CdsApp.css +2 -2
- package/dist/esm-node/src/composables/useLoader/index.mjs +1 -1
- package/dist/esm-node/src/composables/useRouter/index.mjs +1 -1
- package/dist/iife/entry.js +3 -3
- package/dist/styles/common.css +1 -1
- package/dist/styles/core.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/components/CdsInput/api/CdsInput.types.d.ts +2 -2
- package/dist/types/composables/useFocus/useFocusGroup.d.ts +1 -1
- package/llms/llms-components.txt +174 -19
- package/llms/llms-full.txt +174 -19
- package/llms/llms-guides.txt +1 -1
- package/llms/llms-migration.txt +1 -1
- package/llms/llms-tokens.txt +1 -1
- package/llms/llms.txt +1 -1
- package/package.json +7 -5
- package/src/components/CdsApp/CdsApp.scss +2 -2
- package/src/styles/{generic/_fonts.scss → _fonts.scss} +4 -5
- package/src/styles/core.scss +1 -1
- package/src/styles/generic/index.scss +1 -1
- package/dist/styles/pt-root-ui_vf.woff +0 -0
- package/src/assets/fonts/PTRootUI/pt-root-ui_vf.ttf +0 -0
- package/src/assets/fonts/PTRootUI/pt-root-ui_vf.woff +0 -0
package/llms/llms-full.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Central Design System (CDS 4) — full documentation
|
|
2
2
|
|
|
3
|
-
> Version: 4.0.0-alpha.
|
|
3
|
+
> Version: 4.0.0-alpha.12
|
|
4
4
|
> Everything at once: guides, tokens and themes, components with examples and the API contract, CDS 3 migration.
|
|
5
5
|
> Generated automatically (`bun run generate:meta` → `bun run generate:llms`). Do not edit manually.
|
|
6
6
|
|
|
@@ -4301,6 +4301,8 @@ color is set via a component's `color` prop or theme tokens (themes.md).
|
|
|
4301
4301
|
|
|
4302
4302
|
_Category: Other_
|
|
4303
4303
|
|
|
4304
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
4305
|
+
|
|
4304
4306
|
## API
|
|
4305
4307
|
|
|
4306
4308
|
### CdsApp
|
|
@@ -4324,6 +4326,8 @@ _Category: Other_
|
|
|
4324
4326
|
|
|
4325
4327
|
_Category: Controls · since 4.0.0_
|
|
4326
4328
|
|
|
4329
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
4330
|
+
|
|
4327
4331
|
An autocomplete is a field for picking from a long list: the user types a query, the list is filtered on the fly and the matches are highlighted. The field is built on CdsTextInput, and the menu and the list are the same as in CdsSelect, so the label, the messages, validation and the menu behave identically.
|
|
4328
4332
|
|
|
4329
4333
|
**See also:** If there are few options and search is not needed, take CdsSelect. If the user may enter values outside the list — CdsCombobox.
|
|
@@ -4960,7 +4964,7 @@ const selected = ref(null);
|
|
|
4960
4964
|
| `loader` | `LoaderSlotProps` | Slot for a custom loader (shown when the loading prop is true). |
|
|
4961
4965
|
| `menu-footer` | `{ search: Ref<string \| undefined, string \| undefined>; filteredItems: ListItem<any>[]; }` | Content of the menu footer. Receives the current search query and the filtered items. |
|
|
4962
4966
|
| `menu-header` | `{ search: Ref<string \| undefined, string \| undefined>; filteredItems: ListItem<any>[]; }` | Content of the menu header. Receives the current search query and the filtered items. |
|
|
4963
|
-
| `message` | `
|
|
4967
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
4964
4968
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
4965
4969
|
| `no-data` | `any` | Content shown in the menu when the item list is empty. |
|
|
4966
4970
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
@@ -4994,6 +4998,8 @@ const selected = ref(null);
|
|
|
4994
4998
|
|
|
4995
4999
|
_Category: Content · since 4.0.0 · status: new_
|
|
4996
5000
|
|
|
5001
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
5002
|
+
|
|
4997
5003
|
An avatar shows a person, a team or a company: a photo, initials or an icon inside a round container. Use it in member lists, comments and profile headers — anywhere the reader needs to recognize "who is this" at a glance.
|
|
4998
5004
|
|
|
4999
5005
|
**See also:** The built-in badge shows a status or a counter right on the avatar; for a marker on arbitrary content take CdsBadge, and for a text label inside a line — CdsTag.
|
|
@@ -5312,6 +5318,8 @@ const remove = () => {
|
|
|
5312
5318
|
|
|
5313
5319
|
_Category: Feedback · since 4.0.0_
|
|
5314
5320
|
|
|
5321
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
5322
|
+
|
|
5315
5323
|
A badge is a small marker in the corner of an element or next to it: a counter of unread messages, a "there is something new" dot, a short label. A badge is not interactive — it draws attention to the element it is attached to instead of acting on its own.
|
|
5316
5324
|
|
|
5317
5325
|
**See also:** For a textual object status ("Done", "In progress") take CdsStatus, and CdsAvatar has a built-in `badge` prop for the common indicators on an avatar.
|
|
@@ -5720,6 +5728,8 @@ const contacts = [
|
|
|
5720
5728
|
|
|
5721
5729
|
_Category: Navigation · since 4.0.0_
|
|
5722
5730
|
|
|
5731
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
5732
|
+
|
|
5723
5733
|
Breadcrumbs show the path to the current page in the hierarchy of sections and take you back to any level above in one click. The list is built from the `items` array or by hand — from `CdsBreadcrumbsItem` and `CdsBreadcrumbsDivider`.
|
|
5724
5734
|
|
|
5725
5735
|
**See also:** To switch between sections of the same level, use CdsTabs; for a link styled as text inside a paragraph, use CdsLink; and to move through the steps of a process, use CdsSteps.
|
|
@@ -6059,6 +6069,8 @@ const visible = computed(() => (expanded.value ? path : [path[0], '…', ...path
|
|
|
6059
6069
|
|
|
6060
6070
|
_Category: Content · since 4.0.0_
|
|
6061
6071
|
|
|
6072
|
+
_Tests: API 38/38 · 47 unit · 2 e2e · 3 known bugs · lines 97.6% (v4.0.0-alpha.11) · a11y: 11 axe recommendations (v4.0.0-alpha.11)_
|
|
6073
|
+
|
|
6062
6074
|
A button is the primary way to trigger an action: submit a form, open a modal, confirm a choice. Its appearance signals the role it plays: `primary` is the main action on the screen, `secondary` and `tertiary` are the supporting ones.
|
|
6063
6075
|
|
|
6064
6076
|
**See also:** For a link styled as text inside a paragraph, use CdsLink; to pick one option out of several, use CdsButtonToggle.
|
|
@@ -6488,6 +6500,8 @@ const totalSteps = 4;
|
|
|
6488
6500
|
|
|
6489
6501
|
_Category: Content · since 4.0.0 · status: new_
|
|
6490
6502
|
|
|
6503
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
6504
|
+
|
|
6491
6505
|
A button group joins several CdsButton into one block: the buttons sit flush against each other, only the outer corners stay rounded, and shared props are set once on the group. This is how you present sets of related actions — a toolbar over a record or zoom controls.
|
|
6492
6506
|
|
|
6493
6507
|
**See also:** If the user does not trigger an action but picks one of several options, use CdsButtonToggle — it keeps the selected state.
|
|
@@ -6551,6 +6565,8 @@ import { CdsButton, CdsButtonGroup } from '@central-design-system/components';
|
|
|
6551
6565
|
|
|
6552
6566
|
_Category: Content · since 4.0.0 · status: new_
|
|
6553
6567
|
|
|
6568
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
6569
|
+
|
|
6554
6570
|
A toggle group turns CdsButton into a switch: the pressed button stays selected, and the choice is available through `v-model`. Use it for modes and filters that are visible right away — the layout of a list, the period of a report, formatting options.
|
|
6555
6571
|
|
|
6556
6572
|
**See also:** If the buttons trigger actions instead of storing a choice, take CdsButtonGroup. To pick from a long list use CdsSelect, and inside forms — CdsRadioGroup.
|
|
@@ -6907,6 +6923,8 @@ const stats = {
|
|
|
6907
6923
|
|
|
6908
6924
|
_Category: Content · since 4.0.0_
|
|
6909
6925
|
|
|
6926
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
6927
|
+
|
|
6910
6928
|
A card gathers related content — a title, text, an image, actions — into one bordered block. Use it when an object (a product, a plan, a document) should read as a whole: a card can act as a link and as a selectable item in a group.
|
|
6911
6929
|
|
|
6912
6930
|
**See also:** For uniform lists of rows use CdsList, for collapsible sections use CdsExpandablePanel, and when you only need a surface without any structure, use CdsSurface.
|
|
@@ -7824,6 +7842,8 @@ const photos = [
|
|
|
7824
7842
|
|
|
7825
7843
|
_Category: Content · since 4.0.0 · status: new_
|
|
7826
7844
|
|
|
7845
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
7846
|
+
|
|
7827
7847
|
A carousel shows images or arbitrary content slide by slide: promo banners, photo galleries, onboarding steps. Arrows and delimiter dots give you navigation, autoplay flips the slides on its own, and the progress bar shows the current position.
|
|
7828
7848
|
|
|
7829
7849
|
**See also:** To switch content without delimiters and autoplay, take CdsSlideView — the carousel is built on top of it; for a single image take CdsImage.
|
|
@@ -8415,6 +8435,8 @@ const isLast = computed(() => slide.value === steps.length - 1);
|
|
|
8415
8435
|
|
|
8416
8436
|
_Category: Controls · since 4.0.0_
|
|
8417
8437
|
|
|
8438
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
8439
|
+
|
|
8418
8440
|
A checkbox turns an independent option on and off: consent to terms, an entry in a filter list, a profile setting. Every checkbox in a group is selected on its own, which makes it right for multiple choice.
|
|
8419
8441
|
|
|
8420
8442
|
**See also:** To pick one option out of several use CdsRadio, for settings that apply immediately — CdsToggle. If you need the control alone, without a label and messages — in a table cell, for example — take CdsCheckboxButton.
|
|
@@ -8846,7 +8868,7 @@ const filtered = computed(() =>
|
|
|
8846
8868
|
| `details` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
8847
8869
|
| `input` | `SelectionControlSlot` | Slot for the default input element. |
|
|
8848
8870
|
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
8849
|
-
| `message` | `
|
|
8871
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
8850
8872
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
8851
8873
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
8852
8874
|
|
|
@@ -8870,6 +8892,8 @@ const filtered = computed(() =>
|
|
|
8870
8892
|
|
|
8871
8893
|
_Category: Controls · since 4.0.0 · status: new_
|
|
8872
8894
|
|
|
8895
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
8896
|
+
|
|
8873
8897
|
The checkbox control without a label and a messages block — the atom CdsCheckbox is built on. Use it where the caption is not needed or lives outside: in a table cell, a list row, a card.
|
|
8874
8898
|
|
|
8875
8899
|
**See also:** For a standalone option with a label, a description and validation use CdsCheckbox — states, colors and groups work the same way here and are described in detail on its page.
|
|
@@ -8957,6 +8981,8 @@ const checked = ref(true);
|
|
|
8957
8981
|
|
|
8958
8982
|
_Category: Controls · since 4.0.0_
|
|
8959
8983
|
|
|
8984
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
8985
|
+
|
|
8960
8986
|
A combobox is a field with a dropdown list and free input: the value can be picked from the offered ones or typed in — the text itself becomes the value. The field is built on CdsTextInput, and the menu and the list are the same as in CdsSelect, so the label, the messages, validation and the menu behave identically.
|
|
8961
8987
|
|
|
8962
8988
|
**See also:** If the value must come from the list only, take CdsAutocomplete. If there are few options and free input is not needed — CdsSelect.
|
|
@@ -9413,7 +9439,7 @@ async function submit() {
|
|
|
9413
9439
|
| `loader` | `LoaderSlotProps` | Slot for a custom loader (shown when the loading prop is true). |
|
|
9414
9440
|
| `menu-footer` | `{ search: Ref<string \| undefined, string \| undefined>; filteredItems: ListItem<any>[]; }` | Content of the menu footer. Receives the current search query and the filtered items. |
|
|
9415
9441
|
| `menu-header` | `{ search: Ref<string \| undefined, string \| undefined>; filteredItems: ListItem<any>[]; }` | Content of the menu header. Receives the current search query and the filtered items. |
|
|
9416
|
-
| `message` | `
|
|
9442
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
9417
9443
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
9418
9444
|
| `no-data` | `any` | Content shown in the menu when the item list is empty. |
|
|
9419
9445
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
@@ -9449,6 +9475,8 @@ async function submit() {
|
|
|
9449
9475
|
|
|
9450
9476
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
9451
9477
|
|
|
9478
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
9479
|
+
|
|
9452
9480
|
The counter shows how many characters are already typed and how many are allowed: `42 / 100`. When the value exceeds the maximum, the counter turns red — the user sees the problem before submitting the form.
|
|
9453
9481
|
|
|
9454
9482
|
**See also:** The ready-made fields already have the counter built in — turn on the `counter` prop of CdsTextInput or CdsTextArea. A standalone `CdsCounter` is needed when you build your own control.
|
|
@@ -9576,6 +9604,8 @@ const title = ref('Поставка канцелярских товаров');
|
|
|
9576
9604
|
|
|
9577
9605
|
_Category: Controls · since 4.0.0 · status: new_
|
|
9578
9606
|
|
|
9607
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
9608
|
+
|
|
9579
9609
|
A date field: a text field with a calendar icon that opens CdsDatePicker in a dropdown menu on click. The date can be picked with the mouse or typed on the keyboard — the value arrives as a string in the `mask` format (`DD.MM.YYYY` by default).
|
|
9580
9610
|
|
|
9581
9611
|
**See also:** If the calendar is needed right on the page, without a field, take CdsDatePicker. For the time alone — CdsTimePicker, to pick from a ready list — CdsSelect.
|
|
@@ -10231,7 +10261,7 @@ const minYearMonth = `${today.getFullYear()}/${pad(today.getMonth() + 1)}`;
|
|
|
10231
10261
|
| `details` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
10232
10262
|
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
10233
10263
|
| `loader` | `LoaderSlotProps` | Slot for a custom loader (shown when the loading prop is true). |
|
|
10234
|
-
| `message` | `
|
|
10264
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
10235
10265
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
10236
10266
|
| `picker-description` | `{ year: string \| number \| undefined; }` | Description in the calendar header. |
|
|
10237
10267
|
| `picker-title` | `{ date: string; }` | Title in the calendar header. |
|
|
@@ -10262,6 +10292,8 @@ const minYearMonth = `${today.getFullYear()}/${pad(today.getMonth() + 1)}`;
|
|
|
10262
10292
|
|
|
10263
10293
|
_Category: Controls · since 4.0.0_
|
|
10264
10294
|
|
|
10295
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
10296
|
+
|
|
10265
10297
|
A calendar for picking a date — a single one, several or a range. It lives right on the page or in a dropdown menu next to a field; the value is a string in the given format (`DD.MM.YYYY` by default), which is convenient to store and to send to the server.
|
|
10266
10298
|
|
|
10267
10299
|
**See also:** If the calendar needs a field, take the ready CdsDateInput — it assembles the very same thing out of a field, a menu and this calendar, adding manual input and time. For picking the time alone there is CdsTimePicker.
|
|
@@ -10776,6 +10808,8 @@ const dateTime = ref(`15.${String(now.getMonth() + 1).padStart(2, '0')}.${now.ge
|
|
|
10776
10808
|
|
|
10777
10809
|
_Category: Other_
|
|
10778
10810
|
|
|
10811
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
10812
|
+
|
|
10779
10813
|
## API
|
|
10780
10814
|
|
|
10781
10815
|
### CdsDefaultsProvider
|
|
@@ -10802,6 +10836,8 @@ _Category: Other_
|
|
|
10802
10836
|
|
|
10803
10837
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
10804
10838
|
|
|
10839
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
10840
|
+
|
|
10805
10841
|
A description is muted text under the label of a field. It clarifies what to enter and in what format, so the label can stay short.
|
|
10806
10842
|
|
|
10807
10843
|
**See also:** Inputs already have the description built in — the `description` prop of CdsTextInput and the other controls. A standalone `CdsDescription` is needed for groups of fields and for your own controls. For the label of a field take CdsLabel, for the messages under a field take CdsMessages.
|
|
@@ -10902,6 +10938,8 @@ const channels = ref(['email']);
|
|
|
10902
10938
|
|
|
10903
10939
|
_Category: Atoms · since 4.0.0_
|
|
10904
10940
|
|
|
10941
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
10942
|
+
|
|
10905
10943
|
A divider is a thin line between the meaningful parts of an interface: the sections of a form, the rows of a list, the blocks of a card. It does nothing and asks for no attention, it only shows the border where the paddings are no longer enough. A short caption can go into its slot — "or" between two ways of doing something, for example.
|
|
10906
10944
|
|
|
10907
10945
|
**See also:** The blocks of a card are separated by the `divider` prop of CdsCard — it draws the same line without adding markup. If the parts of the screen need to be moved onto different surfaces rather than separated, take CdsSurface.
|
|
@@ -11333,6 +11371,8 @@ const phone = ref('');
|
|
|
11333
11371
|
|
|
11334
11372
|
_Category: Layouts · since 4.0.0_
|
|
11335
11373
|
|
|
11374
|
+
_Tests: API 0/33 · 31 unit · lines 85.3% (v4.0.0-alpha.11) · a11y: 14 axe recommendations (v4.0.0-alpha.11)_
|
|
11375
|
+
|
|
11336
11376
|
The side panel of the application: navigation sections on the left, the context of a record or filters on the right. Inside `CdsLayout` the drawer takes its place in the layout and pushes the content aside, and in temporary mode it slides out over it.
|
|
11337
11377
|
|
|
11338
11378
|
**See also:** For a list of sections inside the drawer take CdsList; for navigating the subsections of a single page take CdsTabs. The drawer is a part of the CdsLayout frame, but unlike the other parts it also works on its own: with the `fixed` prop it sticks to the window without a layout.
|
|
@@ -12090,6 +12130,8 @@ const items = ref([
|
|
|
12090
12130
|
|
|
12091
12131
|
_Category: Feedback · since 4.0.0_
|
|
12092
12132
|
|
|
12133
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
12134
|
+
|
|
12093
12135
|
An empty state explains why there is no content on the screen and suggests the next step: no search results, an empty list, a loading error. It is assembled from a media area, headings, a description and an action button.
|
|
12094
12136
|
|
|
12095
12137
|
**See also:** For a short message about the result of an operation take CdsToast, and while the data is still loading show CdsSkeletonLoader instead of an empty state.
|
|
@@ -12527,6 +12569,8 @@ import { CdsEmptyState } from '@central-design-system/components';
|
|
|
12527
12569
|
|
|
12528
12570
|
_Category: Content · since 4.0.0_
|
|
12529
12571
|
|
|
12572
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
12573
|
+
|
|
12530
12574
|
An expandable panel hides the details behind a title: you see the list of topics and open only the one you need. Take it for FAQs, optional settings and long descriptions that turn a page into an endless feed.
|
|
12531
12575
|
|
|
12532
12576
|
**See also:** If the sections are equal in weight and the reader switches between them, take CdsTabs. For a hierarchy of nested nodes take CdsTree, and for a block that simply separates content — CdsCard.
|
|
@@ -13304,6 +13348,8 @@ const cities = [
|
|
|
13304
13348
|
|
|
13305
13349
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
13306
13350
|
|
|
13351
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
13352
|
+
|
|
13307
13353
|
The frame of an input: the background, the border, the focus and error states, the inner icons, the clear button and the loading indicator. You put the control itself into the `default` slot — the text fields, selects and autocompletes of the design system are built on `CdsField`.
|
|
13308
13354
|
|
|
13309
13355
|
**See also:** For regular input take the ready-made fields — CdsTextInput, CdsSelect, CdsTextArea. `CdsField` is needed when your control is not in the library. The label, the description and the messages around the frame are added by CdsInput.
|
|
@@ -13592,6 +13638,8 @@ function addTag() {
|
|
|
13592
13638
|
|
|
13593
13639
|
_Category: Controls · since 4.0.0 · status: new_
|
|
13594
13640
|
|
|
13641
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
13642
|
+
|
|
13595
13643
|
A file field: the user attaches documents by a click, by dragging or by pasting from the clipboard. Around the native `input type="file"` the component gathers everything a form needs: a label, a description, messages, a counter, clearing and a filter by file types.
|
|
13596
13644
|
|
|
13597
13645
|
**See also:** If you need a prominent upload zone with a list of files, take CdsFileUpload; sending the files to the server is the job of CdsUploader.
|
|
@@ -14100,7 +14148,7 @@ onBeforeUnmount(() => {
|
|
|
14100
14148
|
| `details` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
14101
14149
|
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
14102
14150
|
| `loader` | `LoaderSlotProps` | Slot for a custom loader (shown when the loading prop is true). |
|
|
14103
|
-
| `message` | `
|
|
14151
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
14104
14152
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
14105
14153
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
14106
14154
|
| `prepend-inner` | `CdsInputDefaultSlot` | Slot added at the start of the input |
|
|
@@ -14128,6 +14176,8 @@ onBeforeUnmount(() => {
|
|
|
14128
14176
|
|
|
14129
14177
|
_Category: Controls · since 4.0.0 · status: new_
|
|
14130
14178
|
|
|
14179
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
14180
|
+
|
|
14131
14181
|
A file upload zone: it accepts files by dragging, by pasting from the clipboard and through the system dialog, and shows the selection as a list with image previews. Around the zone the component gathers everything a form needs: a label, a description, messages and validation.
|
|
14132
14182
|
|
|
14133
14183
|
**See also:** For a compact file field in a form row use CdsFileInput; sending the files to the server is the job of CdsUploader.
|
|
@@ -14672,7 +14722,7 @@ watch(
|
|
|
14672
14722
|
| `item` | `CdsFileUploadFileSlot` | An item of the list of the chosen files. |
|
|
14673
14723
|
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
14674
14724
|
| `loader` | `LoaderSlotProps` | The loading indicator. |
|
|
14675
|
-
| `message` | `
|
|
14725
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
14676
14726
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
14677
14727
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
14678
14728
|
| `single` | `CdsFileUploadFileSlot` | The only chosen file with `insetFileList` and without `multiple`. |
|
|
@@ -14884,6 +14934,8 @@ watch(
|
|
|
14884
14934
|
|
|
14885
14935
|
_Category: Layouts · since 4.0.0_
|
|
14886
14936
|
|
|
14937
|
+
_Tests: API 0/12 · 3 unit · lines 76.7% (v4.0.0-alpha.11) · a11y: 6 axe recommendations (v4.0.0-alpha.11)_
|
|
14938
|
+
|
|
14887
14939
|
The footer of the application: a copyright notice and utility links on regular pages, an action bar on forms. The layout measures the height of the footer and reserves the space, so it never covers the last line of the content.
|
|
14888
14940
|
|
|
14889
14941
|
**See also:** The footer works only inside CdsLayout — outside the layout it renders nothing and warns about it in the console. The top bar of the application is built by CdsHeader, and the content of both by CdsToolbar.
|
|
@@ -15161,6 +15213,8 @@ function save() {
|
|
|
15161
15213
|
|
|
15162
15214
|
_Category: Controls · since 4.0.0_
|
|
15163
15215
|
|
|
15216
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
15217
|
+
|
|
15164
15218
|
A form joins fields into one group: it collects their validation into a common status, intercepts the submission and can reset the values. CDS fields with the `rules` prop connect to the form automatically — with no registration and no extra code.
|
|
15165
15219
|
|
|
15166
15220
|
**See also:** The form does not render the fields itself — build them out of CdsTextInput, CdsSelect, CdsCheckbox and other controls. The validation rules are declared on the fields themselves through the `rules` prop.
|
|
@@ -15810,6 +15864,8 @@ const submit = () => {
|
|
|
15810
15864
|
|
|
15811
15865
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
15812
15866
|
|
|
15867
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
15868
|
+
|
|
15813
15869
|
A functional button is a utility action next to the content: download a file in a row of a list, reveal a password in a field, collapse a block, open the menu of a record. It is a CdsButton with `size="sm"` and `appearance="tertiary"` fixed in place: the background is transparent and appears only on hover, so the button does not compete for attention with the content it stands next to.
|
|
15814
15870
|
|
|
15815
15871
|
**See also:** Style the primary action of the screen — "Save", "Submit the request" — with CdsButton, and a navigation inside a paragraph with CdsLink. If the icon triggers nothing and only explains the content, leave it as CdsIcon.
|
|
@@ -16123,6 +16179,8 @@ const expanded = ref(true);
|
|
|
16123
16179
|
|
|
16124
16180
|
_Category: Layouts · since 4.0.0_
|
|
16125
16181
|
|
|
16182
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
16183
|
+
|
|
16126
16184
|
A responsive modular grid: `CdsGrid`, `CdsRow` and `CdsCol` lay the content out in columns — from 4 on a phone to 16 on wide screens. The grid works in two modes — Flexbox (the default) and CSS Grid — and the whole markup is also available as ready-made CSS classes, without a single component.
|
|
16127
16185
|
|
|
16128
16186
|
**See also:** The grid lays out the content inside a page. Build the frame of the application — the header, the drawers and the footer — from CdsLayout.
|
|
@@ -16970,6 +17028,8 @@ const filtered = computed(() =>
|
|
|
16970
17028
|
|
|
16971
17029
|
_Category: Layouts · since 4.0.0_
|
|
16972
17030
|
|
|
17031
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
17032
|
+
|
|
16973
17033
|
The header of the application: the title, the global search, notifications, the profile — everything that has to be at hand on any screen. The layout measures its height itself and reserves the space, so the content never ends up under the header.
|
|
16974
17034
|
|
|
16975
17035
|
**See also:** The header works only inside CdsLayout — outside the layout it renders nothing and warns about it in the console. The content of the header is laid out by CdsToolbar, and the bottom bar of the application is built by CdsFooter.
|
|
@@ -17379,6 +17439,8 @@ const tab = ref('active');
|
|
|
17379
17439
|
|
|
17380
17440
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
17381
17441
|
|
|
17442
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
17443
|
+
|
|
17382
17444
|
Highlighting explains why a row made it into the results: the component finds the matches with the query (`query`) or with ready ranges (`matches`) in the text and wraps them into `mark`. Take it for search results, autocomplete suggestions and filtered lists.
|
|
17383
17445
|
|
|
17384
17446
|
**See also:** In CdsAutocomplete, CdsCombobox and CdsSelect the highlighting of the matches is already built in — a standalone `CdsHighlight` is not needed there. For a permanent label next to the text take CdsTag, for a counter take CdsBadge.
|
|
@@ -17742,6 +17804,8 @@ const search = () => {
|
|
|
17742
17804
|
|
|
17743
17805
|
_Category: Content · since 4.0.0_
|
|
17744
17806
|
|
|
17807
|
+
_Tests: API 0/15 · 3 unit · lines 95.5% (v4.0.0-alpha.11) · a11y: 3 axe recommendations (v4.0.0-alpha.11)_
|
|
17808
|
+
|
|
17745
17809
|
An icon is a short visual mark next to the text: the status of a record, the type of a file, the direction of a transition. The component takes an icon by name from a connected pack and subordinates its size, color and spacing to the design system tokens.
|
|
17746
17810
|
|
|
17747
17811
|
**See also:** Inside other components you do not assemble an icon separately: CdsButton, CdsTextInput, CdsList and others have the `icon`, `prepend-icon` and `append-icon` props. For a standalone action take CdsFunctionalButton — an icon button with a label and states. All the available icons are in the gallery, and connecting your own pack is described in the guide.
|
|
@@ -18088,6 +18152,8 @@ import { CdsIcon } from '@central-design-system/components';
|
|
|
18088
18152
|
|
|
18089
18153
|
_Category: Content · since 4.0.0_
|
|
18090
18154
|
|
|
18155
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
18156
|
+
|
|
18091
18157
|
An image that knows how to wait. The component reserves space in the layout according to the given proportions, loads the file when the picture enters the viewport, and shows a placeholder while it is on its way. Over the image you can lay a gradient and any content — a caption, a tag, a button.
|
|
18092
18158
|
|
|
18093
18159
|
**See also:** For a photo of a person or a company logo in a round frame take CdsAvatar, for interface pictograms — CdsIcon. If the proportions have to be set not for a picture but for an arbitrary block — a video, a map, an iframe — use CdsResponsive, and a slideshow of several images is assembled by CdsCarousel.
|
|
@@ -18660,6 +18726,8 @@ const current = computed(() => photos[active.value]);
|
|
|
18660
18726
|
|
|
18661
18727
|
_Category: Atoms · since 4.0.0_
|
|
18662
18728
|
|
|
18729
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
18730
|
+
|
|
18663
18731
|
The wrapper of an input: the label, the description, the outer icons, the block of messages and the validation by rules. You put the control itself into the `default` slot — usually a CdsField with your `input` inside.
|
|
18664
18732
|
|
|
18665
18733
|
**See also:** For regular input take the ready-made fields — CdsTextInput, CdsSelect, CdsTextArea: they are already assembled from `CdsInput` and `CdsField`. `CdsInput` is needed when your control is not in the library.
|
|
@@ -18945,7 +19013,7 @@ const rules = [
|
|
|
18945
19013
|
| `description` | `{ description: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsDescription component |
|
|
18946
19014
|
| `details` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
18947
19015
|
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
18948
|
-
| `message` | `
|
|
19016
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
18949
19017
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
18950
19018
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
18951
19019
|
|
|
@@ -18969,6 +19037,8 @@ const rules = [
|
|
|
18969
19037
|
|
|
18970
19038
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
18971
19039
|
|
|
19040
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
19041
|
+
|
|
18972
19042
|
A label names a field — it says what is expected from the user. It renders as a `label` tag and binds to the control through `for`, so a click on the label moves the focus into the field.
|
|
18973
19043
|
|
|
18974
19044
|
**See also:** The ready-made fields already have the label built in — the `label` prop of CdsTextInput and the other controls. A standalone `CdsLabel` is needed for groups of fields and for your own controls. The explanation under the label is added by CdsDescription.
|
|
@@ -19074,6 +19144,8 @@ const agreed = ref(false);
|
|
|
19074
19144
|
|
|
19075
19145
|
_Category: Layouts · since 4.0.0_
|
|
19076
19146
|
|
|
19147
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
19148
|
+
|
|
19077
19149
|
The frame of the application: `CdsLayout` places the header, the side drawers, the content and the footer, measures their sizes and takes the scrolling over. The parts of the layout know about each other — the content never slides under the header and never hides behind a drawer.
|
|
19078
19150
|
|
|
19079
19151
|
**See also:** The parts of the layout are described on their own pages: CdsHeader, CdsDrawer, CdsMain, CdsPage, CdsFooter and CdsToolbar. You can assemble the frame with the mouse and copy the ready code in the layout builder.
|
|
@@ -19586,6 +19658,8 @@ const statuses = ref<string[]>(['active']);
|
|
|
19586
19658
|
|
|
19587
19659
|
_Category: Navigation · since 4.0.0_
|
|
19588
19660
|
|
|
19661
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
19662
|
+
|
|
19589
19663
|
A link sends the user somewhere else: to a neighboring page of the application, to an external service or to an email address. Inside the application the path comes from the `to` prop and vue-router takes over the navigation; for outside destinations the address goes into `href`.
|
|
19590
19664
|
|
|
19591
19665
|
**See also:** If the element triggers an action instead of a navigation — saves, deletes, opens a modal — take CdsButton. A button also accepts `href` or `to` when a navigation has to look like a button. The path through the hierarchy of sections is built by CdsBreadcrumbs, and sections of equal weight are switched by CdsTabs.
|
|
@@ -19854,6 +19928,8 @@ function requestAccess() {
|
|
|
19854
19928
|
|
|
19855
19929
|
_Category: Content · since 4.0.0_
|
|
19856
19930
|
|
|
19931
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
19932
|
+
|
|
19857
19933
|
A list shows a set of records of the same kind — menu sections, documents, employees, settings — so that the one you need is easy to find and pick. Build it from an `items` array in a single line, or from `CdsListItem` components when a row is more than a title with an icon.
|
|
19858
19934
|
|
|
19859
19935
|
**See also:** To pick a value in a form, take CdsSelect; for a tree with checkboxes, async loading and drag and drop — CdsTree; for tabular data with columns — CdsTable. Inside CdsMenu, CdsSelect and CdsAutocomplete the list is already in use — there is no need to assemble it by hand.
|
|
@@ -20880,6 +20956,8 @@ const filtered = computed(() =>
|
|
|
20880
20956
|
|
|
20881
20957
|
_Category: Feedback · since 4.0.0 · status: deprecated_
|
|
20882
20958
|
|
|
20959
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
20960
|
+
|
|
20883
20961
|
A circular indeterminate loading indicator — a spinning ring without progress. It shows that the data is still loading: as an inline element, as an overlay above a container or above the whole page.
|
|
20884
20962
|
|
|
20885
20963
|
**See also:** The component is deprecated and will be removed in future versions. Use CdsProgressCircle: it covers both indeterminate loading and progress.
|
|
@@ -20963,6 +21041,8 @@ function refresh() {
|
|
|
20963
21041
|
|
|
20964
21042
|
_Category: Layouts · since 4.0.0_
|
|
20965
21043
|
|
|
21044
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
21045
|
+
|
|
20966
21046
|
The main area of the application: `CdsMain` is the place where the content of the page lands. Inside `CdsLayout` it indents itself by the height of the header and the footer and by the width of the side drawers, so the content never has to be moved by hand.
|
|
20967
21047
|
|
|
20968
21048
|
**See also:** Put the content into CdsPage — it calculates the minimum height of the page. `CdsMain` works only inside CdsLayout: outside the layout it renders nothing and warns about it in the console.
|
|
@@ -21041,6 +21121,8 @@ import {
|
|
|
21041
21121
|
|
|
21042
21122
|
_Category: Content · since 4.0.0_
|
|
21043
21123
|
|
|
21124
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
21125
|
+
|
|
21044
21126
|
A menu pops up next to an activator element and shows a list of actions or sections: the "more" button in a table row, the user menu in the header, a context menu on right click. It positions itself — it opens towards the free space and sticks to the activator while the page scrolls.
|
|
21045
21127
|
|
|
21046
21128
|
**See also:** To pick a value in a form, take CdsSelect — it stays visible and gets submitted. For a short hint on hover use CdsTooltip, and for a dialog that demands an answer use CdsModal. The content of a menu is usually built from CdsList.
|
|
@@ -21785,6 +21867,8 @@ watch(isOpen, (value) => {
|
|
|
21785
21867
|
|
|
21786
21868
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
21787
21869
|
|
|
21870
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
21871
|
+
|
|
21788
21872
|
The block of messages under an input: a hint, an explanation or a validation error. The messages appear and disappear with an animation, so the line under the field does not jerk the layout.
|
|
21789
21873
|
|
|
21790
21874
|
**See also:** The ready-made fields already have the block of messages built in — the `messages`, `hint` and `error-messages` props of CdsTextInput and the other controls. A standalone `CdsMessages` is needed for groups of fields and for your own controls. For a noticeable notification on the page take CdsNotification.
|
|
@@ -21944,6 +22028,8 @@ const isEmpty = computed(() => channels.value.length === 0);
|
|
|
21944
22028
|
|
|
21945
22029
|
_Category: Content · since 4.0.0_
|
|
21946
22030
|
|
|
22031
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
22032
|
+
|
|
21947
22033
|
A modal opens on top of the page and keeps the focus on a single task: confirm an action, fill in a short form, look at the details — without taking you away from the current screen. While the modal is open, the page behind it is dimmed, does not scroll and does not accept clicks.
|
|
21948
22034
|
|
|
21949
22035
|
**See also:** For a list of actions on an element take CdsMenu, for a short hint — CdsTooltip, for a notification about the result — CdsToast. Complex modal content — a header, scrollable text and a row of buttons — is assembled from CdsCard.
|
|
@@ -22600,6 +22686,8 @@ const answer = (value: boolean) => {
|
|
|
22600
22686
|
|
|
22601
22687
|
_Category: Feedback · since 4.0.0_
|
|
22602
22688
|
|
|
22689
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
22690
|
+
|
|
22603
22691
|
A notification is a block with a message about an event or a state: a successful save, a warning about a limit, a loading error. The semantic status sets the color and the icon, and the display modes let you embed the message into a form, a card or a list.
|
|
22604
22692
|
|
|
22605
22693
|
**See also:** For pop-up messages above the page that disappear on their own take CdsToast. For a short status label in a row or a card — CdsTag.
|
|
@@ -23000,6 +23088,8 @@ async function retry() {
|
|
|
23000
23088
|
|
|
23001
23089
|
_Category: Feedback · since 4.0.0 · status: deprecated_
|
|
23002
23090
|
|
|
23091
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
23092
|
+
|
|
23003
23093
|
A pop-up notification above the page — the counterpart of `CdsNotificationAlert` from CDS 3. It is assembled from CdsOverlay and CdsNotification in the `important` variant; it hides automatically after `timeout`, while hovering the cursor or focusing inside pauses the timer.
|
|
23004
23094
|
|
|
23005
23095
|
**See also:** The component exists only for a smooth migration from CDS 3 and will be removed. For new scenarios use CdsToast.
|
|
@@ -23311,6 +23401,8 @@ function onUpdateModelValue(value: boolean, id: string) {
|
|
|
23311
23401
|
|
|
23312
23402
|
_Category: Controls · since 4.0.0 · status: new_
|
|
23313
23403
|
|
|
23404
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
23405
|
+
|
|
23314
23406
|
A field for entering a one-time code — from an SMS, an email or an authenticator app. It looks like a row of separate cells, but the input is taken by a single hidden `input`: that is why the SMS autofill, pasting a whole string from the clipboard, selection and the arrow keys all work, and the focus does not have to be jumped between the cells by hand.
|
|
23315
23407
|
|
|
23316
23408
|
**See also:** For an ordinary short text or number take CdsTextInput: `CdsOtpInput` is needed where the length of the input is known upfront and every character is shown in its own cell.
|
|
@@ -23795,6 +23887,8 @@ function submit() {
|
|
|
23795
23887
|
|
|
23796
23888
|
_Category: Content · since 4.0.0_
|
|
23797
23889
|
|
|
23890
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
23891
|
+
|
|
23798
23892
|
An overlay shows content on top of the page: it dims the page with a scrim, computes the position relative to an activator and manages the stacking order of the open layers. It is the base mechanism behind CdsModal, CdsMenu and CdsTooltip — take it when you need a popup of your own that is not among the ready-made ones.
|
|
23799
23893
|
|
|
23800
23894
|
**See also:** For common tasks there are ready-made components built on the overlay: a dialog — CdsModal, a list of actions next to an activator — CdsMenu, a hint on hover — CdsTooltip, notifications — CdsToast. CdsOverlay is for when none of them fits.
|
|
@@ -24346,6 +24440,8 @@ const hint = ref(false);
|
|
|
24346
24440
|
|
|
24347
24441
|
_Category: Layouts · since 4.0.0_
|
|
24348
24442
|
|
|
24443
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
24444
|
+
|
|
24349
24445
|
A page inside the layout: `CdsPage` gives the content a minimum height that accounts for the header and the footer, so a short page fills the whole screen instead of hanging as a narrow strip at the top.
|
|
24350
24446
|
|
|
24351
24447
|
**See also:** `CdsPage` lives inside CdsMain — outside it renders nothing and warns about it in the console. The paddings around the whole content area are calculated by CdsLayout.
|
|
@@ -24501,6 +24597,8 @@ import {
|
|
|
24501
24597
|
|
|
24502
24598
|
_Category: Navigation · since 4.0.0_
|
|
24503
24599
|
|
|
24600
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
24601
|
+
|
|
24504
24602
|
Pagination splits a large data set into pages and helps you jump to the one you need: numbered buttons, "back" and "forward" arrows, jumps to the first and the last page, and a quick jump field. Extra numbers collapse into an ellipsis, and without an explicit limit the number of buttons adapts to the width of the container.
|
|
24505
24603
|
|
|
24506
24604
|
**See also:** Pagination pages through homogeneous data — a list or a table. To switch between sections of the interface use CdsTabs, and to navigate the hierarchy of pages use CdsBreadcrumbs.
|
|
@@ -24933,6 +25031,8 @@ watch(query, () => (page.value = 1));
|
|
|
24933
25031
|
|
|
24934
25032
|
_Category: Feedback · since 4.0.0_
|
|
24935
25033
|
|
|
25034
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
25035
|
+
|
|
24936
25036
|
A linear progress indicator — a horizontal bar for the course of an operation: a file upload, the steps of a wizard, media playback. The value comes from `model-value`, and when the course of the operation is unknown, the `indeterminate` mode turns on a running waiting animation.
|
|
24937
25037
|
|
|
24938
25038
|
**See also:** For progress shown as a ring take CdsProgressCircle, and to dim a container while it loads — CdsOverlay.
|
|
@@ -25426,6 +25526,8 @@ const refresh = () => {
|
|
|
25426
25526
|
|
|
25427
25527
|
_Category: Feedback · since 4.0.0 · status: new_
|
|
25428
25528
|
|
|
25529
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
25530
|
+
|
|
25429
25531
|
A circular progress indicator shows the course of an operation: a file upload, data processing, a filling quota. The value is set in percent through `model-value`, and when the course of the operation is unknown, the `indeterminate` mode turns on an endless waiting animation.
|
|
25430
25532
|
|
|
25431
25533
|
**See also:** For progress shown as a horizontal bar take CdsProgressBar, and to dim a container while it loads — CdsOverlay.
|
|
@@ -25810,6 +25912,8 @@ const generate = () => {
|
|
|
25810
25912
|
|
|
25811
25913
|
_Category: Controls · since 4.0.0_
|
|
25812
25914
|
|
|
25915
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
25916
|
+
|
|
25813
25917
|
A radio button is one option of a mutually exclusive choice. It is not used on its own: the buttons are joined by CdsRadioGroup — it keeps the selected value, captions the set and shows the messages. The button is left with `value` — the value of the option, `label` and `description` — its caption and details.
|
|
25814
25918
|
|
|
25815
25919
|
**See also:** Examples, guidelines and scenarios are on the CdsRadioGroup page. For an independent on/off option take CdsCheckbox.
|
|
@@ -25863,6 +25967,8 @@ A radio button is one option of a mutually exclusive choice. It is not used on i
|
|
|
25863
25967
|
|
|
25864
25968
|
_Category: Controls · since 4.0.0_
|
|
25865
25969
|
|
|
25970
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
25971
|
+
|
|
25866
25972
|
A radio group is a choice of one option out of a short mutually exclusive set: a payment method, a plan, a report period. The group keeps the selected value, captions the set with a heading and a description, shows messages and errors; the options themselves are CdsRadio components with their own `value`.
|
|
25867
25973
|
|
|
25868
25974
|
**See also:** For independent options that are turned on separately use CdsCheckbox, for an on/off setting that applies immediately — CdsToggle. If there are more than five options, fold the list into CdsSelect.
|
|
@@ -26293,7 +26399,7 @@ const items = computed(() =>
|
|
|
26293
26399
|
| `description` | `{ description: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsDescription component |
|
|
26294
26400
|
| `details` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
26295
26401
|
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
26296
|
-
| `message` | `
|
|
26402
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
26297
26403
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
26298
26404
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
26299
26405
|
|
|
@@ -26317,6 +26423,8 @@ const items = computed(() =>
|
|
|
26317
26423
|
|
|
26318
26424
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
26319
26425
|
|
|
26426
|
+
_Tests: API 0/11 · 5 unit · lines 100% (v4.0.0-alpha.11) · a11y: 1 axe recommendation (v4.0.0-alpha.11)_
|
|
26427
|
+
|
|
26320
26428
|
A frame with constant proportions. Set `aspect-ratio` and the height of the block is calculated from its width on any screen. Anything that needs a fixed shape goes inside: a video, a map, an `iframe`, a category tile. The space for the content is taken right away, so the layout does not jump while it loads.
|
|
26321
26429
|
|
|
26322
26430
|
**See also:** For photos take CdsImage — it is built on `CdsResponsive` and can also do lazy loading, a placeholder and cropping. If you need the columns of a page rather than the shape of a single block, take CdsGrid.
|
|
@@ -26659,6 +26767,8 @@ const ratio = computed(() => ratios[selected.value]);
|
|
|
26659
26767
|
|
|
26660
26768
|
_Category: Controls · since 4.0.0_
|
|
26661
26769
|
|
|
26770
|
+
_Tests: API 127/127 · 80 unit · 10 e2e · 11 known bugs · lines 64.1% (v4.0.0-alpha.11) · a11y: 5 axe recommendations (v4.0.0-alpha.11)_
|
|
26771
|
+
|
|
26662
26772
|
A select opens a dropdown list and lets you pick one or several values from a known set: a country, a status, a category. The field is built on CdsTextInput, so the label, the description, the messages, validation and the states work exactly as in a text field.
|
|
26663
26773
|
|
|
26664
26774
|
**See also:** For two or three options take CdsRadioGroup — the options are visible right away. If the list is long and the user searches by typing, use CdsAutocomplete, and if values outside the list are allowed — CdsCombobox.
|
|
@@ -27639,7 +27749,7 @@ const sorted = computed(() => {
|
|
|
27639
27749
|
| `loader` | `LoaderSlotProps` | Slot for a custom loader (shown when the loading prop is true). |
|
|
27640
27750
|
| `menu-footer` | `{ search: Ref<string \| undefined, string \| undefined>; filteredItems: ListItem<any>[]; }` | Content of the menu footer. Receives the current search query and the filtered items. |
|
|
27641
27751
|
| `menu-header` | `{ search: Ref<string \| undefined, string \| undefined>; filteredItems: ListItem<any>[]; }` | Content of the menu header. Receives the current search query and the filtered items. |
|
|
27642
|
-
| `message` | `
|
|
27752
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
27643
27753
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
27644
27754
|
| `no-data` | `any` | Content shown in the menu when the item list is empty. |
|
|
27645
27755
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
@@ -27673,6 +27783,8 @@ const sorted = computed(() => {
|
|
|
27673
27783
|
|
|
27674
27784
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
27675
27785
|
|
|
27786
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
27787
|
+
|
|
27676
27788
|
The base of the selection controls: a native `input` with state icons, a label and a description. The component holds the value, can work with its own `true`/`false` values and with multiple selection, and picks up the settings of CdsSelectionControlGroup. The checkboxes, radio buttons and toggles of the design system are built on it.
|
|
27677
27789
|
|
|
27678
27790
|
**See also:** For regular selection take the ready-made controls — CdsCheckbox, CdsRadio, CdsToggle: they already have the icons, the sizes, the state colors and the block of messages. `CdsSelectionControl` is needed when the control you want is not in the library.
|
|
@@ -28249,6 +28361,8 @@ function submit() {
|
|
|
28249
28361
|
|
|
28250
28362
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
28251
28363
|
|
|
28364
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
28365
|
+
|
|
28252
28366
|
A container for a set of selection controls: it holds the shared value, hands the nested CdsSelectionControl the type, the icons, the colors and the states, and ties them together with a single `name` attribute. The radio button group of the design system is built on it.
|
|
28253
28367
|
|
|
28254
28368
|
**See also:** For a ready group with a title, a description and messages take CdsRadioGroup: it is assembled from this group and the CdsInput wrapper. `CdsSelectionControlGroup` is needed when you build your own set of controls.
|
|
@@ -28667,6 +28781,8 @@ const slot = ref('day');
|
|
|
28667
28781
|
|
|
28668
28782
|
_Category: Feedback · since 4.0.0_
|
|
28669
28783
|
|
|
28784
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
28785
|
+
|
|
28670
28786
|
A skeleton shows the shape of the future content while the data is loading: instead of an empty screen the user immediately sees where the heading, the text and the buttons will appear. The ready-made types (`type`) are assembled from "bones" — blanks for an avatar, a line of text, a button or a table.
|
|
28671
28787
|
|
|
28672
28788
|
**See also:** A skeleton fits the first load of a block or a page. For waiting inside a single action — submitting a form, saving — take the `loading` prop of CdsButton or CdsProgressCircle. If there is no data at all, show CdsEmptyState.
|
|
@@ -29032,6 +29148,8 @@ load();
|
|
|
29032
29148
|
|
|
29033
29149
|
_Category: Atoms · since 4.0.0_
|
|
29034
29150
|
|
|
29151
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
29152
|
+
|
|
29035
29153
|
A slide group lays a set of elements out in a single scrollable line: when the elements do not fit, the strip is paged with arrows. It can also drive a selection through `v-model` — CdsTabs and CdsTagGroup are built on the slide group.
|
|
29036
29154
|
|
|
29037
29155
|
**See also:** For a bar of sections take the ready CdsTabs, for picking tags take CdsTagGroup, and to page through slides one by one take CdsSlideView.
|
|
@@ -29452,6 +29570,8 @@ const tools = [
|
|
|
29452
29570
|
|
|
29453
29571
|
_Category: Atoms · since 4.0.0_
|
|
29454
29572
|
|
|
29573
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
29574
|
+
|
|
29455
29575
|
A slide view shows one slide out of a set and switches them with a shift animation: arrows, swipes and `v-model` page forward and backward. It is the base for carousels and step-by-step interfaces — CdsCarousel is built on the slide view.
|
|
29456
29576
|
|
|
29457
29577
|
**See also:** For a carousel of images with dot delimiters and autoplay take the ready CdsCarousel, for sections with a navigation bar take CdsTabs, and for a strip where several elements are visible at once take CdsSlideGroup.
|
|
@@ -29894,6 +30014,8 @@ const events = [
|
|
|
29894
30014
|
|
|
29895
30015
|
_Category: Feedback · since 4.0.0 · status: deprecated_
|
|
29896
30016
|
|
|
30017
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
30018
|
+
|
|
29897
30019
|
A stage bar shows the course of a business process: which stages are behind, which one is running now and where the process stopped because of an error. The component only displays the status — the stages are not clickable, so the bar fits cards, headers and lists where the state of the process has to be read at a glance.
|
|
29898
30020
|
|
|
29899
30021
|
**See also:** The component is deprecated: do not write new code with it. It keeps working across the whole 4.x line and prints a `[CDS UPGRADE]` warning in the dev console; it will be removed in 5.0. To show the course of a process without step navigation use CdsSteps — without the `interactive` prop the steps are not clickable, and the header without `items` works as a status tracker (see the "Request status" scenario). Mind that the look differs: `CdsStages` is an arrow bar, `CdsSteps` is a row of indicators with a progress line. To switch between equally weighted sections — CdsTabs.
|
|
@@ -30188,6 +30310,8 @@ const stagesFor = (order: Order) =>
|
|
|
30188
30310
|
|
|
30189
30311
|
_Category: Feedback · since 4.0.0_
|
|
30190
30312
|
|
|
30313
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
30314
|
+
|
|
30191
30315
|
A status is a non-interactive indicator of the state of an object: the request is paid, the document is under review, the payment is overdue. The `status` prop sets the semantics — the color and the icon — while `variant` sets the display mode: a prominent filled badge or compact text with a colored icon.
|
|
30192
30316
|
|
|
30193
30317
|
**See also:** For labels with arbitrary palette colors — categories, filters — take CdsTag; for counters and marker dots in the corner of an element — CdsBadge.
|
|
@@ -30413,6 +30537,8 @@ import { CdsStatus } from '@central-design-system/components';
|
|
|
30413
30537
|
|
|
30414
30538
|
_Category: Navigation · since 4.0.0_
|
|
30415
30539
|
|
|
30540
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
30541
|
+
|
|
30416
30542
|
The stepper walks the user through a multi-step process: it shows which steps are done, which one is active and how many are left. It can switch the content of the steps and renders the "Back" / "Next" buttons out of the box, while a header without content works as a status tracker.
|
|
30417
30543
|
|
|
30418
30544
|
**See also:** The stepper shows the progress of a business process without step navigation on its own: without the `interactive` prop the steps are not clickable, and the header without `items` works as a status tracker — see the ["Request status"](#request-status) scenario. The CdsStages component, which used to solve the same task, is deprecated. For sections of equal weight that are switched in any order, use CdsTabs.
|
|
@@ -30953,6 +31079,8 @@ import { CdsSteps, CdsStepsItem } from '@central-design-system/components';
|
|
|
30953
31079
|
|
|
30954
31080
|
_Category: Atoms · since 4.0.0 · status: new_
|
|
30955
31081
|
|
|
31082
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
31083
|
+
|
|
30956
31084
|
A surface is a container with a background from the tokens, sizes, positioning and a theme of its own. Take it when a block needs a design system background rather than a ready-made component: the backdrop of a panel, a plate, the base of your own component.
|
|
30957
31085
|
|
|
30958
31086
|
**See also:** For a card with a title and actions take CdsCard, for the sections of a page take CdsLayout. `CdsSurface` is the lowest layer, without content or paddings of its own.
|
|
@@ -31103,6 +31231,8 @@ const rows = [
|
|
|
31103
31231
|
|
|
31104
31232
|
_Category: Content · since 4.0.0_
|
|
31105
31233
|
|
|
31234
|
+
_Tests: API 0/72 · 13 unit · lines 10.9% (v4.0.0-alpha.11) · a11y: 50 axe recommendations (v4.0.0-alpha.11)_
|
|
31235
|
+
|
|
31106
31236
|
A table shows large sets of records in columns and takes the data work off your hands: sorting, filters, pagination, row selection and expansion, a pinned header and pinned columns. Columns are described by the `columns` prop, the records by the `data` prop.
|
|
31107
31237
|
|
|
31108
31238
|
**See also:** For a plain list of similar items without columns, use CdsList; for a hierarchy without tabular data, use CdsTree.
|
|
@@ -34304,6 +34434,8 @@ watch(tableDataSwitcher, () => {
|
|
|
34304
34434
|
|
|
34305
34435
|
_Category: Navigation · since 4.0.0_
|
|
34306
34436
|
|
|
34437
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
34438
|
+
|
|
34307
34439
|
Tabs split the screen into sections of equal weight and switch between them in place, without going to another page. The bar is built from `CdsTab` components or from an `items` array, and the content of the sections is switched by `CdsTabsView` and `CdsTabsViewItem`.
|
|
34308
34440
|
|
|
34309
34441
|
**See also:** For a sequential process with steps and progress, use CdsSteps; to pick a single value in a form, use CdsButtonToggle.
|
|
@@ -35144,6 +35276,8 @@ async function select(item: string) {
|
|
|
35144
35276
|
|
|
35145
35277
|
_Category: Content · since 4.0.0_
|
|
35146
35278
|
|
|
35279
|
+
_Tests: API 0/41 · 6 unit · lines 77.2% (v4.0.0-alpha.11) · a11y: 2 axe recommendations (v4.0.0-alpha.11)_
|
|
35280
|
+
|
|
35147
35281
|
A tag is a compact label next to an object: the status of a request, a product category, a selected filter. It takes a color from the palette, carries an icon or an avatar, can be closed with a cross and can work as a link.
|
|
35148
35282
|
|
|
35149
35283
|
**See also:** To build a toggle or a filter with selection out of tags, take CdsTagGroup. For a counter or a dot indicator on top of another element use CdsBadge, and trigger actions with CdsButton — a tag only labels.
|
|
@@ -35167,10 +35301,9 @@ disabled state and removes the reaction to clicks.
|
|
|
35167
35301
|
|
|
35168
35302
|
```vue
|
|
35169
35303
|
<script setup lang="ts">
|
|
35170
|
-
import { CdsTagConstants } from '@cds/components/CdsTag/api/CdsTag.constants';
|
|
35171
35304
|
import { CdsTag } from '@central-design-system/components';
|
|
35172
35305
|
|
|
35173
|
-
const colors =
|
|
35306
|
+
const colors = CdsTag.constants.colors;
|
|
35174
35307
|
</script>
|
|
35175
35308
|
|
|
35176
35309
|
<template>
|
|
@@ -35188,10 +35321,9 @@ The `size` prop offers five sizes from `xs` to `xl`. The default size is `md`.
|
|
|
35188
35321
|
|
|
35189
35322
|
```vue
|
|
35190
35323
|
<script setup lang="ts">
|
|
35191
|
-
import { CdsTagConstants } from '@cds/components/CdsTag/api/CdsTag.constants';
|
|
35192
35324
|
import { CdsTag } from '@central-design-system/components';
|
|
35193
35325
|
|
|
35194
|
-
const sizes =
|
|
35326
|
+
const sizes = CdsTag.constants.sizes;
|
|
35195
35327
|
</script>
|
|
35196
35328
|
|
|
35197
35329
|
<template>
|
|
@@ -35541,6 +35673,8 @@ const remove = (tag: string) => {
|
|
|
35541
35673
|
|
|
35542
35674
|
_Category: Content · since 4.0.0 · status: new_
|
|
35543
35675
|
|
|
35676
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
35677
|
+
|
|
35544
35678
|
A tag group turns a set of CdsTag into a toggle: the selected tag is highlighted, the value is available through `v-model`, and the tags that do not fit move into a horizontal scroll. Fits catalog filters, category pickers and quick period switches.
|
|
35545
35679
|
|
|
35546
35680
|
**See also:** If the choice should look like buttons, take CdsButtonToggle. For a choice out of a long list use CdsSelect, and for separate independent tags without selection just use CdsTag.
|
|
@@ -35978,6 +36112,8 @@ const group = ref<InstanceType<typeof CdsTagGroup> | null>(null);
|
|
|
35978
36112
|
|
|
35979
36113
|
_Category: Controls · since 4.0.0_
|
|
35980
36114
|
|
|
36115
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
36116
|
+
|
|
35981
36117
|
A text area is a field for multiline text: a comment, a description, a support request. Around the native `textarea` the component gathers everything a form needs: a label, a description, hints, error messages, clearing and a character counter, and with `auto-grow` it grows together with the text.
|
|
35982
36118
|
|
|
35983
36119
|
**See also:** For a short single-line value use CdsTextInput, to pick from a ready list of options — CdsSelect.
|
|
@@ -36432,7 +36568,7 @@ const publish = async () => {
|
|
|
36432
36568
|
| `details` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
36433
36569
|
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
36434
36570
|
| `loader` | `LoaderSlotProps` | Slot for a custom loader (shown when the loading prop is true). |
|
|
36435
|
-
| `message` | `
|
|
36571
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
36436
36572
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
36437
36573
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
36438
36574
|
| `prepend-inner` | `CdsInputDefaultSlot` | Slot added at the start of the input |
|
|
@@ -36459,6 +36595,8 @@ const publish = async () => {
|
|
|
36459
36595
|
|
|
36460
36596
|
_Category: Controls · since 4.0.0_
|
|
36461
36597
|
|
|
36598
|
+
_Tests: API 87/87 · 86 unit · 3 e2e · 6 known bugs · lines 97.2% (v4.0.0-alpha.11) · a11y: 12 axe recommendations (v4.0.0-alpha.11)_
|
|
36599
|
+
|
|
36462
36600
|
A text field is the basic way to get data from the user: a name, an email, an amount, a search query. Around the native `input` the component gathers everything a form needs: a label, a description, hints, error messages, icons, clearing and a character counter.
|
|
36463
36601
|
|
|
36464
36602
|
**See also:** For multiline text use CdsTextArea, to pick from a ready list of options use CdsSelect.
|
|
@@ -37160,7 +37298,7 @@ const sendMessage = () => {
|
|
|
37160
37298
|
| `details` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
37161
37299
|
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
37162
37300
|
| `loader` | `LoaderSlotProps` | Slot for a custom loader (shown when the loading prop is true). |
|
|
37163
|
-
| `message` | `
|
|
37301
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
37164
37302
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
37165
37303
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
37166
37304
|
| `prepend-inner` | `CdsInputDefaultSlot` | Slot added at the start of the input |
|
|
@@ -37187,6 +37325,8 @@ const sendMessage = () => {
|
|
|
37187
37325
|
|
|
37188
37326
|
_Category: Controls · since 4.0.0_
|
|
37189
37327
|
|
|
37328
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
37329
|
+
|
|
37190
37330
|
Time selection: hours, minutes and — if you want — seconds. The value can be typed on the keyboard or stepped through with the arrows, and `v-model` receives a string in the given format (`HH:mm` by default), which is convenient to store and to send to the server.
|
|
37191
37331
|
|
|
37192
37332
|
**See also:** To pick a date use CdsDatePicker, and if you need a field with a date and a time at once — the ready CdsDateInput with the `with-time` prop: it puts this clock under the calendar and brings everything together into one string itself.
|
|
@@ -37691,6 +37831,8 @@ const dateTime = ref('01.09.2026 09:30');
|
|
|
37691
37831
|
|
|
37692
37832
|
_Category: Feedback · since 4.0.0 · status: new_
|
|
37693
37833
|
|
|
37834
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
37835
|
+
|
|
37694
37836
|
A toast is a pop-up notification about the result of an action: the changes are saved, the file is uploaded, the request failed. It appears above the page, does not interrupt the work and closes itself once `timeout` runs out.
|
|
37695
37837
|
|
|
37696
37838
|
**See also:** For a stream of events where notifications arrive one after another use CdsToastQueue. A message that has to stay on the page belongs in CdsNotification, and a question that requires a decision from the user — in the CdsModal dialog.
|
|
@@ -38136,6 +38278,8 @@ const send = () => {
|
|
|
38136
38278
|
|
|
38137
38279
|
_Category: Feedback · since 4.0.0 · status: new_
|
|
38138
38280
|
|
|
38281
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
38282
|
+
|
|
38139
38283
|
A queue of pop-up notifications built on CdsToast. Put the messages into the `v-model` array — the queue will show them one by one or as a stack, respect the limit of simultaneously visible toasts and close the ones that are done.
|
|
38140
38284
|
|
|
38141
38285
|
**See also:** For a single notification — a save confirmation, for example — CdsToast is enough.
|
|
@@ -38484,6 +38628,8 @@ const push = () => {
|
|
|
38484
38628
|
|
|
38485
38629
|
_Category: Controls · since 4.0.0_
|
|
38486
38630
|
|
|
38631
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
38632
|
+
|
|
38487
38633
|
A toggle is an on/off switch for a setting that applies immediately, without a "Save" button: notifications, auto-renewal, profile visibility. It is built on CdsInput: it can do a label and a description, messages and errors, loading and the indeterminate state.
|
|
38488
38634
|
|
|
38489
38635
|
**See also:** A toggle changes the setting instantly. If the choice is applied together with the rest of the form by a button, take CdsCheckbox, and to pick one option out of a set — CdsRadioGroup.
|
|
@@ -38534,11 +38680,10 @@ Five sizes on the `size` scale — from `xs` to `xl`, `md` by default.
|
|
|
38534
38680
|
|
|
38535
38681
|
```vue
|
|
38536
38682
|
<script setup lang="ts">
|
|
38537
|
-
import { CdsToggleConstants } from '@cds/components/CdsToggle/api/CdsToggle.constants';
|
|
38538
38683
|
import { CdsToggle } from '@central-design-system/components';
|
|
38539
38684
|
import { ref } from 'vue';
|
|
38540
38685
|
|
|
38541
|
-
const sizes =
|
|
38686
|
+
const sizes = CdsToggle.constants.sizes;
|
|
38542
38687
|
const enabled = ref(true);
|
|
38543
38688
|
</script>
|
|
38544
38689
|
|
|
@@ -38937,7 +39082,7 @@ const total = computed(() => options.reduce((sum, option) => sum + (selected.val
|
|
|
38937
39082
|
| `input` | `SelectionControlSlot` | Slot for the default input element. |
|
|
38938
39083
|
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
38939
39084
|
| `loader` | `LoaderSlotProps` | Slot for a custom loading indicator. |
|
|
38940
|
-
| `message` | `
|
|
39085
|
+
| `message` | `CdsMessageSlot` | Slot for customizing the content of a message |
|
|
38941
39086
|
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
38942
39087
|
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
38943
39088
|
| `thumb` | `{ icon: IconValue \| undefined; } & CdsToggleSlot` | Slot for the content of the thumb. |
|
|
@@ -38964,6 +39109,8 @@ const total = computed(() => options.reduce((sum, option) => sum + (selected.val
|
|
|
38964
39109
|
|
|
38965
39110
|
_Category: Layouts · since 4.0.0_
|
|
38966
39111
|
|
|
39112
|
+
_Tests: API 0/10 · 3 unit · lines 72.7% (v4.0.0-alpha.11) · a11y: 5 axe recommendations (v4.0.0-alpha.11)_
|
|
39113
|
+
|
|
38967
39114
|
A horizontal bar with a title and actions: it fills the header and the footer of the application, and on a page it assembles the title of a section together with its buttons. `CdsToolbarTitle` stretches and pushes the left and the right groups to the edges on its own.
|
|
38968
39115
|
|
|
38969
39116
|
**See also:** The toolbar only lays the content out — the place in the layout is reserved by CdsHeader and CdsFooter. For navigating the subsections take CdsTabs; for an action bar over a record take CdsButtonGroup.
|
|
@@ -39222,6 +39369,8 @@ import {
|
|
|
39222
39369
|
|
|
39223
39370
|
_Category: Content · since 4.0.0_
|
|
39224
39371
|
|
|
39372
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
39373
|
+
|
|
39225
39374
|
A tooltip briefly explains an interface element on hover or focus: it names an icon button, shows the full text of a truncated line, explains why an action is unavailable. It appears and disappears on its own — the user does not have to press or close anything.
|
|
39226
39375
|
|
|
39227
39376
|
**See also:** A tooltip is for a short text without interaction. A list of actions on click is the job of CdsMenu, and a dialog with a form and buttons is the job of CdsModal.
|
|
@@ -39668,6 +39817,8 @@ const active = ref(false);
|
|
|
39668
39817
|
|
|
39669
39818
|
_Category: Content · since 4.0.0_
|
|
39670
39819
|
|
|
39820
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
39821
|
+
|
|
39671
39822
|
A tree shows a hierarchy: catalog sections, project files, an org structure. Nodes expand, get selected by a click or with checkboxes, load from the server and can be dragged, while virtual scrolling keeps everything smooth even with thousands of nodes.
|
|
39672
39823
|
|
|
39673
39824
|
**See also:** For a flat set without nesting take CdsList, for navigation between sections take CdsMenu, and for collapsible sections of content take CdsExpandablePanel.
|
|
@@ -40668,6 +40819,8 @@ const selectedFile = computed(() => {
|
|
|
40668
40819
|
|
|
40669
40820
|
_Category: Controls · since 4.0.0_
|
|
40670
40821
|
|
|
40822
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
40823
|
+
|
|
40671
40824
|
The uploader sends files to the server right from the interface: the user picks them in the system dialog or drags them onto the button, and the component shows the list of what was uploaded — with a status, progress, downloading and removal. Every step of the file lifecycle comes with an event.
|
|
40672
40825
|
|
|
40673
40826
|
**See also:** The uploader sends the files over HTTP itself. If the files only have to be picked and sent together with the form, take the CdsFileInput field, and for a drop zone with image previews — CdsFileUpload.
|
|
@@ -41378,6 +41531,8 @@ const handlePreview = (file: NUploader.IUploadFile) => {
|
|
|
41378
41531
|
|
|
41379
41532
|
_Category: Content · since 4.0.0 · status: new_
|
|
41380
41533
|
|
|
41534
|
+
_Tests: none yet — behavior is not covered by automated tests_
|
|
41535
|
+
|
|
41381
41536
|
Virtual scrolling keeps long lists fast: only the visible rows get into the DOM, not the whole array. Pass the records to `items`, the markup of a row to the slot, and a list of tens of thousands of positions scrolls as smoothly as a list of ten.
|
|
41382
41537
|
|
|
41383
41538
|
**See also:** The dropdowns of CdsSelect and CdsAutocomplete, as well as the CdsTree tree, already virtualize their items — there is no need to wrap them. Render a short list — up to a couple of hundred rows — with the regular CdsList: virtualization will not pay off there.
|