@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,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Size of the button.
|
|
3
|
+
*/
|
|
4
|
+
export type CButtonSize = 'default' | 'large' | 'small';
|
|
5
|
+
/**
|
|
6
|
+
* Native `type` of the underlying `<button>` element. Ignored when `href`
|
|
7
|
+
* turns the component into a link.
|
|
8
|
+
*/
|
|
9
|
+
export type CButtonType = 'button' | 'reset' | 'submit';
|
|
10
|
+
interface CButtonProps {
|
|
2
11
|
/**
|
|
3
12
|
* Pressed (toggle) state — renders the selected look and sets
|
|
4
13
|
* `aria-pressed`. Leave unset for regular action buttons: only a
|
|
@@ -7,111 +16,91 @@ export interface CButtonProps {
|
|
|
7
16
|
*/
|
|
8
17
|
active?: boolean;
|
|
9
18
|
/**
|
|
10
|
-
*
|
|
19
|
+
* Be a tab of a tablist: `role="tab"`, with `active` as `aria-selected`
|
|
20
|
+
* instead of `aria-pressed`. c-tab-buttons sets it on its buttons.
|
|
11
21
|
*
|
|
12
|
-
* @
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
asTab?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Danger appearance for a destructive action: the filled button in the error
|
|
27
|
+
* colour; no effect on `outlined`, `ghost` or `text`.
|
|
13
28
|
*/
|
|
14
29
|
danger?: boolean;
|
|
15
30
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @seeded from csc-ui — verify
|
|
31
|
+
* Grey the button out and block clicks and keys, a link button (`href`)
|
|
32
|
+
* included.
|
|
19
33
|
*/
|
|
20
34
|
disabled?: boolean;
|
|
21
35
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* @seeded from csc-ui — verify
|
|
36
|
+
* Stretch the button to the full width of its container.
|
|
25
37
|
*/
|
|
26
38
|
fit?: boolean;
|
|
27
39
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* @seeded from csc-ui — verify
|
|
40
|
+
* Ghost appearance: primary text on a light primary tint, for lower emphasis.
|
|
31
41
|
*/
|
|
32
42
|
ghost?: boolean;
|
|
33
43
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* @seeded from csc-ui — verify
|
|
37
|
-
* @freeform
|
|
38
|
-
*/
|
|
39
|
-
hostId?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Hyperlink url
|
|
44
|
+
* URL to link to: the button renders as a real link (`<a>`) styled as a
|
|
45
|
+
* button.
|
|
42
46
|
*
|
|
43
|
-
* @seeded from csc-ui — verify
|
|
44
47
|
* @freeform any URL
|
|
45
48
|
*/
|
|
46
49
|
href?: string;
|
|
47
50
|
/**
|
|
48
|
-
* Inverted
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
+
* Inverted colours for a fixed dark or brand-coloured backdrop: the
|
|
52
|
+
* `inverse-*` family, the same in both theme modes. Combines with the other
|
|
53
|
+
* appearances.
|
|
51
54
|
*/
|
|
52
55
|
inverted?: boolean;
|
|
53
56
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* @seeded from csc-ui — verify
|
|
57
|
+
* Show a spinner in place of the label and ignore clicks and keys, e.g. while
|
|
58
|
+
* the action runs.
|
|
57
59
|
*/
|
|
58
60
|
loading?: boolean;
|
|
59
61
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @seeded from csc-ui — verify
|
|
62
|
+
* Square corners instead of the rounded default.
|
|
63
63
|
*/
|
|
64
64
|
noRadius?: boolean;
|
|
65
|
-
/** Suppress the click ripple (e.g. when a wrapper owns the press feedback). */
|
|
66
|
-
noRipple?: boolean;
|
|
67
65
|
/**
|
|
68
|
-
*
|
|
66
|
+
* Suppress the click ripple; the parent `<c-button-group>` sets it on its
|
|
67
|
+
* buttons, whose press feedback it owns.
|
|
69
68
|
*
|
|
70
|
-
* @
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
noRipple?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Outlined appearance: a primary outline and text with no fill, for lower
|
|
74
|
+
* emphasis.
|
|
71
75
|
*/
|
|
72
76
|
outlined?: boolean;
|
|
73
77
|
/**
|
|
74
|
-
* Size of the button
|
|
75
|
-
*
|
|
76
|
-
* @seeded from csc-ui — verify
|
|
78
|
+
* Size of the button: `small`, `default` (the control height, level with a
|
|
79
|
+
* form field) or `large` (the toolbar height).
|
|
77
80
|
*/
|
|
78
81
|
size?: CButtonSize;
|
|
79
82
|
/**
|
|
80
|
-
*
|
|
83
|
+
* Where the `href` opens, as on a native `<a>`: the same tab unless set —
|
|
84
|
+
* `_blank` for a new one.
|
|
81
85
|
*
|
|
82
|
-
* @seeded from csc-ui — verify
|
|
83
86
|
* @freeform any browsing-context name (e.g. _blank, _self)
|
|
84
87
|
*/
|
|
85
88
|
target?: string;
|
|
86
89
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* @seeded from csc-ui — verify
|
|
90
|
+
* Text appearance: primary text with no fill or outline, the lightest look.
|
|
90
91
|
*/
|
|
91
92
|
text?: boolean;
|
|
92
93
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* @seeded from csc-ui — verify
|
|
94
|
+
* Native `type` of the button: `button` unless set, `submit` or `reset`.
|
|
95
|
+
* Ignored when `href` is set.
|
|
96
96
|
*/
|
|
97
97
|
type?: CButtonType;
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* @seeded from csc-ui — verify
|
|
99
|
+
* The button's value in a `c-button-group`; in `c-tab-buttons`, the `value`
|
|
100
|
+
* of the `c-tab-item` panel it shows.
|
|
103
101
|
*/
|
|
104
102
|
value?: number | string;
|
|
105
103
|
}
|
|
106
|
-
/**
|
|
107
|
-
* Size of the button.
|
|
108
|
-
*/
|
|
109
|
-
export type CButtonSize = 'default' | 'large' | 'small';
|
|
110
|
-
/**
|
|
111
|
-
* Native `type` of the underlying `<button>` element. Ignored when `href`
|
|
112
|
-
* turns the component into a link.
|
|
113
|
-
*/
|
|
114
|
-
export type CButtonType = 'button' | 'reset' | 'submit';
|
|
115
104
|
declare const _default: typeof __VLS_export;
|
|
116
105
|
export default _default;
|
|
117
106
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CButtonProps> & Readonly<{}>, {
|
|
@@ -119,19 +108,19 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButto
|
|
|
119
108
|
outlined: boolean;
|
|
120
109
|
value: number | string;
|
|
121
110
|
type: CButtonType;
|
|
111
|
+
size: CButtonSize;
|
|
112
|
+
fit: boolean;
|
|
122
113
|
disabled: boolean;
|
|
123
|
-
hostId: string;
|
|
124
114
|
loading: boolean;
|
|
125
|
-
|
|
115
|
+
href: string;
|
|
116
|
+
target: string;
|
|
126
117
|
active: boolean;
|
|
118
|
+
asTab: boolean;
|
|
127
119
|
danger: boolean;
|
|
128
|
-
fit: boolean;
|
|
129
120
|
ghost: boolean;
|
|
130
|
-
href: string;
|
|
131
121
|
inverted: boolean;
|
|
132
122
|
noRadius: boolean;
|
|
133
123
|
noRipple: boolean;
|
|
134
|
-
target: string;
|
|
135
124
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
136
125
|
icon?: (props: {}) => any;
|
|
137
126
|
} & {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Size of the button group. `small` renders a more compact control; the size
|
|
3
|
+
* is also propagated to every slotted `<c-button>`. Omitting the attribute
|
|
4
|
+
* renders the default size.
|
|
5
|
+
*/
|
|
6
|
+
export type CButtonGroupSize = 'default' | 'small';
|
|
7
|
+
/**
|
|
8
|
+
* Selection value of the group: a single button value (or index) — `null`
|
|
9
|
+
* when nothing is selected — or, in `multiple` mode, an array of them.
|
|
10
|
+
*/
|
|
11
|
+
export type CButtonGroupValue = (number | string)[] | null | number | string;
|
|
12
|
+
interface CButtonGroupProps {
|
|
2
13
|
/** Disable the whole group — every slotted c-button is disabled and the selection can no longer be changed. */
|
|
3
14
|
disabled?: boolean;
|
|
4
15
|
/**
|
|
@@ -35,27 +46,18 @@ export interface CButtonGroupProps {
|
|
|
35
46
|
*/
|
|
36
47
|
value?: CButtonGroupValue;
|
|
37
48
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Size of the button group. `small` renders a more compact control; the size
|
|
40
|
-
* is also propagated to every slotted `<c-button>`. Omitting the attribute
|
|
41
|
-
* renders the default size.
|
|
42
|
-
*/
|
|
43
|
-
export type CButtonGroupSize = 'default' | 'small';
|
|
44
|
-
/**
|
|
45
|
-
* Selection value of the group: a single button value (or index) — `null`
|
|
46
|
-
* when nothing is selected — or, in `multiple` mode, an array of them.
|
|
47
|
-
*/
|
|
48
|
-
export type CButtonGroupValue = (number | string)[] | null | number | string;
|
|
49
49
|
declare const _default: typeof __VLS_export;
|
|
50
50
|
export default _default;
|
|
51
|
-
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButtonGroupProps, {
|
|
51
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButtonGroupProps, {
|
|
52
|
+
focus: (options?: FocusOptions) => void;
|
|
53
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CButtonGroupProps> & Readonly<{}>, {
|
|
52
54
|
label: string;
|
|
53
55
|
value: CButtonGroupValue;
|
|
54
56
|
mandatory: boolean;
|
|
55
57
|
multiple: boolean;
|
|
58
|
+
size: CButtonGroupSize;
|
|
56
59
|
disabled: boolean;
|
|
57
60
|
required: boolean;
|
|
58
|
-
size: CButtonGroupSize;
|
|
59
61
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
60
62
|
default?: (props: {}) => any;
|
|
61
63
|
}>;
|
|
@@ -7,17 +7,15 @@ export type CCardActionsAlign = 'center' | 'end' | 'start';
|
|
|
7
7
|
* grow to fill the row.
|
|
8
8
|
*/
|
|
9
9
|
export type CCardActionsJustify = 'center' | 'end' | 'space-around' | 'space-between' | 'start' | 'stretch';
|
|
10
|
-
|
|
10
|
+
interface CCardActionsProps {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @seeded from csc-ui — verify
|
|
12
|
+
* Aligns the actions across the row: to its top (`start`), centre or
|
|
13
|
+
* bottom (`end`).
|
|
15
14
|
*/
|
|
16
15
|
align?: CCardActionsAlign;
|
|
17
16
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @seeded from csc-ui — verify
|
|
17
|
+
* Distributes the actions along the row; `stretch` grows every action to
|
|
18
|
+
* share it.
|
|
21
19
|
*/
|
|
22
20
|
justify?: CCardActionsJustify;
|
|
23
21
|
}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
+
interface CCardTitleProps {
|
|
2
|
+
/**
|
|
3
|
+
* The title's heading level, 1 to 6: pick the one that fits the card's
|
|
4
|
+
* place in the page's outline (2 under the page's `h1`, 3 inside a section
|
|
5
|
+
* with an `h2`).
|
|
6
|
+
*/
|
|
7
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
|
+
}
|
|
1
9
|
declare var __VLS_1: {}, __VLS_3: {};
|
|
2
10
|
type __VLS_Slots = {} & {
|
|
3
11
|
default?: (props: typeof __VLS_1) => any;
|
|
4
12
|
} & {
|
|
5
13
|
actions?: (props: typeof __VLS_3) => any;
|
|
6
14
|
};
|
|
7
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<CCardTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CCardTitleProps> & Readonly<{}>, {
|
|
16
|
+
headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
9
19
|
declare const _default: typeof __VLS_export;
|
|
10
20
|
export default _default;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
interface CCheckboxProps {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Whether the checkbox is on: the boolean view of `value`. Setting it sets
|
|
4
|
+
* `value` to `trueValue` or `falseValue`; reading it reports whether
|
|
5
|
+
* `value` equals `trueValue`. As an attribute it sets the initial state when
|
|
6
|
+
* no `value` is bound.
|
|
6
7
|
*/
|
|
7
8
|
checked?: boolean;
|
|
8
9
|
/**
|
|
9
10
|
* Disable the checkbox
|
|
10
|
-
*
|
|
11
|
-
* @seeded from csc-ui — verify
|
|
12
11
|
*/
|
|
13
12
|
disabled?: boolean;
|
|
14
13
|
/**
|
|
@@ -19,94 +18,76 @@ interface CCheckboxProps {
|
|
|
19
18
|
errorMessage?: string;
|
|
20
19
|
/**
|
|
21
20
|
* The value when the checkbox is unchecked
|
|
22
|
-
*
|
|
23
|
-
* @seeded from csc-ui — verify
|
|
24
21
|
*/
|
|
25
22
|
falseValue?: boolean | number | string;
|
|
26
23
|
/**
|
|
27
24
|
* Hide the hint and error messages
|
|
28
|
-
*
|
|
29
|
-
* @seeded from csc-ui — verify
|
|
30
25
|
*/
|
|
31
26
|
hideDetails?: boolean;
|
|
32
27
|
/**
|
|
33
|
-
* Hint text for the
|
|
28
|
+
* Hint text for the checkbox
|
|
34
29
|
*
|
|
35
|
-
* @seeded from csc-ui — verify
|
|
36
30
|
* @freeform
|
|
37
31
|
*/
|
|
38
32
|
hint?: string;
|
|
39
33
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* @freeform
|
|
34
|
+
* Show the mixed state, a bar in place of the check, for a parent checkbox
|
|
35
|
+
* whose options are partly checked. It wins over `checked`; a click or Space
|
|
36
|
+
* clears it and toggles the state, as on a native checkbox
|
|
44
37
|
*/
|
|
45
|
-
|
|
38
|
+
indeterminate?: boolean;
|
|
46
39
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* @seeded from csc-ui — verify
|
|
51
|
-
* @freeform
|
|
40
|
+
* Show the control as invalid: its `error-message`, when set, replaces the
|
|
41
|
+
* hint, and the control is marked `aria-invalid`.
|
|
52
42
|
*/
|
|
53
|
-
|
|
43
|
+
invalid?: boolean;
|
|
54
44
|
/**
|
|
55
|
-
*
|
|
45
|
+
* Label of the checkbox, shown beside the box. Falls back to the default
|
|
46
|
+
* slot content when not set.
|
|
56
47
|
*
|
|
57
|
-
* @
|
|
48
|
+
* @freeform
|
|
58
49
|
*/
|
|
59
|
-
|
|
50
|
+
label?: string;
|
|
60
51
|
/**
|
|
61
|
-
*
|
|
52
|
+
* `name` of the inner checkbox input. The component is not
|
|
53
|
+
* form-associated, so it does not submit with a `<form>`.
|
|
62
54
|
*
|
|
63
|
-
* @seeded from csc-ui — verify
|
|
64
55
|
* @freeform
|
|
65
56
|
*/
|
|
66
|
-
|
|
57
|
+
name?: string;
|
|
67
58
|
/**
|
|
68
|
-
* Set as required
|
|
69
|
-
*
|
|
70
|
-
* @seeded from csc-ui — verify
|
|
59
|
+
* Set as required — shows the required marker on the label
|
|
71
60
|
*/
|
|
72
61
|
required?: boolean;
|
|
73
62
|
/**
|
|
74
63
|
* The value when the checkbox is checked
|
|
75
|
-
*
|
|
76
|
-
* @seeded from csc-ui — verify
|
|
77
64
|
*/
|
|
78
65
|
trueValue?: boolean | number | string;
|
|
79
66
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
valid?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* The input value
|
|
87
|
-
* - Only used when the checkbox participates in a native `<form>`
|
|
88
|
-
*
|
|
89
|
-
* @seeded from csc-ui — verify
|
|
67
|
+
* The checkbox's state: `trueValue` while it is on, `falseValue` while it is
|
|
68
|
+
* off. A bound value wins over a `checked` attribute; any other value,
|
|
69
|
+
* `''` included, reads as off.
|
|
90
70
|
*/
|
|
91
|
-
value?:
|
|
71
|
+
value?: string | number | boolean;
|
|
92
72
|
}
|
|
93
|
-
declare var
|
|
73
|
+
declare var __VLS_12: {};
|
|
94
74
|
type __VLS_Slots = {} & {
|
|
95
|
-
default?: (props: typeof
|
|
75
|
+
default?: (props: typeof __VLS_12) => any;
|
|
96
76
|
};
|
|
97
|
-
declare const __VLS_base: import("vue").DefineComponent<CCheckboxProps, {
|
|
77
|
+
declare const __VLS_base: import("vue").DefineComponent<CCheckboxProps, {
|
|
78
|
+
focus: (options?: FocusOptions) => void;
|
|
79
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CCheckboxProps> & Readonly<{}>, {
|
|
98
80
|
label: string;
|
|
99
|
-
|
|
81
|
+
invalid: boolean;
|
|
82
|
+
name: string;
|
|
83
|
+
value: string | number | boolean;
|
|
84
|
+
hideDetails: boolean;
|
|
100
85
|
disabled: boolean;
|
|
101
86
|
errorMessage: string;
|
|
102
|
-
hideDetails: boolean;
|
|
103
87
|
hint: string;
|
|
104
|
-
hostId: string;
|
|
105
88
|
required: boolean;
|
|
106
|
-
valid: boolean;
|
|
107
89
|
checked: boolean;
|
|
108
90
|
falseValue: boolean | number | string;
|
|
109
|
-
hostName: string;
|
|
110
91
|
indeterminate: boolean;
|
|
111
92
|
trueValue: boolean | number | string;
|
|
112
93
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { CFieldSize } from '../../types';
|
|
2
|
+
/** The notation a colour picker's value is written in (CONTEXT.md "Notation"). */
|
|
3
|
+
export type CColorPickerFormat = 'hex' | 'oklch' | 'rgb';
|
|
4
|
+
/** A predefined colour: a CSS colour, or one with a name for assistive technology and the swatch-only field. */
|
|
5
|
+
export type CColorPickerSwatch = {
|
|
6
|
+
name?: string;
|
|
7
|
+
value: string;
|
|
8
|
+
} | string;
|
|
9
|
+
/**
|
|
10
|
+
* UI texts of `c-color-picker`, merged key by key over the English defaults.
|
|
11
|
+
*/
|
|
12
|
+
export interface CColorPickerTexts {
|
|
13
|
+
/** Accessible name of the alpha slider and the A channel. */
|
|
14
|
+
alpha?: string;
|
|
15
|
+
/** Accessible name of the blue channel. */
|
|
16
|
+
blue?: string;
|
|
17
|
+
/** Accessible name of the colour area's vertical axis. */
|
|
18
|
+
brightness?: string;
|
|
19
|
+
/** Accessible name of the dialog when the field has no label. */
|
|
20
|
+
chooseColor?: string;
|
|
21
|
+
/** Accessible name of the chroma channel. */
|
|
22
|
+
chroma?: string;
|
|
23
|
+
/** Accessible label of the clear button. */
|
|
24
|
+
clearSelection?: string;
|
|
25
|
+
/** Accessible label of the close button in the fullscreen panel (narrow viewports). */
|
|
26
|
+
closePanel?: string;
|
|
27
|
+
/** Label of the Done button in the fullscreen panel (narrow viewports). */
|
|
28
|
+
done?: string;
|
|
29
|
+
/** Accessible name of the green channel. */
|
|
30
|
+
green?: string;
|
|
31
|
+
/** Accessible name of the hex channel. */
|
|
32
|
+
hex?: string;
|
|
33
|
+
/** Accessible name of the hue slider and the OKLCH hue channel. */
|
|
34
|
+
hue?: string;
|
|
35
|
+
/** Accessible name of the lightness channel. */
|
|
36
|
+
lightness?: string;
|
|
37
|
+
/** Accessible name of the notation switch. */
|
|
38
|
+
notation?: string;
|
|
39
|
+
/** Accessible label of the colour button. */
|
|
40
|
+
openPicker?: string;
|
|
41
|
+
/** Accessible name of the red channel. */
|
|
42
|
+
red?: string;
|
|
43
|
+
/** Accessible label of the original colour in the colour comparison: a click restores it. */
|
|
44
|
+
restoreOriginal?: string;
|
|
45
|
+
/** Accessible name of the colour area's horizontal axis. */
|
|
46
|
+
saturation?: string;
|
|
47
|
+
/** Accessible name of the swatch list. */
|
|
48
|
+
swatches?: string;
|
|
49
|
+
/** Accessible label of the swatch-only field's chevron button. */
|
|
50
|
+
toggleSwatches?: string;
|
|
51
|
+
}
|
|
52
|
+
/** Value of `c-color-picker`: a colour in its `format` notation, or `null` when empty. */
|
|
53
|
+
export type CColorPickerValue = null | string;
|
|
54
|
+
interface CColorPickerProps {
|
|
55
|
+
/**
|
|
56
|
+
* Let the colour carry transparency: an alpha slider and an A channel join
|
|
57
|
+
* the panel. Without it typed alpha is dropped
|
|
58
|
+
*
|
|
59
|
+
* @defaultable false
|
|
60
|
+
*/
|
|
61
|
+
alpha?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Make the value clearable
|
|
64
|
+
*/
|
|
65
|
+
clearable?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Disable the field
|
|
68
|
+
*/
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Error message shown in place of the hint while the field is invalid
|
|
72
|
+
*
|
|
73
|
+
* @freeform
|
|
74
|
+
*/
|
|
75
|
+
errorMessage?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The notation the value is written in — and every emission with it:
|
|
78
|
+
* `#rrggbb`, `rgb(r g b)` or `oklch(l c h)`
|
|
79
|
+
*
|
|
80
|
+
* @defaultable 'hex'
|
|
81
|
+
*/
|
|
82
|
+
format?: CColorPickerFormat;
|
|
83
|
+
/**
|
|
84
|
+
* Hide the hint and error messages
|
|
85
|
+
*
|
|
86
|
+
* @defaultable false
|
|
87
|
+
*/
|
|
88
|
+
hideDetails?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Hint text for the field
|
|
91
|
+
*
|
|
92
|
+
* @freeform
|
|
93
|
+
*/
|
|
94
|
+
hint?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Show the control as invalid: its `error-message`, when set, replaces the
|
|
97
|
+
* hint, and the control is marked `aria-invalid`.
|
|
98
|
+
*/
|
|
99
|
+
invalid?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Element label
|
|
102
|
+
*
|
|
103
|
+
* @freeform
|
|
104
|
+
*/
|
|
105
|
+
label?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Label on top of the field
|
|
108
|
+
*
|
|
109
|
+
* @defaultable false
|
|
110
|
+
*/
|
|
111
|
+
labelOnTop?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Input field name
|
|
114
|
+
*
|
|
115
|
+
* @freeform
|
|
116
|
+
*/
|
|
117
|
+
name?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Placeholder of the input; an example of the notation when empty
|
|
120
|
+
*
|
|
121
|
+
* @freeform
|
|
122
|
+
*/
|
|
123
|
+
placeholder?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Set the field as required
|
|
126
|
+
*/
|
|
127
|
+
required?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Shadow variant
|
|
130
|
+
*
|
|
131
|
+
* @defaultable false
|
|
132
|
+
*/
|
|
133
|
+
shadow?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Field height: the 52px default (the shared control height) or the 36px `small` box
|
|
136
|
+
*
|
|
137
|
+
* @defaultable 'default'
|
|
138
|
+
*/
|
|
139
|
+
size?: CFieldSize;
|
|
140
|
+
/**
|
|
141
|
+
* Predefined colours offered under the picker — CSS colours, or
|
|
142
|
+
* `{ value, name }` objects whose name is read out and shown. Arrays have
|
|
143
|
+
* no attribute form — bind as a DOM property
|
|
144
|
+
*/
|
|
145
|
+
swatches?: CColorPickerSwatch[];
|
|
146
|
+
/**
|
|
147
|
+
* Limit the choice to the swatches: the field becomes readonly and opens
|
|
148
|
+
* a panel of the swatches alone
|
|
149
|
+
*/
|
|
150
|
+
swatchesOnly?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* UI text overrides (i18n), merged over the English defaults. Objects have
|
|
153
|
+
* no attribute form — bind as a DOM property
|
|
154
|
+
*
|
|
155
|
+
* @defaultable {}
|
|
156
|
+
*/
|
|
157
|
+
texts?: CColorPickerTexts;
|
|
158
|
+
/**
|
|
159
|
+
* The colour in the `format` notation, or `null` when empty. Any CSS
|
|
160
|
+
* colour is accepted and shown in the notation
|
|
161
|
+
*/
|
|
162
|
+
value?: CColorPickerValue;
|
|
163
|
+
}
|
|
164
|
+
declare const _default: typeof __VLS_export;
|
|
165
|
+
export default _default;
|
|
166
|
+
declare const __VLS_export: import("vue").DefineComponent<CColorPickerProps, {
|
|
167
|
+
badInput: import("vue").ComputedRef<boolean>;
|
|
168
|
+
focus: (options?: FocusOptions) => void;
|
|
169
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CColorPickerProps> & Readonly<{}>, {
|
|
170
|
+
label: string;
|
|
171
|
+
invalid: boolean;
|
|
172
|
+
name: string;
|
|
173
|
+
value: CColorPickerValue;
|
|
174
|
+
size: CFieldSize;
|
|
175
|
+
texts: CColorPickerTexts;
|
|
176
|
+
hideDetails: boolean;
|
|
177
|
+
labelOnTop: boolean;
|
|
178
|
+
shadow: boolean;
|
|
179
|
+
alpha: boolean;
|
|
180
|
+
format: CColorPickerFormat;
|
|
181
|
+
clearable: boolean;
|
|
182
|
+
disabled: boolean;
|
|
183
|
+
errorMessage: string;
|
|
184
|
+
hint: string;
|
|
185
|
+
placeholder: string;
|
|
186
|
+
required: boolean;
|
|
187
|
+
swatches: CColorPickerSwatch[];
|
|
188
|
+
swatchesOnly: boolean;
|
|
189
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|