@cscfi/csc-ui 4.0.0-alpha.3 → 4.0.0-alpha.30
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 +14328 -8058
- package/dist/custom-elements.json +8952 -4605
- package/dist/docs/c-alert/usage.md +24 -0
- package/dist/docs/c-autocomplete/usage.md +152 -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-group/usage.md +14 -1
- package/dist/docs/c-checkbox/usage.md +53 -0
- package/dist/docs/c-date-picker/usage.md +224 -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 +6 -0
- package/dist/docs/c-number-field/usage.md +112 -0
- package/dist/docs/c-option-value/usage.md +1 -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-select/usage.md +127 -0
- package/dist/docs/c-side-navigation/usage.md +21 -0
- package/dist/docs/c-spinner/usage.md +21 -0
- package/dist/docs/c-switch/usage.md +36 -0
- package/dist/docs/c-tab-buttons/usage.md +7 -0
- package/dist/docs/c-table/usage.md +14 -0
- package/dist/docs/c-text-field/usage.md +106 -0
- package/dist/docs/c-time-picker/usage.md +170 -0
- package/dist/docs/c-toolbar/usage.md +17 -0
- package/dist/docs/c-tooltip/usage.md +30 -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 +33 -0
- package/dist/styles/css/tokens.css +719 -197
- package/dist/vscode.css-custom-data.json +474 -20
- package/dist/vscode.html-custom-data.json +659 -57
- package/dist/web-types.json +2813 -697
- package/dist-types/components/c-alert/CAlert.vue.d.ts +18 -4
- package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +118 -21
- 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 +4 -4
- package/dist-types/components/c-button-group/CButtonGroup.vue.d.ts +1 -1
- package/dist-types/components/c-checkbox/CCheckbox.vue.d.ts +3 -3
- package/dist-types/components/c-data-table/CDataTable.vue.d.ts +6 -2
- package/dist-types/components/c-date-picker/CDatePicker.vue.d.ts +282 -0
- package/dist-types/components/c-date-picker/dates.d.ts +119 -0
- package/dist-types/components/c-dropdown/CDropdown.vue.d.ts +50 -7
- package/dist-types/components/c-icon-button/CIconButton.vue.d.ts +1 -1
- package/dist-types/components/c-input/CInput.vue.d.ts +6 -6
- package/dist-types/components/c-list-item/CListItem.vue.d.ts +1 -1
- package/dist-types/components/c-main/CMain.vue.d.ts +10 -2
- package/dist-types/components/c-menu/CMenu.vue.d.ts +13 -3
- package/dist-types/components/c-menu-item/CMenuItem.vue.d.ts +30 -3
- package/dist-types/components/c-number-field/CNumberField.vue.d.ts +174 -0
- package/dist-types/components/c-number-field/numbers.d.ts +58 -0
- package/dist-types/components/c-otp-input/COtpInput.vue.d.ts +1 -1
- package/dist-types/components/c-pagination/CPagination.vue.d.ts +1 -1
- 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 +10 -48
- package/dist-types/components/c-select/CSelect.vue.d.ts +115 -27
- package/dist-types/components/c-side-navigation/CSideNavigation.vue.d.ts +1 -1
- package/dist-types/components/c-side-navigation-item/CSideNavigationItem.vue.d.ts +1 -1
- package/dist-types/components/c-slider/CSlider.vue.d.ts +3 -3
- package/dist-types/components/c-sub-navigation-item/CSubNavigationItem.vue.d.ts +1 -1
- package/dist-types/components/c-tab-buttons/CTabButtons.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 +7 -0
- package/dist-types/components/c-tags/CTags.vue.d.ts +1 -1
- package/dist-types/components/c-text-field/CTextField.vue.d.ts +27 -10
- package/dist-types/components/c-time-picker/CTimePicker.vue.d.ts +210 -0
- package/dist-types/components/c-time-picker/times.d.ts +82 -0
- package/dist-types/components/c-toasts/CToasts.vue.d.ts +1 -1
- package/dist-types/components/c-toolbar/CToolbar.vue.d.ts +10 -1
- package/dist-types/components/c-tooltip/CTooltip.vue.d.ts +49 -0
- package/dist-types/components/c-tree-select/CTreeSelect.vue.d.ts +261 -0
- package/dist-types/index.d.ts +19 -2
- package/dist-types/shared/FieldMessage.vue.d.ts +21 -0
- 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 +46 -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/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 +65 -0
- package/dist-types/shared/positionArea.d.ts +13 -0
- 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 +102 -0
- package/dist-types/shared/useDesignatedTrigger.d.ts +41 -0
- package/dist-types/shared/useFallbackPosition.d.ts +63 -0
- package/dist-types/shared/useHostStates.d.ts +25 -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 +103 -0
- package/dist-types/shared/visualViewport.d.ts +51 -0
- package/dist-types/tag-name-map.d.ts +769 -54
- 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 -0
- package/package.json +21 -9
- package/dist/css-anchor-positioning-fn-RTxo68pt.js +0 -6447
- package/dist-types/shared/anchorPolyfill.d.ts +0 -24
|
@@ -36,9 +36,9 @@ type __VLS_Slots = {} & {
|
|
|
36
36
|
};
|
|
37
37
|
declare const __VLS_base: import("vue").DefineComponent<CSideNavigationItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CSideNavigationItemProps> & Readonly<{}>, {
|
|
38
38
|
loading: boolean;
|
|
39
|
-
active: boolean;
|
|
40
39
|
href: string;
|
|
41
40
|
target: string;
|
|
41
|
+
active: boolean;
|
|
42
42
|
focusable: boolean;
|
|
43
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
44
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -92,16 +92,16 @@ interface CSliderProps {
|
|
|
92
92
|
declare const __VLS_export: import("vue").DefineComponent<CSliderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CSliderProps> & Readonly<{}>, {
|
|
93
93
|
label: string;
|
|
94
94
|
value: number | string;
|
|
95
|
+
step: number | string;
|
|
95
96
|
disabled: boolean;
|
|
96
97
|
hostId: string;
|
|
98
|
+
max: number | string;
|
|
99
|
+
min: number | string;
|
|
97
100
|
hostName: string;
|
|
98
101
|
ariaLabelInternal: string;
|
|
99
102
|
disableTooltip: boolean;
|
|
100
103
|
labels: boolean;
|
|
101
|
-
max: number | string;
|
|
102
|
-
min: number | string;
|
|
103
104
|
segments: number | string;
|
|
104
|
-
step: number | string;
|
|
105
105
|
ticks: boolean;
|
|
106
106
|
unit: string;
|
|
107
107
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -38,9 +38,9 @@ type __VLS_Slots = {} & {
|
|
|
38
38
|
};
|
|
39
39
|
declare const __VLS_base: import("vue").DefineComponent<CSubNavigationItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CSubNavigationItemProps> & Readonly<{}>, {
|
|
40
40
|
loading: boolean;
|
|
41
|
-
active: boolean;
|
|
42
41
|
href: string;
|
|
43
42
|
target: string;
|
|
43
|
+
active: boolean;
|
|
44
44
|
focusable: boolean;
|
|
45
45
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
46
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -24,8 +24,8 @@ declare const _default: typeof __VLS_export;
|
|
|
24
24
|
export default _default;
|
|
25
25
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTabButtonsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CTabButtonsProps> & Readonly<{}>, {
|
|
26
26
|
value: number | string;
|
|
27
|
-
disabled: boolean;
|
|
28
27
|
size: CTabButtonsSize;
|
|
28
|
+
disabled: boolean;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
30
30
|
default?: (props: {}) => any;
|
|
31
31
|
}>;
|
|
@@ -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;
|
|
@@ -17,6 +17,12 @@ export interface CTagProps {
|
|
|
17
17
|
* @seeded from csc-ui — verify
|
|
18
18
|
*/
|
|
19
19
|
closeable?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Accessible name of the close button rendered when `closeable`
|
|
22
|
+
*
|
|
23
|
+
* @freeform
|
|
24
|
+
*/
|
|
25
|
+
closeLabel?: string;
|
|
20
26
|
/**
|
|
21
27
|
* Remove the hover effect
|
|
22
28
|
*
|
|
@@ -41,6 +47,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTagPr
|
|
|
41
47
|
flat: boolean;
|
|
42
48
|
size: CTagSize;
|
|
43
49
|
active: boolean;
|
|
50
|
+
closeLabel: string;
|
|
44
51
|
badge: null | number | string;
|
|
45
52
|
closeable: boolean;
|
|
46
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
@@ -25,8 +25,8 @@ declare const _default: typeof __VLS_export;
|
|
|
25
25
|
export default _default;
|
|
26
26
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTagsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CTagsProps> & Readonly<{}>, {
|
|
27
27
|
label: string;
|
|
28
|
-
required: boolean;
|
|
29
28
|
size: CTagsSize;
|
|
29
|
+
required: boolean;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
31
31
|
default?: (props: {}) => any;
|
|
32
32
|
}>;
|
|
@@ -40,6 +40,7 @@ export interface CTextFieldProps {
|
|
|
40
40
|
* Hide the hint and error messages
|
|
41
41
|
*
|
|
42
42
|
* @seeded from csc-ui — verify
|
|
43
|
+
* @defaultable false
|
|
43
44
|
*/
|
|
44
45
|
hideDetails?: boolean;
|
|
45
46
|
/**
|
|
@@ -67,8 +68,15 @@ export interface CTextFieldProps {
|
|
|
67
68
|
* Label on top of the input
|
|
68
69
|
*
|
|
69
70
|
* @seeded from csc-ui — verify
|
|
71
|
+
* @defaultable false
|
|
70
72
|
*/
|
|
71
73
|
labelOnTop?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Input mask the typed text follows: `#` a digit, `A` a letter, `*` a letter or a digit, `\` escapes the next character, `[…]` wraps a trailing optional section, anything else is a literal. Applies to a single-line `text`, `tel` or `search` field
|
|
76
|
+
*
|
|
77
|
+
* @freeform a mask pattern, e.g. `+358 ## ### ####`
|
|
78
|
+
*/
|
|
79
|
+
mask?: string;
|
|
72
80
|
/**
|
|
73
81
|
* Maximum value on a numeric input
|
|
74
82
|
*
|
|
@@ -117,9 +125,14 @@ export interface CTextFieldProps {
|
|
|
117
125
|
* Shadow variant of the input
|
|
118
126
|
*
|
|
119
127
|
* @seeded from csc-ui — verify
|
|
128
|
+
* @defaultable false
|
|
120
129
|
*/
|
|
121
130
|
shadow?: boolean;
|
|
122
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* Field height: the 52px default (the shared control height) or the 36px `small` box (single-line fields)
|
|
133
|
+
*
|
|
134
|
+
* @defaultable 'default'
|
|
135
|
+
*/
|
|
123
136
|
size?: CFieldSize;
|
|
124
137
|
/**
|
|
125
138
|
* Step size on a numeric input
|
|
@@ -161,30 +174,34 @@ export interface CTextFieldProps {
|
|
|
161
174
|
export type CTextFieldType = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url';
|
|
162
175
|
declare const _default: typeof __VLS_export;
|
|
163
176
|
export default _default;
|
|
164
|
-
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTextFieldProps, {
|
|
177
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTextFieldProps, {
|
|
178
|
+
maskComplete: import("vue").ComputedRef<boolean>;
|
|
179
|
+
unmaskedValue: import("vue").ComputedRef<string>;
|
|
180
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CTextFieldProps> & Readonly<{}>, {
|
|
165
181
|
label: string;
|
|
182
|
+
mask: string;
|
|
166
183
|
value: string;
|
|
167
184
|
type: CTextFieldType;
|
|
168
185
|
name: string;
|
|
186
|
+
rows: number;
|
|
187
|
+
size: CFieldSize;
|
|
188
|
+
hideDetails: boolean;
|
|
189
|
+
labelOnTop: boolean;
|
|
190
|
+
shadow: boolean;
|
|
191
|
+
step: null | number;
|
|
169
192
|
disabled: boolean;
|
|
170
193
|
errorMessage: string;
|
|
171
|
-
hideDetails: boolean;
|
|
172
194
|
hint: string;
|
|
173
195
|
hostId: string;
|
|
174
|
-
labelOnTop: boolean;
|
|
175
196
|
placeholder: string;
|
|
176
197
|
required: boolean;
|
|
177
|
-
shadow: boolean;
|
|
178
|
-
size: CFieldSize;
|
|
179
198
|
valid: boolean;
|
|
180
|
-
autocomplete: string;
|
|
181
|
-
readonly: boolean;
|
|
182
199
|
autocorrect: boolean;
|
|
183
200
|
max: null | number;
|
|
184
201
|
min: null | number;
|
|
185
|
-
|
|
202
|
+
readonly: boolean;
|
|
203
|
+
autocomplete: string;
|
|
186
204
|
automaticCapitalize: CTextFieldAutocapitalize;
|
|
187
|
-
rows: number;
|
|
188
205
|
trimWhitespace: boolean;
|
|
189
206
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
190
207
|
pre?: (props: {}) => any;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import type { CFieldSize } from '../../types';
|
|
2
|
+
export interface CTimePickerProps {
|
|
3
|
+
/**
|
|
4
|
+
* Make the value clearable
|
|
5
|
+
*/
|
|
6
|
+
clearable?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Disable the field
|
|
9
|
+
*/
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Error message shown in place of the hint while the field is invalid
|
|
13
|
+
*
|
|
14
|
+
* @freeform
|
|
15
|
+
*/
|
|
16
|
+
errorMessage?: string;
|
|
17
|
+
/**
|
|
18
|
+
* How times are shown and read from typing: a pattern of the tokens `H`,
|
|
19
|
+
* `HH` (24-hour), `h`, `hh` (12-hour, with the period `a`) and `mm` with
|
|
20
|
+
* any separators, e.g. `HH:mm` or `h:mm a`
|
|
21
|
+
*
|
|
22
|
+
* @defaultable 'HH.mm'
|
|
23
|
+
* @freeform
|
|
24
|
+
*/
|
|
25
|
+
format?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Hide the hint and error messages
|
|
28
|
+
*
|
|
29
|
+
* @defaultable false
|
|
30
|
+
*/
|
|
31
|
+
hideDetails?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Hint text for the field
|
|
34
|
+
*
|
|
35
|
+
* @freeform
|
|
36
|
+
*/
|
|
37
|
+
hint?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Id of the element
|
|
40
|
+
*
|
|
41
|
+
* @freeform
|
|
42
|
+
*/
|
|
43
|
+
hostId?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Element label
|
|
46
|
+
*
|
|
47
|
+
* @freeform
|
|
48
|
+
*/
|
|
49
|
+
label?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Label on top of the field
|
|
52
|
+
*
|
|
53
|
+
* @defaultable false
|
|
54
|
+
*/
|
|
55
|
+
labelOnTop?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The latest time that can be picked or typed, as an ISO `HH:mm` time
|
|
58
|
+
*
|
|
59
|
+
* @freeform
|
|
60
|
+
*/
|
|
61
|
+
max?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The earliest time that can be picked or typed, as an ISO `HH:mm` time;
|
|
64
|
+
* a `min` after `max` is invalid and both are ignored
|
|
65
|
+
*
|
|
66
|
+
* @freeform
|
|
67
|
+
*/
|
|
68
|
+
min?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Minutes between the minute column's rows; typed times need not fall on
|
|
71
|
+
* the step
|
|
72
|
+
*/
|
|
73
|
+
minuteStep?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Input field name
|
|
76
|
+
*
|
|
77
|
+
* @freeform
|
|
78
|
+
*/
|
|
79
|
+
name?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Placeholder of the input; the `format` pattern when empty
|
|
82
|
+
*
|
|
83
|
+
* @freeform
|
|
84
|
+
*/
|
|
85
|
+
placeholder?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Pick a range: the value becomes `{ start, end }` and the field holds two
|
|
88
|
+
* inputs
|
|
89
|
+
*/
|
|
90
|
+
range?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Set the field as required
|
|
93
|
+
*/
|
|
94
|
+
required?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Shadow variant
|
|
97
|
+
*
|
|
98
|
+
* @defaultable false
|
|
99
|
+
*/
|
|
100
|
+
shadow?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Show a Now button under the columns that commits the current time
|
|
103
|
+
*
|
|
104
|
+
* @defaultable false
|
|
105
|
+
*/
|
|
106
|
+
showNow?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Field height: the 52px default (the shared control height) or the 36px `small` box
|
|
109
|
+
*
|
|
110
|
+
* @defaultable 'default'
|
|
111
|
+
*/
|
|
112
|
+
size?: CFieldSize;
|
|
113
|
+
/**
|
|
114
|
+
* UI text overrides (i18n), merged over the AM/PM texts `Intl` gives for
|
|
115
|
+
* the page's `lang` and the English defaults. Objects have no attribute
|
|
116
|
+
* form — bind as a DOM property
|
|
117
|
+
*
|
|
118
|
+
* @defaultable {}
|
|
119
|
+
*/
|
|
120
|
+
texts?: CTimePickerTexts;
|
|
121
|
+
/**
|
|
122
|
+
* Set the validity of the field
|
|
123
|
+
*/
|
|
124
|
+
valid?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* The time as an ISO `HH:mm` string on a 24-hour clock, or `{ start, end }`
|
|
127
|
+
* under `range`; `null` when empty
|
|
128
|
+
*/
|
|
129
|
+
value?: CTimePickerValue;
|
|
130
|
+
}
|
|
131
|
+
/** A time range: ISO `HH:mm` ends, either of which may be `null` while only one is typed; an end before the start spans midnight. */
|
|
132
|
+
export interface CTimePickerRange {
|
|
133
|
+
/** The end of the range; earlier than the start for an overnight range. */
|
|
134
|
+
end: null | string;
|
|
135
|
+
/** The start of the range. */
|
|
136
|
+
start: null | string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The text committed from the field, as typed: a string, or both ends'
|
|
140
|
+
* texts under `range`.
|
|
141
|
+
*/
|
|
142
|
+
export type CTimePickerText = {
|
|
143
|
+
end: string;
|
|
144
|
+
start: string;
|
|
145
|
+
} | string;
|
|
146
|
+
/**
|
|
147
|
+
* UI texts of `c-time-picker`, merged key by key over the AM/PM texts
|
|
148
|
+
* `Intl` gives for the page's `lang` and the English defaults.
|
|
149
|
+
*/
|
|
150
|
+
export interface CTimePickerTexts {
|
|
151
|
+
/** The period before noon in a 12-hour `format`. */
|
|
152
|
+
am?: string;
|
|
153
|
+
/** Accessible name of the dialog when the field has no label. */
|
|
154
|
+
chooseTime?: string;
|
|
155
|
+
/** Accessible label of the clear button. */
|
|
156
|
+
clearSelection?: string;
|
|
157
|
+
/** Accessible label of the close button in the fullscreen panel (narrow viewports). */
|
|
158
|
+
closePanel?: string;
|
|
159
|
+
/** Label of the Done button in the fullscreen panel (narrow viewports). */
|
|
160
|
+
done?: string;
|
|
161
|
+
/** Name of the end input and the end tab under `range`. */
|
|
162
|
+
end?: string;
|
|
163
|
+
/** Accessible name of the hour column. */
|
|
164
|
+
hours?: string;
|
|
165
|
+
/** Accessible name of the minute column. */
|
|
166
|
+
minutes?: string;
|
|
167
|
+
/** Label of the Now button (`show-now`). */
|
|
168
|
+
now?: string;
|
|
169
|
+
/** Accessible label of the clock button. */
|
|
170
|
+
openClock?: string;
|
|
171
|
+
/** Accessible name of the AM/PM column. */
|
|
172
|
+
period?: string;
|
|
173
|
+
/** The period from noon in a 12-hour `format`. */
|
|
174
|
+
pm?: string;
|
|
175
|
+
/** Name of the start input and the start tab under `range`. */
|
|
176
|
+
start?: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Value of `c-time-picker`: an ISO `HH:mm` string, a
|
|
180
|
+
* {@link CTimePickerRange} under `range`, or `null` when empty.
|
|
181
|
+
*/
|
|
182
|
+
export type CTimePickerValue = CTimePickerRange | null | string;
|
|
183
|
+
declare const _default: typeof __VLS_export;
|
|
184
|
+
export default _default;
|
|
185
|
+
declare const __VLS_export: import("vue").DefineComponent<CTimePickerProps, {
|
|
186
|
+
badInput: import("vue").ComputedRef<boolean>;
|
|
187
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CTimePickerProps> & Readonly<{}>, {
|
|
188
|
+
label: string;
|
|
189
|
+
value: CTimePickerValue;
|
|
190
|
+
name: string;
|
|
191
|
+
size: CFieldSize;
|
|
192
|
+
texts: CTimePickerTexts;
|
|
193
|
+
hideDetails: boolean;
|
|
194
|
+
labelOnTop: boolean;
|
|
195
|
+
shadow: boolean;
|
|
196
|
+
format: string;
|
|
197
|
+
showNow: boolean;
|
|
198
|
+
clearable: boolean;
|
|
199
|
+
disabled: boolean;
|
|
200
|
+
errorMessage: string;
|
|
201
|
+
hint: string;
|
|
202
|
+
hostId: string;
|
|
203
|
+
placeholder: string;
|
|
204
|
+
required: boolean;
|
|
205
|
+
valid: boolean;
|
|
206
|
+
max: string;
|
|
207
|
+
min: string;
|
|
208
|
+
range: boolean;
|
|
209
|
+
minuteStep: number;
|
|
210
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time-of-day helpers for `c-time-picker` (ADR-0061). Pure functions over
|
|
3
|
+
* ISO `HH:mm` strings on a 24-hour clock — no seconds, no date, no zone.
|
|
4
|
+
* Arithmetic works in minutes since midnight.
|
|
5
|
+
*/
|
|
6
|
+
import type { MaskSlot } from '../../shared/inputMask';
|
|
7
|
+
/** The two period texts of a 12-hour format, as shown. */
|
|
8
|
+
export interface CTimePickerPeriods {
|
|
9
|
+
am: string;
|
|
10
|
+
pm: string;
|
|
11
|
+
}
|
|
12
|
+
/** `min` / `max` in minutes since midnight; `null` where unbounded. */
|
|
13
|
+
export interface CTimePickerBounds {
|
|
14
|
+
max: null | number;
|
|
15
|
+
min: null | number;
|
|
16
|
+
}
|
|
17
|
+
export declare const isTime: (value: unknown) => value is string;
|
|
18
|
+
export declare const toMinutes: (time: string) => number;
|
|
19
|
+
export declare const fromMinutes: (minutes: number) => string;
|
|
20
|
+
/** The current local time, as ISO. */
|
|
21
|
+
export declare const nowTime: () => string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether `pattern` is usable: one hour token then `mm`, a literal between
|
|
24
|
+
* them, and the period `a` exactly when the hour is 12-hour (`h`, `hh`) —
|
|
25
|
+
* before or after the time. No other letters. Anything else falls back to
|
|
26
|
+
* the built-in pattern.
|
|
27
|
+
*/
|
|
28
|
+
export declare const isValidPattern: (pattern: string) => boolean;
|
|
29
|
+
/** Whether a valid pattern shows a 12-hour clock with a period. */
|
|
30
|
+
export declare const isTwelveHour: (pattern: string) => boolean;
|
|
31
|
+
/** Whether a valid pattern pads the hour to two digits. */
|
|
32
|
+
export declare const padsHour: (pattern: string) => boolean;
|
|
33
|
+
/** The hour as its column row shows it under `pattern`: `0`–`23`, or `12`, `1`–`11`. */
|
|
34
|
+
export declare const hourLabel: (hour24: number, pattern: string) => string;
|
|
35
|
+
export declare const formatTime: (time: string, pattern: string, periods: CTimePickerPeriods) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Read typed text as a time (ADR-0061). Lenient: any run of `.`, `:` or
|
|
38
|
+
* spaces separates the hour from the minutes; a bare hour reads as on the
|
|
39
|
+
* hour (`9` → `09:00`); three or four digits split as hour and minutes
|
|
40
|
+
* (`930` → `09:30`); a minute of one digit is that minute (`9.3` →
|
|
41
|
+
* `09:03`). A period — the resolved AM/PM texts or English `a` / `p` —
|
|
42
|
+
* makes the hour 12-hour whatever the pattern; a 12-hour pattern also
|
|
43
|
+
* takes a 24-hour time, and reads an hour without a period as AM. Returns
|
|
44
|
+
* the ISO time, or `null`.
|
|
45
|
+
*/
|
|
46
|
+
export declare const parseTime: (text: string, pattern: string, periods: CTimePickerPeriods) => null | string;
|
|
47
|
+
/**
|
|
48
|
+
* The input mask typing follows under a pattern (ADR-0061, ADR-0059): the
|
|
49
|
+
* hour and the minutes take one or two digits, closing early on a typed
|
|
50
|
+
* separator or on a first digit no two-digit value starts with (an hour
|
|
51
|
+
* 3–9, 2–9 on a 12-hour clock; a minute 6–9); the period is a word slot
|
|
52
|
+
* over the resolved AM/PM texts, so `p` shows the whole PM text. A
|
|
53
|
+
* separator of the pattern also accepts any of `. : space` typed in its
|
|
54
|
+
* place and shows as the pattern's own.
|
|
55
|
+
*/
|
|
56
|
+
export declare const compileTimeMask: (pattern: string, periods: CTimePickerPeriods) => MaskSlot[];
|
|
57
|
+
/**
|
|
58
|
+
* `min` / `max` read as minutes. A bound that is not an ISO time is
|
|
59
|
+
* unbounded; `min` after `max` is invalid — `null` — not an overnight wrap.
|
|
60
|
+
*/
|
|
61
|
+
export declare const readBounds: (min: unknown, max: unknown) => CTimePickerBounds | null;
|
|
62
|
+
export declare const inBounds: (minutes: number, b: CTimePickerBounds) => boolean;
|
|
63
|
+
export declare const clampToBounds: (minutes: number, b: CTimePickerBounds) => number;
|
|
64
|
+
/** Whether no minute of the hour (0–23) is inside the bounds. */
|
|
65
|
+
export declare const hourDisabled: (hour: number, b: CTimePickerBounds) => boolean;
|
|
66
|
+
/** Whether no minute of the half day is inside the bounds. */
|
|
67
|
+
export declare const periodDisabled: (period: "am" | "pm", b: CTimePickerBounds) => boolean;
|
|
68
|
+
/** The hour column's hours (0–23) in row order: `0…23`, or `1…11, 12` of one half day. */
|
|
69
|
+
export declare const hourRows: (twelve: boolean, pm?: boolean) => number[];
|
|
70
|
+
/**
|
|
71
|
+
* The minute column's minutes: every `step` from 0, plus `current` sorted in
|
|
72
|
+
* when it is off the step (ADR-0061: a step shapes the column, never the
|
|
73
|
+
* value). A step that is not a positive integer is 1.
|
|
74
|
+
*/
|
|
75
|
+
export declare const minuteRows: (step: number, current: null | number) => number[];
|
|
76
|
+
/** The minute row nearest `minute` on the step, never past the last row. */
|
|
77
|
+
export declare const roundToStep: (minute: number, step: number) => number;
|
|
78
|
+
/**
|
|
79
|
+
* The AM/PM texts for `lang` from `Intl.DateTimeFormat`'s `dayPeriod` — the
|
|
80
|
+
* fallback under `texts` (ADR-0061). `null` without a language or `Intl`.
|
|
81
|
+
*/
|
|
82
|
+
export declare const intlPeriods: (lang: string) => CTimePickerPeriods | null;
|
|
@@ -33,8 +33,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CToast
|
|
|
33
33
|
addToast: (message: CToastMessage) => void;
|
|
34
34
|
removeToast: (id: string) => void;
|
|
35
35
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CToastsProps> & Readonly<{}>, {
|
|
36
|
-
vertical: CToastsVertical;
|
|
37
36
|
absolute: boolean;
|
|
37
|
+
vertical: CToastsVertical;
|
|
38
38
|
horizontal: CToastsHorizontal;
|
|
39
39
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
40
40
|
default?: (props: {}) => any;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
interface CToolbarProps {
|
|
2
|
+
/**
|
|
3
|
+
* Keep the toolbar in the page flow so it scrolls away with the content
|
|
4
|
+
* instead of staying pinned to the top of its scroll container
|
|
5
|
+
*/
|
|
6
|
+
static?: boolean;
|
|
7
|
+
}
|
|
1
8
|
declare var __VLS_1: {};
|
|
2
9
|
type __VLS_Slots = {} & {
|
|
3
10
|
default?: (props: typeof __VLS_1) => any;
|
|
4
11
|
};
|
|
5
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<CToolbarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CToolbarProps> & Readonly<{}>, {
|
|
13
|
+
static: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
16
|
declare const _default: typeof __VLS_export;
|
|
8
17
|
export default _default;
|
|
@@ -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
|
+
};
|