@cscfi/csc-ui 4.0.0-alpha.11 → 4.0.0-alpha.13

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 (31) hide show
  1. package/dist/csc-ui.js +7677 -7042
  2. package/dist/custom-elements.json +337 -58
  3. package/dist/docs/c-autocomplete/usage.md +129 -0
  4. package/dist/docs/c-menu/usage.md +15 -0
  5. package/dist/docs/c-menu-item/usage.md +6 -0
  6. package/dist/docs/c-option-value/usage.md +1 -0
  7. package/dist/docs/c-select/usage.md +104 -0
  8. package/dist/vscode.css-custom-data.json +65 -0
  9. package/dist/vscode.html-custom-data.json +50 -20
  10. package/dist/web-types.json +210 -53
  11. package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +84 -11
  12. package/dist-types/components/c-checkbox/CCheckbox.vue.d.ts +2 -2
  13. package/dist-types/components/c-data-table/CDataTable.vue.d.ts +1 -1
  14. package/dist-types/components/c-dropdown/CDropdown.vue.d.ts +32 -4
  15. package/dist-types/components/c-input/CInput.vue.d.ts +1 -1
  16. package/dist-types/components/c-menu/CMenu.vue.d.ts +1 -1
  17. package/dist-types/components/c-popover/CPopover.vue.d.ts +1 -1
  18. package/dist-types/components/c-select/CSelect.vue.d.ts +81 -17
  19. package/dist-types/components/c-side-navigation/CSideNavigation.vue.d.ts +1 -1
  20. package/dist-types/components/c-tag/CTag.vue.d.ts +7 -0
  21. package/dist-types/components/c-text-field/CTextField.vue.d.ts +3 -3
  22. package/dist-types/components/c-tooltip/CTooltip.vue.d.ts +1 -1
  23. package/dist-types/index.d.ts +2 -1
  24. package/dist-types/shared/FormLabel.vue.d.ts +1 -1
  25. package/dist-types/shared/SelectionIndicator.vue.d.ts +21 -0
  26. package/dist-types/shared/optionLabel.d.ts +18 -0
  27. package/dist-types/shared/peekCap.d.ts +35 -0
  28. package/dist-types/shared/selectAll.d.ts +29 -0
  29. package/dist-types/shared/splitMatches.d.ts +18 -0
  30. package/dist-types/tag-name-map.d.ts +110 -18
  31. package/package.json +1 -1
