@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
|
@@ -1,44 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Value of `c-accordion`: the expanded item's `value`, an array of them in
|
|
3
|
+
* `multiple` mode, or `null` when every item is collapsed.
|
|
4
|
+
*/
|
|
5
|
+
export type CAccordionValue = (number | string)[] | null | number | string;
|
|
3
6
|
interface CAccordionProps {
|
|
4
7
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
+
* Keeps the last expanded item from collapsing: its header stops
|
|
9
|
+
* responding until another item expands. It never expands an item
|
|
10
|
+
* itself, so pair it with an initial `value`.
|
|
8
11
|
*/
|
|
9
12
|
mandatory?: boolean;
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @seeded from csc-ui — verify
|
|
14
|
+
* Lets items expand and collapse independently; `value` is then an array
|
|
15
|
+
* of the expanded items' values.
|
|
14
16
|
*/
|
|
15
17
|
multiple?: boolean;
|
|
16
18
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @seeded from csc-ui — verify
|
|
19
|
+
* Adds a primary ring inside the outline of expanded items.
|
|
20
20
|
*/
|
|
21
21
|
outlined?: boolean;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @seeded from csc-ui — verify
|
|
23
|
+
* The expanded item's `value`, an array of them with `multiple`, or `null`
|
|
24
|
+
* when every item is collapsed.
|
|
26
25
|
*/
|
|
27
|
-
value?:
|
|
26
|
+
value?: CAccordionValue;
|
|
28
27
|
}
|
|
29
|
-
declare
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
declare const __VLS_base: import("vue").DefineComponent<CAccordionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CAccordionProps> & Readonly<{}>, {
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAccordionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CAccordionProps> & Readonly<{}>, {
|
|
34
31
|
outlined: boolean;
|
|
35
|
-
value:
|
|
32
|
+
value: CAccordionValue;
|
|
36
33
|
mandatory: boolean;
|
|
37
34
|
multiple: boolean;
|
|
38
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export default _default;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
36
|
+
default?: (props: {}) => any;
|
|
37
|
+
}>;
|
|
42
38
|
type __VLS_WithSlots<T, S> = T & {
|
|
43
39
|
new (): {
|
|
44
40
|
$slots: S;
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
interface CAccordionItemProps {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Whether the expanded item may collapse; the parent `<c-accordion>` sets
|
|
4
|
+
* it from its `mandatory`.
|
|
4
5
|
*
|
|
5
|
-
* @
|
|
6
|
+
* @internal
|
|
6
7
|
*/
|
|
7
8
|
collapsable?: boolean;
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
+
* Whether the item is expanded; the parent `<c-accordion>` sets it from its
|
|
11
|
+
* `value`. Style an expanded item through `:state(expanded)`.
|
|
10
12
|
*
|
|
11
|
-
* @
|
|
13
|
+
* @internal
|
|
12
14
|
*/
|
|
13
15
|
expanded?: boolean;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
17
|
+
* The header's text. The `heading` slot replaces it for rich content.
|
|
16
18
|
*
|
|
17
|
-
* @seeded from csc-ui — verify
|
|
18
19
|
* @freeform
|
|
19
20
|
*/
|
|
20
21
|
heading?: string;
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
+
* Outline the item while it is expanded; the parent `<c-accordion>` sets
|
|
24
|
+
* it from its own `outlined`.
|
|
23
25
|
*
|
|
24
|
-
* @
|
|
26
|
+
* @internal
|
|
25
27
|
*/
|
|
26
28
|
outlined?: boolean;
|
|
27
29
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* @seeded from csc-ui — verify
|
|
30
|
+
* Identifies the item in the parent `<c-accordion>`'s `value`. Required:
|
|
31
|
+
* the accordion leaves an item without one collapsed.
|
|
31
32
|
*/
|
|
32
33
|
value?: number | string;
|
|
33
34
|
}
|
|
@@ -35,7 +36,7 @@ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
|
35
36
|
type __VLS_Slots = {} & {
|
|
36
37
|
icon?: (props: typeof __VLS_1) => any;
|
|
37
38
|
} & {
|
|
38
|
-
|
|
39
|
+
heading?: (props: typeof __VLS_3) => any;
|
|
39
40
|
} & {
|
|
40
41
|
default?: (props: typeof __VLS_5) => any;
|
|
41
42
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Type of the alert: the four status types carry their status family's
|
|
3
|
+
* colours and icon. Omitting it renders the neutral look, in the brand primary
|
|
4
|
+
* colour (unlike `c-status`, whose neutral pill is grey) and without an icon.
|
|
4
5
|
*/
|
|
5
|
-
export type
|
|
6
|
-
|
|
6
|
+
export type CAlertType = 'error' | 'info' | 'success' | 'warning';
|
|
7
|
+
interface CAlertProps {
|
|
7
8
|
/**
|
|
8
|
-
* Show a
|
|
9
|
-
*
|
|
9
|
+
* Show a close button. The alert only fires `close` — removing it from the
|
|
10
|
+
* page stays the consumer's job.
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
closeable?: boolean;
|
|
12
13
|
/**
|
|
13
14
|
* Heading rendered above the message. The `heading` slot overrides it for
|
|
14
15
|
* rich content.
|
|
@@ -17,23 +18,17 @@ export interface CAlertProps {
|
|
|
17
18
|
*/
|
|
18
19
|
heading?: string;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* The status type, setting the colours, the icon and how urgently the
|
|
22
|
+
* alert is announced (`warning` and `error` interrupt). Without it the
|
|
23
|
+
* alert has the neutral, brand-primary look and no icon.
|
|
23
24
|
*/
|
|
24
25
|
type?: CAlertType;
|
|
25
26
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Type of the alert. `default` — equivalently, omitting the attribute —
|
|
28
|
-
* renders the brand-primary look; the four status types carry their status
|
|
29
|
-
* family's colours.
|
|
30
|
-
*/
|
|
31
|
-
export type CAlertType = 'default' | CAlertIconType;
|
|
32
27
|
declare const _default: typeof __VLS_export;
|
|
33
28
|
export default _default;
|
|
34
29
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CAlertProps> & Readonly<{}>, {
|
|
35
30
|
type: CAlertType;
|
|
36
|
-
|
|
31
|
+
closeable: boolean;
|
|
37
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
38
33
|
heading?: (props: {}) => any;
|
|
39
34
|
} & {
|
|
@@ -17,12 +17,60 @@ export type CAutocompleteItem = CSelectItem;
|
|
|
17
17
|
export interface CAutocompleteOption {
|
|
18
18
|
/** Whether the option is disabled. */
|
|
19
19
|
disabled: boolean;
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* The option's label: its `name`, else the text of its `c-option-value`,
|
|
22
|
+
* else its whole text content (for an `items` entry, its `name`).
|
|
23
|
+
*/
|
|
21
24
|
label: string;
|
|
22
25
|
/** The option's value. */
|
|
23
26
|
value: number | string;
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
/**
|
|
29
|
+
* UI texts of `c-autocomplete`, shallow-merged over the English defaults.
|
|
30
|
+
* Static labels are strings; count- or label-interpolated ones are
|
|
31
|
+
* functions.
|
|
32
|
+
*/
|
|
33
|
+
export interface CAutocompleteTexts {
|
|
34
|
+
/** Accessible label of the clear button. */
|
|
35
|
+
clearSelection?: string;
|
|
36
|
+
/** Accessible label of the close button in the fullscreen panel (narrow viewports). */
|
|
37
|
+
closePanel?: string;
|
|
38
|
+
/** Accessible label of the search input inside the panel. */
|
|
39
|
+
filterOptions?: string;
|
|
40
|
+
/** Text of the loading row shown while `loading` with nothing to list. */
|
|
41
|
+
loading?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Text of the overflow tag when `max-tags` folds the selection; receives the
|
|
44
|
+
* number of hidden tags.
|
|
45
|
+
*/
|
|
46
|
+
more?: (count: number) => string;
|
|
47
|
+
/** Text of the row shown when the query matches no options. */
|
|
48
|
+
noResults?: string;
|
|
49
|
+
/** Accessible label of a tag's remove button; receives the option label. */
|
|
50
|
+
remove?: (label: string) => string;
|
|
51
|
+
/** Placeholder of the search input when the `placeholder` prop is empty. */
|
|
52
|
+
searchPlaceholder?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Label of the select-all row; receives the number of enabled options
|
|
55
|
+
* listed.
|
|
56
|
+
*/
|
|
57
|
+
selectAll?: (count: number) => string;
|
|
58
|
+
/**
|
|
59
|
+
* Field text when `max-tags="0"` shows no tags; receives the selection
|
|
60
|
+
* count.
|
|
61
|
+
*/
|
|
62
|
+
selected?: (count: number) => string;
|
|
63
|
+
/** Accessible label of the chevron button that opens and closes the panel. */
|
|
64
|
+
toggleOptions?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Selection value of `c-autocomplete`: the committed option's value — or the
|
|
68
|
+
* whole `{ name, value }` item with `return-object` — and `null` when
|
|
69
|
+
* cleared. In `multiple` mode an array of them in the order they were
|
|
70
|
+
* picked, `[]` when empty.
|
|
71
|
+
*/
|
|
72
|
+
export type CAutocompleteValue = (number | string)[] | CAutocompleteItem | CAutocompleteItem[] | null | number | string;
|
|
73
|
+
interface CAutocompleteProps {
|
|
26
74
|
/** Make the selected value clearable */
|
|
27
75
|
clearable?: boolean;
|
|
28
76
|
/** Disable the input */
|
|
@@ -41,7 +89,11 @@ export interface CAutocompleteProps {
|
|
|
41
89
|
external?: boolean;
|
|
42
90
|
/** Custom filter predicate; receives a normalized option + the query. Ignored when `external` is set */
|
|
43
91
|
filter?: CAutocompleteFilter;
|
|
44
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* Hide the hint and error messages
|
|
94
|
+
*
|
|
95
|
+
* @defaultable false
|
|
96
|
+
*/
|
|
45
97
|
hideDetails?: boolean;
|
|
46
98
|
/**
|
|
47
99
|
* Hint text for the input
|
|
@@ -50,14 +102,17 @@ export interface CAutocompleteProps {
|
|
|
50
102
|
*/
|
|
51
103
|
hint?: string;
|
|
52
104
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* @freeform
|
|
105
|
+
* Show the control as invalid: its `error-message`, when set, replaces the
|
|
106
|
+
* hint, and the control is marked `aria-invalid`.
|
|
56
107
|
*/
|
|
57
|
-
|
|
108
|
+
invalid?: boolean;
|
|
58
109
|
/** Dropdown items (when not using <c-option> elements) */
|
|
59
110
|
items?: CAutocompleteItem[];
|
|
60
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Items per page before the list scrolls
|
|
113
|
+
*
|
|
114
|
+
* @defaultable 6
|
|
115
|
+
*/
|
|
61
116
|
itemsPerPage?: number;
|
|
62
117
|
/**
|
|
63
118
|
* Element label
|
|
@@ -65,22 +120,34 @@ export interface CAutocompleteProps {
|
|
|
65
120
|
* @freeform
|
|
66
121
|
*/
|
|
67
122
|
label?: string;
|
|
68
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Label on top of the input
|
|
125
|
+
*
|
|
126
|
+
* @defaultable false
|
|
127
|
+
*/
|
|
69
128
|
labelOnTop?: boolean;
|
|
70
129
|
/** Show loading state */
|
|
71
130
|
loading?: boolean;
|
|
72
131
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
132
|
+
* In `multiple` mode, show at most this many selected-value tags and fold
|
|
133
|
+
* the rest into one "+N more" tag; `0` shows no tags and reads "N selected"
|
|
134
|
+
* instead; unset shows every tag
|
|
76
135
|
*/
|
|
77
|
-
|
|
136
|
+
maxTags?: number;
|
|
78
137
|
/**
|
|
79
|
-
*
|
|
138
|
+
* Allow selecting several options: rows toggle, the panel stays open and
|
|
139
|
+
* keeps its query, `value` becomes an array of the selected values (items
|
|
140
|
+
* with `return-object`) in the order they were picked, and the picks show
|
|
141
|
+
* as tags inside the field. Arrays have no attribute form — bind `value` as
|
|
142
|
+
* a DOM property
|
|
143
|
+
*/
|
|
144
|
+
multiple?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Input field name
|
|
80
147
|
*
|
|
81
148
|
* @freeform
|
|
82
149
|
*/
|
|
83
|
-
|
|
150
|
+
name?: string;
|
|
84
151
|
/**
|
|
85
152
|
* Placeholder for the in-panel search input
|
|
86
153
|
*
|
|
@@ -91,42 +158,68 @@ export interface CAutocompleteProps {
|
|
|
91
158
|
required?: boolean;
|
|
92
159
|
/** Return object instead of value */
|
|
93
160
|
returnObject?: boolean;
|
|
94
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* In `multiple` mode, pin a select-all row at the top of the list. Its
|
|
163
|
+
* checkbox shows whether none, some or all enabled options currently listed
|
|
164
|
+
* — the matches while a query is typed, the given `items` with `external` —
|
|
165
|
+
* are selected; activating it selects them all, or, when all are selected,
|
|
166
|
+
* unselects them. Ignored in single mode
|
|
167
|
+
*/
|
|
168
|
+
selectAll?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Shadow variant
|
|
171
|
+
*
|
|
172
|
+
* @defaultable false
|
|
173
|
+
*/
|
|
95
174
|
shadow?: boolean;
|
|
96
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* Field height: the 52px default (the shared control height) or the 36px `small` box
|
|
177
|
+
*
|
|
178
|
+
* @defaultable 'default'
|
|
179
|
+
*/
|
|
97
180
|
size?: CFieldSize;
|
|
98
|
-
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
181
|
+
/**
|
|
182
|
+
* UI text overrides (i18n), merged over the English defaults. Objects have
|
|
183
|
+
* no attribute form — bind as a DOM property (`:texts.prop` in Vue)
|
|
184
|
+
*
|
|
185
|
+
* @defaultable {}
|
|
186
|
+
*/
|
|
187
|
+
texts?: CAutocompleteTexts;
|
|
188
|
+
/**
|
|
189
|
+
* Selected value: the option's value, or the whole item with
|
|
190
|
+
* `return-object`; an array of them in `multiple` mode
|
|
191
|
+
*/
|
|
192
|
+
value?: CAutocompleteValue;
|
|
102
193
|
}
|
|
103
194
|
declare const _default: typeof __VLS_export;
|
|
104
195
|
export default _default;
|
|
105
196
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAutocompleteProps, {
|
|
106
|
-
|
|
197
|
+
focus: (options?: FocusOptions) => void;
|
|
107
198
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CAutocompleteProps> & Readonly<{}>, {
|
|
108
199
|
label: string;
|
|
109
200
|
filter: CAutocompleteFilter;
|
|
110
|
-
|
|
201
|
+
invalid: boolean;
|
|
111
202
|
name: string;
|
|
203
|
+
value: CAutocompleteValue;
|
|
204
|
+
multiple: boolean;
|
|
205
|
+
itemsPerPage: number;
|
|
206
|
+
size: CFieldSize;
|
|
207
|
+
texts: CAutocompleteTexts;
|
|
208
|
+
hideDetails: boolean;
|
|
209
|
+
labelOnTop: boolean;
|
|
210
|
+
shadow: boolean;
|
|
112
211
|
clearable: boolean;
|
|
113
212
|
disabled: boolean;
|
|
114
213
|
errorMessage: string;
|
|
115
214
|
external: boolean;
|
|
116
|
-
hideDetails: boolean;
|
|
117
215
|
hint: string;
|
|
118
|
-
hostId: string;
|
|
119
216
|
items: CAutocompleteItem[];
|
|
120
|
-
itemsPerPage: number;
|
|
121
|
-
labelOnTop: boolean;
|
|
122
217
|
loading: boolean;
|
|
123
|
-
|
|
218
|
+
maxTags: number;
|
|
124
219
|
placeholder: string;
|
|
125
220
|
required: boolean;
|
|
126
221
|
returnObject: boolean;
|
|
127
|
-
|
|
128
|
-
size: CFieldSize;
|
|
129
|
-
valid: boolean;
|
|
222
|
+
selectAll: boolean;
|
|
130
223
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
131
224
|
pre?: (props: {}) => any;
|
|
132
225
|
} & {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI texts of `c-breadcrumb`, shallow-merged over the English defaults.
|
|
3
|
+
* Static labels are strings; interpolated ones are functions.
|
|
4
|
+
*/
|
|
5
|
+
export interface CBreadcrumbTexts {
|
|
6
|
+
/** Accessible name of the breadcrumb navigation. */
|
|
7
|
+
breadcrumb?: string;
|
|
8
|
+
/** Accessible name of the fold button; receives the number of folded crumbs. */
|
|
9
|
+
fold?: (count: number) => string;
|
|
10
|
+
}
|
|
11
|
+
interface CBreadcrumbProps {
|
|
12
|
+
/**
|
|
13
|
+
* UI text overrides (i18n), merged over the English defaults. Objects have
|
|
14
|
+
* no attribute form — set it as a property
|
|
15
|
+
*
|
|
16
|
+
* @defaultable {}
|
|
17
|
+
*/
|
|
18
|
+
texts?: CBreadcrumbTexts;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CBreadcrumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CBreadcrumbProps> & Readonly<{}>, {
|
|
23
|
+
texts: CBreadcrumbTexts;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
25
|
+
first?: (props: {}) => any;
|
|
26
|
+
} & {
|
|
27
|
+
folded?: (props: {}) => any;
|
|
28
|
+
} & {
|
|
29
|
+
default?: (props: {}) => any;
|
|
30
|
+
}>;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The breadcrumb's fold arithmetic (ADR-0067), kept free of the DOM so the
|
|
3
|
+
* node project can pin it down. The component measures each crumb once, in
|
|
4
|
+
* the row and untruncated, and asks `fitCrumbs` how to lay out the current
|
|
5
|
+
* width.
|
|
6
|
+
*/
|
|
7
|
+
/** One crumb's widths in px, measured in the row: its whole item, separator included. */
|
|
8
|
+
export interface CBreadcrumbCrumbWidth {
|
|
9
|
+
/** The narrowest the crumb may get when its label truncates. */
|
|
10
|
+
floor: number;
|
|
11
|
+
/** The untruncated width. */
|
|
12
|
+
natural: number;
|
|
13
|
+
}
|
|
14
|
+
export interface CBreadcrumbFit {
|
|
15
|
+
/** Width cap for the current (last) crumb, or `null` when it keeps its natural width. */
|
|
16
|
+
currentMax: null | number;
|
|
17
|
+
/** Width cap for the first crumb, or `null` when it keeps its natural width. */
|
|
18
|
+
firstMax: null | number;
|
|
19
|
+
/** How many crumbs fold, counted from the second one. */
|
|
20
|
+
folded: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Lay the crumbs out in `available` px: fold middle crumbs, the one nearest
|
|
24
|
+
* the first crumb first, until the row fits — the fold button joining it at
|
|
25
|
+
* `foldWidth` — never the first or the current (last) crumb. When nothing
|
|
26
|
+
* more can fold, truncate the current crumb down to its floor, then the
|
|
27
|
+
* first one.
|
|
28
|
+
*/
|
|
29
|
+
export declare const fitCrumbs: (crumbs: readonly CBreadcrumbCrumbWidth[], foldWidth: number, available: number) => CBreadcrumbFit;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface CBreadcrumbItemProps {
|
|
2
|
+
/**
|
|
3
|
+
* URL of the page the crumb leads to. Ignored on the current crumb (the
|
|
4
|
+
* last one); a crumb without it names a level that has no page and renders
|
|
5
|
+
* as plain text
|
|
6
|
+
*
|
|
7
|
+
* @freeform any URL
|
|
8
|
+
*/
|
|
9
|
+
href?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Browsing context the link opens in; the same tab when unset
|
|
12
|
+
*
|
|
13
|
+
* @freeform any browsing-context name (e.g. _blank, _self)
|
|
14
|
+
*/
|
|
15
|
+
target?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CBreadcrumbItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CBreadcrumbItemProps> & Readonly<{}>, {
|
|
20
|
+
href: string;
|
|
21
|
+
target: string;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
23
|
+
icon?: (props: {}) => any;
|
|
24
|
+
} & {
|
|
25
|
+
default?: (props: {}) => any;
|
|
26
|
+
}>;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|