@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
|
@@ -132,7 +132,7 @@ export interface CAutocompleteElementEventMap {
|
|
|
132
132
|
'update:value': CustomEvent<CAutocompleteValue>;
|
|
133
133
|
}
|
|
134
134
|
/** A filterable value-selection component: a readonly value field that opens a popover panel with a search input above the matching options. */
|
|
135
|
-
export interface CAutocompleteElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'errorMessage' | 'external' | 'filter' | 'hideDetails' | 'hint' | 'invalid' | 'items' | 'itemsPerPage' | 'label' | 'labelOnTop' | 'loading' | 'maxTags' | 'multiple' | 'name' | 'placeholder' | 'required' | 'returnObject' | 'selectAll' | 'shadow' | 'size' | 'texts' | 'value'> {
|
|
135
|
+
export interface CAutocompleteElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'errorMessage' | 'external' | 'filter' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'items' | 'itemsPerPage' | 'label' | 'labelOnTop' | 'loading' | 'maxTags' | 'multiple' | 'name' | 'placeholder' | 'required' | 'returnObject' | 'selectAll' | 'shadow' | 'size' | 'texts' | 'value'> {
|
|
136
136
|
/** Make the selected value clearable */
|
|
137
137
|
clearable?: boolean;
|
|
138
138
|
/** Disable the input */
|
|
@@ -147,8 +147,17 @@ export interface CAutocompleteElement extends Omit<HTMLElement, 'clearable' | 'd
|
|
|
147
147
|
external?: boolean;
|
|
148
148
|
/** Custom filter predicate; receives a normalized option + the query. Ignored when `external` is set */
|
|
149
149
|
filter?: CAutocompleteFilter;
|
|
150
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Hide the hint and error messages
|
|
152
|
+
*
|
|
153
|
+
* @deprecated Use `hide-message`.
|
|
154
|
+
*/
|
|
151
155
|
hideDetails?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Hide the message line — the hint and error messages under the field —
|
|
158
|
+
* and the room it keeps.
|
|
159
|
+
*/
|
|
160
|
+
hideMessage?: boolean;
|
|
152
161
|
/** Hint text for the input */
|
|
153
162
|
hint?: string;
|
|
154
163
|
/**
|
|
@@ -242,8 +251,8 @@ export interface CBreadcrumbItemElement extends Omit<HTMLElement, 'href' | 'targ
|
|
|
242
251
|
/** Browsing context the link opens in; the same tab when unset */
|
|
243
252
|
target?: string;
|
|
244
253
|
}
|
|
245
|
-
/** Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one
|
|
246
|
-
export interface CButtonElement extends Omit<HTMLElement, 'active' | 'asTab' | 'danger' | 'disabled' | 'fit' | 'ghost' | 'href' | 'inverted' | 'loading' | 'noRadius' | 'noRipple' | 'outlined' | 'size' | 'target' | 'text' | 'type' | 'value'> {
|
|
254
|
+
/** Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one filled button (the default `appearance`) per view for its main action; other actions use `appearance="outlined"`, `"ghost"` or `"text"`. */
|
|
255
|
+
export interface CButtonElement extends Omit<HTMLElement, 'active' | 'appearance' | 'asTab' | 'danger' | 'disabled' | 'fit' | 'ghost' | 'href' | 'inverted' | 'loading' | 'noRadius' | 'noRipple' | 'outlined' | 'size' | 'target' | 'text' | 'type' | 'value' | 'variant'> {
|
|
247
256
|
/**
|
|
248
257
|
* Pressed (toggle) state — renders the selected look and sets
|
|
249
258
|
* `aria-pressed`. Leave unset for regular action buttons: only a
|
|
@@ -252,8 +261,15 @@ export interface CButtonElement extends Omit<HTMLElement, 'active' | 'asTab' | '
|
|
|
252
261
|
*/
|
|
253
262
|
active?: boolean;
|
|
254
263
|
/**
|
|
255
|
-
*
|
|
256
|
-
*
|
|
264
|
+
* The button's look: `filled` (unless set) for the main action of a view;
|
|
265
|
+
* `outlined` (a primary outline, no fill), `ghost` (a light primary tint)
|
|
266
|
+
* or `text` (no fill or outline) for lower emphasis.
|
|
267
|
+
*/
|
|
268
|
+
appearance?: 'filled' | 'ghost' | 'outlined' | 'text';
|
|
269
|
+
/**
|
|
270
|
+
* Danger look for a destructive action: the error colour.
|
|
271
|
+
*
|
|
272
|
+
* @deprecated Use `variant="danger"`.
|
|
257
273
|
*/
|
|
258
274
|
danger?: boolean;
|
|
259
275
|
/**
|
|
@@ -263,7 +279,11 @@ export interface CButtonElement extends Omit<HTMLElement, 'active' | 'asTab' | '
|
|
|
263
279
|
disabled?: boolean;
|
|
264
280
|
/** Stretch the button to the full width of its container. */
|
|
265
281
|
fit?: boolean;
|
|
266
|
-
/**
|
|
282
|
+
/**
|
|
283
|
+
* Ghost appearance: primary text on a light primary tint, for lower emphasis.
|
|
284
|
+
*
|
|
285
|
+
* @deprecated Use `appearance="ghost"`.
|
|
286
|
+
*/
|
|
267
287
|
ghost?: boolean;
|
|
268
288
|
/**
|
|
269
289
|
* URL to link to: the button renders as a real link (`<a>`) styled as a
|
|
@@ -272,8 +292,8 @@ export interface CButtonElement extends Omit<HTMLElement, 'active' | 'asTab' | '
|
|
|
272
292
|
href?: string;
|
|
273
293
|
/**
|
|
274
294
|
* Inverted colours for a fixed dark or brand-coloured backdrop: the
|
|
275
|
-
* `inverse-*` family, the same in both theme modes. Combines with
|
|
276
|
-
*
|
|
295
|
+
* `inverse-*` family, the same in both theme modes. Combines with every
|
|
296
|
+
* appearance.
|
|
277
297
|
*/
|
|
278
298
|
inverted?: boolean;
|
|
279
299
|
/**
|
|
@@ -286,6 +306,8 @@ export interface CButtonElement extends Omit<HTMLElement, 'active' | 'asTab' | '
|
|
|
286
306
|
/**
|
|
287
307
|
* Outlined appearance: a primary outline and text with no fill, for lower
|
|
288
308
|
* emphasis.
|
|
309
|
+
*
|
|
310
|
+
* @deprecated Use `appearance="outlined"`.
|
|
289
311
|
*/
|
|
290
312
|
outlined?: boolean;
|
|
291
313
|
/**
|
|
@@ -298,7 +320,11 @@ export interface CButtonElement extends Omit<HTMLElement, 'active' | 'asTab' | '
|
|
|
298
320
|
* `_blank` for a new one.
|
|
299
321
|
*/
|
|
300
322
|
target?: string;
|
|
301
|
-
/**
|
|
323
|
+
/**
|
|
324
|
+
* Text appearance: primary text with no fill or outline, the lightest look.
|
|
325
|
+
*
|
|
326
|
+
* @deprecated Use `appearance="text"`.
|
|
327
|
+
*/
|
|
302
328
|
text?: boolean;
|
|
303
329
|
/**
|
|
304
330
|
* Native `type` of the button: `button` unless set, `submit` or `reset`.
|
|
@@ -310,6 +336,12 @@ export interface CButtonElement extends Omit<HTMLElement, 'active' | 'asTab' | '
|
|
|
310
336
|
* of the `c-tab-item` panel it shows.
|
|
311
337
|
*/
|
|
312
338
|
value?: number | string;
|
|
339
|
+
/**
|
|
340
|
+
* The button's colour, in every appearance: `primary` unless set (or
|
|
341
|
+
* changed app-wide), `secondary`, `success`, `info`, `warning`, or `danger`
|
|
342
|
+
* for a destructive action.
|
|
343
|
+
*/
|
|
344
|
+
variant?: 'danger' | 'info' | 'primary' | 'secondary' | 'success' | 'warning';
|
|
313
345
|
}
|
|
314
346
|
/** Events dispatched by `<c-button-group>`. */
|
|
315
347
|
export interface CButtonGroupElementEventMap {
|
|
@@ -367,12 +399,19 @@ export interface CButtonGroupElement extends Omit<HTMLElement, 'disabled' | 'lab
|
|
|
367
399
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
368
400
|
}
|
|
369
401
|
/** A raised, bordered surface that groups one piece of content — its heading, body and actions — into a single box on the page. */
|
|
370
|
-
export interface CCardElement extends Omit<HTMLElement, 'fullscreen'> {
|
|
402
|
+
export interface CCardElement extends Omit<HTMLElement, 'fullscreen' | 'showFullscreen'> {
|
|
371
403
|
/**
|
|
372
404
|
* Shows a toggle button in the card's top-right corner that puts the card
|
|
373
405
|
* in the browser's fullscreen mode and back.
|
|
406
|
+
*
|
|
407
|
+
* @deprecated Use `show-fullscreen`.
|
|
374
408
|
*/
|
|
375
409
|
fullscreen?: boolean;
|
|
410
|
+
/**
|
|
411
|
+
* Show a toggle button in the card's top-right corner that puts the card
|
|
412
|
+
* in the browser's fullscreen mode and back.
|
|
413
|
+
*/
|
|
414
|
+
showFullscreen?: boolean;
|
|
376
415
|
/**
|
|
377
416
|
* Shows the card in the browser's fullscreen mode; does nothing while any
|
|
378
417
|
* element is already fullscreen. Browsers grant it only in response to a
|
|
@@ -426,7 +465,7 @@ export interface CCheckboxElementEventMap {
|
|
|
426
465
|
'update:value': CustomEvent<boolean | number | string>;
|
|
427
466
|
}
|
|
428
467
|
/** A form control for a single on/off choice: a native checkbox with a label, an optional hint, and validation messaging. */
|
|
429
|
-
export interface CCheckboxElement extends Omit<HTMLElement, 'checked' | 'disabled' | 'errorMessage' | 'falseValue' | 'hideDetails' | 'hint' | 'indeterminate' | 'invalid' | 'label' | 'name' | 'required' | 'trueValue' | 'value'> {
|
|
468
|
+
export interface CCheckboxElement extends Omit<HTMLElement, 'checked' | 'disabled' | 'errorMessage' | 'falseValue' | 'hideDetails' | 'hideMessage' | 'hint' | 'indeterminate' | 'invalid' | 'label' | 'name' | 'required' | 'trueValue' | 'value'> {
|
|
430
469
|
/**
|
|
431
470
|
* Whether the checkbox is on: the boolean view of `value`. Setting it sets
|
|
432
471
|
* `value` to `trueValue` or `falseValue`; reading it reports whether
|
|
@@ -440,8 +479,17 @@ export interface CCheckboxElement extends Omit<HTMLElement, 'checked' | 'disable
|
|
|
440
479
|
errorMessage?: string;
|
|
441
480
|
/** The value when the checkbox is unchecked */
|
|
442
481
|
falseValue?: boolean | number | string;
|
|
443
|
-
/**
|
|
482
|
+
/**
|
|
483
|
+
* Hide the hint and error messages
|
|
484
|
+
*
|
|
485
|
+
* @deprecated Use `hide-message`.
|
|
486
|
+
*/
|
|
444
487
|
hideDetails?: boolean;
|
|
488
|
+
/**
|
|
489
|
+
* Hide the message line — the hint and error messages under the field —
|
|
490
|
+
* and the room it keeps.
|
|
491
|
+
*/
|
|
492
|
+
hideMessage?: boolean;
|
|
445
493
|
/** Hint text for the checkbox */
|
|
446
494
|
hint?: string;
|
|
447
495
|
/**
|
|
@@ -512,7 +560,7 @@ export interface CColorPickerElementEventMap {
|
|
|
512
560
|
'update:value': CustomEvent<CColorPickerValue>;
|
|
513
561
|
}
|
|
514
562
|
/** A colour field that takes any typed CSS colour, or opens a panel for picking one: a colour area, hue and alpha sliders, per-channel inputs and swatches — or swatches alone under `swatches-only`. */
|
|
515
|
-
export interface CColorPickerElement extends Omit<HTMLElement, 'alpha' | 'clearable' | 'disabled' | 'errorMessage' | 'format' | 'hideDetails' | 'hint' | 'invalid' | 'label' | 'labelOnTop' | 'name' | 'placeholder' | 'required' | 'shadow' | 'size' | 'swatches' | 'swatchesOnly' | 'texts' | 'value'> {
|
|
563
|
+
export interface CColorPickerElement extends Omit<HTMLElement, 'alpha' | 'clearable' | 'disabled' | 'errorMessage' | 'format' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'label' | 'labelOnTop' | 'name' | 'placeholder' | 'required' | 'shadow' | 'size' | 'swatches' | 'swatchesOnly' | 'texts' | 'value'> {
|
|
516
564
|
/**
|
|
517
565
|
* Let the colour carry transparency: an alpha slider and an A channel join
|
|
518
566
|
* the panel. Without it typed alpha is dropped
|
|
@@ -529,8 +577,17 @@ export interface CColorPickerElement extends Omit<HTMLElement, 'alpha' | 'cleara
|
|
|
529
577
|
* `#rrggbb`, `rgb(r g b)` or `oklch(l c h)`
|
|
530
578
|
*/
|
|
531
579
|
format?: 'hex' | 'oklch' | 'rgb';
|
|
532
|
-
/**
|
|
580
|
+
/**
|
|
581
|
+
* Hide the hint and error messages
|
|
582
|
+
*
|
|
583
|
+
* @deprecated Use `hide-message`.
|
|
584
|
+
*/
|
|
533
585
|
hideDetails?: boolean;
|
|
586
|
+
/**
|
|
587
|
+
* Hide the message line — the hint and error messages under the field —
|
|
588
|
+
* and the room it keeps.
|
|
589
|
+
*/
|
|
590
|
+
hideMessage?: boolean;
|
|
534
591
|
/** Hint text for the field */
|
|
535
592
|
hint?: string;
|
|
536
593
|
/**
|
|
@@ -713,7 +770,7 @@ export interface CDatePickerElementEventMap {
|
|
|
713
770
|
'update:value': CustomEvent<CDatePickerValue>;
|
|
714
771
|
}
|
|
715
772
|
/** A date field that takes a typed date, or opens a calendar panel for picking one, or a start and end date under `range`. */
|
|
716
|
-
export interface CDatePickerElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'disabledDates' | 'errorMessage' | 'firstDayOfWeek' | 'format' | 'hideDetails' | 'hint' | 'invalid' | 'isDateDisabled' | 'label' | 'labelOnTop' | 'max' | 'min' | 'name' | 'placeholder' | 'range' | 'required' | 'shadow' | 'showToday' | 'showWeekNumbers' | 'size' | 'texts' | 'type' | 'value'> {
|
|
773
|
+
export interface CDatePickerElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'disabledDates' | 'errorMessage' | 'firstDayOfWeek' | 'format' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'isDateDisabled' | 'label' | 'labelOnTop' | 'max' | 'min' | 'name' | 'placeholder' | 'range' | 'required' | 'shadow' | 'showToday' | 'showWeekNumbers' | 'size' | 'texts' | 'type' | 'value'> {
|
|
717
774
|
/** Make the value clearable */
|
|
718
775
|
clearable?: boolean;
|
|
719
776
|
/** Disable the field */
|
|
@@ -735,8 +792,17 @@ export interface CDatePickerElement extends Omit<HTMLElement, 'clearable' | 'dis
|
|
|
735
792
|
* `dd`, `M`, `MM` and `yyyy` with any separators, e.g. `yyyy-MM-dd`
|
|
736
793
|
*/
|
|
737
794
|
format?: string;
|
|
738
|
-
/**
|
|
795
|
+
/**
|
|
796
|
+
* Hide the hint and error messages
|
|
797
|
+
*
|
|
798
|
+
* @deprecated Use `hide-message`.
|
|
799
|
+
*/
|
|
739
800
|
hideDetails?: boolean;
|
|
801
|
+
/**
|
|
802
|
+
* Hide the message line — the hint and error messages under the field —
|
|
803
|
+
* and the room it keeps.
|
|
804
|
+
*/
|
|
805
|
+
hideMessage?: boolean;
|
|
740
806
|
/** Hint text for the field */
|
|
741
807
|
hint?: string;
|
|
742
808
|
/**
|
|
@@ -841,7 +907,7 @@ export interface CFileUploadElementEventMap {
|
|
|
841
907
|
'update:value': CustomEvent<CFileUploadEntry[]>;
|
|
842
908
|
}
|
|
843
909
|
/** A field the user adds files to by dropping them on it or choosing them from a file dialog — and, given an upload function, the place each file's upload shows its progress. */
|
|
844
|
-
export interface CFileUploadElement extends Omit<HTMLElement, 'accept' | 'compact' | 'disabled' | 'errorMessage' | 'hideDetails' | 'hint' | 'invalid' | 'label' | 'manual' | 'maxFiles' | 'maxSize' | 'multiple' | 'required' | 'size' | 'texts' | 'upload' | 'value'> {
|
|
910
|
+
export interface CFileUploadElement extends Omit<HTMLElement, 'accept' | 'compact' | 'disabled' | 'errorMessage' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'label' | 'manual' | 'maxFiles' | 'maxSize' | 'multiple' | 'required' | 'size' | 'texts' | 'upload' | 'value'> {
|
|
845
911
|
/** The file types the field takes, in the native `accept` syntax: extensions (`.pdf`) and media types (`image/*`, `application/json`), comma separated. It filters the file dialog and is checked again on a drop */
|
|
846
912
|
accept?: string;
|
|
847
913
|
/** Show the drop zone as a control-height row — a "Choose files" button and a drop prompt — that lines up with the fields beside it */
|
|
@@ -850,8 +916,17 @@ export interface CFileUploadElement extends Omit<HTMLElement, 'accept' | 'compac
|
|
|
850
916
|
disabled?: boolean;
|
|
851
917
|
/** Error message shown in place of the hint while the field is invalid */
|
|
852
918
|
errorMessage?: string;
|
|
853
|
-
/**
|
|
919
|
+
/**
|
|
920
|
+
* Hide the hint and error messages
|
|
921
|
+
*
|
|
922
|
+
* @deprecated Use `hide-message`.
|
|
923
|
+
*/
|
|
854
924
|
hideDetails?: boolean;
|
|
925
|
+
/**
|
|
926
|
+
* Hide the message line — the hint and error messages under the field —
|
|
927
|
+
* and the room it keeps.
|
|
928
|
+
*/
|
|
929
|
+
hideMessage?: boolean;
|
|
855
930
|
/** Hint text under the drop zone — the place to name the accepted types and limits */
|
|
856
931
|
hint?: string;
|
|
857
932
|
/**
|
|
@@ -905,25 +980,36 @@ export interface CIconElement extends Omit<HTMLElement, 'color' | 'path' | 'size
|
|
|
905
980
|
size?: number;
|
|
906
981
|
}
|
|
907
982
|
/** An icon-only button: a round native button that shows a single icon and takes its accessible name from an `aria-label` on the element. */
|
|
908
|
-
export interface CIconButtonElement extends Omit<HTMLElement, 'badge' | 'danger' | 'disabled' | 'ghost' | 'inverted' | 'loading' | 'outlined' | 'path' | 'size' | 'text'> {
|
|
983
|
+
export interface CIconButtonElement extends Omit<HTMLElement, 'appearance' | 'badge' | 'danger' | 'disabled' | 'ghost' | 'inverted' | 'loading' | 'outlined' | 'path' | 'size' | 'text' | 'variant'> {
|
|
984
|
+
/**
|
|
985
|
+
* The button's look: `filled` (unless set) for the main action; `outlined`
|
|
986
|
+
* (a primary outline, no fill), `ghost` (a light primary tint) or `text`
|
|
987
|
+
* (no fill or outline) for lower emphasis.
|
|
988
|
+
*/
|
|
989
|
+
appearance?: 'filled' | 'ghost' | 'outlined' | 'text';
|
|
909
990
|
/**
|
|
910
991
|
* Count shown in a bubble at the button's top-right corner; hidden while
|
|
911
992
|
* `null` or empty, so `0` still shows.
|
|
912
993
|
*/
|
|
913
994
|
badge?: null | number | string;
|
|
914
995
|
/**
|
|
915
|
-
* Danger
|
|
916
|
-
*
|
|
996
|
+
* Danger look for a destructive action: the error colour.
|
|
997
|
+
*
|
|
998
|
+
* @deprecated Use `variant="danger"`.
|
|
917
999
|
*/
|
|
918
1000
|
danger?: boolean;
|
|
919
1001
|
/** Disable the button: it leaves the Tab order and ignores the pointer. */
|
|
920
1002
|
disabled?: boolean;
|
|
921
|
-
/**
|
|
1003
|
+
/**
|
|
1004
|
+
* Ghost appearance: a light primary tint, for lower emphasis.
|
|
1005
|
+
*
|
|
1006
|
+
* @deprecated Use `appearance="ghost"`.
|
|
1007
|
+
*/
|
|
922
1008
|
ghost?: boolean;
|
|
923
1009
|
/**
|
|
924
1010
|
* Inverted colours for a fixed dark or brand-coloured backdrop: the
|
|
925
|
-
* `inverse-*` family, the same in both theme modes. Combines with
|
|
926
|
-
*
|
|
1011
|
+
* `inverse-*` family, the same in both theme modes. Combines with every
|
|
1012
|
+
* appearance.
|
|
927
1013
|
*/
|
|
928
1014
|
inverted?: boolean;
|
|
929
1015
|
/**
|
|
@@ -931,7 +1017,11 @@ export interface CIconButtonElement extends Omit<HTMLElement, 'badge' | 'danger'
|
|
|
931
1017
|
* focusable and is announced as busy and unavailable.
|
|
932
1018
|
*/
|
|
933
1019
|
loading?: boolean;
|
|
934
|
-
/**
|
|
1020
|
+
/**
|
|
1021
|
+
* Outlined appearance: a primary outline with no fill, for lower emphasis.
|
|
1022
|
+
*
|
|
1023
|
+
* @deprecated Use `appearance="outlined"`.
|
|
1024
|
+
*/
|
|
935
1025
|
outlined?: boolean;
|
|
936
1026
|
/**
|
|
937
1027
|
* Icon path of an icon the button draws itself, always 24px; a slotted icon
|
|
@@ -940,8 +1030,18 @@ export interface CIconButtonElement extends Omit<HTMLElement, 'badge' | 'danger'
|
|
|
940
1030
|
path?: string;
|
|
941
1031
|
/** Size of the button: `default` (40px), `small` (32px) or `x-small` (28px). */
|
|
942
1032
|
size?: 'default' | 'small' | 'x-small';
|
|
943
|
-
/**
|
|
1033
|
+
/**
|
|
1034
|
+
* Text appearance: no fill or outline, the lightest look.
|
|
1035
|
+
*
|
|
1036
|
+
* @deprecated Use `appearance="text"`.
|
|
1037
|
+
*/
|
|
944
1038
|
text?: boolean;
|
|
1039
|
+
/**
|
|
1040
|
+
* The button's colour, in every appearance: `primary` unless set (or
|
|
1041
|
+
* changed app-wide), `secondary`, `success`, `info`, `warning`, or `danger`
|
|
1042
|
+
* for a destructive action.
|
|
1043
|
+
*/
|
|
1044
|
+
variant?: 'danger' | 'info' | 'primary' | 'secondary' | 'success' | 'warning';
|
|
945
1045
|
}
|
|
946
1046
|
/** A text link to another page or resource: a native `<a>` in the link colour, with an optional underline. */
|
|
947
1047
|
export interface CLinkElement extends Omit<HTMLElement, 'href' | 'target' | 'underline'> {
|
|
@@ -1008,7 +1108,7 @@ export interface CListItemElement extends Omit<HTMLElement, 'active' | 'disabled
|
|
|
1008
1108
|
export interface CListItemTitleElement extends Omit<HTMLElement, 'active'> {
|
|
1009
1109
|
}
|
|
1010
1110
|
/** A loading overlay that covers a container with a translucent scrim and a centred spinner, with an optional message below it, while that container's content loads. */
|
|
1011
|
-
export interface CLoaderElement extends Omit<HTMLElement, 'contentDelay' | 'hide' | 'size' | 'width'> {
|
|
1111
|
+
export interface CLoaderElement extends Omit<HTMLElement, 'contentDelay' | 'hide' | 'size' | 'thickness' | 'width'> {
|
|
1012
1112
|
/**
|
|
1013
1113
|
* Delay, in milliseconds, before the slotted message fades in once the
|
|
1014
1114
|
* loader shows.
|
|
@@ -1022,7 +1122,13 @@ export interface CLoaderElement extends Omit<HTMLElement, 'contentDelay' | 'hide
|
|
|
1022
1122
|
hide?: boolean;
|
|
1023
1123
|
/** The spinner's diameter in pixels. */
|
|
1024
1124
|
size?: number;
|
|
1025
|
-
/** The spinner's stroke
|
|
1125
|
+
/** The spinner's stroke thickness in pixels: 4 unless set. */
|
|
1126
|
+
thickness?: number;
|
|
1127
|
+
/**
|
|
1128
|
+
* The spinner's stroke width in pixels.
|
|
1129
|
+
*
|
|
1130
|
+
* @deprecated Use `thickness`.
|
|
1131
|
+
*/
|
|
1026
1132
|
width?: number;
|
|
1027
1133
|
}
|
|
1028
1134
|
/** One identity-provider choice inside `c-login-buttons`: a card with the provider's logo (`src`, or markup in the `image` slot) above the provider's name. With an `href` it is a link to the provider's sign-in; without one it is a button whose `click` you handle. Leave `alt` empty when the name already identifies the provider. */
|
|
@@ -1245,7 +1351,7 @@ export interface CNumberFieldElementEventMap {
|
|
|
1245
1351
|
'update:value': CustomEvent<null | number>;
|
|
1246
1352
|
}
|
|
1247
1353
|
/** A field for a number — an integer, or one with decimals — shown with thousands separators as it is typed. */
|
|
1248
|
-
export interface CNumberFieldElement extends Omit<HTMLElement, 'decimals' | 'decimalSeparator' | 'disabled' | 'errorMessage' | 'fixedDecimals' | 'groupSeparator' | 'hideDetails' | 'hint' | 'invalid' | 'label' | 'labelOnTop' | 'max' | 'min' | 'name' | 'placeholder' | 'readonly' | 'required' | 'shadow' | 'size' | 'step' | 'texts' | 'value'> {
|
|
1354
|
+
export interface CNumberFieldElement extends Omit<HTMLElement, 'decimals' | 'decimalSeparator' | 'disabled' | 'errorMessage' | 'fixedDecimals' | 'groupSeparator' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'label' | 'labelOnTop' | 'max' | 'min' | 'name' | 'placeholder' | 'readonly' | 'required' | 'shadow' | 'size' | 'step' | 'texts' | 'value'> {
|
|
1249
1355
|
/** The most fraction digits the field takes; `0` makes it an integer field */
|
|
1250
1356
|
decimals?: number;
|
|
1251
1357
|
/** The decimal separator. Empty follows the page's `lang` (`,` for `fi`, `.` for `en`) */
|
|
@@ -1258,8 +1364,17 @@ export interface CNumberFieldElement extends Omit<HTMLElement, 'decimals' | 'dec
|
|
|
1258
1364
|
fixedDecimals?: boolean;
|
|
1259
1365
|
/** The thousands separator. Empty follows the page's `lang` (a space for `fi`, `,` for `en`) */
|
|
1260
1366
|
groupSeparator?: string;
|
|
1261
|
-
/**
|
|
1367
|
+
/**
|
|
1368
|
+
* Hide the hint and error messages
|
|
1369
|
+
*
|
|
1370
|
+
* @deprecated Use `hide-message`.
|
|
1371
|
+
*/
|
|
1262
1372
|
hideDetails?: boolean;
|
|
1373
|
+
/**
|
|
1374
|
+
* Hide the message line — the hint and error messages under the field —
|
|
1375
|
+
* and the room it keeps.
|
|
1376
|
+
*/
|
|
1377
|
+
hideMessage?: boolean;
|
|
1263
1378
|
/** Hint text for the field */
|
|
1264
1379
|
hint?: string;
|
|
1265
1380
|
/**
|
|
@@ -1340,13 +1455,22 @@ export interface COtpInputElementEventMap {
|
|
|
1340
1455
|
'update:value': CustomEvent<string>;
|
|
1341
1456
|
}
|
|
1342
1457
|
/** A one-time-code field: a row of single-digit boxes, filled in order as the user types or pastes a code, under a group label and above a hint or error message. */
|
|
1343
|
-
export interface COtpInputElement extends Omit<HTMLElement, 'autofocus' | 'errorMessage' | 'hideDetails' | 'hint' | 'invalid' | 'label' | 'length' | 'required' | 'value'> {
|
|
1458
|
+
export interface COtpInputElement extends Omit<HTMLElement, 'autofocus' | 'errorMessage' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'label' | 'length' | 'required' | 'value'> {
|
|
1344
1459
|
/** Focus the first digit when the field mounts. */
|
|
1345
1460
|
autofocus?: boolean;
|
|
1346
1461
|
/** Error message shown in place of the hint while the input is invalid */
|
|
1347
1462
|
errorMessage?: string;
|
|
1348
|
-
/**
|
|
1463
|
+
/**
|
|
1464
|
+
* Hide the hint and error messages
|
|
1465
|
+
*
|
|
1466
|
+
* @deprecated Use `hide-message`.
|
|
1467
|
+
*/
|
|
1349
1468
|
hideDetails?: boolean;
|
|
1469
|
+
/**
|
|
1470
|
+
* Hide the message line — the hint and error messages under the field —
|
|
1471
|
+
* and the room it keeps.
|
|
1472
|
+
*/
|
|
1473
|
+
hideMessage?: boolean;
|
|
1350
1474
|
/** Hint text for the input */
|
|
1351
1475
|
hint?: string;
|
|
1352
1476
|
/**
|
|
@@ -1524,13 +1648,22 @@ export interface CRadioGroupElementEventMap {
|
|
|
1524
1648
|
'update:value': CustomEvent<string>;
|
|
1525
1649
|
}
|
|
1526
1650
|
/** A radio group is a set of mutually exclusive choices where exactly one can be selected, authored as slotted `c-radio` children. Give the group a `label` so the choice it represents is named for every user, and a `hint` describing how to answer. */
|
|
1527
|
-
export interface CRadioGroupElement extends Omit<HTMLElement, 'disabled' | 'errorMessage' | 'hideDetails' | 'hint' | 'inline' | 'invalid' | 'label' | 'required' | 'value'> {
|
|
1651
|
+
export interface CRadioGroupElement extends Omit<HTMLElement, 'disabled' | 'errorMessage' | 'hideDetails' | 'hideMessage' | 'hint' | 'inline' | 'invalid' | 'label' | 'required' | 'value'> {
|
|
1528
1652
|
/** Disable the radio group */
|
|
1529
1653
|
disabled?: boolean;
|
|
1530
1654
|
/** Error message shown in place of the hint while the group is invalid */
|
|
1531
1655
|
errorMessage?: string;
|
|
1532
|
-
/**
|
|
1656
|
+
/**
|
|
1657
|
+
* Hide the hint and error messages
|
|
1658
|
+
*
|
|
1659
|
+
* @deprecated Use `hide-message`.
|
|
1660
|
+
*/
|
|
1533
1661
|
hideDetails?: boolean;
|
|
1662
|
+
/**
|
|
1663
|
+
* Hide the message line — the hint and error messages under the field —
|
|
1664
|
+
* and the room it keeps.
|
|
1665
|
+
*/
|
|
1666
|
+
hideMessage?: boolean;
|
|
1534
1667
|
/** Hint text for the input */
|
|
1535
1668
|
hint?: string;
|
|
1536
1669
|
/** Display radio buttons inline */
|
|
@@ -1578,15 +1711,24 @@ export interface CSelectElementEventMap {
|
|
|
1578
1711
|
'update:value': CustomEvent<CSelectValue>;
|
|
1579
1712
|
}
|
|
1580
1713
|
/** A value-selection field: a readonly field that opens a listbox of options — slotted `c-option` elements or an `items` array — and holds the picked value, emitting the value events that back `v-model`. */
|
|
1581
|
-
export interface CSelectElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'errorMessage' | 'hideDetails' | 'hint' | 'invalid' | 'items' | 'itemsPerPage' | 'label' | 'labelOnTop' | 'loading' | 'maxTags' | 'multiple' | 'name' | 'optionAsSelection' | 'placeholder' | 'required' | 'returnObject' | 'selectAll' | 'shadow' | 'size' | 'texts' | 'value'> {
|
|
1714
|
+
export interface CSelectElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'errorMessage' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'items' | 'itemsPerPage' | 'label' | 'labelOnTop' | 'loading' | 'maxTags' | 'multiple' | 'name' | 'optionAsSelection' | 'placeholder' | 'required' | 'returnObject' | 'selectAll' | 'shadow' | 'size' | 'texts' | 'value'> {
|
|
1582
1715
|
/** Make the selected value clearable */
|
|
1583
1716
|
clearable?: boolean;
|
|
1584
1717
|
/** Disable the input */
|
|
1585
1718
|
disabled?: boolean;
|
|
1586
1719
|
/** Error message shown in place of the hint while the select is invalid */
|
|
1587
1720
|
errorMessage?: string;
|
|
1588
|
-
/**
|
|
1721
|
+
/**
|
|
1722
|
+
* Hide the hint and error messages
|
|
1723
|
+
*
|
|
1724
|
+
* @deprecated Use `hide-message`.
|
|
1725
|
+
*/
|
|
1589
1726
|
hideDetails?: boolean;
|
|
1727
|
+
/**
|
|
1728
|
+
* Hide the message line — the hint and error messages under the field —
|
|
1729
|
+
* and the room it keeps.
|
|
1730
|
+
*/
|
|
1731
|
+
hideMessage?: boolean;
|
|
1590
1732
|
/** Hint text for the input */
|
|
1591
1733
|
hint?: string;
|
|
1592
1734
|
/**
|
|
@@ -1698,13 +1840,27 @@ export interface CSideNavigationItemElementEventMap {
|
|
|
1698
1840
|
value: string | undefined;
|
|
1699
1841
|
}>;
|
|
1700
1842
|
}
|
|
1701
|
-
/** One entry of a `c-side-navigation`: its label text, after an optional leading `c-icon`, goes in the default slot, and activating it fires `select` with its `value`; with `href` it is a real link, opened in `target`, and without one a button. Write `c-sub-navigation-item` children inside it to make it an expandable parent,
|
|
1702
|
-
export interface CSideNavigationItemElement extends Omit<HTMLElement, 'active' | 'collapsed' | 'href' | 'loading' | 'target' | 'value'> {
|
|
1843
|
+
/** One entry of a `c-side-navigation`: its label text, after an optional leading `c-icon`, goes in the default slot, and activating it fires `select` with its `value`; with `href` it is a real link, opened in `target`, and without one a button. Write `c-sub-navigation-item` children inside it to make it an expandable parent, shown open while `expanded`; an item without sub-items marks the page shown with `current`. */
|
|
1844
|
+
export interface CSideNavigationItemElement extends Omit<HTMLElement, 'active' | 'collapsed' | 'current' | 'expanded' | 'href' | 'loading' | 'target' | 'value'> {
|
|
1703
1845
|
/**
|
|
1704
1846
|
* On an item without sub-items, mark the current page
|
|
1705
1847
|
* (`aria-current="page"`); on a parent, expand its sub-items.
|
|
1848
|
+
*
|
|
1849
|
+
* @deprecated Use `current` on an item without sub-items and `expanded` on a parent.
|
|
1706
1850
|
*/
|
|
1707
1851
|
active?: boolean;
|
|
1852
|
+
/**
|
|
1853
|
+
* Mark the item as the page shown (`aria-current="page"`), on an item
|
|
1854
|
+
* without sub-items. Bind it from the page your router or the URL shows:
|
|
1855
|
+
* the navigation never sets it.
|
|
1856
|
+
*/
|
|
1857
|
+
current?: boolean;
|
|
1858
|
+
/**
|
|
1859
|
+
* Show a parent item's sub-items. The navigation sets it as parents open
|
|
1860
|
+
* and close, collapsing the other top-level parents; set it to open one
|
|
1861
|
+
* initially.
|
|
1862
|
+
*/
|
|
1863
|
+
expanded?: boolean;
|
|
1708
1864
|
/** URL that makes the item a real link; without it the item is a button. */
|
|
1709
1865
|
href?: string;
|
|
1710
1866
|
/** Cover the item with a loading overlay: a translucent scrim and a spinner. */
|
|
@@ -1743,7 +1899,7 @@ export interface CSliderElementEventMap {
|
|
|
1743
1899
|
'update:value': CustomEvent<number>;
|
|
1744
1900
|
}
|
|
1745
1901
|
/** A slider for picking a number from a range by dragging a thumb along a track, with a label, a value bubble and optional tick marks. */
|
|
1746
|
-
export interface CSliderElement extends Omit<HTMLElement, 'disabled' | 'disableTooltip' | 'label' | 'labels' | 'max' | 'min' | 'name' | 'segments' | 'step' | 'ticks' | 'unit' | 'value'> {
|
|
1902
|
+
export interface CSliderElement extends Omit<HTMLElement, 'disabled' | 'disableTooltip' | 'label' | 'labels' | 'max' | 'min' | 'name' | 'segments' | 'step' | 'tickLabels' | 'ticks' | 'unit' | 'value'> {
|
|
1747
1903
|
/** Disable the slider */
|
|
1748
1904
|
disabled?: boolean;
|
|
1749
1905
|
/**
|
|
@@ -1756,6 +1912,8 @@ export interface CSliderElement extends Omit<HTMLElement, 'disabled' | 'disableT
|
|
|
1756
1912
|
/**
|
|
1757
1913
|
* Write a number under the track at each tick mark position, `segments`
|
|
1758
1914
|
* apart, formatted like the value bubble's; shown with or without `ticks`
|
|
1915
|
+
*
|
|
1916
|
+
* @deprecated Use `tick-labels`.
|
|
1759
1917
|
*/
|
|
1760
1918
|
labels?: boolean;
|
|
1761
1919
|
/** The largest value. */
|
|
@@ -1771,6 +1929,11 @@ export interface CSliderElement extends Omit<HTMLElement, 'disabled' | 'disableT
|
|
|
1771
1929
|
segments?: number;
|
|
1772
1930
|
/** Step between values. */
|
|
1773
1931
|
step?: number;
|
|
1932
|
+
/**
|
|
1933
|
+
* Write a number under the track at each tick mark position, `segments`
|
|
1934
|
+
* apart, formatted like the value bubble's; shown with or without `ticks`
|
|
1935
|
+
*/
|
|
1936
|
+
tickLabels?: boolean;
|
|
1774
1937
|
/** Draw tick marks along the track, `segments` apart. */
|
|
1775
1938
|
ticks?: boolean;
|
|
1776
1939
|
/** Unit shown after the value in the tooltip and read with it, e.g. `%`. */
|
|
@@ -1788,7 +1951,7 @@ export interface CSliderElement extends Omit<HTMLElement, 'disabled' | 'disableT
|
|
|
1788
1951
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1789
1952
|
}
|
|
1790
1953
|
/** A circular indeterminate activity indicator — pure motion with no value, for waits of unknown duration. */
|
|
1791
|
-
export interface CSpinnerElement extends Omit<HTMLElement, 'color' | 'size' | 'width'> {
|
|
1954
|
+
export interface CSpinnerElement extends Omit<HTMLElement, 'color' | 'size' | 'thickness' | 'width'> {
|
|
1792
1955
|
/**
|
|
1793
1956
|
* Stroke colour, the primary role by default; `currentColor` follows the
|
|
1794
1957
|
* surrounding text colour.
|
|
@@ -1796,7 +1959,13 @@ export interface CSpinnerElement extends Omit<HTMLElement, 'color' | 'size' | 'w
|
|
|
1796
1959
|
color?: string;
|
|
1797
1960
|
/** Diameter in pixels. */
|
|
1798
1961
|
size?: number;
|
|
1799
|
-
/** Stroke
|
|
1962
|
+
/** Stroke thickness in pixels: 2 unless set. */
|
|
1963
|
+
thickness?: number;
|
|
1964
|
+
/**
|
|
1965
|
+
* Stroke width in pixels.
|
|
1966
|
+
*
|
|
1967
|
+
* @deprecated Use `thickness`.
|
|
1968
|
+
*/
|
|
1800
1969
|
width?: number;
|
|
1801
1970
|
}
|
|
1802
1971
|
/** A status pill: a short word naming the state of a record, such as Active, Pending or Failed, tinted with the colours of its status type. */
|
|
@@ -1825,13 +1994,21 @@ export interface CSubNavigationItemElementEventMap {
|
|
|
1825
1994
|
value: string | undefined;
|
|
1826
1995
|
}>;
|
|
1827
1996
|
}
|
|
1828
|
-
/** A second-level entry of a `c-side-navigation`, written inside the `c-side-navigation-item` it belongs to (no `slot` attribute needed) and shown while that parent is `
|
|
1829
|
-
export interface CSubNavigationItemElement extends Omit<HTMLElement, 'active' | 'collapsed' | 'href' | 'loading' | 'target' | 'value'> {
|
|
1997
|
+
/** A second-level entry of a `c-side-navigation`, written inside the `c-side-navigation-item` it belongs to (no `slot` attribute needed) and shown while that parent is `expanded`. Activating it fires `select` with its `value` and closes the mobile drawer. It does not mark itself as the current page: set `current` on the sub-item of the page shown, and `expanded` on its parent. */
|
|
1998
|
+
export interface CSubNavigationItemElement extends Omit<HTMLElement, 'active' | 'collapsed' | 'current' | 'href' | 'loading' | 'target' | 'value'> {
|
|
1830
1999
|
/**
|
|
1831
2000
|
* Mark the sub-item as the current page (`aria-current="page"`); set `active`
|
|
1832
2001
|
* on its parent item too, so the parent is expanded.
|
|
2002
|
+
*
|
|
2003
|
+
* @deprecated Use `current`.
|
|
1833
2004
|
*/
|
|
1834
2005
|
active?: boolean;
|
|
2006
|
+
/**
|
|
2007
|
+
* Mark the sub-item as the page shown (`aria-current="page"`), and set
|
|
2008
|
+
* `expanded` on its parent item so the parent is open. Bind it from the
|
|
2009
|
+
* page your router or the URL shows: the navigation never sets it.
|
|
2010
|
+
*/
|
|
2011
|
+
current?: boolean;
|
|
1835
2012
|
/**
|
|
1836
2013
|
* URL that makes the sub-item a real link; without it the sub-item is a
|
|
1837
2014
|
* button.
|
|
@@ -2075,7 +2252,7 @@ export interface CTextFieldElementEventMap {
|
|
|
2075
2252
|
'update:value': CustomEvent<string>;
|
|
2076
2253
|
}
|
|
2077
2254
|
/** A text field for a single line of text, or several lines under `rows`, with a label, a hint and an error message. */
|
|
2078
|
-
export interface CTextFieldElement extends Omit<HTMLElement, 'autocapitalize' | 'autocomplete' | 'autocorrect' | 'autofocus' | 'disabled' | 'errorMessage' | 'hideDetails' | 'hint' | 'invalid' | 'label' | 'labelOnTop' | 'mask' | 'max' | 'min' | 'name' | 'placeholder' | 'readonly' | 'required' | 'rows' | 'shadow' | 'size' | 'step' | 'trimWhitespace' | 'type' | 'value'> {
|
|
2255
|
+
export interface CTextFieldElement extends Omit<HTMLElement, 'autocapitalize' | 'autocomplete' | 'autocorrect' | 'autofocus' | 'disabled' | 'errorMessage' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'label' | 'labelOnTop' | 'mask' | 'max' | 'min' | 'name' | 'placeholder' | 'readonly' | 'required' | 'rows' | 'shadow' | 'size' | 'step' | 'trimWhitespace' | 'type' | 'value'> {
|
|
2079
2256
|
/**
|
|
2080
2257
|
* How on-screen keyboards capitalize typed text, as the native
|
|
2081
2258
|
* `autocapitalize` attribute; unset leaves the browser's default
|
|
@@ -2103,8 +2280,17 @@ export interface CTextFieldElement extends Omit<HTMLElement, 'autocapitalize' |
|
|
|
2103
2280
|
disabled?: boolean;
|
|
2104
2281
|
/** Error message shown in place of the hint while the input is invalid */
|
|
2105
2282
|
errorMessage?: string;
|
|
2106
|
-
/**
|
|
2283
|
+
/**
|
|
2284
|
+
* Hide the hint and error messages
|
|
2285
|
+
*
|
|
2286
|
+
* @deprecated Use `hide-message`.
|
|
2287
|
+
*/
|
|
2107
2288
|
hideDetails?: boolean;
|
|
2289
|
+
/**
|
|
2290
|
+
* Hide the message line — the hint and error messages under the field —
|
|
2291
|
+
* and the room it keeps.
|
|
2292
|
+
*/
|
|
2293
|
+
hideMessage?: boolean;
|
|
2108
2294
|
/** Hint text for the input */
|
|
2109
2295
|
hint?: string;
|
|
2110
2296
|
/**
|
|
@@ -2203,7 +2389,7 @@ export interface CTimePickerElementEventMap {
|
|
|
2203
2389
|
'update:value': CustomEvent<CTimePickerValue>;
|
|
2204
2390
|
}
|
|
2205
2391
|
/** A time field that takes a typed time, or opens hour and minute columns for picking one, or a start and end time under `range`. */
|
|
2206
|
-
export interface CTimePickerElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'errorMessage' | 'format' | 'hideDetails' | 'hint' | 'invalid' | 'label' | 'labelOnTop' | 'max' | 'min' | 'minuteStep' | 'name' | 'placeholder' | 'range' | 'required' | 'shadow' | 'showNow' | 'size' | 'texts' | 'value'> {
|
|
2392
|
+
export interface CTimePickerElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'errorMessage' | 'format' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'label' | 'labelOnTop' | 'max' | 'min' | 'minuteStep' | 'name' | 'placeholder' | 'range' | 'required' | 'shadow' | 'showNow' | 'size' | 'texts' | 'value'> {
|
|
2207
2393
|
/** Make the value clearable */
|
|
2208
2394
|
clearable?: boolean;
|
|
2209
2395
|
/** Disable the field */
|
|
@@ -2216,8 +2402,17 @@ export interface CTimePickerElement extends Omit<HTMLElement, 'clearable' | 'dis
|
|
|
2216
2402
|
* any separators, e.g. `HH:mm` or `h:mm a`
|
|
2217
2403
|
*/
|
|
2218
2404
|
format?: string;
|
|
2219
|
-
/**
|
|
2405
|
+
/**
|
|
2406
|
+
* Hide the hint and error messages
|
|
2407
|
+
*
|
|
2408
|
+
* @deprecated Use `hide-message`.
|
|
2409
|
+
*/
|
|
2220
2410
|
hideDetails?: boolean;
|
|
2411
|
+
/**
|
|
2412
|
+
* Hide the message line — the hint and error messages under the field —
|
|
2413
|
+
* and the room it keeps.
|
|
2414
|
+
*/
|
|
2415
|
+
hideMessage?: boolean;
|
|
2221
2416
|
/** Hint text for the field */
|
|
2222
2417
|
hint?: string;
|
|
2223
2418
|
/**
|
|
@@ -2291,19 +2486,40 @@ export interface CToastsElementEventMap {
|
|
|
2291
2486
|
close: CustomEvent<CToastMessage>;
|
|
2292
2487
|
}
|
|
2293
2488
|
/** Toasts are passive, transient notifications — operation results, background progress — stacked and managed by a single `c-toasts` container via its `addToast` / `removeToast` methods. `addToast` returns the message's `id` (its own, or a generated one), which `removeToast` takes; `close` fires on the container with the message once a toast has left. */
|
|
2294
|
-
export interface CToastsElement extends Omit<HTMLElement, 'absolute' | 'horizontal' | 'vertical'> {
|
|
2489
|
+
export interface CToastsElement extends Omit<HTMLElement, 'absolute' | 'contained' | 'horizontal' | 'position' | 'vertical'> {
|
|
2295
2490
|
/**
|
|
2296
2491
|
* Places the stack in its nearest positioned ancestor instead of the
|
|
2297
2492
|
* viewport, for in-container notifications. Such a stack is not
|
|
2298
2493
|
* guaranteed to paint above an open modal.
|
|
2494
|
+
*
|
|
2495
|
+
* @deprecated Use `contained`.
|
|
2299
2496
|
*/
|
|
2300
2497
|
absolute?: boolean;
|
|
2498
|
+
/**
|
|
2499
|
+
* Keep the stack inside its nearest positioned ancestor instead of the
|
|
2500
|
+
* viewport, for in-container notifications. Such a stack is not
|
|
2501
|
+
* guaranteed to paint above an open modal.
|
|
2502
|
+
*/
|
|
2503
|
+
contained?: boolean;
|
|
2301
2504
|
/**
|
|
2302
2505
|
* Where the stack sits across the viewport, or across its container
|
|
2303
2506
|
* under `absolute`.
|
|
2507
|
+
*
|
|
2508
|
+
* @deprecated Use `position`.
|
|
2304
2509
|
*/
|
|
2305
2510
|
horizontal?: 'center' | 'left' | 'right';
|
|
2306
|
-
/**
|
|
2511
|
+
/**
|
|
2512
|
+
* Where the stack sits in the viewport, or in its container when
|
|
2513
|
+
* `contained`: `bottom` (unless set), `bottom-start`, `bottom-end`,
|
|
2514
|
+
* `top`, `top-start` or `top-end`. Toasts slide in from the top or bottom
|
|
2515
|
+
* edge.
|
|
2516
|
+
*/
|
|
2517
|
+
position?: 'bottom-end' | 'bottom-start' | 'bottom' | 'top-end' | 'top-start' | 'top';
|
|
2518
|
+
/**
|
|
2519
|
+
* The edge the stack is anchored to; toasts slide in from it.
|
|
2520
|
+
*
|
|
2521
|
+
* @deprecated Use `position`.
|
|
2522
|
+
*/
|
|
2307
2523
|
vertical?: 'bottom' | 'top';
|
|
2308
2524
|
/**
|
|
2309
2525
|
* Show a message as a toast and return its `id` — the message's own, or a
|
|
@@ -2392,7 +2608,7 @@ export interface CTreeSelectElementEventMap {
|
|
|
2392
2608
|
'update:value': CustomEvent<CTreeSelectValue>;
|
|
2393
2609
|
}
|
|
2394
2610
|
/** A hierarchical value-selection component: a readonly value field that opens a panel for browsing a tree one level at a time, or searching it as a whole, to commit one item. */
|
|
2395
|
-
export interface CTreeSelectElement extends Omit<HTMLElement, 'allowBranch' | 'clearable' | 'disabled' | 'errorMessage' | 'filter' | 'hideDetails' | 'hint' | 'invalid' | 'items' | 'itemsPerPage' | 'label' | 'labelOnTop' | 'levelLabels' | 'name' | 'placeholder' | 'required' | 'returnObject' | 'shadow' | 'size' | 'texts' | 'value'> {
|
|
2611
|
+
export interface CTreeSelectElement extends Omit<HTMLElement, 'allowBranch' | 'clearable' | 'disabled' | 'errorMessage' | 'filter' | 'hideDetails' | 'hideMessage' | 'hint' | 'invalid' | 'items' | 'itemsPerPage' | 'label' | 'labelOnTop' | 'levelLabels' | 'name' | 'placeholder' | 'required' | 'returnObject' | 'shadow' | 'size' | 'texts' | 'value'> {
|
|
2396
2612
|
/**
|
|
2397
2613
|
* Let a branch be committed as the value: a pinned select-branch row heads
|
|
2398
2614
|
* every level below the root, and matching branches are listed as search
|
|
@@ -2410,8 +2626,17 @@ export interface CTreeSelectElement extends Omit<HTMLElement, 'allowBranch' | 'c
|
|
|
2410
2626
|
* ancestors. Functions have no attribute form — bind as a DOM property
|
|
2411
2627
|
*/
|
|
2412
2628
|
filter?: CTreeSelectFilter;
|
|
2413
|
-
/**
|
|
2629
|
+
/**
|
|
2630
|
+
* Hide the hint and error messages
|
|
2631
|
+
*
|
|
2632
|
+
* @deprecated Use `hide-message`.
|
|
2633
|
+
*/
|
|
2414
2634
|
hideDetails?: boolean;
|
|
2635
|
+
/**
|
|
2636
|
+
* Hide the message line — the hint and error messages under the field —
|
|
2637
|
+
* and the room it keeps.
|
|
2638
|
+
*/
|
|
2639
|
+
hideMessage?: boolean;
|
|
2415
2640
|
/** Hint text for the field */
|
|
2416
2641
|
hint?: string;
|
|
2417
2642
|
/**
|
|
@@ -2478,35 +2703,39 @@ export interface CTreeSelectElement extends Omit<HTMLElement, 'allowBranch' | 'c
|
|
|
2478
2703
|
* always wins over an app default.
|
|
2479
2704
|
*/
|
|
2480
2705
|
export interface CAppDefaults {
|
|
2481
|
-
'c-autocomplete'?: Partial<Pick<CAutocompleteElement, 'hideDetails' | 'itemsPerPage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
|
|
2706
|
+
'c-autocomplete'?: Partial<Pick<CAutocompleteElement, 'hideDetails' | 'hideMessage' | 'itemsPerPage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
|
|
2482
2707
|
'c-breadcrumb'?: Partial<Pick<CBreadcrumbElement, 'texts'>>;
|
|
2483
|
-
'c-
|
|
2708
|
+
'c-button'?: Partial<Pick<CButtonElement, 'variant'>>;
|
|
2709
|
+
'c-color-picker'?: Partial<Pick<CColorPickerElement, 'alpha' | 'format' | 'hideDetails' | 'hideMessage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
|
|
2484
2710
|
'c-data-table'?: Partial<Pick<CDataTableElement, 'texts'>>;
|
|
2485
|
-
'c-date-picker'?: Partial<Pick<CDatePickerElement, 'firstDayOfWeek' | 'format' | 'hideDetails' | 'labelOnTop' | 'shadow' | 'showToday' | 'showWeekNumbers' | 'size' | 'texts'>>;
|
|
2486
|
-
'c-file-upload'?: Partial<Pick<CFileUploadElement, 'compact' | 'hideDetails' | 'size' | 'texts'>>;
|
|
2711
|
+
'c-date-picker'?: Partial<Pick<CDatePickerElement, 'firstDayOfWeek' | 'format' | 'hideDetails' | 'hideMessage' | 'labelOnTop' | 'shadow' | 'showToday' | 'showWeekNumbers' | 'size' | 'texts'>>;
|
|
2712
|
+
'c-file-upload'?: Partial<Pick<CFileUploadElement, 'compact' | 'hideDetails' | 'hideMessage' | 'size' | 'texts'>>;
|
|
2713
|
+
'c-icon-button'?: Partial<Pick<CIconButtonElement, 'variant'>>;
|
|
2487
2714
|
'c-navigation-button'?: Partial<Pick<CNavigationButtonElement, 'texts'>>;
|
|
2488
|
-
'c-number-field'?: Partial<Pick<CNumberFieldElement, 'decimalSeparator' | 'decimals' | 'fixedDecimals' | 'groupSeparator' | 'hideDetails' | 'labelOnTop' | 'shadow' | 'size' | 'step' | 'texts'>>;
|
|
2715
|
+
'c-number-field'?: Partial<Pick<CNumberFieldElement, 'decimalSeparator' | 'decimals' | 'fixedDecimals' | 'groupSeparator' | 'hideDetails' | 'hideMessage' | 'labelOnTop' | 'shadow' | 'size' | 'step' | 'texts'>>;
|
|
2489
2716
|
'c-pagination'?: Partial<Pick<CPaginationElement, 'texts'>>;
|
|
2490
|
-
'c-select'?: Partial<Pick<CSelectElement, 'hideDetails' | 'itemsPerPage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
|
|
2491
|
-
'c-text-field'?: Partial<Pick<CTextFieldElement, 'hideDetails' | 'labelOnTop' | 'shadow' | 'size'>>;
|
|
2492
|
-
'c-time-picker'?: Partial<Pick<CTimePickerElement, 'format' | 'hideDetails' | 'labelOnTop' | 'shadow' | 'showNow' | 'size' | 'texts'>>;
|
|
2493
|
-
'c-tree-select'?: Partial<Pick<CTreeSelectElement, 'hideDetails' | 'itemsPerPage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
|
|
2717
|
+
'c-select'?: Partial<Pick<CSelectElement, 'hideDetails' | 'hideMessage' | 'itemsPerPage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
|
|
2718
|
+
'c-text-field'?: Partial<Pick<CTextFieldElement, 'hideDetails' | 'hideMessage' | 'labelOnTop' | 'shadow' | 'size'>>;
|
|
2719
|
+
'c-time-picker'?: Partial<Pick<CTimePickerElement, 'format' | 'hideDetails' | 'hideMessage' | 'labelOnTop' | 'shadow' | 'showNow' | 'size' | 'texts'>>;
|
|
2720
|
+
'c-tree-select'?: Partial<Pick<CTreeSelectElement, 'hideDetails' | 'hideMessage' | 'itemsPerPage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
|
|
2494
2721
|
}
|
|
2495
2722
|
/** Runtime allow-list behind `applyDefaults()` validation — the same data as `CAppDefaults`. */
|
|
2496
2723
|
export declare const DEFAULTABLE_PROPS: {
|
|
2497
|
-
readonly 'c-autocomplete': readonly ["hideDetails", "itemsPerPage", "labelOnTop", "shadow", "size", "texts"];
|
|
2724
|
+
readonly 'c-autocomplete': readonly ["hideDetails", "hideMessage", "itemsPerPage", "labelOnTop", "shadow", "size", "texts"];
|
|
2498
2725
|
readonly 'c-breadcrumb': readonly ["texts"];
|
|
2499
|
-
readonly 'c-
|
|
2726
|
+
readonly 'c-button': readonly ["variant"];
|
|
2727
|
+
readonly 'c-color-picker': readonly ["alpha", "format", "hideDetails", "hideMessage", "labelOnTop", "shadow", "size", "texts"];
|
|
2500
2728
|
readonly 'c-data-table': readonly ["texts"];
|
|
2501
|
-
readonly 'c-date-picker': readonly ["firstDayOfWeek", "format", "hideDetails", "labelOnTop", "shadow", "showToday", "showWeekNumbers", "size", "texts"];
|
|
2502
|
-
readonly 'c-file-upload': readonly ["compact", "hideDetails", "size", "texts"];
|
|
2729
|
+
readonly 'c-date-picker': readonly ["firstDayOfWeek", "format", "hideDetails", "hideMessage", "labelOnTop", "shadow", "showToday", "showWeekNumbers", "size", "texts"];
|
|
2730
|
+
readonly 'c-file-upload': readonly ["compact", "hideDetails", "hideMessage", "size", "texts"];
|
|
2731
|
+
readonly 'c-icon-button': readonly ["variant"];
|
|
2503
2732
|
readonly 'c-navigation-button': readonly ["texts"];
|
|
2504
|
-
readonly 'c-number-field': readonly ["decimalSeparator", "decimals", "fixedDecimals", "groupSeparator", "hideDetails", "labelOnTop", "shadow", "size", "step", "texts"];
|
|
2733
|
+
readonly 'c-number-field': readonly ["decimalSeparator", "decimals", "fixedDecimals", "groupSeparator", "hideDetails", "hideMessage", "labelOnTop", "shadow", "size", "step", "texts"];
|
|
2505
2734
|
readonly 'c-pagination': readonly ["texts"];
|
|
2506
|
-
readonly 'c-select': readonly ["hideDetails", "itemsPerPage", "labelOnTop", "shadow", "size", "texts"];
|
|
2507
|
-
readonly 'c-text-field': readonly ["hideDetails", "labelOnTop", "shadow", "size"];
|
|
2508
|
-
readonly 'c-time-picker': readonly ["format", "hideDetails", "labelOnTop", "shadow", "showNow", "size", "texts"];
|
|
2509
|
-
readonly 'c-tree-select': readonly ["hideDetails", "itemsPerPage", "labelOnTop", "shadow", "size", "texts"];
|
|
2735
|
+
readonly 'c-select': readonly ["hideDetails", "hideMessage", "itemsPerPage", "labelOnTop", "shadow", "size", "texts"];
|
|
2736
|
+
readonly 'c-text-field': readonly ["hideDetails", "hideMessage", "labelOnTop", "shadow", "size"];
|
|
2737
|
+
readonly 'c-time-picker': readonly ["format", "hideDetails", "hideMessage", "labelOnTop", "shadow", "showNow", "size", "texts"];
|
|
2738
|
+
readonly 'c-tree-select': readonly ["hideDetails", "hideMessage", "itemsPerPage", "labelOnTop", "shadow", "size", "texts"];
|
|
2510
2739
|
};
|
|
2511
2740
|
/** Tags dispatching the v-model contract event `update:value` — the value controls (CONTEXT.md). */
|
|
2512
2741
|
export declare const VALUE_TAGS: readonly ["c-accordion", "c-autocomplete", "c-button-group", "c-checkbox", "c-color-picker", "c-date-picker", "c-file-upload", "c-modal", "c-number-field", "c-otp-input", "c-pagination", "c-radio-group", "c-select", "c-slider", "c-switch", "c-tabs", "c-text-field", "c-time-picker", "c-tree-select"];
|