@cscfi/csc-ui 4.0.0-alpha.9 → 4.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +36 -2
  2. package/dist/csc-ui.js +22771 -14908
  3. package/dist/custom-elements.json +8943 -5632
  4. package/dist/docs/c-accordion/usage.md +60 -0
  5. package/dist/docs/c-accordion-item/usage.md +1 -0
  6. package/dist/docs/c-alert/usage.md +5 -5
  7. package/dist/docs/c-autocomplete/usage.md +156 -0
  8. package/dist/docs/c-badge/usage.md +50 -0
  9. package/dist/docs/c-breadcrumb/usage.md +104 -0
  10. package/dist/docs/c-breadcrumb-item/usage.md +1 -0
  11. package/dist/docs/c-button/usage.md +13 -0
  12. package/dist/docs/c-button-group/usage.md +16 -2
  13. package/dist/docs/c-card/usage.md +55 -0
  14. package/dist/docs/c-card-actions/usage.md +1 -0
  15. package/dist/docs/c-card-content/usage.md +1 -0
  16. package/dist/docs/c-card-title/usage.md +3 -0
  17. package/dist/docs/c-checkbox/usage.md +37 -5
  18. package/dist/docs/c-color-picker/usage.md +160 -0
  19. package/dist/docs/c-csc-logo/usage.md +25 -0
  20. package/dist/docs/c-data-table/usage.md +180 -0
  21. package/dist/docs/c-date-picker/usage.md +224 -0
  22. package/dist/docs/c-divider/usage.md +36 -0
  23. package/dist/docs/c-file-upload/usage.md +189 -0
  24. package/dist/docs/c-icon/usage.md +51 -0
  25. package/dist/docs/c-icon-button/usage.md +80 -0
  26. package/dist/docs/c-link/usage.md +45 -1
  27. package/dist/docs/c-list/usage.md +50 -0
  28. package/dist/docs/c-list-item/usage.md +1 -0
  29. package/dist/docs/c-list-item-title/usage.md +1 -0
  30. package/dist/docs/c-loader/usage.md +52 -1
  31. package/dist/docs/c-login-button/usage.md +1 -0
  32. package/dist/docs/c-login-buttons/usage.md +48 -0
  33. package/dist/docs/c-login-card/usage.md +45 -0
  34. package/dist/docs/c-login-card-actions/usage.md +1 -0
  35. package/dist/docs/c-login-card-content/usage.md +1 -0
  36. package/dist/docs/c-login-card-title/usage.md +3 -0
  37. package/dist/docs/c-main/usage.md +21 -1
  38. package/dist/docs/c-menu/usage.md +15 -0
  39. package/dist/docs/c-menu-item/usage.md +11 -0
  40. package/dist/docs/c-message/usage.md +56 -0
  41. package/dist/docs/c-modal/usage.md +18 -12
  42. package/dist/docs/c-navigation-button/usage.md +32 -0
  43. package/dist/docs/c-number-field/usage.md +114 -0
  44. package/dist/docs/c-option/usage.md +1 -0
  45. package/dist/docs/c-option-value/usage.md +1 -0
  46. package/dist/docs/c-otp-input/usage.md +95 -0
  47. package/dist/docs/c-page/usage.md +44 -0
  48. package/dist/docs/c-pagination/usage.md +69 -0
  49. package/dist/docs/c-popover/usage.md +1 -1
  50. package/dist/docs/c-progress-bar/usage.md +1 -1
  51. package/dist/docs/c-progress-circle/usage.md +1 -1
  52. package/dist/docs/c-radio/usage.md +9 -6
  53. package/dist/docs/c-radio-group/usage.md +5 -6
  54. package/dist/docs/c-select/usage.md +131 -0
  55. package/dist/docs/c-side-navigation/usage.md +70 -0
  56. package/dist/docs/c-side-navigation-item/usage.md +1 -0
  57. package/dist/docs/c-side-navigation-title/usage.md +1 -0
  58. package/dist/docs/c-slider/usage.md +78 -0
  59. package/dist/docs/c-spinner/usage.md +1 -1
  60. package/dist/docs/c-status/usage.md +46 -0
  61. package/dist/docs/c-step/usage.md +1 -0
  62. package/dist/docs/c-steps/usage.md +35 -0
  63. package/dist/docs/c-sub-navigation-item/usage.md +1 -0
  64. package/dist/docs/c-switch/usage.md +10 -3
  65. package/dist/docs/c-tab/usage.md +1 -0
  66. package/dist/docs/c-tab-buttons/usage.md +15 -0
  67. package/dist/docs/c-tab-item/usage.md +1 -0
  68. package/dist/docs/c-tab-items/usage.md +1 -0
  69. package/dist/docs/c-table/usage.md +1 -1
  70. package/dist/docs/c-tabs/usage.md +77 -0
  71. package/dist/docs/c-tag/usage.md +1 -0
  72. package/dist/docs/c-tags/usage.md +85 -0
  73. package/dist/docs/c-text-field/usage.md +109 -0
  74. package/dist/docs/c-time-picker/usage.md +170 -0
  75. package/dist/docs/c-toasts/usage.md +27 -3
  76. package/dist/docs/c-toolbar/usage.md +17 -0
  77. package/dist/docs/c-tree-select/usage.md +156 -0
  78. package/dist/floating-ui.dom-DvzxEaDJ.js +1292 -0
  79. package/dist/styles/css/tailwind-theme.css +2 -1
  80. package/dist/styles/css/tokens.css +609 -178
  81. package/dist/vscode.css-custom-data.json +556 -99
  82. package/dist/vscode.html-custom-data.json +1050 -480
  83. package/dist/web-types.json +3303 -1707
  84. package/dist-types/components/c-accordion/CAccordion.vue.d.ts +21 -25
  85. package/dist-types/components/c-accordion-item/CAccordionItem.vue.d.ts +13 -12
  86. package/dist-types/components/c-alert/CAlert.vue.d.ts +12 -17
  87. package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +124 -31
  88. package/dist-types/components/c-breadcrumb/CBreadcrumb.vue.d.ts +35 -0
  89. package/dist-types/components/c-breadcrumb/fit.d.ts +29 -0
  90. package/dist-types/components/c-breadcrumb-item/CBreadcrumbItem.vue.d.ts +31 -0
  91. package/dist-types/components/c-button/CButton.vue.d.ts +52 -63
  92. package/dist-types/components/c-button-group/CButtonGroup.vue.d.ts +16 -14
  93. package/dist-types/components/c-card/CCard.vue.d.ts +2 -3
  94. package/dist-types/components/c-card-actions/CCardActions.vue.d.ts +5 -7
  95. package/dist-types/components/c-card-title/CCardTitle.vue.d.ts +11 -1
  96. package/dist-types/components/c-checkbox/CCheckbox.vue.d.ts +33 -52
  97. package/dist-types/components/c-color-picker/CColorPicker.vue.d.ts +189 -0
  98. package/dist-types/components/c-color-picker/colors.d.ts +66 -0
  99. package/dist-types/components/c-csc-logo/CCscLogo.vue.d.ts +1 -3
  100. package/dist-types/components/c-data-table/CDataTable.vue.d.ts +75 -51
  101. package/dist-types/components/c-date-picker/CDatePicker.vue.d.ts +277 -0
  102. package/dist-types/components/c-date-picker/dates.d.ts +119 -0
  103. package/dist-types/components/c-dropdown/CDropdown.vue.d.ts +51 -8
  104. package/dist-types/components/c-file-upload/CFileUpload.vue.d.ts +204 -0
  105. package/dist-types/components/c-file-upload/files.d.ts +99 -0
  106. package/dist-types/components/c-icon-button/CIconButton.vue.d.ts +23 -36
  107. package/dist-types/components/c-input/CInput.vue.d.ts +21 -43
  108. package/dist-types/components/c-link/CLink.vue.d.ts +6 -14
  109. package/dist-types/components/c-list/CList.vue.d.ts +4 -6
  110. package/dist-types/components/c-list-item/CListItem.vue.d.ts +14 -19
  111. package/dist-types/components/c-list-item-title/CListItemTitle.vue.d.ts +3 -2
  112. package/dist-types/components/c-loader/CLoader.vue.d.ts +13 -29
  113. package/dist-types/components/c-login-button/CLoginButton.vue.d.ts +9 -9
  114. package/dist-types/components/c-login-card/CLoginCard.vue.d.ts +11 -16
  115. package/dist-types/components/c-login-card-actions/CLoginCardActions.vue.d.ts +5 -7
  116. package/dist-types/components/c-login-card-title/CLoginCardTitle.vue.d.ts +11 -1
  117. package/dist-types/components/c-main/CMain.vue.d.ts +12 -5
  118. package/dist-types/components/c-menu/CMenu.vue.d.ts +17 -16
  119. package/dist-types/components/c-menu-item/CMenuItem.vue.d.ts +27 -35
  120. package/dist-types/components/c-message/CMessage.vue.d.ts +5 -15
  121. package/dist-types/components/c-modal/CModal.vue.d.ts +3 -3
  122. package/dist-types/components/c-navigation-button/CNavigationButton.vue.d.ts +20 -1
  123. package/dist-types/components/c-number-field/CNumberField.vue.d.ts +169 -0
  124. package/dist-types/components/c-number-field/numbers.d.ts +58 -0
  125. package/dist-types/components/c-option/COption.vue.d.ts +1 -1
  126. package/dist-types/components/c-otp-input/COtpInput.vue.d.ts +16 -30
  127. package/dist-types/components/c-page/CPage.vue.d.ts +2 -3
  128. package/dist-types/components/c-pagination/CPagination.vue.d.ts +56 -26
  129. package/dist-types/components/c-popover/CPopover.vue.d.ts +11 -7
  130. package/dist-types/components/c-progress-bar/CProgressBar.vue.d.ts +10 -14
  131. package/dist-types/components/c-progress-circle/CProgressCircle.vue.d.ts +7 -7
  132. package/dist-types/components/c-radio-group/CRadioGroup.vue.d.ts +11 -8
  133. package/dist-types/components/c-select/CSelect.vue.d.ts +119 -35
  134. package/dist-types/components/c-side-navigation/CSideNavigation.vue.d.ts +10 -18
  135. package/dist-types/components/c-side-navigation-item/CSideNavigationItem.vue.d.ts +22 -14
  136. package/dist-types/components/c-slider/CSlider.vue.d.ts +29 -73
  137. package/dist-types/components/c-spinner/CSpinner.vue.d.ts +4 -8
  138. package/dist-types/components/c-status/CStatus.vue.d.ts +8 -9
  139. package/dist-types/components/c-step/CStep.vue.d.ts +6 -4
  140. package/dist-types/components/c-steps/CSteps.vue.d.ts +3 -7
  141. package/dist-types/components/c-sub-navigation-item/CSubNavigationItem.vue.d.ts +23 -17
  142. package/dist-types/components/c-switch/CSwitch.vue.d.ts +17 -30
  143. package/dist-types/components/c-tab/CTab.vue.d.ts +11 -28
  144. package/dist-types/components/c-tab-buttons/CTabButtons.vue.d.ts +11 -13
  145. package/dist-types/components/c-tab-item/CTabItem.vue.d.ts +4 -5
  146. package/dist-types/components/c-tab-items/CTabItems.vue.d.ts +5 -4
  147. package/dist-types/components/c-table/CTable.vue.d.ts +7 -7
  148. package/dist-types/components/c-tabs/CTabs.vue.d.ts +13 -20
  149. package/dist-types/components/c-tag/CTag.vue.d.ts +22 -21
  150. package/dist-types/components/c-tags/CTags.vue.d.ts +9 -10
  151. package/dist-types/components/c-text-field/CTextField.vue.d.ts +74 -77
  152. package/dist-types/components/c-time-picker/CTimePicker.vue.d.ts +205 -0
  153. package/dist-types/components/c-time-picker/times.d.ts +82 -0
  154. package/dist-types/components/c-toast/CToast.vue.d.ts +3 -4
  155. package/dist-types/components/c-toast/swipe.d.ts +40 -0
  156. package/dist-types/components/c-toasts/CToasts.vue.d.ts +14 -16
  157. package/dist-types/components/c-toolbar/CToolbar.vue.d.ts +10 -1
  158. package/dist-types/components/c-tooltip/CTooltip.vue.d.ts +12 -8
  159. package/dist-types/components/c-tree-select/CTreeSelect.vue.d.ts +257 -0
  160. package/dist-types/index.d.ts +41 -32
  161. package/dist-types/registry.d.ts +9 -0
  162. package/dist-types/shared/FieldMessage.vue.d.ts +8 -5
  163. package/dist-types/shared/PanelHeadingRow.vue.d.ts +13 -0
  164. package/dist-types/shared/SelectionIndicator.vue.d.ts +21 -0
  165. package/dist-types/shared/TypedField.vue.d.ts +48 -0
  166. package/dist-types/shared/appDefaults.d.ts +75 -0
  167. package/dist-types/shared/defineElement.d.ts +1 -0
  168. package/dist-types/shared/inputMask.d.ts +106 -0
  169. package/dist-types/shared/lightDismiss.d.ts +35 -0
  170. package/dist-types/shared/modalStack.d.ts +4 -3
  171. package/dist-types/shared/navigationDrawer.d.ts +4 -0
  172. package/dist-types/shared/optionLabel.d.ts +18 -0
  173. package/dist-types/shared/pageLock.d.ts +26 -0
  174. package/dist-types/shared/peekCap.d.ts +35 -0
  175. package/dist-types/shared/popoverChain.d.ts +13 -10
  176. package/dist-types/shared/positionArea.d.ts +9 -4
  177. package/dist-types/shared/reducedMotion.d.ts +10 -0
  178. package/dist-types/shared/selectAll.d.ts +29 -0
  179. package/dist-types/shared/splitMatches.d.ts +18 -0
  180. package/dist-types/shared/useAnchoredPanel.d.ts +107 -0
  181. package/dist-types/shared/useControlAttrs.d.ts +8 -0
  182. package/dist-types/shared/useDesignatedTrigger.d.ts +5 -4
  183. package/dist-types/shared/useFallbackPosition.d.ts +71 -0
  184. package/dist-types/shared/useHostEmit.d.ts +38 -0
  185. package/dist-types/shared/useIdReferences.d.ts +39 -0
  186. package/dist-types/shared/useKeyboardModality.d.ts +7 -0
  187. package/dist-types/shared/useNarrowViewport.d.ts +19 -0
  188. package/dist-types/shared/useScrollStrip.d.ts +39 -0
  189. package/dist-types/shared/useStatusAnnouncer.d.ts +33 -0
  190. package/dist-types/shared/useTypedField.d.ts +108 -0
  191. package/dist-types/shared/valueEvents.d.ts +41 -0
  192. package/dist-types/shared/visualViewport.d.ts +51 -0
  193. package/dist-types/tag-name-map.d.ts +1572 -672
  194. package/dist-types/theme/applyTheme.d.ts +6 -6
  195. package/dist-types/theme/chart-data.d.ts +51 -0
  196. package/dist-types/theme/ramp.d.ts +38 -0
  197. package/dist-types/theme/themeMode.d.ts +51 -0
  198. package/dist-types/types.d.ts +7 -11
  199. package/package.json +32 -21
  200. package/dist/css-anchor-positioning-fn-RTxo68pt.js +0 -6447
  201. package/dist/docs/c-toast/usage.md +0 -1
  202. package/dist-types/shared/anchorPolyfill.d.ts +0 -24
  203. package/dist-types/shared/emitModelValue.d.ts +0 -37
