@cscfi/csc-ui 4.0.0-alpha.1 → 4.0.0-alpha.11
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 +7689 -6829
- package/dist/custom-elements.json +1037 -144
- package/dist/docs/c-alert/usage.md +24 -0
- package/dist/docs/c-button-group/usage.md +6 -0
- package/dist/docs/c-checkbox/usage.md +53 -0
- package/dist/docs/c-popover/usage.md +33 -0
- package/dist/docs/c-progress-bar/usage.md +23 -0
- package/dist/docs/c-progress-circle/usage.md +25 -0
- package/dist/docs/c-radio/usage.md +45 -0
- package/dist/docs/c-radio-group/usage.md +67 -0
- package/dist/docs/c-spinner/usage.md +21 -0
- package/dist/docs/c-switch/usage.md +36 -0
- package/dist/docs/c-table/usage.md +14 -0
- package/dist/docs/c-tooltip/usage.md +30 -0
- package/dist/styles/css/tailwind-theme.css +31 -0
- package/dist/styles/css/tokens.css +282 -201
- package/dist/vscode.css-custom-data.json +104 -15
- package/dist/vscode.html-custom-data.json +182 -26
- package/dist/web-types.json +526 -89
- package/dist-types/components/c-alert/CAlert.vue.d.ts +18 -4
- package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +4 -1
- package/dist-types/components/c-button/CButton.vue.d.ts +1 -1
- package/dist-types/components/c-icon/CIcon.vue.d.ts +1 -1
- package/dist-types/components/c-icon-button/CIconButton.vue.d.ts +1 -1
- package/dist-types/components/c-input/CInput.vue.d.ts +4 -0
- package/dist-types/components/c-login-button/CLoginButton.vue.d.ts +4 -2
- package/dist-types/components/c-menu/CMenu.vue.d.ts +13 -3
- package/dist-types/components/c-menu-item/CMenuItem.vue.d.ts +29 -3
- package/dist-types/components/c-popover/CPopover.vue.d.ts +43 -0
- package/dist-types/components/c-progress-circle/CProgressCircle.vue.d.ts +32 -0
- package/dist-types/components/c-radio/CRadio.vue.d.ts +7 -11
- package/dist-types/components/c-radio-group/CRadioGroup.vue.d.ts +8 -46
- package/dist-types/components/c-select/CSelect.vue.d.ts +4 -1
- package/dist-types/components/c-spinner/CSpinner.vue.d.ts +1 -1
- package/dist-types/components/c-table/CTable.vue.d.ts +11 -1
- package/dist-types/components/c-table/injectTableStyles.d.ts +1 -0
- package/dist-types/components/c-tag/CTag.vue.d.ts +1 -1
- package/dist-types/components/c-text-field/CTextField.vue.d.ts +4 -0
- package/dist-types/components/c-tooltip/CTooltip.vue.d.ts +49 -0
- package/dist-types/index.d.ts +9 -1
- package/dist-types/shared/FieldMessage.vue.d.ts +21 -0
- package/dist-types/shared/popoverChain.d.ts +62 -0
- package/dist-types/shared/positionArea.d.ts +13 -0
- package/dist-types/shared/useDesignatedTrigger.d.ts +40 -0
- package/dist-types/shared/useHostStates.d.ts +25 -0
- package/dist-types/tag-name-map.d.ts +193 -32
- package/dist-types/theme/chart-data.d.ts +50 -0
- package/dist-types/theme/ramp.d.ts +38 -0
- package/dist-types/theme/themeMode.d.ts +13 -0
- package/dist-types/types.d.ts +13 -0
- package/package.json +8 -6
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The alert types that
|
|
3
|
-
*
|
|
2
|
+
* The alert types that carry a status family's accent colour; `default` uses
|
|
3
|
+
* the brand primary. Every type renders its status icon.
|
|
4
4
|
*/
|
|
5
5
|
export type CAlertIconType = 'error' | 'info' | 'success' | 'warning';
|
|
6
6
|
export interface CAlertProps {
|
|
7
|
+
/**
|
|
8
|
+
* Show a dismiss button. The alert only emits `dismiss` — removing it from
|
|
9
|
+
* the page stays the consumer's job.
|
|
10
|
+
*/
|
|
11
|
+
dismissible?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Heading rendered above the message. The `heading` slot overrides it for
|
|
14
|
+
* rich content.
|
|
15
|
+
*
|
|
16
|
+
* @freeform
|
|
17
|
+
*/
|
|
18
|
+
heading?: string;
|
|
7
19
|
/**
|
|
8
20
|
* Type of the alert
|
|
9
21
|
*
|
|
@@ -13,15 +25,17 @@ export interface CAlertProps {
|
|
|
13
25
|
}
|
|
14
26
|
/**
|
|
15
27
|
* Type of the alert. `default` — equivalently, omitting the attribute —
|
|
16
|
-
* renders the
|
|
28
|
+
* renders the brand-primary look; the four status types carry their status
|
|
29
|
+
* family's colours.
|
|
17
30
|
*/
|
|
18
31
|
export type CAlertType = 'default' | CAlertIconType;
|
|
19
32
|
declare const _default: typeof __VLS_export;
|
|
20
33
|
export default _default;
|
|
21
34
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CAlertProps> & Readonly<{}>, {
|
|
22
35
|
type: CAlertType;
|
|
36
|
+
dismissible: boolean;
|
|
23
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
24
|
-
|
|
38
|
+
heading?: (props: {}) => any;
|
|
25
39
|
} & {
|
|
26
40
|
default?: (props: {}) => any;
|
|
27
41
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CSelectItem } from '../../types';
|
|
1
|
+
import type { CFieldSize, CSelectItem } from '../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Custom filter predicate for `c-autocomplete`. Return `true` to keep the
|
|
4
4
|
* option for the current query. The default matches the start of the label.
|
|
@@ -93,6 +93,8 @@ export interface CAutocompleteProps {
|
|
|
93
93
|
returnObject?: boolean;
|
|
94
94
|
/** Shadow variant */
|
|
95
95
|
shadow?: boolean;
|
|
96
|
+
/** Field height: the 44px default or the 36px `small` box */
|
|
97
|
+
size?: CFieldSize;
|
|
96
98
|
/** Set the validity of the input */
|
|
97
99
|
valid?: boolean;
|
|
98
100
|
/** Selected value (scalar, or object when return-object is set) */
|
|
@@ -123,6 +125,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAutoc
|
|
|
123
125
|
required: boolean;
|
|
124
126
|
returnObject: boolean;
|
|
125
127
|
shadow: boolean;
|
|
128
|
+
size: CFieldSize;
|
|
126
129
|
valid: boolean;
|
|
127
130
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
128
131
|
pre?: (props: {}) => any;
|
|
@@ -122,6 +122,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButto
|
|
|
122
122
|
disabled: boolean;
|
|
123
123
|
hostId: string;
|
|
124
124
|
loading: boolean;
|
|
125
|
+
size: CButtonSize;
|
|
125
126
|
active: boolean;
|
|
126
127
|
danger: boolean;
|
|
127
128
|
fit: boolean;
|
|
@@ -130,7 +131,6 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButto
|
|
|
130
131
|
inverted: boolean;
|
|
131
132
|
noRadius: boolean;
|
|
132
133
|
noRipple: boolean;
|
|
133
|
-
size: CButtonSize;
|
|
134
134
|
target: string;
|
|
135
135
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
136
136
|
icon?: (props: {}) => any;
|
|
@@ -15,8 +15,8 @@ interface CIconProps {
|
|
|
15
15
|
size?: number;
|
|
16
16
|
}
|
|
17
17
|
declare const __VLS_export: import("vue").DefineComponent<CIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CIconProps> & Readonly<{}>, {
|
|
18
|
-
color: string;
|
|
19
18
|
size: number;
|
|
19
|
+
color: string;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
22
22
|
export default _default;
|
|
@@ -74,10 +74,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CIconB
|
|
|
74
74
|
outlined: boolean;
|
|
75
75
|
disabled: boolean;
|
|
76
76
|
loading: boolean;
|
|
77
|
+
size: CIconButtonSize;
|
|
77
78
|
danger: boolean;
|
|
78
79
|
ghost: boolean;
|
|
79
80
|
inverted: boolean;
|
|
80
|
-
size: CIconButtonSize;
|
|
81
81
|
badge: null | number | string;
|
|
82
82
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
83
83
|
default?: (props: {}) => any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CFieldSize } from '../../types';
|
|
1
2
|
interface CInputProps {
|
|
2
3
|
/** Set by the wrapping form component when its input has focus or holds a value. */
|
|
3
4
|
active?: boolean;
|
|
@@ -61,6 +62,8 @@ interface CInputProps {
|
|
|
61
62
|
* @seeded from csc-ui — verify
|
|
62
63
|
*/
|
|
63
64
|
shadow?: boolean;
|
|
65
|
+
/** Field height: the 44px default or the 36px `small` box */
|
|
66
|
+
size?: CFieldSize;
|
|
64
67
|
/**
|
|
65
68
|
* Set the validíty of the input
|
|
66
69
|
*
|
|
@@ -85,6 +88,7 @@ declare const __VLS_base: import("vue").DefineComponent<CInputProps, {}, {}, {},
|
|
|
85
88
|
labelOnTop: boolean;
|
|
86
89
|
required: boolean;
|
|
87
90
|
shadow: boolean;
|
|
91
|
+
size: CFieldSize;
|
|
88
92
|
valid: boolean;
|
|
89
93
|
inputId: string;
|
|
90
94
|
active: boolean;
|
|
@@ -21,9 +21,11 @@ interface CLoginButtonProps {
|
|
|
21
21
|
*/
|
|
22
22
|
src?: string;
|
|
23
23
|
}
|
|
24
|
-
declare var __VLS_1: {};
|
|
24
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
25
25
|
type __VLS_Slots = {} & {
|
|
26
|
-
|
|
26
|
+
image?: (props: typeof __VLS_1) => any;
|
|
27
|
+
} & {
|
|
28
|
+
default?: (props: typeof __VLS_3) => any;
|
|
27
29
|
};
|
|
28
30
|
declare const __VLS_base: import("vue").DefineComponent<CLoginButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CLoginButtonProps> & Readonly<{}>, {
|
|
29
31
|
href: string;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
+
import type { CPlacement } from '../../types';
|
|
1
2
|
interface CMenuProps {
|
|
2
3
|
/** Distance from the trigger to the panel, in pixels. Defaults to `0`. */
|
|
3
4
|
distance?: number | string;
|
|
4
5
|
/** Whether the menu is open. Two-way: emits `change:open`. */
|
|
5
6
|
open?: boolean;
|
|
6
7
|
/** Preferred placement of the panel relative to the trigger. */
|
|
7
|
-
position?:
|
|
8
|
+
position?: CPlacement;
|
|
9
|
+
/**
|
|
10
|
+
* Designated trigger: an element elsewhere in the document that opens the
|
|
11
|
+
* menu — its document ID, or the element itself. The same trigger concept
|
|
12
|
+
* as the `trigger` slot, supplied by reference: the menu wires
|
|
13
|
+
* click-to-toggle, arrow-key opening, ARIA and focus return onto it and
|
|
14
|
+
* anchors the panel to it. When both routes are supplied, this prop wins
|
|
15
|
+
* over the slot.
|
|
16
|
+
*/
|
|
17
|
+
trigger?: HTMLElement | string;
|
|
8
18
|
}
|
|
9
|
-
type Placement = 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
|
|
10
19
|
declare var __VLS_1: {}, __VLS_3: {};
|
|
11
20
|
type __VLS_Slots = {} & {
|
|
12
21
|
trigger?: (props: typeof __VLS_1) => any;
|
|
@@ -16,7 +25,8 @@ type __VLS_Slots = {} & {
|
|
|
16
25
|
declare const __VLS_base: import("vue").DefineComponent<CMenuProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CMenuProps> & Readonly<{}>, {
|
|
17
26
|
open: boolean;
|
|
18
27
|
distance: number | string;
|
|
19
|
-
position:
|
|
28
|
+
position: CPlacement;
|
|
29
|
+
trigger: HTMLElement | string;
|
|
20
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
32
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
interface CMenuItemProps {
|
|
2
|
+
/**
|
|
3
|
+
* Marks the item as the currently selected choice: renders the trailing
|
|
4
|
+
* indicator icon and stamps `role="menuitemradio"` + `aria-checked`. Leave
|
|
5
|
+
* unset for regular command items — only a true/false value marks the item
|
|
6
|
+
* as a selectable choice. The state is consumer-owned: the menu emits
|
|
7
|
+
* `select` as usual and never toggles this itself. Distinct from the
|
|
8
|
+
* keyboard highlight (the `data-active` attribute the controlling menu
|
|
9
|
+
* moves between rows).
|
|
10
|
+
*/
|
|
11
|
+
active?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* SVG path for the trailing indicator shown while `active`; defaults to a
|
|
14
|
+
* check mark.
|
|
15
|
+
*
|
|
16
|
+
* @freeform SVG path data
|
|
17
|
+
*/
|
|
18
|
+
activeIcon?: string;
|
|
2
19
|
/** Marks the action as destructive (renders in the error colour). */
|
|
3
20
|
danger?: boolean;
|
|
4
21
|
/** Disables the item — it is skipped by keyboard nav and emits no select. */
|
|
5
22
|
disabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* SVG path for a leading icon rendered before the item's content.
|
|
25
|
+
*
|
|
26
|
+
* @freeform SVG path data
|
|
27
|
+
*/
|
|
28
|
+
icon?: string;
|
|
6
29
|
/**
|
|
7
30
|
* Value reported in the menu's `select` event when this item is chosen.
|
|
8
31
|
*
|
|
@@ -10,19 +33,22 @@ interface CMenuItemProps {
|
|
|
10
33
|
*/
|
|
11
34
|
value?: string;
|
|
12
35
|
}
|
|
13
|
-
declare var
|
|
36
|
+
declare var __VLS_6: {}, __VLS_13: {};
|
|
14
37
|
type __VLS_Slots = {} & {
|
|
15
|
-
default?: (props: typeof
|
|
38
|
+
default?: (props: typeof __VLS_6) => any;
|
|
16
39
|
} & {
|
|
17
|
-
submenu?: (props: typeof
|
|
40
|
+
submenu?: (props: typeof __VLS_13) => any;
|
|
18
41
|
};
|
|
19
42
|
declare const __VLS_base: import("vue").DefineComponent<CMenuItemProps, {
|
|
20
43
|
closeSubmenu: () => void;
|
|
21
44
|
openSubmenu: () => void;
|
|
22
45
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CMenuItemProps> & Readonly<{}>, {
|
|
46
|
+
icon: string;
|
|
23
47
|
value: string;
|
|
24
48
|
disabled: boolean;
|
|
49
|
+
active: boolean;
|
|
25
50
|
danger: boolean;
|
|
51
|
+
activeIcon: string;
|
|
26
52
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
53
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
54
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { CPlacement } from '../../types';
|
|
2
|
+
export interface CPopoverProps {
|
|
3
|
+
/** Distance from the trigger to the panel, in pixels. Defaults to `0`. */
|
|
4
|
+
distance?: number | string;
|
|
5
|
+
/**
|
|
6
|
+
* Heading rendered at the top of the panel, doubling as its accessible
|
|
7
|
+
* name. Without it, set `aria-label` on the host. Named `heading`, not
|
|
8
|
+
* `title`: a `title` attribute on the host would trigger the browser's
|
|
9
|
+
* native tooltip and collides with `HTMLElement.title`.
|
|
10
|
+
* @freeform
|
|
11
|
+
*/
|
|
12
|
+
heading?: string;
|
|
13
|
+
/** Whether the popover is open. Two-way: emits `change:open`. */
|
|
14
|
+
open?: boolean;
|
|
15
|
+
/** Preferred placement of the panel relative to the trigger. */
|
|
16
|
+
position?: CPlacement;
|
|
17
|
+
/**
|
|
18
|
+
* Designated trigger: an element elsewhere in the document that opens the
|
|
19
|
+
* popover — its document ID, or the element itself. The same trigger
|
|
20
|
+
* concept as the `trigger` slot, supplied by reference: the popover wires
|
|
21
|
+
* click-to-toggle, ARIA and focus return onto it and anchors the panel to
|
|
22
|
+
* it. When both routes are supplied, this prop wins over the slot.
|
|
23
|
+
*/
|
|
24
|
+
trigger?: HTMLElement | string;
|
|
25
|
+
}
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CPopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CPopoverProps> & Readonly<{}>, {
|
|
29
|
+
heading: string;
|
|
30
|
+
open: boolean;
|
|
31
|
+
distance: number | string;
|
|
32
|
+
position: CPlacement;
|
|
33
|
+
trigger: HTMLElement | string;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
35
|
+
trigger?: (props: {}) => any;
|
|
36
|
+
} & {
|
|
37
|
+
default?: (props: {}) => any;
|
|
38
|
+
}>;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface CProgressCircleProps {
|
|
2
|
+
/**
|
|
3
|
+
* Diameter of the circle in pixels
|
|
4
|
+
*/
|
|
5
|
+
size?: number;
|
|
6
|
+
/**
|
|
7
|
+
* Progress value in percentage (0 to 100)
|
|
8
|
+
*/
|
|
9
|
+
value?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Stroke width of the track in pixels; the value arc draws at half this
|
|
12
|
+
* width, inset within the track
|
|
13
|
+
*/
|
|
14
|
+
width?: number;
|
|
15
|
+
}
|
|
16
|
+
declare var __VLS_1: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_1) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<CProgressCircleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CProgressCircleProps> & Readonly<{}>, {
|
|
21
|
+
value: number;
|
|
22
|
+
width: number;
|
|
23
|
+
size: number;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
interface CRadioProps {
|
|
2
|
-
/**
|
|
3
|
-
* Set option as checked
|
|
4
|
-
*
|
|
5
|
-
* @seeded from csc-ui — verify
|
|
6
|
-
*/
|
|
7
|
-
checked?: boolean;
|
|
8
2
|
/**
|
|
9
3
|
* Disable the radio button
|
|
10
|
-
*
|
|
11
|
-
* @seeded from csc-ui — verify
|
|
12
4
|
*/
|
|
13
5
|
disabled?: boolean;
|
|
14
6
|
/**
|
|
15
7
|
* Radio button value
|
|
16
8
|
*
|
|
17
|
-
* @seeded from csc-ui — verify
|
|
18
9
|
* @freeform
|
|
19
10
|
*/
|
|
20
11
|
value?: string;
|
|
@@ -23,10 +14,15 @@ declare var __VLS_1: {};
|
|
|
23
14
|
type __VLS_Slots = {} & {
|
|
24
15
|
default?: (props: typeof __VLS_1) => any;
|
|
25
16
|
};
|
|
26
|
-
declare const __VLS_base: import("vue").DefineComponent<CRadioProps, {
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<CRadioProps, {
|
|
18
|
+
_syncGroupState: (state: {
|
|
19
|
+
checked: boolean;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
tabIndex: number;
|
|
22
|
+
}) => void;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CRadioProps> & Readonly<{}>, {
|
|
27
24
|
value: string;
|
|
28
25
|
disabled: boolean;
|
|
29
|
-
checked: boolean;
|
|
30
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
28
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
interface CRadioGroupProps {
|
|
2
2
|
/**
|
|
3
3
|
* Disable the radio group
|
|
4
|
-
*
|
|
5
|
-
* @seeded from csc-ui — verify
|
|
6
4
|
*/
|
|
7
5
|
disabled?: boolean;
|
|
8
6
|
/**
|
|
@@ -13,88 +11,52 @@ interface CRadioGroupProps {
|
|
|
13
11
|
errorMessage?: string;
|
|
14
12
|
/**
|
|
15
13
|
* Hide the hint and error messages
|
|
16
|
-
*
|
|
17
|
-
* @seeded from csc-ui — verify
|
|
18
14
|
*/
|
|
19
15
|
hideDetails?: boolean;
|
|
20
16
|
/**
|
|
21
17
|
* Hint text for the input
|
|
22
18
|
*
|
|
23
|
-
* @seeded from csc-ui — verify
|
|
24
19
|
* @freeform
|
|
25
20
|
*/
|
|
26
21
|
hint?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Id of the element
|
|
29
|
-
*
|
|
30
|
-
* @seeded from csc-ui — verify
|
|
31
|
-
* @freeform
|
|
32
|
-
*/
|
|
33
|
-
hostId?: string;
|
|
34
22
|
/**
|
|
35
23
|
* Display radio buttons inline
|
|
36
|
-
*
|
|
37
|
-
* @seeded from csc-ui — verify
|
|
38
24
|
*/
|
|
39
25
|
inline?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Radio group items
|
|
42
|
-
*
|
|
43
|
-
* @seeded from csc-ui — verify
|
|
44
|
-
*/
|
|
45
|
-
items?: RadioItem[];
|
|
46
26
|
/**
|
|
47
27
|
* Label of the radio group
|
|
48
28
|
*
|
|
49
|
-
* @seeded from csc-ui — verify
|
|
50
29
|
* @freeform
|
|
51
30
|
*/
|
|
52
31
|
label?: string;
|
|
53
32
|
/**
|
|
54
33
|
* Set as required
|
|
55
|
-
*
|
|
56
|
-
* @seeded from csc-ui — verify
|
|
57
34
|
*/
|
|
58
35
|
required?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Return the whole item object
|
|
61
|
-
*
|
|
62
|
-
* @seeded from csc-ui — verify
|
|
63
|
-
*/
|
|
64
|
-
returnObject?: boolean;
|
|
65
36
|
/**
|
|
66
37
|
* Set the validity of the input
|
|
67
|
-
*
|
|
68
|
-
* @seeded from csc-ui — verify
|
|
69
38
|
*/
|
|
70
39
|
valid?: boolean;
|
|
71
40
|
/**
|
|
72
|
-
* Value of the radio group
|
|
73
|
-
*
|
|
74
|
-
* @seeded from csc-ui — verify
|
|
41
|
+
* Value of the radio group; matched against each radio's `value` by strict
|
|
42
|
+
* string equality
|
|
75
43
|
*/
|
|
76
|
-
value?: null |
|
|
77
|
-
}
|
|
78
|
-
interface RadioItem {
|
|
79
|
-
disabled?: boolean;
|
|
80
|
-
name: string;
|
|
81
|
-
value: number | string;
|
|
44
|
+
value?: null | string;
|
|
82
45
|
}
|
|
83
|
-
declare var __VLS_7: {};
|
|
46
|
+
declare var __VLS_7: {}, __VLS_9: {};
|
|
84
47
|
type __VLS_Slots = {} & {
|
|
85
|
-
|
|
48
|
+
label?: (props: typeof __VLS_7) => any;
|
|
49
|
+
} & {
|
|
50
|
+
default?: (props: typeof __VLS_9) => any;
|
|
86
51
|
};
|
|
87
52
|
declare const __VLS_base: import("vue").DefineComponent<CRadioGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CRadioGroupProps> & Readonly<{}>, {
|
|
88
53
|
label: string;
|
|
89
|
-
value: null |
|
|
54
|
+
value: null | string;
|
|
90
55
|
disabled: boolean;
|
|
91
56
|
errorMessage: string;
|
|
92
57
|
hideDetails: boolean;
|
|
93
58
|
hint: string;
|
|
94
|
-
hostId: string;
|
|
95
|
-
items: RadioItem[];
|
|
96
59
|
required: boolean;
|
|
97
|
-
returnObject: boolean;
|
|
98
60
|
valid: boolean;
|
|
99
61
|
inline: boolean;
|
|
100
62
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CSelectItem } from '../../types';
|
|
1
|
+
import type { CFieldSize, CSelectItem } from '../../types';
|
|
2
2
|
interface CSelectProps {
|
|
3
3
|
/** Make the selected value clearable */
|
|
4
4
|
clearable?: boolean;
|
|
@@ -58,6 +58,8 @@ interface CSelectProps {
|
|
|
58
58
|
returnObject?: boolean;
|
|
59
59
|
/** Shadow variant */
|
|
60
60
|
shadow?: boolean;
|
|
61
|
+
/** Field height: the 44px default or the 36px `small` box */
|
|
62
|
+
size?: CFieldSize;
|
|
61
63
|
/** Set the validity of the input */
|
|
62
64
|
valid?: boolean;
|
|
63
65
|
/** Selected value (scalar, or object when return-object is set) */
|
|
@@ -91,6 +93,7 @@ declare const __VLS_base: import("vue").DefineComponent<CSelectProps, {
|
|
|
91
93
|
required: boolean;
|
|
92
94
|
returnObject: boolean;
|
|
93
95
|
shadow: boolean;
|
|
96
|
+
size: CFieldSize;
|
|
94
97
|
valid: boolean;
|
|
95
98
|
optionAsSelection: boolean;
|
|
96
99
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -21,8 +21,8 @@ interface CSpinnerProps {
|
|
|
21
21
|
}
|
|
22
22
|
declare const __VLS_export: import("vue").DefineComponent<CSpinnerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CSpinnerProps> & Readonly<{}>, {
|
|
23
23
|
width: number;
|
|
24
|
-
color: string;
|
|
25
24
|
size: number;
|
|
25
|
+
color: string;
|
|
26
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const _default: typeof __VLS_export;
|
|
28
28
|
export default _default;
|
|
@@ -12,9 +12,19 @@ interface CTableProps {
|
|
|
12
12
|
*/
|
|
13
13
|
responsive?: boolean;
|
|
14
14
|
}
|
|
15
|
-
declare
|
|
15
|
+
declare var __VLS_1: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
default?: (props: typeof __VLS_1) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<CTableProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CTableProps> & Readonly<{}>, {
|
|
16
20
|
mobileBreakpoint: number;
|
|
17
21
|
responsive: boolean;
|
|
18
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
24
|
declare const _default: typeof __VLS_export;
|
|
20
25
|
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ensureTableStyles: () => void;
|
|
@@ -39,8 +39,8 @@ declare const _default: typeof __VLS_export;
|
|
|
39
39
|
export default _default;
|
|
40
40
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CTagProps> & Readonly<{}>, {
|
|
41
41
|
flat: boolean;
|
|
42
|
-
active: boolean;
|
|
43
42
|
size: CTagSize;
|
|
43
|
+
active: boolean;
|
|
44
44
|
badge: null | number | string;
|
|
45
45
|
closeable: boolean;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CFieldSize } from '../../types';
|
|
1
2
|
/**
|
|
2
3
|
* Native `autocapitalize` behaviour of the input.
|
|
3
4
|
*/
|
|
@@ -118,6 +119,8 @@ export interface CTextFieldProps {
|
|
|
118
119
|
* @seeded from csc-ui — verify
|
|
119
120
|
*/
|
|
120
121
|
shadow?: boolean;
|
|
122
|
+
/** Field height: the 44px default or the 36px `small` box (single-line fields) */
|
|
123
|
+
size?: CFieldSize;
|
|
121
124
|
/**
|
|
122
125
|
* Step size on a numeric input
|
|
123
126
|
*
|
|
@@ -172,6 +175,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTextF
|
|
|
172
175
|
placeholder: string;
|
|
173
176
|
required: boolean;
|
|
174
177
|
shadow: boolean;
|
|
178
|
+
size: CFieldSize;
|
|
175
179
|
valid: boolean;
|
|
176
180
|
autocomplete: string;
|
|
177
181
|
readonly: boolean;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { CPlacement } from '../../types';
|
|
2
|
+
export interface CTooltipProps {
|
|
3
|
+
/**
|
|
4
|
+
* Delay before the tooltip shows on hover, in milliseconds. Keyboard focus
|
|
5
|
+
* shows the tooltip immediately, regardless of this value. Defaults to
|
|
6
|
+
* `400`.
|
|
7
|
+
*/
|
|
8
|
+
delay?: number | string;
|
|
9
|
+
/** Distance from the trigger to the tooltip, in pixels. Defaults to `4`. */
|
|
10
|
+
distance?: number | string;
|
|
11
|
+
/** Whether the tooltip is open. Two-way: emits `change:open`. */
|
|
12
|
+
open?: boolean;
|
|
13
|
+
/** Preferred placement of the tooltip relative to the trigger. */
|
|
14
|
+
position?: CPlacement;
|
|
15
|
+
/**
|
|
16
|
+
* The tooltip text. Overridden by the `content` slot when that is
|
|
17
|
+
* populated.
|
|
18
|
+
* @freeform
|
|
19
|
+
*/
|
|
20
|
+
text?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Designated trigger: an element elsewhere in the document that the
|
|
23
|
+
* tooltip describes — its document ID, or the element itself. The same
|
|
24
|
+
* trigger concept as the `trigger` slot, supplied by reference: the
|
|
25
|
+
* tooltip wires hover/focus, mirrors `aria-description` onto it and
|
|
26
|
+
* anchors the bubble to it. When both routes are supplied, this prop wins
|
|
27
|
+
* over the slot.
|
|
28
|
+
*/
|
|
29
|
+
trigger?: HTMLElement | string;
|
|
30
|
+
}
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CTooltipProps> & Readonly<{}>, {
|
|
34
|
+
text: string;
|
|
35
|
+
open: boolean;
|
|
36
|
+
distance: number | string;
|
|
37
|
+
position: CPlacement;
|
|
38
|
+
trigger: HTMLElement | string;
|
|
39
|
+
delay: number | string;
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
41
|
+
trigger?: (props: {}) => any;
|
|
42
|
+
} & {
|
|
43
|
+
content?: (props: {}) => any;
|
|
44
|
+
}>;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
package/dist-types/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export type { CIconButtonProps, CIconButtonSize, } from './components/c-icon-but
|
|
|
8
8
|
export type { CLoginCardActionsAlign, CLoginCardActionsJustify, CLoginCardActionsProps, } from './components/c-login-card-actions/CLoginCardActions.vue';
|
|
9
9
|
export type { CLoginCardBlendMode, CLoginCardProps, } from './components/c-login-card/CLoginCard.vue';
|
|
10
10
|
export type { CPaginationOptions, CPaginationProps, CPaginationSize, } from './components/c-pagination/CPagination.vue';
|
|
11
|
+
export type { CPopoverProps } from './components/c-popover/CPopover.vue';
|
|
12
|
+
export type { CProgressCircleProps } from './components/c-progress-circle/CProgressCircle.vue';
|
|
11
13
|
export type { CStatusProps, CStatusType, } from './components/c-status/CStatus.vue';
|
|
12
14
|
export type { CTabButtonsProps, CTabButtonsSize, } from './components/c-tab-buttons/CTabButtons.vue';
|
|
13
15
|
export type { CTabsJustify, CTabsProps } from './components/c-tabs/CTabs.vue';
|
|
@@ -16,10 +18,16 @@ export type { CTagsProps, CTagsSize } from './components/c-tags/CTags.vue';
|
|
|
16
18
|
export type { CTextFieldAutocapitalize, CTextFieldProps, CTextFieldType, } from './components/c-text-field/CTextField.vue';
|
|
17
19
|
export type { CToastProps } from './components/c-toast/CToast.vue';
|
|
18
20
|
export type { CToastsHorizontal, CToastsProps, CToastsVertical, } from './components/c-toasts/CToasts.vue';
|
|
21
|
+
export type { CTooltipProps } from './components/c-tooltip/CTooltip.vue';
|
|
19
22
|
export type * from './tag-name-map';
|
|
20
23
|
export { applyTheme, resetTheme, themeToCss } from './theme/applyTheme';
|
|
21
24
|
export type { Family, ThemeSeeds } from './theme/applyTheme';
|
|
22
|
-
export
|
|
25
|
+
export { chartAnatomy, chartAnatomyHex, chartSlots, chartSlotsHex, } from './theme/chart-data';
|
|
26
|
+
export type { ChartAnatomy, ChartSlots } from './theme/chart-data';
|
|
27
|
+
export { DEFAULT_SEEDS, FAMILIES } from './theme/ramp.js';
|
|
28
|
+
export { themeMode } from './theme/themeMode';
|
|
29
|
+
export type { ThemeMode } from './theme/themeMode';
|
|
30
|
+
export type { CFieldSize, CPlacement, CSelectItem, CToastMessage, CToastType, } from './types';
|
|
23
31
|
export { h } from 'vue';
|
|
24
32
|
export type { VNode, VNodeChild } from 'vue';
|
|
25
33
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface FieldMessageProps {
|
|
2
|
+
/** Consumer-supplied text shown in place of the hint while invalid. */
|
|
3
|
+
errorMessage?: string;
|
|
4
|
+
/** Suppress the whole message area (no reserved height either). */
|
|
5
|
+
hideDetails?: boolean;
|
|
6
|
+
/** Neutral helper text shown while valid (or when no error message is supplied). */
|
|
7
|
+
hint?: string;
|
|
8
|
+
/** Part name stamped on the message area (`message` unless the host reserves it). */
|
|
9
|
+
part?: string;
|
|
10
|
+
/** Host control's validity; `false` switches to the error message when one is supplied. */
|
|
11
|
+
valid?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<FieldMessageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FieldMessageProps> & Readonly<{}>, {
|
|
14
|
+
part: string;
|
|
15
|
+
errorMessage: string;
|
|
16
|
+
hideDetails: boolean;
|
|
17
|
+
hint: string;
|
|
18
|
+
valid: boolean;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|