@cscfi/csc-ui 4.0.0-rc.2 → 4.0.0-rc.4
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/csc-ui.js +6848 -6757
- package/dist/custom-elements.json +651 -23
- package/dist/docs/c-button/usage.md +40 -2
- package/dist/docs/c-card/usage.md +2 -2
- package/dist/docs/c-checkbox/usage.md +1 -1
- package/dist/docs/c-icon-button/usage.md +19 -7
- package/dist/docs/c-link/usage.md +1 -1
- package/dist/docs/c-loader/usage.md +3 -2
- package/dist/docs/c-otp-input/usage.md +1 -1
- package/dist/docs/c-radio-group/usage.md +1 -1
- package/dist/docs/c-side-navigation/usage.md +6 -6
- package/dist/docs/c-side-navigation-item/usage.md +1 -1
- package/dist/docs/c-slider/usage.md +10 -3
- package/dist/docs/c-spinner/usage.md +2 -2
- package/dist/docs/c-sub-navigation-item/usage.md +1 -1
- package/dist/docs/c-toasts/usage.md +7 -3
- package/dist/styles/css/tokens.css +13 -9
- package/dist/vscode.css-custom-data.json +12 -12
- package/dist/vscode.html-custom-data.json +202 -46
- package/dist/web-types.json +2118 -496
- package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +9 -0
- package/dist-types/components/c-button/CButton.vue.d.ts +40 -6
- package/dist-types/components/c-card/CCard.vue.d.ts +8 -0
- package/dist-types/components/c-checkbox/CCheckbox.vue.d.ts +8 -0
- package/dist-types/components/c-color-picker/CColorPicker.vue.d.ts +9 -0
- package/dist-types/components/c-date-picker/CDatePicker.vue.d.ts +9 -0
- package/dist-types/components/c-file-upload/CFileUpload.vue.d.ts +9 -0
- package/dist-types/components/c-icon-button/CIconButton.vue.d.ts +39 -4
- package/dist-types/components/c-list-item/CListItem.vue.d.ts +1 -1
- package/dist-types/components/c-loader/CLoader.vue.d.ts +7 -0
- package/dist-types/components/c-number-field/CNumberField.vue.d.ts +9 -0
- package/dist-types/components/c-otp-input/COtpInput.vue.d.ts +8 -0
- package/dist-types/components/c-radio-group/CRadioGroup.vue.d.ts +8 -0
- package/dist-types/components/c-select/CSelect.vue.d.ts +9 -0
- package/dist-types/components/c-side-navigation-item/CSideNavigationItem.vue.d.ts +17 -1
- package/dist-types/components/c-slider/CSlider.vue.d.ts +8 -0
- package/dist-types/components/c-spinner/CSpinner.vue.d.ts +7 -0
- package/dist-types/components/c-step/CStep.vue.d.ts +1 -1
- package/dist-types/components/c-sub-navigation-item/CSubNavigationItem.vue.d.ts +10 -1
- package/dist-types/components/c-text-field/CTextField.vue.d.ts +9 -0
- package/dist-types/components/c-time-picker/CTimePicker.vue.d.ts +9 -0
- package/dist-types/components/c-toasts/CToasts.vue.d.ts +26 -0
- package/dist-types/components/c-tree-select/CTreeSelect.vue.d.ts +9 -0
- package/dist-types/index.d.ts +3 -3
- package/dist-types/shared/appDefaults.d.ts +15 -1
- package/dist-types/shared/buttonAppearance.d.ts +20 -0
- package/dist-types/shared/buttonVariant.d.ts +5 -0
- package/dist-types/tag-name-map.d.ts +299 -70
- package/package.json +1 -1
|
@@ -79,8 +79,16 @@ interface CTimePickerProps {
|
|
|
79
79
|
* Hide the hint and error messages
|
|
80
80
|
*
|
|
81
81
|
* @defaultable false
|
|
82
|
+
* @deprecated Use `hide-message`.
|
|
82
83
|
*/
|
|
83
84
|
hideDetails?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Hide the message line — the hint and error messages under the field —
|
|
87
|
+
* and the room it keeps.
|
|
88
|
+
*
|
|
89
|
+
* @defaultable false
|
|
90
|
+
*/
|
|
91
|
+
hideMessage?: boolean;
|
|
84
92
|
/**
|
|
85
93
|
* Hint text for the field
|
|
86
94
|
*
|
|
@@ -188,6 +196,7 @@ declare const __VLS_export: import("vue").DefineComponent<CTimePickerProps, {
|
|
|
188
196
|
size: CFieldSize;
|
|
189
197
|
texts: CTimePickerTexts;
|
|
190
198
|
hideDetails: boolean;
|
|
199
|
+
hideMessage: boolean;
|
|
191
200
|
labelOnTop: boolean;
|
|
192
201
|
shadow: boolean;
|
|
193
202
|
format: string;
|
|
@@ -3,6 +3,11 @@ import type { CToastMessage } from '../../types';
|
|
|
3
3
|
* Horizontal placement of the toast stack.
|
|
4
4
|
*/
|
|
5
5
|
export type CToastsHorizontal = 'center' | 'left' | 'right';
|
|
6
|
+
/**
|
|
7
|
+
* Where the toast stack sits: the edge it is anchored to, then its
|
|
8
|
+
* alignment along it — `start` is the left, `end` the right — or centred.
|
|
9
|
+
*/
|
|
10
|
+
export type CToastsPosition = 'bottom-end' | 'bottom-start' | 'bottom' | 'top-end' | 'top-start' | 'top';
|
|
6
11
|
/**
|
|
7
12
|
* Vertical placement of the toast stack.
|
|
8
13
|
*/
|
|
@@ -12,15 +17,34 @@ interface CToastsProps {
|
|
|
12
17
|
* Places the stack in its nearest positioned ancestor instead of the
|
|
13
18
|
* viewport, for in-container notifications. Such a stack is not
|
|
14
19
|
* guaranteed to paint above an open modal.
|
|
20
|
+
*
|
|
21
|
+
* @deprecated Use `contained`.
|
|
15
22
|
*/
|
|
16
23
|
absolute?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Keep the stack inside its nearest positioned ancestor instead of the
|
|
26
|
+
* viewport, for in-container notifications. Such a stack is not
|
|
27
|
+
* guaranteed to paint above an open modal.
|
|
28
|
+
*/
|
|
29
|
+
contained?: boolean;
|
|
17
30
|
/**
|
|
18
31
|
* Where the stack sits across the viewport, or across its container
|
|
19
32
|
* under `absolute`.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated Use `position`.
|
|
20
35
|
*/
|
|
21
36
|
horizontal?: CToastsHorizontal;
|
|
37
|
+
/**
|
|
38
|
+
* Where the stack sits in the viewport, or in its container when
|
|
39
|
+
* `contained`: `bottom` (unless set), `bottom-start`, `bottom-end`,
|
|
40
|
+
* `top`, `top-start` or `top-end`. Toasts slide in from the top or bottom
|
|
41
|
+
* edge.
|
|
42
|
+
*/
|
|
43
|
+
position?: CToastsPosition;
|
|
22
44
|
/**
|
|
23
45
|
* The edge the stack is anchored to; toasts slide in from it.
|
|
46
|
+
*
|
|
47
|
+
* @deprecated Use `position`.
|
|
24
48
|
*/
|
|
25
49
|
vertical?: CToastsVertical;
|
|
26
50
|
}
|
|
@@ -33,6 +57,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CToast
|
|
|
33
57
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CToastsProps> & Readonly<{}>, {
|
|
34
58
|
absolute: boolean;
|
|
35
59
|
vertical: CToastsVertical;
|
|
60
|
+
position: CToastsPosition;
|
|
61
|
+
contained: boolean;
|
|
36
62
|
horizontal: CToastsHorizontal;
|
|
37
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
38
64
|
default?: (props: {}) => any;
|
|
@@ -140,8 +140,16 @@ interface CTreeSelectProps {
|
|
|
140
140
|
* Hide the hint and error messages
|
|
141
141
|
*
|
|
142
142
|
* @defaultable false
|
|
143
|
+
* @deprecated Use `hide-message`.
|
|
143
144
|
*/
|
|
144
145
|
hideDetails?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Hide the message line — the hint and error messages under the field —
|
|
148
|
+
* and the room it keeps.
|
|
149
|
+
*
|
|
150
|
+
* @defaultable false
|
|
151
|
+
*/
|
|
152
|
+
hideMessage?: boolean;
|
|
145
153
|
/**
|
|
146
154
|
* Hint text for the field
|
|
147
155
|
*
|
|
@@ -242,6 +250,7 @@ declare const __VLS_export: import("vue").DefineComponent<CTreeSelectProps, {
|
|
|
242
250
|
size: CFieldSize;
|
|
243
251
|
texts: CTreeSelectTexts;
|
|
244
252
|
hideDetails: boolean;
|
|
253
|
+
hideMessage: boolean;
|
|
245
254
|
labelOnTop: boolean;
|
|
246
255
|
shadow: boolean;
|
|
247
256
|
clearable: boolean;
|
package/dist-types/index.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ export type { CAlertType } from './components/c-alert/CAlert.vue';
|
|
|
3
3
|
export type { CAutocompleteFilter, CAutocompleteItem, CAutocompleteOption, CAutocompleteTexts, CAutocompleteValue, } from './components/c-autocomplete/CAutocomplete.vue';
|
|
4
4
|
export type { CBreadcrumbTexts } from './components/c-breadcrumb/CBreadcrumb.vue';
|
|
5
5
|
export type { CButtonGroupSize, CButtonGroupValue, } from './components/c-button-group/CButtonGroup.vue';
|
|
6
|
-
export type { CButtonSize, CButtonType, } from './components/c-button/CButton.vue';
|
|
6
|
+
export type { CButtonAppearance, CButtonSize, CButtonType, CButtonVariant, } from './components/c-button/CButton.vue';
|
|
7
7
|
export type { CCardActionsAlign, CCardActionsJustify, } from './components/c-card-actions/CCardActions.vue';
|
|
8
8
|
export type { CColorPickerFormat, CColorPickerSwatch, CColorPickerTexts, CColorPickerValue, } from './components/c-color-picker/CColorPicker.vue';
|
|
9
9
|
export type { CDataTableAlign, CDataTableCellContent, CDataTableCellContext, CDataTableColumn, CDataTableColumnExpansion, CDataTableColumnPin, CDataTableExpandedContext, CDataTableFooterContext, CDataTableRow, CDataTableSelectionMode, CDataTableSort, CDataTableSortDirection, CDataTableTexts, } from './components/c-data-table/CDataTable.vue';
|
|
10
10
|
export type { CDatePickerDisabledDate, CDatePickerRange, CDatePickerText, CDatePickerTexts, CDatePickerType, CDatePickerValue, CDatePickerWeekday, } from './components/c-date-picker/CDatePicker.vue';
|
|
11
11
|
export type { CFileUploadContext, CFileUploadEntry, CFileUploadFunction, CFileUploadRejection, CFileUploadRejectReason, CFileUploadStatus, CFileUploadTexts, } from './components/c-file-upload/CFileUpload.vue';
|
|
12
|
-
export type { CIconButtonSize } from './components/c-icon-button/CIconButton.vue';
|
|
12
|
+
export type { CIconButtonAppearance, CIconButtonSize, CIconButtonVariant, } from './components/c-icon-button/CIconButton.vue';
|
|
13
13
|
export type { CLoginCardActionsAlign, CLoginCardActionsJustify, } from './components/c-login-card-actions/CLoginCardActions.vue';
|
|
14
14
|
export type { CLoginCardBlendMode } from './components/c-login-card/CLoginCard.vue';
|
|
15
15
|
export type { CMenuItemType } from './components/c-menu-item/CMenuItem.vue';
|
|
@@ -26,7 +26,7 @@ export type { CTagSize } from './components/c-tag/CTag.vue';
|
|
|
26
26
|
export type { CTagsSize } from './components/c-tags/CTags.vue';
|
|
27
27
|
export type { CTextFieldAutocapitalize, CTextFieldType, } from './components/c-text-field/CTextField.vue';
|
|
28
28
|
export type { CTimePickerRange, CTimePickerText, CTimePickerTexts, CTimePickerValue, } from './components/c-time-picker/CTimePicker.vue';
|
|
29
|
-
export type { CToastsHorizontal, CToastsVertical, } from './components/c-toasts/CToasts.vue';
|
|
29
|
+
export type { CToastsHorizontal, CToastsPosition, CToastsVertical, } from './components/c-toasts/CToasts.vue';
|
|
30
30
|
export type { CTooltipPosition } from './components/c-tooltip/CTooltip.vue';
|
|
31
31
|
export type { CTreeSelectFilter, CTreeSelectItem, CTreeSelectSelection, CTreeSelectTexts, CTreeSelectValue, } from './components/c-tree-select/CTreeSelect.vue';
|
|
32
32
|
export { applyDefaults, DEFAULTABLE_PROPS, resetDefaults, } from './shared/appDefaults';
|
|
@@ -71,5 +71,19 @@ export declare function resetDefaults(tags?: CDefaultableTag[]): void;
|
|
|
71
71
|
*
|
|
72
72
|
* A nullish own value counts as "unset" (Vue itself treats `null` as an
|
|
73
73
|
* explicit value; here it falls through to the app default).
|
|
74
|
+
*
|
|
75
|
+
* A scalar prop that replaces a deprecated one (ADR-0074) names it third,
|
|
76
|
+
* and each layer reads the new name, then the old: instance (new, old) →
|
|
77
|
+
* app default (new, old) → built-in. So an instance `hide-message="false"`
|
|
78
|
+
* still beats an app-wide `hideDetails: true`.
|
|
79
|
+
*
|
|
80
|
+
* const hideMessageResolved = appDefault('hideMessage', false, 'hideDetails');
|
|
81
|
+
*
|
|
82
|
+
* A replaced prop of another shape names a mapper fourth: it receives that
|
|
83
|
+
* prop's own instance value (an attribute string or a property) and returns
|
|
84
|
+
* the new prop's value, or undefined to fall through. Such a prop is not
|
|
85
|
+
* defaultable, so only the instance layer reads it.
|
|
86
|
+
*
|
|
87
|
+
* const variantResolved = appDefault('variant', 'primary', 'danger', dangerAsVariant);
|
|
74
88
|
*/
|
|
75
|
-
export declare const useAppDefault: <T extends CDefaultableTag>(tag: T, props: object) => <K extends keyof Bucket<T> & string>(key: K, builtIn: Resolved<T, K>) => ComputedRef<Resolved<T, K>>;
|
|
89
|
+
export declare const useAppDefault: <T extends CDefaultableTag>(tag: T, props: object) => <K extends keyof Bucket<T> & string>(key: K, builtIn: Resolved<T, K>, replaces?: string, map?: (value: unknown) => Resolved<T, K> | undefined) => ComputedRef<Resolved<T, K>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The appearance of c-button and c-icon-button. `appearance` names it; until
|
|
3
|
+
* 5.0 the deprecated `outlined` / `ghost` / `text` booleans still choose one
|
|
4
|
+
* when `appearance` is unset (ADR-0074).
|
|
5
|
+
*/
|
|
6
|
+
type Appearance = 'filled' | 'ghost' | 'outlined' | 'text';
|
|
7
|
+
interface AppearanceProps {
|
|
8
|
+
appearance?: string;
|
|
9
|
+
ghost?: boolean;
|
|
10
|
+
outlined?: boolean;
|
|
11
|
+
text?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The appearance a button paints: `appearance` when it names one (an
|
|
15
|
+
* attribute can deliver any string), else the deprecated booleans —
|
|
16
|
+
* `outlined` over `text` over `ghost`, the order their styles used to
|
|
17
|
+
* override each other in — else `filled`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const resolveAppearance: (props: AppearanceProps) => Appearance;
|
|
20
|
+
export {};
|