@@ -17,7 +17,10 @@ export type CAutocompleteItem = CSelectItem;
17
17
  export interface CAutocompleteOption {
18
18
  /** Whether the option is disabled. */
19
19
  disabled: boolean;
20
- /** The option's display label. */
20
+ /**
21
+ * The option's label: its `name`, else the text of its `c-option-value`,
22
+ * else its whole text content (for an `items` entry, its `name`).
23
+ */
21
24
  label: string;
22
25
  /** The option's value. */
23
26
  value: number | string;
@@ -70,17 +73,25 @@ export interface CAutocompleteProps {
70
73
  /** Show loading state */
71
74
  loading?: boolean;
72
75
  /**
73
- * Input field name
74
- *
75
- * @freeform
76
+ * In `multiple` mode, show at most this many selected-value tags and fold
77
+ * the rest into one "+N more" tag; `0` shows no tags and reads "N selected"
78
+ * instead; unset shows every tag
76
79
  */
77
- name?: string;
80
+ maxTags?: number;
81
+ /**
82
+ * Allow selecting several options: rows toggle, the panel stays open and
83
+ * keeps its query, `value` becomes an array of the selected values (items
84
+ * with `return-object`) in the order they were picked, and the picks show
85
+ * as tags inside the field. Arrays have no attribute form — bind `value` as
86
+ * a DOM property
87
+ */
88
+ multiple?: boolean;
78
89
  /**
79
- * Message shown when the query matches no options
90
+ * Input field name
80
91
  *
81
92
  * @freeform
82
93
  */
83
- noResultsText?: string;
94
+ name?: string;
84
95
  /**
85
96
  * Placeholder for the in-panel search input
86
97
  *
@@ -91,15 +102,74 @@ export interface CAutocompleteProps {
91
102
  required?: boolean;
92
103
  /** Return object instead of value */
93
104
  returnObject?: boolean;
105
+ /**
106
+ * In `multiple` mode, pin a select-all row at the top of the list. Its
107
+ * checkbox shows whether none, some or all enabled options currently listed
108
+ * — the matches while a query is typed, the given `items` with `external` —
109
+ * are selected; activating it selects them all, or, when all are selected,
110
+ * unselects them. Ignored in single mode
111
+ */
112
+ selectAll?: boolean;
94
113
  /** Shadow variant */
95
114
  shadow?: boolean;
96
115
  /** Field height: the 44px default or the 36px `small` box */
97
116
  size?: CFieldSize;
117
+ /**
118
+ * UI text overrides (i18n), merged over the English defaults. Objects have
119
+ * no attribute form — bind as a DOM property (`:texts.prop` in Vue)
120
+ */
121
+ texts?: CAutocompleteTexts;
98
122
  /** Set the validity of the input */
99
123
  valid?: boolean;
100
- /** Selected value (scalar, or object when return-object is set) */
101
- value?: CAutocompleteItem | null | number | string;
124
+ /**
125
+ * Selected value: the option's value, or the whole item with
126
+ * `return-object`; an array of them in `multiple` mode
127
+ */
128
+ value?: CAutocompleteValue;
102
129
  }
130
+ /**
131
+ * UI texts of `c-autocomplete`, shallow-merged over the English defaults.
132
+ * Static labels are strings; count- or label-interpolated ones are
133
+ * functions.
134
+ */
135
+ export interface CAutocompleteTexts {
136
+ /** Accessible label of the clear button. */
137
+ clearSelection?: string;
138
+ /** Accessible label of the search input inside the panel. */
139
+ filterOptions?: string;
140
+ /** Text of the loading row shown while `loading` with nothing to list. */
141
+ loading?: string;
142
+ /**
143
+ * Text of the overflow tag when `max-tags` folds the selection; receives the
144
+ * number of hidden tags.
145
+ */
146
+ more?: (count: number) => string;
147
+ /** Text of the row shown when the query matches no options. */
148
+ noResults?: string;
149
+ /** Accessible label of a tag's remove button; receives the option label. */
150
+ remove?: (label: string) => string;
151
+ /** Placeholder of the search input when the `placeholder` prop is empty. */
152
+ searchPlaceholder?: string;
153
+ /**
154
+ * Label of the select-all row; receives the number of enabled options
155
+ * listed.
156
+ */
157
+ selectAll?: (count: number) => string;
158
+ /**
159
+ * Field text when `max-tags="0"` shows no tags; receives the selection
160
+ * count.
161
+ */
162
+ selected?: (count: number) => string;
163
+ /** Accessible label of the chevron button that opens and closes the panel. */
164
+ toggleOptions?: string;
165
+ }
166
+ /**
167
+ * Selection value of `c-autocomplete`: the committed option's value — or the
168
+ * whole `{ name, value }` item with `return-object` — and `null` when
169
+ * cleared. In `multiple` mode an array of them in the order they were
170
+ * picked, `[]` when empty.
171
+ */
172
+ export type CAutocompleteValue = (number | string)[] | CAutocompleteItem | CAutocompleteItem[] | null | number | string;
103
173
  declare const _default: typeof __VLS_export;
104
174
  export default _default;
105
175
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAutocompleteProps, {
@@ -107,8 +177,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAutoc
107
177
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CAutocompleteProps> & Readonly<{}>, {
108
178
  label: string;
109
179
  filter: CAutocompleteFilter;
110
- value: CAutocompleteItem | null | number | string;
180
+ value: CAutocompleteValue;
111
181
  name: string;
182
+ multiple: boolean;
112
183
  clearable: boolean;
113
184
  disabled: boolean;
114
185
  errorMessage: string;
@@ -120,12 +191,14 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAutoc
120
191
  itemsPerPage: number;
121
192
  labelOnTop: boolean;
122
193
  loading: boolean;
123
- noResultsText: string;
194
+ maxTags: number;
124
195
  placeholder: string;
125
196
  required: boolean;
126
197
  returnObject: boolean;
198
+ selectAll: boolean;
127
199
  shadow: boolean;
128
200
  size: CFieldSize;
201
+ texts: CAutocompleteTexts;
129
202
  valid: boolean;
130
203
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
131
204
  pre?: (props: {}) => any;
@@ -90,9 +90,9 @@ interface CCheckboxProps {
90
90
  */
91
91
  value?: boolean | number | string;
92
92
  }
93
- declare var __VLS_7: {};
93
+ declare var __VLS_12: {};
94
94
  type __VLS_Slots = {} & {
95
- default?: (props: typeof __VLS_7) => any;
95
+ default?: (props: typeof __VLS_12) => any;
96
96
  };
97
97
  declare const __VLS_base: import("vue").DefineComponent<CCheckboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CCheckboxProps> & Readonly<{}>, {
98
98
  label: string;
@@ -196,6 +196,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CDataT
196
196
  sort: CDataTableSort | null;
197
197
  external: boolean;
198
198
  loading: boolean;
199
+ texts: CDataTableTexts;
199
200
  autohide: boolean;
200
201
  columns: CDataTableColumn[];
201
202
  expandedContent: (context: CDataTableExpandedContext) => CDataTableCellContent;
@@ -209,7 +210,6 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CDataT
209
210
  singleExpansion: boolean;
210
211
  stickyFooter: boolean;
211
212
  stickyHeader: boolean;
212
- texts: CDataTableTexts;
213
213
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
214
214
  caption?: (props: {}) => any;
215
215
  } & {
@@ -9,31 +9,56 @@ interface CDropdownProps {
9
9
  * @freeform
10
10
  */
11
11
  hostId?: string;
12
- /** Current highlighted index */
12
+ /** Current highlighted index; `-1` (`SELECT_ALL_INDEX`) is the select-all row */
13
13
  index?: null | number;
14
14
  /** Dropdown options: a NodeList of <c-option> or an array of items */
15
15
  items?: ArrayLike<DropdownItem>;
16
16
  /** Items per page before adding scroll */
17
17
  itemsPerPage?: number;
18
+ /**
19
+ * Multi-select mode: rows toggle instead of committing, each carries a
20
+ * decorative checkbox indicator, and the listbox is `aria-multiselectable`
21
+ */
22
+ multiple?: boolean;
18
23
  /** Dropdown parent (the c-select / c-autocomplete host element) */
19
24
  parent?: HTMLElement | null;
25
+ /**
26
+ * The select-all row in `multiple` mode, as the parent computes it (label,
27
+ * tri-state, counts for the live region); `null` renders no row
28
+ */
29
+ selectAllRow?: CDropdownSelectAllRow | null;
30
+ /**
31
+ * Values of the currently selected items in `multiple` mode; drives each
32
+ * row's `aria-selected` and its indicator
33
+ */
34
+ selected?: (number | string)[];
20
35
  /** Parent type — drives autocomplete-only behaviour (highlight, messages) */
21
36
  type?: CDropdownParentType;
22
37
  }
23
38
  type DropdownItem = {
24
- disabled?: boolean;
39
+ disabled?: boolean | string;
25
40
  name: string;
26
41
  outerHTML?: string;
27
42
  selected?: boolean;
28
43
  value: number | string;
29
44
  };
30
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
45
+ /**
46
+ * The select-all row as the parent computes it (ADR-0046): the label, the
47
+ * indicator's tri-state and the counts the live region speaks.
48
+ */
49
+ interface CDropdownSelectAllRow {
50
+ label: string;
51
+ selected: number;
52
+ state: 'all' | 'none' | 'some';
53
+ total: number;
54
+ }
55
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_20: {};
31
56
  type __VLS_Slots = {} & {
32
57
  default?: (props: typeof __VLS_1) => any;
33
58
  } & {
34
59
  'input-top'?: (props: typeof __VLS_3) => any;
35
60
  } & {
36
- 'input-bottom'?: (props: typeof __VLS_5) => any;
61
+ 'input-bottom'?: (props: typeof __VLS_20) => any;
37
62
  };
38
63
  declare const __VLS_base: import("vue").DefineComponent<CDropdownProps, {
39
64
  close: () => void;
@@ -44,12 +69,15 @@ declare const __VLS_base: import("vue").DefineComponent<CDropdownProps, {
44
69
  updateList: (reset?: boolean) => void;
45
70
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CDropdownProps> & Readonly<{}>, {
46
71
  type: CDropdownParentType;
72
+ multiple: boolean;
47
73
  hostId: string;
48
74
  items: ArrayLike<DropdownItem>;
49
75
  itemsPerPage: number;
76
+ selected: (number | string)[];
50
77
  dropdownItemType: CDropdownItemType;
51
78
  index: null | number;
52
79
  parent: HTMLElement | null;
80
+ selectAllRow: CDropdownSelectAllRow | null;
53
81
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
54
82
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
55
83
  declare const _default: typeof __VLS_export;
@@ -90,9 +90,9 @@ declare const __VLS_base: import("vue").DefineComponent<CInputProps, {}, {}, {},
90
90
  shadow: boolean;
91
91
  size: CFieldSize;
92
92
  valid: boolean;
93
- inputId: string;
94
93
  active: boolean;
95
94
  filled: boolean;
95
+ inputId: string;
96
96
  isTextarea: boolean;
97
97
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
98
98
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -23,8 +23,8 @@ type __VLS_Slots = {} & {
23
23
  default?: (props: typeof __VLS_3) => any;
24
24
  };
25
25
  declare const __VLS_base: import("vue").DefineComponent<CMenuProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CMenuProps> & Readonly<{}>, {
26
- open: boolean;
27
26
  distance: number | string;
27
+ open: boolean;
28
28
  position: CPlacement;
29
29
  trigger: HTMLElement | string;
30
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -27,8 +27,8 @@ declare const _default: typeof __VLS_export;
27
27
  export default _default;
28
28
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CPopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CPopoverProps> & Readonly<{}>, {
29
29
  heading: string;
30
- open: boolean;
31
30
  distance: number | string;
31
+ open: boolean;
32
32
  position: CPlacement;
33
33
  trigger: HTMLElement | string;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -1,5 +1,5 @@
1
1
  import type { CFieldSize, CSelectItem } from '../../types';
2
- interface CSelectProps {
2
+ export interface CSelectProps {
3
3
  /** Make the selected value clearable */
4
4
  clearable?: boolean;
5
5
  /** Disable the input */
@@ -38,6 +38,20 @@ interface CSelectProps {
38
38
  labelOnTop?: boolean;
39
39
  /** Show loading state */
40
40
  loading?: boolean;
41
+ /**
42
+ * In `multiple` mode, show at most this many selected-value tags and fold
43
+ * the rest into one "+N more" tag; `0` shows no tags and reads "N selected"
44
+ * instead; unset shows every tag
45
+ */
46
+ maxTags?: number;
47
+ /**
48
+ * Allow selecting several options: rows toggle and the list stays open,
49
+ * `value` becomes an array of the selected values (items with
50
+ * `return-object`) in the order they were picked, and the picks show as
51
+ * tags inside the field. `option-as-selection` is ignored in this mode.
52
+ * Arrays have no attribute form — bind `value` as a DOM property
53
+ */
54
+ multiple?: boolean;
41
55
  /**
42
56
  * Input field name
43
57
  *
@@ -56,29 +70,73 @@ interface CSelectProps {
56
70
  required?: boolean;
57
71
  /** Return object instead of value */
58
72
  returnObject?: boolean;
73
+ /**
74
+ * In `multiple` mode, pin a select-all row at the top of the list. Its
75
+ * checkbox shows whether none, some or all enabled options are selected;
76
+ * activating it selects every enabled option — or, when all are selected,
77
+ * unselects them. Ignored in single mode
78
+ */
79
+ selectAll?: boolean;
59
80
  /** Shadow variant */
60
81
  shadow?: boolean;
61
82
  /** Field height: the 44px default or the 36px `small` box */
62
83
  size?: CFieldSize;
84
+ /**
85
+ * UI text overrides (i18n), merged over the English defaults. Objects have
86
+ * no attribute form — bind as a DOM property (`:texts.prop` in Vue)
87
+ */
88
+ texts?: CSelectTexts;
63
89
  /** Set the validity of the input */
64
90
  valid?: boolean;
65
- /** Selected value (scalar, or object when return-object is set) */
66
- value?: CSelectItem | null | number | string;
91
+ /**
92
+ * Selected value: the option's value, or the whole item with
93
+ * `return-object`; an array of them in `multiple` mode
94
+ */
95
+ value?: CSelectValue;
67
96
  }
68
- declare var __VLS_19: {}, __VLS_54: {}, __VLS_56: {};
69
- type __VLS_Slots = {} & {
70
- pre?: (props: typeof __VLS_19) => any;
71
- } & {
72
- default?: (props: typeof __VLS_54) => any;
73
- } & {
74
- post?: (props: typeof __VLS_56) => any;
75
- };
76
- declare const __VLS_base: import("vue").DefineComponent<CSelectProps, {
97
+ /**
98
+ * UI texts of `c-select`, shallow-merged over the English defaults. Static
99
+ * labels are strings; count- or label-interpolated ones are functions.
100
+ */
101
+ export interface CSelectTexts {
102
+ /** Accessible label of the clear button. */
103
+ clearSelection?: string;
104
+ /**
105
+ * Text of the overflow tag when `max-tags` folds the selection; receives the
106
+ * number of hidden tags.
107
+ */
108
+ more?: (count: number) => string;
109
+ /** Accessible label of a tag's remove button; receives the option label. */
110
+ remove?: (label: string) => string;
111
+ /**
112
+ * Label of the select-all row; receives the number of enabled options
113
+ * listed.
114
+ */
115
+ selectAll?: (count: number) => string;
116
+ /**
117
+ * Field text when `max-tags="0"` shows no tags; receives the selection
118
+ * count.
119
+ */
120
+ selected?: (count: number) => string;
121
+ /** Accessible label of the chevron button that opens and closes the list. */
122
+ toggleOptions?: string;
123
+ }
124
+ /**
125
+ * Selection value of `c-select`: the picked option's value — or the whole
126
+ * `{ name, value }` item with `return-object` — and `null` when nothing is
127
+ * selected. In `multiple` mode an array of them in the order they were
128
+ * picked, `[]` when empty.
129
+ */
130
+ export type CSelectValue = (number | string)[] | CSelectItem | CSelectItem[] | null | number | string;
131
+ declare const _default: typeof __VLS_export;
132
+ export default _default;
133
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CSelectProps, {
77
134
  reset: () => void;
78
135
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CSelectProps> & Readonly<{}>, {
79
136
  label: string;
80
- value: CSelectItem | null | number | string;
137
+ value: CSelectValue;
81
138
  name: string;
139
+ multiple: boolean;
82
140
  clearable: boolean;
83
141
  disabled: boolean;
84
142
  errorMessage: string;
@@ -89,17 +147,23 @@ declare const __VLS_base: import("vue").DefineComponent<CSelectProps, {
89
147
  itemsPerPage: number;
90
148
  labelOnTop: boolean;
91
149
  loading: boolean;
150
+ maxTags: number;
92
151
  placeholder: string;
93
152
  required: boolean;
94
153
  returnObject: boolean;
154
+ selectAll: boolean;
95
155
  shadow: boolean;
96
156
  size: CFieldSize;
157
+ texts: CSelectTexts;
97
158
  valid: boolean;
98
159
  optionAsSelection: boolean;
99
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
100
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
101
- declare const _default: typeof __VLS_export;
102
- export default _default;
160
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
161
+ pre?: (props: {}) => any;
162
+ } & {
163
+ default?: (props: {}) => any;
164
+ } & {
165
+ post?: (props: {}) => any;
166
+ }>;
103
167
  type __VLS_WithSlots<T, S> = T & {
104
168
  new (): {
105
169
  $slots: S;
@@ -25,8 +25,8 @@ type __VLS_Slots = {} & {
25
25
  bottom?: (props: typeof __VLS_16) => any;
26
26
  };
27
27
  declare const __VLS_base: import("vue").DefineComponent<CSideNavigationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CSideNavigationProps> & Readonly<{}>, {
28
- mobile: boolean;
29
28
  menuVisible: boolean;
29
+ mobile: boolean;
30
30
  styles: null | Record<string, string>;
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
32
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -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
  *
@@ -43,6 +49,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTagPr
43
49
  active: boolean;
44
50
  badge: null | number | string;
45
51
  closeable: boolean;
52
+ closeLabel: string;
46
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
47
54
  default?: (props: {}) => any;
48
55
  }>;
@@ -166,6 +166,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTextF
166
166
  value: string;
167
167
  type: CTextFieldType;
168
168
  name: string;
169
+ autocorrect: boolean;
169
170
  disabled: boolean;
170
171
  errorMessage: string;
171
172
  hideDetails: boolean;
@@ -177,13 +178,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CTextF
177
178
  shadow: boolean;
178
179
  size: CFieldSize;
179
180
  valid: boolean;
180
- autocomplete: string;
181
- readonly: boolean;
182
- autocorrect: boolean;
183
181
  max: null | number;
184
182
  min: null | number;
185
183
  step: null | number;
184
+ autocomplete: string;
186
185
  automaticCapitalize: CTextFieldAutocapitalize;
186
+ readonly: boolean;
187
187
  rows: number;
188
188
  trimWhitespace: boolean;
189
189
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -32,8 +32,8 @@ declare const _default: typeof __VLS_export;
32
32
  export default _default;
33
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
34
  text: string;
35
- open: boolean;
36
35
  distance: number | string;
36
+ open: boolean;
37
37
  position: CPlacement;
38
38
  trigger: HTMLElement | string;
39
39
  delay: number | string;
@@ -1,5 +1,5 @@
1
1
  export type { CAlertIconType, CAlertProps, CAlertType, } from './components/c-alert/CAlert.vue';
2
- export type { CAutocompleteFilter, CAutocompleteItem, CAutocompleteOption, CAutocompleteProps, } from './components/c-autocomplete/CAutocomplete.vue';
2
+ export type { CAutocompleteFilter, CAutocompleteItem, CAutocompleteOption, CAutocompleteProps, CAutocompleteTexts, CAutocompleteValue, } from './components/c-autocomplete/CAutocomplete.vue';
3
3
  export type { CButtonGroupProps, CButtonGroupSize, CButtonGroupValue, } from './components/c-button-group/CButtonGroup.vue';
4
4
  export type { CButtonProps, CButtonSize, CButtonType, } from './components/c-button/CButton.vue';
5
5
  export type { CCardActionsAlign, CCardActionsJustify, CCardActionsProps, } from './components/c-card-actions/CCardActions.vue';
@@ -10,6 +10,7 @@ export type { CLoginCardBlendMode, CLoginCardProps, } from './components/c-login
10
10
  export type { CPaginationOptions, CPaginationProps, CPaginationSize, } from './components/c-pagination/CPagination.vue';
11
11
  export type { CPopoverProps } from './components/c-popover/CPopover.vue';
12
12
  export type { CProgressCircleProps } from './components/c-progress-circle/CProgressCircle.vue';
13
+ export type { CSelectProps, CSelectTexts, CSelectValue, } from './components/c-select/CSelect.vue';
13
14
  export type { CStatusProps, CStatusType, } from './components/c-status/CStatus.vue';
14
15
  export type { CTabButtonsProps, CTabButtonsSize, } from './components/c-tab-buttons/CTabButtons.vue';
15
16
  export type { CTabsJustify, CTabsProps } from './components/c-tabs/CTabs.vue';
@@ -20,9 +20,9 @@ declare const __VLS_base: import("vue").DefineComponent<FormLabelProps, {}, {},
20
20
  label: string;
21
21
  part: string;
22
22
  required: boolean;
23
+ tag: "div" | "label" | "span";
23
24
  htmlFor: string;
24
25
  labelId: string;
25
- tag: "div" | "label" | "span";
26
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
27
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
28
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,21 @@
1
+ interface SelectionIndicatorProps {
2
+ /** Fill the box and show the check glyph. */
3
+ checked?: boolean;
4
+ /** Paint the disabled colour channel. */
5
+ disabled?: boolean;
6
+ /** Paint the error colour channel (box unless disabled; mark always). */
7
+ error?: boolean;
8
+ /** Render the keyboard focus halo pseudo-element for the host to reveal. */
9
+ focusHalo?: boolean;
10
+ /** Fill the box and show the indeterminate bar (wins over `checked`). */
11
+ indeterminate?: boolean;
12
+ }
13
+ declare const __VLS_export: import("vue").DefineComponent<SelectionIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SelectionIndicatorProps> & Readonly<{}>, {
14
+ error: boolean;
15
+ disabled: boolean;
16
+ checked: boolean;
17
+ indeterminate: boolean;
18
+ focusHalo: boolean;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The label of a slotted `<c-option>` — what a value-selection field shows
3
+ * for the option in its row, its closed field and its tags, and what
4
+ * `c-autocomplete`'s filter matches (ADR-0045).
5
+ *
6
+ * Resolution chain:
7
+ * 1. the option's `name` (the property, else the attribute — the element may
8
+ * not be upgraded yet when a parent reads it during mount);
9
+ * 2. else the text of its first `<c-option-value>`, the label region: it
10
+ * lets an option carry richer content (a description, an icon) that is
11
+ * not part of the label;
12
+ * 3. else the option's whole text content.
13
+ *
14
+ * Trimmed; an empty `name` counts as absent. Callers keep their own last
15
+ * resort (the raw value) so a label is never blank.
16
+ */
17
+ export declare const optionValueElement: (option: Element) => Element | null;
18
+ export declare const optionLabel: (option: HTMLElement) => string;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The peek (CONTEXT.md, ADR-0043).
3
+ *
4
+ * A transient list panel — the menu and submenu panels, `c-dropdown`'s
5
+ * listbox, `c-autocomplete`'s options list — hides its scrollbar. In its
6
+ * place an overflowing list must end at an item row's midpoint: the
7
+ * half-visible row is the one cue that more rows follow. This module computes
8
+ * that cap from the real row boxes, so mixed-height menus (items, labels,
9
+ * dividers) and taller slotted option rows cut correctly.
10
+ */
11
+ export interface PeekCapOptions {
12
+ /**
13
+ * Upper bound for the list's `max-height`, in px. `Infinity` for none.
14
+ * `applyPeekCap` defaults it to the list's stylesheet `max-height`.
15
+ */
16
+ ceiling?: number;
17
+ /** Full rows shown before the peek. `0` (or less): no row cap. */
18
+ itemsPerPage?: number;
19
+ /** Item rows in visual order — only these can be the peek row. */
20
+ rows: readonly HTMLElement[];
21
+ }
22
+ /**
23
+ * The `max-height` (px) that ends `list` at a row midpoint, or `null` when
24
+ * the content fits and needs no cap. Rows are located relative to the list's
25
+ * scroll content (rect deltas plus `scrollTop`), so the result is independent
26
+ * of the panel's positioning scheme and of any cap currently applied.
27
+ */
28
+ export declare const peekCap: (list: HTMLElement, { ceiling, itemsPerPage, rows }: PeekCapOptions) => null | number;
29
+ /**
30
+ * Write the peek cap as the list's inline `max-height` (cleared when no cap
31
+ * is needed). Without `ceiling` the list's stylesheet `max-height` (e.g.
32
+ * `max-h-[80vh]`, or a consumer's `::part()` override) is the ceiling; the
33
+ * inline value is cleared first so that stylesheet value is what gets read.
34
+ */
35
+ export declare const applyPeekCap: (list: HTMLElement, options: PeekCapOptions) => void;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The select-all row (CONTEXT.md, ADR-0046): the selection maths `c-select`
3
+ * and `c-autocomplete` share in `multiple` mode.
4
+ *
5
+ * `listed` is the enabled options currently in the list, in list order —
6
+ * every option in c-select, the current matches in c-autocomplete; callers
7
+ * filter disabled options out first. Duplicate option values collapse in the
8
+ * Set maths, exactly as they do when a single row is toggled.
9
+ */
10
+ /** `c-select` ↔ `c-dropdown` `index` contract: the select-all row is highlighted. */
11
+ export declare const SELECT_ALL_INDEX = -1;
12
+ export type SelectAllState = 'all' | 'none' | 'some';
13
+ export interface SelectAllListedOption {
14
+ label: string;
15
+ value: number | string;
16
+ }
17
+ /** What the row's indicator shows: none, some (indeterminate) or all listed selected. */
18
+ export declare const selectAllState: (listed: readonly (number | string)[], selected: ReadonlySet<number | string>) => SelectAllState;
19
+ /**
20
+ * The next selection after the row is activated. Every listed option already
21
+ * selected → drop the listed values (the others keep their order); otherwise
22
+ * append the unselected listed options in list order (selection order,
23
+ * ADR-0044). `added` / `removed` let a caller keep per-value bookkeeping.
24
+ */
25
+ export declare const toggleAllValues: <T>(current: readonly T[], listed: readonly SelectAllListedOption[], valueOf: (v: T) => number | string, make: (o: SelectAllListedOption) => T) => {
26
+ added: SelectAllListedOption[];
27
+ next: T[];
28
+ removed: (number | string)[];
29
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Split a label into the runs that equal the query and the runs between them
3
+ * — the shape `c-autocomplete`'s match marking renders as text and
4
+ * `<mark part="match">` nodes (ADR-0045).
5
+ *
6
+ * The query is matched literally (regex metacharacters escaped — the 3.x
7
+ * implementation built an unescaped RegExp and threw on `c++` or `(`) and
8
+ * case-insensitively via the `i` flag on the original string, so indices never
9
+ * drift the way a lowercased `indexOf` can when case mapping changes a
10
+ * string's length. Every occurrence is marked, left to right, without
11
+ * overlap; adjacent occurrences yield adjacent marks. An empty query yields
12
+ * one plain run (or nothing for empty text).
13
+ */
14
+ export interface MatchSegment {
15
+ match: boolean;
16
+ text: string;
17
+ }
18
+ export declare const splitMatches: (text: string, query: string) => MatchSegment[];