@@ -0,0 +1,169 @@
1
+ import type { CFieldSize } from '../../types';
2
+ /** UI texts of `c-number-field`, merged key by key over the English defaults. */
3
+ export interface CNumberFieldTexts {
4
+ /** Accessible label of the step-down button. */
5
+ stepDown?: string;
6
+ /** Accessible label of the step-up button. */
7
+ stepUp?: string;
8
+ }
9
+ interface CNumberFieldProps {
10
+ /**
11
+ * The most fraction digits the field takes; `0` makes it an integer field
12
+ *
13
+ * @defaultable 0
14
+ */
15
+ decimals?: number;
16
+ /**
17
+ * The decimal separator. Empty follows the page's `lang` (`,` for `fi`, `.` for `en`)
18
+ *
19
+ * @defaultable ''
20
+ * @freeform one character
21
+ */
22
+ decimalSeparator?: string;
23
+ /**
24
+ * Disable the field
25
+ */
26
+ disabled?: boolean;
27
+ /**
28
+ * Error message shown in place of the hint while the field is invalid
29
+ *
30
+ * @freeform
31
+ */
32
+ errorMessage?: string;
33
+ /**
34
+ * Pad the fraction to exactly `decimals` digits when the field is left (`12,5` → `12,50`)
35
+ *
36
+ * @defaultable false
37
+ */
38
+ fixedDecimals?: boolean;
39
+ /**
40
+ * The thousands separator. Empty follows the page's `lang` (a space for `fi`, `,` for `en`)
41
+ *
42
+ * @defaultable ''
43
+ * @freeform one character
44
+ */
45
+ groupSeparator?: string;
46
+ /**
47
+ * Hide the hint and error messages
48
+ *
49
+ * @defaultable false
50
+ */
51
+ hideDetails?: boolean;
52
+ /**
53
+ * Hint text for the field
54
+ *
55
+ * @freeform
56
+ */
57
+ hint?: string;
58
+ /**
59
+ * Show the control as invalid: its `error-message`, when set, replaces the
60
+ * hint, and the control is marked `aria-invalid`.
61
+ */
62
+ invalid?: boolean;
63
+ /**
64
+ * Label of the field
65
+ *
66
+ * @freeform
67
+ */
68
+ label?: string;
69
+ /**
70
+ * Label on top of the field
71
+ *
72
+ * @defaultable false
73
+ */
74
+ labelOnTop?: boolean;
75
+ /**
76
+ * The largest number in range; a larger one is kept and reported as out of range
77
+ */
78
+ max?: null | number;
79
+ /**
80
+ * The smallest number in range; a smaller one is kept and reported as out of range. At `0` or above, the minus key is ignored
81
+ */
82
+ min?: null | number;
83
+ /**
84
+ * Name of the input
85
+ *
86
+ * @freeform
87
+ */
88
+ name?: string;
89
+ /**
90
+ * Placeholder of the input
91
+ *
92
+ * @freeform
93
+ */
94
+ placeholder?: string;
95
+ /**
96
+ * Mark as readonly
97
+ */
98
+ readonly?: boolean;
99
+ /**
100
+ * Set the field as required
101
+ */
102
+ required?: boolean;
103
+ /**
104
+ * Shadow variant of the field
105
+ *
106
+ * @defaultable false
107
+ */
108
+ shadow?: boolean;
109
+ /**
110
+ * Field height: the 52px default (the shared control height) or the 36px `small` box
111
+ *
112
+ * @defaultable 'default'
113
+ */
114
+ size?: CFieldSize;
115
+ /**
116
+ * The spacing of the grid the step buttons and arrow keys move along, counted from `min` (or `0`)
117
+ *
118
+ * @defaultable 1
119
+ */
120
+ step?: number;
121
+ /**
122
+ * UI text overrides (i18n), merged over the English defaults. Objects have no attribute form — bind as a DOM property
123
+ *
124
+ * @defaultable {}
125
+ */
126
+ texts?: CNumberFieldTexts;
127
+ /**
128
+ * The number, or `null` when the field is empty. A string is read as the number it spells, and `''` as empty — what an attribute, or a plain `v-model` holding `null`, writes; the field always emits a number or `null`
129
+ */
130
+ value?: null | number | string;
131
+ }
132
+ declare const _default: typeof __VLS_export;
133
+ export default _default;
134
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CNumberFieldProps, {
135
+ focus: (options?: FocusOptions) => void;
136
+ outOfRange: import("vue").ComputedRef<boolean>;
137
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CNumberFieldProps> & Readonly<{}>, {
138
+ label: string;
139
+ invalid: boolean;
140
+ name: string;
141
+ value: null | number | string;
142
+ size: CFieldSize;
143
+ texts: CNumberFieldTexts;
144
+ hideDetails: boolean;
145
+ labelOnTop: boolean;
146
+ shadow: boolean;
147
+ decimalSeparator: string;
148
+ decimals: number;
149
+ fixedDecimals: boolean;
150
+ groupSeparator: string;
151
+ step: number;
152
+ disabled: boolean;
153
+ errorMessage: string;
154
+ hint: string;
155
+ placeholder: string;
156
+ required: boolean;
157
+ max: null | number;
158
+ min: null | number;
159
+ readonly: boolean;
160
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
161
+ pre?: (props: {}) => any;
162
+ } & {
163
+ post?: (props: {}) => any;
164
+ }>;
165
+ type __VLS_WithSlots<T, S> = T & {
166
+ new (): {
167
+ $slots: S;
168
+ };
169
+ };
@@ -0,0 +1,58 @@
1
+ /**
2
+ * The number core behind `c-number-field` (ADR-0060): the page language's
3
+ * separators, conforming typed text to grouped digits with its caret, and
4
+ * reading and formatting the number. Pure — no DOM, no component state.
5
+ */
6
+ import type { ConformResult } from '../../shared/inputMask';
7
+ export interface CNumberFieldConform extends ConformResult {
8
+ /** The number the text reads as; `null` when it holds no digit. */
9
+ value: null | number;
10
+ }
11
+ export interface CNumberFieldFormat extends CNumberFieldSeparators {
12
+ /** Whether a leading minus is kept (`false` when `min` ≥ 0). */
13
+ allowNegative: boolean;
14
+ /** The most fraction digits; `0` for an integer field. */
15
+ decimals: number;
16
+ }
17
+ export interface CNumberFieldSeparators {
18
+ decimal: string;
19
+ group: string;
20
+ }
21
+ /** More integer digits than this stop being exact as a JS number. */
22
+ export declare const MAX_INTEGER_DIGITS = 15;
23
+ /**
24
+ * The group and decimal separators `Intl.NumberFormat` uses for `lang`
25
+ * (`fi` → non-breaking space and `,`; `en` → `,` and `.`), else the fallback.
26
+ */
27
+ export declare const numberSeparators: (lang: string) => CNumberFieldSeparators;
28
+ /**
29
+ * Conform typed text to the number format: keep a leading minus, digits
30
+ * and one decimal separator (up to `decimals` fraction digits and
31
+ * `MAX_INTEGER_DIGITS` integer digits, leading zeros dropped), and regroup
32
+ * the integer digits in threes. The caret keeps its place among the typed
33
+ * characters; group separators are inserted ones (`tokenAt` false).
34
+ */
35
+ export declare const conformNumber: (text: string, caret: number, format: CNumberFieldFormat) => CNumberFieldConform;
36
+ /** The number `text` reads as under `format`; `null` when it holds no digit. */
37
+ export declare const readNumber: (text: string, format: CNumberFieldFormat) => null | number;
38
+ /**
39
+ * Display a number: rounded to `decimals`, grouped, with trailing fraction
40
+ * zeros kept only when `fixed`. A non-finite value or `null` shows as empty.
41
+ */
42
+ export declare const formatNumber: (value: null | number | undefined, format: CNumberFieldFormat, fixed?: boolean) => string;
43
+ export interface CNumberFieldStepOptions {
44
+ /** The most fraction digits; a stepped number is rounded to them. */
45
+ decimals: number;
46
+ max: null | number;
47
+ min: null | number;
48
+ /** The spacing of the grid, counted from `min` (or `0`); not a positive number reads as `1`. */
49
+ step: number;
50
+ }
51
+ /**
52
+ * Move a number `count` points along its step grid (ADR-0064): to the next
53
+ * point of `base + k·step` above it (`direction` 1) or below it (-1), where
54
+ * `base` is `min`, or `0`. The result is rounded to `decimals` and held in
55
+ * `min`–`max`: a move that would pass a bound lands on it, and a number at or
56
+ * beyond the bound in `direction` stays put. An empty field counts from `0`.
57
+ */
58
+ export declare const stepNumber: (current: null | number, direction: -1 | 1, options: CNumberFieldStepOptions, count?: number) => null | number;
@@ -17,8 +17,8 @@ type __VLS_Slots = {} & {
17
17
  default?: (props: typeof __VLS_1) => any;
18
18
  };
19
19
  declare const __VLS_base: import("vue").DefineComponent<COptionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<COptionProps> & Readonly<{}>, {
20
- value: number | string;
21
20
  name: string;
21
+ value: number | string;
22
22
  disabled: boolean;
23
23
  selected: boolean;
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,36 +1,29 @@
1
1
  interface COtpInputProps {
2
2
  /**
3
- * Id of the element
4
- *
5
- * @seeded from csc-ui — verify
6
- * @freeform
3
+ * Focus the first digit when the field mounts.
7
4
  */
8
- elementId?: string;
5
+ autofocus?: boolean;
9
6
  /**
10
7
  * Error message shown in place of the hint while the input is invalid
11
8
  *
12
9
  * @freeform
13
10
  */
14
11
  errorMessage?: string;
15
- /**
16
- * Auto focus
17
- *
18
- * @seeded from csc-ui — verify
19
- */
20
- hasAutofocus?: boolean;
21
12
  /**
22
13
  * Hide the hint and error messages
23
- *
24
- * @seeded from csc-ui — verify
25
14
  */
26
15
  hideDetails?: boolean;
27
16
  /**
28
17
  * Hint text for the input
29
18
  *
30
- * @seeded from csc-ui — verify
31
19
  * @freeform
32
20
  */
33
21
  hint?: string;
22
+ /**
23
+ * Show the control as invalid: its `error-message`, when set, replaces the
24
+ * hint, and the control is marked `aria-invalid`.
25
+ */
26
+ invalid?: boolean;
34
27
  /**
35
28
  * Label of the input group, shown above the digit inputs
36
29
  *
@@ -38,9 +31,7 @@ interface COtpInputProps {
38
31
  */
39
32
  label?: string;
40
33
  /**
41
- * Length of the OTP code
42
- *
43
- * @seeded from csc-ui — verify
34
+ * Number of digits in the code, one box each
44
35
  */
45
36
  length?: number;
46
37
  /**
@@ -48,15 +39,9 @@ interface COtpInputProps {
48
39
  */
49
40
  required?: boolean;
50
41
  /**
51
- * Set the validíty of the input
42
+ * The digits entered so far, joined into one string (`''` when none).
43
+ * Setting it fills the boxes from the first one
52
44
  *
53
- * @seeded from csc-ui — verify
54
- */
55
- valid?: boolean;
56
- /**
57
- * Value of the input
58
- *
59
- * @seeded from csc-ui — verify
60
45
  * @freeform
61
46
  */
62
47
  value?: string;
@@ -65,17 +50,18 @@ declare var __VLS_7: {};
65
50
  type __VLS_Slots = {} & {
66
51
  default?: (props: typeof __VLS_7) => any;
67
52
  };
68
- declare const __VLS_base: import("vue").DefineComponent<COtpInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<COtpInputProps> & Readonly<{}>, {
53
+ declare const __VLS_base: import("vue").DefineComponent<COtpInputProps, {
54
+ focus: (options?: FocusOptions) => void;
55
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<COtpInputProps> & Readonly<{}>, {
69
56
  label: string;
57
+ invalid: boolean;
70
58
  length: number;
71
59
  value: string;
72
- errorMessage: string;
73
60
  hideDetails: boolean;
61
+ errorMessage: string;
74
62
  hint: string;
75
63
  required: boolean;
76
- valid: boolean;
77
- elementId: string;
78
- hasAutofocus: boolean;
64
+ autofocus: boolean;
79
65
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
80
66
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
81
67
  declare const _default: typeof __VLS_export;
@@ -1,8 +1,7 @@
1
1
  interface CPageProps {
2
2
  /**
3
- * Display scroll indicator
4
- *
5
- * @seeded from csc-ui — verify
3
+ * Shows a 4px primary bar along the top edge of the viewport whose length
4
+ * tracks how far the document has been scrolled.
6
5
  */
7
6
  scrollIndicator?: boolean;
8
7
  }
@@ -1,57 +1,87 @@
1
+ /**
2
+ * The value of `c-pagination`. Set `itemCount`, and `page` and `pageSize`
3
+ * where the defaults do not fit; each change emits a new object with the
4
+ * picked `page` and `pageSize` and the `startFrom` / `endTo` range of the
5
+ * page's items.
6
+ */
1
7
  export interface CPaginationOptions {
2
- currentPage?: number;
8
+ /** Index of the page's last item, from 0; set on the value it emits. */
3
9
  endTo?: number;
10
+ /** Number of items to page through. */
4
11
  itemCount: number;
5
- itemsPerPage?: number;
12
+ /** The current page, from 1. Default 1. */
13
+ page?: number;
14
+ /** Items on a page. Default 25. */
15
+ pageSize?: number;
16
+ /** The page sizes the page-size menu offers. Default `[5, 25, 50, 100]`. */
6
17
  pageSizes?: number[];
18
+ /** Index of the page's first item, from 0; set on the value it emits. */
7
19
  startFrom?: number;
8
- textOverrides?: Record<string, unknown>;
20
+ /** Most page buttons shown at once. Default 7. */
9
21
  totalVisible?: number;
10
22
  }
11
- export interface CPaginationProps {
23
+ /**
24
+ * Size of the pagination controls. `small` renders the compact page buttons.
25
+ */
26
+ export type CPaginationSize = 'default' | 'small';
27
+ /**
28
+ * UI texts of `c-pagination`, shallow-merged over the English defaults.
29
+ * Static labels are strings; interpolated ones are functions.
30
+ */
31
+ export interface CPaginationTexts {
32
+ /** Accessible name of the next-page button. */
33
+ nextPage?: string;
34
+ /** Accessible name of a page button; receives the page and the page count. */
35
+ page?: (page: number, pageCount: number) => string;
36
+ /** Label of the page-size menu. */
37
+ pageSize?: string;
38
+ /** Accessible name of the navigation landmark. */
39
+ pagination?: string;
40
+ /** Accessible name of the previous-page button. */
41
+ previousPage?: string;
42
+ /**
43
+ * The range of items shown; receives the first and the last item, from 1,
44
+ * and the item count.
45
+ */
46
+ range?: (start: number, end: number, count: number) => string;
47
+ }
48
+ interface CPaginationProps {
12
49
  /**
13
- * Hide details (per page dropdown and the 'x - y of n pages' text)
14
- *
15
- * @seeded from csc-ui — verify
50
+ * Hide the details row: the page-size menu and the "x - y of n items" text
16
51
  */
17
52
  hideDetails?: boolean;
18
53
  /**
19
- * Hide range indicator
20
- *
21
- * @seeded from csc-ui — verify
54
+ * Hide the range text ("11 - 20 of 96 items"), keeping the page-size menu.
22
55
  */
23
56
  hideRange?: boolean;
24
57
  /**
25
- * Hide page number buttons
26
- *
27
- * @seeded from csc-ui — verify
58
+ * Drop the page buttons and move previous and next to the bar's end; the
59
+ * range text is then the only sign of position.
28
60
  */
29
61
  simple?: boolean;
62
+ /** Size of the controls: `small` renders the compact page buttons. */
63
+ size?: CPaginationSize;
30
64
  /**
31
- * Hide details (per page dropdown and the 'x - y of n pages' text)
65
+ * UI text overrides (i18n), merged over the English defaults. Objects have
66
+ * no attribute form — bind as a DOM property
32
67
  *
33
- * @seeded from csc-ui — verify
68
+ * @defaultable {}
34
69
  */
35
- size?: CPaginationSize;
70
+ texts?: CPaginationTexts;
36
71
  /**
37
- * Object containing values that are needed for pagination.
38
- *
39
- * Note! startFrom and endTo are assigned automatically to the object based on other values
40
- *
41
- * @seeded from csc-ui — verify
72
+ * The item count and the current page and page size; see
73
+ * `CPaginationOptions`. Bind it with `v-model`, or set it and listen to
74
+ * `change`.
42
75
  */
43
76
  value?: CPaginationOptions;
44
77
  }
45
- /**
46
- * Size of the pagination controls. `small` renders the compact page buttons.
47
- */
48
- export type CPaginationSize = 'default' | 'small';
49
78
  declare const _default: typeof __VLS_export;
50
79
  export default _default;
51
80
  declare const __VLS_export: import("vue").DefineComponent<CPaginationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CPaginationProps> & Readonly<{}>, {
52
81
  value: CPaginationOptions;
53
- hideDetails: boolean;
54
82
  size: CPaginationSize;
83
+ texts: CPaginationTexts;
84
+ hideDetails: boolean;
55
85
  hideRange: boolean;
56
86
  simple: boolean;
57
87
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,7 +1,11 @@
1
- import type { CPlacement } from '../../types';
2
- export interface CPopoverProps {
1
+ /**
2
+ * Preferred placement of the panel relative to its trigger: the side, and
3
+ * `-start`/`-end` to align their edges on the cross axis.
4
+ */
5
+ export type CPopoverPosition = 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
6
+ interface CPopoverProps {
3
7
  /** Distance from the trigger to the panel, in pixels. Defaults to `0`. */
4
- distance?: number | string;
8
+ distance?: number;
5
9
  /**
6
10
  * Heading rendered at the top of the panel, doubling as its accessible
7
11
  * name. Without it, set `aria-label` on the host. Named `heading`, not
@@ -13,7 +17,7 @@ export interface CPopoverProps {
13
17
  /** Whether the popover is open. Two-way: emits `change:open`. */
14
18
  open?: boolean;
15
19
  /** Preferred placement of the panel relative to the trigger. */
16
- position?: CPlacement;
20
+ position?: CPopoverPosition;
17
21
  /**
18
22
  * Designated trigger: an element elsewhere in the document that opens the
19
23
  * popover — its document ID, or the element itself. The same trigger
@@ -26,10 +30,10 @@ export interface CPopoverProps {
26
30
  declare const _default: typeof __VLS_export;
27
31
  export default _default;
28
32
  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
33
  open: boolean;
31
- distance: number | string;
32
- position: CPlacement;
34
+ heading: string;
35
+ distance: number;
36
+ position: CPopoverPosition;
33
37
  trigger: HTMLElement | string;
34
38
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
35
39
  trigger?: (props: {}) => any;
@@ -1,33 +1,29 @@
1
1
  interface CProgressBarProps {
2
2
  /**
3
- * Hide the percentage display
4
- *
5
- * @seeded from csc-ui — verify
3
+ * Hides the details line (the percentage and `label`); `label` still
4
+ * names the bar.
6
5
  */
7
6
  hideDetails?: boolean;
8
7
  /**
9
- * Indeterminate state of the progress bar
10
- *
11
- * @seeded from csc-ui — verify
8
+ * Replaces the fill with a looping sweep for work of unknown duration,
9
+ * hiding the details line and exposing no value.
12
10
  */
13
11
  indeterminate?: boolean;
14
12
  /**
15
- * Optional details message next to percentage display
13
+ * What is progressing: shown after the percentage, and the progress bar's
14
+ * accessible name.
16
15
  *
17
- * @seeded from csc-ui — verify
18
16
  * @freeform
19
17
  */
20
18
  label?: string;
21
19
  /**
22
- * Place details next to progress bar
23
- *
24
- * @seeded from csc-ui — verify
20
+ * Places the details line beside the bar instead of below it.
25
21
  */
26
22
  singleLine?: boolean;
27
23
  /**
28
- * Progress bar value in percentage (0 to 100)
29
- *
30
- * @seeded from csc-ui — verify
24
+ * Completion percentage, 0 to 100. The fill clamps a value outside that
25
+ * range; the details line shows it as given, a negative one in the error
26
+ * colour.
31
27
  */
32
28
  value?: number;
33
29
  }
@@ -1,17 +1,17 @@
1
- export interface CProgressCircleProps {
1
+ interface CProgressCircleProps {
2
2
  /**
3
3
  * Diameter of the circle in pixels
4
4
  */
5
5
  size?: number;
6
6
  /**
7
- * Progress value in percentage (0 to 100)
7
+ * Thickness of the track in pixels; the value arc draws at half this
8
+ * thickness, inset within the track
8
9
  */
9
- value?: number;
10
+ thickness?: number;
10
11
  /**
11
- * Stroke width of the track in pixels; the value arc draws at half this
12
- * width, inset within the track
12
+ * Progress value in percentage (0 to 100)
13
13
  */
14
- width?: number;
14
+ value?: number;
15
15
  }
16
16
  declare var __VLS_1: {};
17
17
  type __VLS_Slots = {} & {
@@ -19,8 +19,8 @@ type __VLS_Slots = {} & {
19
19
  };
20
20
  declare const __VLS_base: import("vue").DefineComponent<CProgressCircleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CProgressCircleProps> & Readonly<{}>, {
21
21
  value: number;
22
- width: number;
23
22
  size: number;
23
+ thickness: number;
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
26
  declare const _default: typeof __VLS_export;
@@ -23,6 +23,11 @@ interface CRadioGroupProps {
23
23
  * Display radio buttons inline
24
24
  */
25
25
  inline?: boolean;
26
+ /**
27
+ * Show the control as invalid: its `error-message`, when set, replaces the
28
+ * hint, and the control is marked `aria-invalid`.
29
+ */
30
+ invalid?: boolean;
26
31
  /**
27
32
  * Label of the radio group
28
33
  *
@@ -33,10 +38,6 @@ interface CRadioGroupProps {
33
38
  * Set as required
34
39
  */
35
40
  required?: boolean;
36
- /**
37
- * Set the validity of the input
38
- */
39
- valid?: boolean;
40
41
  /**
41
42
  * Value of the radio group; matched against each radio's `value` by strict
42
43
  * string equality
@@ -49,16 +50,18 @@ type __VLS_Slots = {} & {
49
50
  } & {
50
51
  default?: (props: typeof __VLS_9) => any;
51
52
  };
52
- declare const __VLS_base: import("vue").DefineComponent<CRadioGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CRadioGroupProps> & Readonly<{}>, {
53
+ declare const __VLS_base: import("vue").DefineComponent<CRadioGroupProps, {
54
+ focus: (options?: FocusOptions) => void;
55
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CRadioGroupProps> & Readonly<{}>, {
53
56
  label: string;
57
+ invalid: boolean;
54
58
  value: null | string;
59
+ inline: boolean;
60
+ hideDetails: boolean;
55
61
  disabled: boolean;
56
62
  errorMessage: string;
57
- hideDetails: boolean;
58
63
  hint: string;
59
64
  required: boolean;
60
- valid: boolean;
61
- inline: boolean;
62
65
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
63
66
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
64
67
  declare const _default: typeof __VLS_export;