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

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 (30) hide show
  1. package/dist/csc-ui.js +7297 -6845
  2. package/dist/custom-elements.json +259 -56
  3. package/dist/docs/c-autocomplete/usage.md +97 -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 +71 -0
  8. package/dist/vscode.css-custom-data.json +53 -0
  9. package/dist/vscode.html-custom-data.json +34 -19
  10. package/dist/web-types.json +153 -51
  11. package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +70 -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 +15 -3
  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 +68 -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/splitMatches.d.ts +18 -0
  29. package/dist-types/tag-name-map.d.ts +78 -17
  30. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@cscfi/csc-ui",
4
- "version": "4.0.0-alpha.11",
4
+ "version": "4.0.0-alpha.12",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -252,7 +252,7 @@
252
252
  },
253
253
  {
254
254
  "name": "c-autocomplete",
255
- "description": "A filterable value-selection component: a readonly value field that opens a popover panel with a search input above the matching options.\n---\n\n\n### **Events:**\n - **change** - Native change event (no detail) dispatched whenever a selection is\ncommitted or cleared; bubbles through the shadow boundary for\nform-style listeners.\n- **change:query** - Fired whenever the query changes — on every keystroke in the search\ninput, and with an empty string when the panel opens. Carries the query\nstring. With `external`, drive your data source from this (debounce on\nyour side) and feed the results back via `items`.\n- **changeValue** - Fired when the selected value changes (an option is committed or the\nselection is cleared), carrying the new value — the option's value, or\nthe whole `{ name, value }` item when `return-object` is set; `null`\nwhen cleared. Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event dispatched alongside every value change so a\nplain `v-model` stays in sync. Carries no detail.\n- **update:value** - Fired alongside `changeValue` with the same detail — the `v-model`\ncontract.\n\n### **Methods:**\n - **reset()** - Reset autocomplete state\n\n### **Slots:**\n - **pre** - Content placed before the value field inside the input row\n- **default** - The c-option elements used as the data source (never rendered in place)\n- **post** - Content placed after the value field inside the input row\n\n### **CSS Parts:**\n - **panel** - The top-layer popover container anchored below the field\n- **card** - The elevated surface inside the panel holding the search row and the list\n- **search** - The search-input row at the top of the panel\n- **list** - The scrollable options listbox\n- **info** - The info row: loading while `loading` with an empty list, otherwise no-results when the query matches no options",
255
+ "description": "A filterable value-selection component: a readonly value field that opens a popover panel with a search input above the matching options.\n---\n\n\n### **Events:**\n - **change** - Native change event (no detail) dispatched whenever a selection is\ncommitted or cleared; bubbles through the shadow boundary for\nform-style listeners.\n- **change:query** - Fired whenever the query changes — on every keystroke in the search\ninput, and with an empty string when the panel opens. Carries the query\nstring. With `external`, drive your data source from this (debounce on\nyour side) and feed the results back via `items`.\n- **changeValue** - Fired when the selected value changes (an option is committed or the\nselection is cleared), carrying the new value — the option's value, or\nthe whole `{ name, value }` item when `return-object` is set; `null`\nwhen cleared. In `multiple` mode the whole array of picked values, in\npick order (`[]` when cleared). Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event dispatched alongside every value change so a\nplain `v-model` stays in sync. Carries no detail.\n- **update:value** - Fired alongside `changeValue` with the same detail — the `v-model`\ncontract.\n\n### **Methods:**\n - **reset()** - Reset autocomplete state\n\n### **Slots:**\n - **pre** - Content placed before the value field inside the input row\n- **default** - The c-option elements used as the data source (never rendered in place)\n- **post** - Content placed after the value field inside the input row\n\n### **CSS Parts:**\n - **panel** - The top-layer popover container anchored below the field\n- **card** - The elevated surface inside the panel holding the search row and the list\n- **search** - The search-input row at the top of the panel\n- **list** - The scrollable options listbox\n- **item** - One option row in the list\n- **indicator** - The decorative checkbox box on an option row in `multiple` mode; border, fill and glyph draw with `currentColor`, so `color` recolours them together (the c-checkbox recipe)\n- **mark** - The check glyph inside a row indicator; draws with `currentColor`\n- **match** - A run of an option's label equal to the query, in the row; underlined in the primary colour, text inherits the row\n- **info** - The info row: loading while `loading` with an empty list, otherwise no-results when the query matches no options\n- **tags** - The row of selected-value tags inside the field (`multiple` mode)\n- **tag** - One selected-value tag: the `c-tag` host, including the overflow tag\n- **tag-root** - The pill box inside each tag (the `c-tag` `root` part), for colours and borders",
256
256
  "doc-url": "",
257
257
  "attributes": [
258
258
  {
@@ -310,16 +310,21 @@
310
310
  "description": "Show loading state",
311
311
  "value": { "type": "boolean", "default": "false" }
312
312
  },
313
+ {
314
+ "name": "max-tags",
315
+ "description": "In `multiple` mode, show at most this many selected-value tags and fold\nthe rest into one \"+N more\" tag; `0` shows no tags and reads \"N selected\"\ninstead; unset shows every tag",
316
+ "value": { "type": "number" }
317
+ },
318
+ {
319
+ "name": "multiple",
320
+ "description": "Allow selecting several options: rows toggle, the panel stays open and\nkeeps its query, `value` becomes an array of the selected values (items\nwith `return-object`) in the order they were picked, and the picks show\nas tags inside the field. Arrays have no attribute form — bind `value` as\na DOM property",
321
+ "value": { "type": "boolean", "default": "false" }
322
+ },
313
323
  {
314
324
  "name": "name",
315
325
  "description": "Input field name",
316
326
  "value": { "type": "string", "default": "''" }
317
327
  },
318
- {
319
- "name": "no-results-text",
320
- "description": "Message shown when the query matches no options",
321
- "value": { "type": "string", "default": "'No matching data'" }
322
- },
323
328
  {
324
329
  "name": "placeholder",
325
330
  "description": "Placeholder for the in-panel search input",
@@ -349,14 +354,6 @@
349
354
  "name": "valid",
350
355
  "description": "Set the validity of the input",
351
356
  "value": { "type": "boolean", "default": "true" }
352
- },
353
- {
354
- "name": "value",
355
- "description": "Selected value (scalar, or object when return-object is set)",
356
- "value": {
357
- "type": "CAutocompleteItem | null | number | string",
358
- "default": "null"
359
- }
360
357
  }
361
358
  ],
362
359
  "slots": [
@@ -386,8 +383,8 @@
386
383
  },
387
384
  {
388
385
  "name": "changeValue",
389
- "type": "CustomEvent<CAutocompleteItem | null | number | string>",
390
- "description": "Fired when the selected value changes (an option is committed or the\nselection is cleared), carrying the new value — the option's value, or\nthe whole `{ name, value }` item when `return-object` is set; `null`\nwhen cleared. Also dispatched as `change-value` — bind that name in Vue templates."
386
+ "type": "CustomEvent<CAutocompleteValue>",
387
+ "description": "Fired when the selected value changes (an option is committed or the\nselection is cleared), carrying the new value — the option's value, or\nthe whole `{ name, value }` item when `return-object` is set; `null`\nwhen cleared. In `multiple` mode the whole array of picked values, in\npick order (`[]` when cleared). Also dispatched as `change-value` — bind that name in Vue templates."
391
388
  },
392
389
  {
393
390
  "name": "input",
@@ -396,7 +393,7 @@
396
393
  },
397
394
  {
398
395
  "name": "update:value",
399
- "type": "CustomEvent<CAutocompleteItem | null | number | string>",
396
+ "type": "CustomEvent<CAutocompleteValue>",
400
397
  "description": "Fired alongside `changeValue` with the same detail — the `v-model`\ncontract."
401
398
  }
402
399
  ],
@@ -468,13 +465,18 @@
468
465
  "type": "boolean"
469
466
  },
470
467
  {
471
- "name": "name",
472
- "description": "Input field name",
473
- "type": "string"
468
+ "name": "maxTags",
469
+ "description": "In `multiple` mode, show at most this many selected-value tags and fold\nthe rest into one \"+N more\" tag; `0` shows no tags and reads \"N selected\"\ninstead; unset shows every tag",
470
+ "type": "number"
471
+ },
472
+ {
473
+ "name": "multiple",
474
+ "description": "Allow selecting several options: rows toggle, the panel stays open and\nkeeps its query, `value` becomes an array of the selected values (items\nwith `return-object`) in the order they were picked, and the picks show\nas tags inside the field. Arrays have no attribute form — bind `value` as\na DOM property",
475
+ "type": "boolean"
474
476
  },
475
477
  {
476
- "name": "noResultsText",
477
- "description": "Message shown when the query matches no options",
478
+ "name": "name",
479
+ "description": "Input field name",
478
480
  "type": "string"
479
481
  },
480
482
  {
@@ -502,6 +504,11 @@
502
504
  "description": "Field height: the 44px default or the 36px `small` box",
503
505
  "type": "'default' | 'small'"
504
506
  },
507
+ {
508
+ "name": "texts",
509
+ "description": "UI text overrides (i18n), merged over the English defaults. Objects have\nno attribute form — bind as a DOM property (`:texts.prop` in Vue)",
510
+ "type": "CAutocompleteTexts"
511
+ },
505
512
  {
506
513
  "name": "valid",
507
514
  "description": "Set the validity of the input",
@@ -509,8 +516,8 @@
509
516
  },
510
517
  {
511
518
  "name": "value",
512
- "description": "Selected value (scalar, or object when return-object is set)",
513
- "type": "CAutocompleteItem | null | number | string"
519
+ "description": "Selected value: the option's value, or the whole item with\n`return-object`; an array of them in `multiple` mode",
520
+ "type": "CAutocompleteValue"
514
521
  }
515
522
  ],
516
523
  "events": [
@@ -526,8 +533,8 @@
526
533
  },
527
534
  {
528
535
  "name": "changeValue",
529
- "type": "CustomEvent<CAutocompleteItem | null | number | string>",
530
- "description": "Fired when the selected value changes (an option is committed or the\nselection is cleared), carrying the new value — the option's value, or\nthe whole `{ name, value }` item when `return-object` is set; `null`\nwhen cleared. Also dispatched as `change-value` — bind that name in Vue templates."
536
+ "type": "CustomEvent<CAutocompleteValue>",
537
+ "description": "Fired when the selected value changes (an option is committed or the\nselection is cleared), carrying the new value — the option's value, or\nthe whole `{ name, value }` item when `return-object` is set; `null`\nwhen cleared. In `multiple` mode the whole array of picked values, in\npick order (`[]` when cleared). Also dispatched as `change-value` — bind that name in Vue templates."
531
538
  },
532
539
  {
533
540
  "name": "input",
@@ -536,7 +543,7 @@
536
543
  },
537
544
  {
538
545
  "name": "update:value",
539
- "type": "CustomEvent<CAutocompleteItem | null | number | string>",
546
+ "type": "CustomEvent<CAutocompleteValue>",
540
547
  "description": "Fired alongside `changeValue` with the same detail — the `v-model`\ncontract."
541
548
  }
542
549
  ]
@@ -1452,7 +1459,7 @@
1452
1459
  },
1453
1460
  {
1454
1461
  "name": "c-dropdown",
1455
- "description": "\n---\n\n\n### **Events:**\n - **dropdownStateChange** - Fired when the dropdown menu opens or closes; the detail is the new open\nstate. Also dispatched as `dropdown-state-change` — bind that name in Vue templates.\n- **selectOption** - Fired when the user selects an option row, carrying the option's name\nand value for the parent (c-select) to commit. Also dispatched as `select-option` — bind that name in Vue templates.\n\n### **Methods:**\n - **close()** - Close dropdown\n- **open()** - Open dropdown\n- **selectItem()** - Select item\n- **updateList()** - Update list items\n\n### **Slots:**\n - **default** - The anchor c-input of the parent select / autocomplete, rendered inline while the menu is closed\n- **input-top** - Target the c-input is moved into when the menu opens below the field\n- **input-bottom** - Target the c-input is moved into when the menu opens above the field\n\n### **CSS Parts:**\n - **menu** - The positioned dialog surface holding the field and the list\n- **list** - The scrolling listbox\n- **item** - One option row",
1462
+ "description": "\n---\n\n\n### **Events:**\n - **dropdownStateChange** - Fired when the dropdown menu opens or closes; the detail is the new open\nstate. Also dispatched as `dropdown-state-change` — bind that name in Vue templates.\n- **selectOption** - Fired when the user selects an option row, carrying the option's name\nand value for the parent (c-select) to commit. Also dispatched as `select-option` — bind that name in Vue templates.\n\n### **Methods:**\n - **close()** - Close dropdown\n- **open()** - Open dropdown\n- **selectItem()** - Select item\n- **updateList()** - Update list items\n\n### **Slots:**\n - **default** - The anchor c-input of the parent select / autocomplete, rendered inline while the menu is closed\n- **input-top** - Target the c-input is moved into when the menu opens below the field\n- **input-bottom** - Target the c-input is moved into when the menu opens above the field\n\n### **CSS Parts:**\n - **menu** - The positioned dialog surface holding the field and the list\n- **list** - The scrolling listbox\n- **item** - One option row\n- **indicator** - The decorative checkbox box on an option row in `multiple` mode; border, fill and glyph draw with `currentColor`, so `color` recolours them together\n- **mark** - The check glyph inside a row indicator; draws with `currentColor`",
1456
1463
  "doc-url": "",
1457
1464
  "attributes": [
1458
1465
  {
@@ -1483,6 +1490,11 @@
1483
1490
  "description": "Items per page before adding scroll",
1484
1491
  "value": { "type": "number", "default": "0" }
1485
1492
  },
1493
+ {
1494
+ "name": "multiple",
1495
+ "description": "Multi-select mode: rows toggle instead of committing, each carries a\ndecorative checkbox indicator, and the listbox is `aria-multiselectable`",
1496
+ "value": { "type": "boolean", "default": "false" }
1497
+ },
1486
1498
  {
1487
1499
  "name": "parent",
1488
1500
  "description": "Dropdown parent (the c-select / c-autocomplete host element)",
@@ -1550,11 +1562,21 @@
1550
1562
  "description": "Items per page before adding scroll",
1551
1563
  "type": "number"
1552
1564
  },
1565
+ {
1566
+ "name": "multiple",
1567
+ "description": "Multi-select mode: rows toggle instead of committing, each carries a\ndecorative checkbox indicator, and the listbox is `aria-multiselectable`",
1568
+ "type": "boolean"
1569
+ },
1553
1570
  {
1554
1571
  "name": "parent",
1555
1572
  "description": "Dropdown parent (the c-select / c-autocomplete host element)",
1556
1573
  "type": "HTMLElement | null"
1557
1574
  },
1575
+ {
1576
+ "name": "selected",
1577
+ "description": "Values of the currently selected items in `multiple` mode; drives each\nrow's `aria-selected` and its indicator",
1578
+ "type": "(number | string)[]"
1579
+ },
1558
1580
  {
1559
1581
  "name": "type",
1560
1582
  "description": "Parent type — drives autocomplete-only behaviour (highlight, messages)",
@@ -2407,7 +2429,7 @@
2407
2429
  },
2408
2430
  {
2409
2431
  "name": "c-menu",
2410
- "description": "\n---\n\n\n### **Events:**\n - **change:open** - Fired whenever the menu opens or closes, carrying the new open state.\nNamed `change:open`, not `update:open`: Vue's runtime silently drops\n`onUpdate:*` listeners on custom elements (`isModelListener`), so a\ntemplate `@update:open` would never be attached.\n- **select** - Fired when a leaf menu item is selected, carrying the item's `value`;\nbubbles out of the menu so a single listener can handle the whole tree.\n\n### **Slots:**\n - **default** - Menu title / activator element (simple variant)\n- **trigger** - The element that opens the menu (e.g. a c-button)\n\n### **CSS Parts:**\n - **trigger** - The inline wrapper around the slotted trigger, serving as the panel's anchor\n- **panel** - The floating popover positioned against the trigger\n- **list** - The menu list surface inside the panel",
2432
+ "description": "A command menu: a transient panel of actions or navigation choices opened from a trigger (the WAI-ARIA menu-button pattern), authored declaratively with slotted `c-menu-item`, `c-menu-label` and `c-divider` elements. Activating an item fires a one-off `select` event and closes the menu; the menu holds no selected value — that is `c-select`'s job.\n---\n\n\n### **Events:**\n - **change:open** - Fired whenever the menu opens or closes, carrying the new open state.\nNamed `change:open`, not `update:open`: Vue's runtime silently drops\n`onUpdate:*` listeners on custom elements (`isModelListener`), so a\ntemplate `@update:open` would never be attached.\n- **select** - Fired when a leaf menu item is selected, carrying the item's `value`;\nbubbles out of the menu so a single listener can handle the whole tree.\n\n### **Slots:**\n - **default** - Menu title / activator element (simple variant)\n- **trigger** - The element that opens the menu (e.g. a c-button)\n\n### **CSS Parts:**\n - **trigger** - The inline wrapper around the slotted trigger, serving as the panel's anchor\n- **panel** - The floating popover positioned against the trigger\n- **list** - The menu list surface inside the panel",
2411
2433
  "doc-url": "",
2412
2434
  "attributes": [
2413
2435
  {
@@ -2746,7 +2768,7 @@
2746
2768
  },
2747
2769
  {
2748
2770
  "name": "c-option",
2749
- "description": "\n---\n\n\n### **Slots:**\n - **default** - The option's visible label content, shown in the c-select dropdown list",
2771
+ "description": "\n---\n\n\n### **Slots:**\n - **default** - The option's content, rendered in the list row; wrap the label text in c-option-value when the option carries more than its label",
2750
2772
  "doc-url": "",
2751
2773
  "attributes": [
2752
2774
  {
@@ -2773,7 +2795,7 @@
2773
2795
  "slots": [
2774
2796
  {
2775
2797
  "name": "default",
2776
- "description": "The option's visible label content, shown in the c-select dropdown list"
2798
+ "description": "The option's content, rendered in the list row; wrap the label text in c-option-value when the option carries more than its label"
2777
2799
  }
2778
2800
  ],
2779
2801
  "events": [],
@@ -2805,13 +2827,13 @@
2805
2827
  },
2806
2828
  {
2807
2829
  "name": "c-option-value",
2808
- "description": "\n---\n\n\n### **Slots:**\n - **default** - The displayed option text, targeted by c-dropdown when highlighting autocomplete matches",
2830
+ "description": "The label region of a `c-option`: wraps the text that c-select and c-autocomplete use as the option's label — in the closed field, its tag and the autocomplete filter — so the option can carry a description or an icon beside its label, and the region in which c-autocomplete marks the runs equal to the query (`::part(match)`).\n---\n\n\n### **Slots:**\n - **default** - The option's label: the text c-select and c-autocomplete use for the option in the closed field, its tag and the filter, and the region c-autocomplete marks query matches in",
2809
2831
  "doc-url": "",
2810
2832
  "attributes": [],
2811
2833
  "slots": [
2812
2834
  {
2813
2835
  "name": "default",
2814
- "description": "The displayed option text, targeted by c-dropdown when highlighting autocomplete matches"
2836
+ "description": "The option's label: the text c-select and c-autocomplete use for the option in the closed field, its tag and the filter, and the region c-autocomplete marks query matches in"
2815
2837
  }
2816
2838
  ],
2817
2839
  "events": [],
@@ -3495,7 +3517,7 @@
3495
3517
  },
3496
3518
  {
3497
3519
  "name": "c-select",
3498
- "description": "\n---\n\n\n### **Events:**\n - **changeValue** - Fired when the selection changes (an option is picked or the value is\ncleared), carrying the new value — the option's value, or the whole\n`{ name, value }` item when `return-object` is set; `null` when cleared. Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event dispatched alongside every value change so a\nplain `v-model` stays in sync. Carries no detail.\n- **update:value** - Fired alongside `changeValue` with the same detail — the `v-model`\ncontract.\n\n### **Methods:**\n - **reset()** - Reset select state\n\n### **Slots:**\n - **default** - Use c-option elements only\n- **pre** - Leading content forwarded to the inner c-input, rendered before the select's value\n- **post** - Trailing content forwarded to the inner c-input, rendered after the select's controls\n\n### **CSS Parts:**\n - **menu** - The dropdown surface (the positioned dialog) holding the field and the list\n- **list** - The scrolling listbox of options\n- **item** - One option row in the list. Any `part` attribute set on content inside a slotted `<c-option>` is exported too, so `c-select::part(<name>)` reaches the consumer's own option markup",
3520
+ "description": "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`.\n---\n\n\n### **Events:**\n - **changeValue** - Fired when the selection changes (an option is picked or the value is\ncleared), carrying the new value — the option's value, or the whole\n`{ name, value }` item when `return-object` is set; `null` when cleared.\nIn `multiple` mode the whole array of picked values, in pick order\n(`[]` when cleared). Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event dispatched alongside every value change so a\nplain `v-model` stays in sync. Carries no detail.\n- **update:value** - Fired alongside `changeValue` with the same detail — the `v-model`\ncontract.\n\n### **Methods:**\n - **reset()** - Reset select state\n\n### **Slots:**\n - **default** - Use c-option elements only\n- **pre** - Leading content forwarded to the inner c-input, rendered before the select's value\n- **post** - Trailing content forwarded to the inner c-input, rendered after the select's controls\n\n### **CSS Parts:**\n - **menu** - The dropdown surface (the positioned dialog) holding the field and the list\n- **list** - The scrolling listbox of options\n- **item** - One option row in the list. Any `part` attribute set on content inside a slotted `<c-option>` is exported too, so `c-select::part(<name>)` reaches the consumer's own option markup\n- **indicator** - The decorative checkbox box on an option row in `multiple` mode; border, fill and glyph draw with `currentColor`, so `color` recolours them together (the c-checkbox recipe)\n- **mark** - The check glyph inside a row indicator; draws with `currentColor`\n- **tags** - The row of selected-value tags inside the field (`multiple` mode)\n- **tag** - One selected-value tag: the `c-tag` host, including the overflow tag\n- **tag-root** - The pill box inside each tag (the `c-tag` `root` part), for colours and borders",
3499
3521
  "doc-url": "",
3500
3522
  "attributes": [
3501
3523
  {
@@ -3548,6 +3570,16 @@
3548
3570
  "description": "Show loading state",
3549
3571
  "value": { "type": "boolean", "default": "false" }
3550
3572
  },
3573
+ {
3574
+ "name": "max-tags",
3575
+ "description": "In `multiple` mode, show at most this many selected-value tags and fold\nthe rest into one \"+N more\" tag; `0` shows no tags and reads \"N selected\"\ninstead; unset shows every tag",
3576
+ "value": { "type": "number" }
3577
+ },
3578
+ {
3579
+ "name": "multiple",
3580
+ "description": "Allow selecting several options: rows toggle and the list stays open,\n`value` becomes an array of the selected values (items with\n`return-object`) in the order they were picked, and the picks show as\ntags inside the field. `option-as-selection` is ignored in this mode.\nArrays have no attribute form — bind `value` as a DOM property",
3581
+ "value": { "type": "boolean", "default": "false" }
3582
+ },
3551
3583
  {
3552
3584
  "name": "name",
3553
3585
  "description": "Input field name",
@@ -3587,14 +3619,6 @@
3587
3619
  "name": "valid",
3588
3620
  "description": "Set the validity of the input",
3589
3621
  "value": { "type": "boolean", "default": "true" }
3590
- },
3591
- {
3592
- "name": "value",
3593
- "description": "Selected value (scalar, or object when return-object is set)",
3594
- "value": {
3595
- "type": "CSelectItem | null | number | string",
3596
- "default": "null"
3597
- }
3598
3622
  }
3599
3623
  ],
3600
3624
  "slots": [
@@ -3611,8 +3635,8 @@
3611
3635
  "events": [
3612
3636
  {
3613
3637
  "name": "changeValue",
3614
- "type": "CustomEvent<CSelectItem | null | number | string>",
3615
- "description": "Fired when the selection changes (an option is picked or the value is\ncleared), carrying the new value — the option's value, or the whole\n`{ name, value }` item when `return-object` is set; `null` when cleared. Also dispatched as `change-value` — bind that name in Vue templates."
3638
+ "type": "CustomEvent<CSelectValue>",
3639
+ "description": "Fired when the selection changes (an option is picked or the value is\ncleared), carrying the new value — the option's value, or the whole\n`{ name, value }` item when `return-object` is set; `null` when cleared.\nIn `multiple` mode the whole array of picked values, in pick order\n(`[]` when cleared). Also dispatched as `change-value` — bind that name in Vue templates."
3616
3640
  },
3617
3641
  {
3618
3642
  "name": "input",
@@ -3621,7 +3645,7 @@
3621
3645
  },
3622
3646
  {
3623
3647
  "name": "update:value",
3624
- "type": "CustomEvent<CSelectItem | null | number | string>",
3648
+ "type": "CustomEvent<CSelectValue>",
3625
3649
  "description": "Fired alongside `changeValue` with the same detail — the `v-model`\ncontract."
3626
3650
  }
3627
3651
  ],
@@ -3682,6 +3706,16 @@
3682
3706
  "description": "Show loading state",
3683
3707
  "type": "boolean"
3684
3708
  },
3709
+ {
3710
+ "name": "maxTags",
3711
+ "description": "In `multiple` mode, show at most this many selected-value tags and fold\nthe rest into one \"+N more\" tag; `0` shows no tags and reads \"N selected\"\ninstead; unset shows every tag",
3712
+ "type": "number"
3713
+ },
3714
+ {
3715
+ "name": "multiple",
3716
+ "description": "Allow selecting several options: rows toggle and the list stays open,\n`value` becomes an array of the selected values (items with\n`return-object`) in the order they were picked, and the picks show as\ntags inside the field. `option-as-selection` is ignored in this mode.\nArrays have no attribute form — bind `value` as a DOM property",
3717
+ "type": "boolean"
3718
+ },
3685
3719
  {
3686
3720
  "name": "name",
3687
3721
  "description": "Input field name",
@@ -3717,6 +3751,11 @@
3717
3751
  "description": "Field height: the 44px default or the 36px `small` box",
3718
3752
  "type": "'default' | 'small'"
3719
3753
  },
3754
+ {
3755
+ "name": "texts",
3756
+ "description": "UI text overrides (i18n), merged over the English defaults. Objects have\nno attribute form — bind as a DOM property (`:texts.prop` in Vue)",
3757
+ "type": "CSelectTexts"
3758
+ },
3720
3759
  {
3721
3760
  "name": "valid",
3722
3761
  "description": "Set the validity of the input",
@@ -3724,15 +3763,15 @@
3724
3763
  },
3725
3764
  {
3726
3765
  "name": "value",
3727
- "description": "Selected value (scalar, or object when return-object is set)",
3728
- "type": "CSelectItem | null | number | string"
3766
+ "description": "Selected value: the option's value, or the whole item with\n`return-object`; an array of them in `multiple` mode",
3767
+ "type": "CSelectValue"
3729
3768
  }
3730
3769
  ],
3731
3770
  "events": [
3732
3771
  {
3733
3772
  "name": "changeValue",
3734
- "type": "CustomEvent<CSelectItem | null | number | string>",
3735
- "description": "Fired when the selection changes (an option is picked or the value is\ncleared), carrying the new value — the option's value, or the whole\n`{ name, value }` item when `return-object` is set; `null` when cleared. Also dispatched as `change-value` — bind that name in Vue templates."
3773
+ "type": "CustomEvent<CSelectValue>",
3774
+ "description": "Fired when the selection changes (an option is picked or the value is\ncleared), carrying the new value — the option's value, or the whole\n`{ name, value }` item when `return-object` is set; `null` when cleared.\nIn `multiple` mode the whole array of picked values, in pick order\n(`[]` when cleared). Also dispatched as `change-value` — bind that name in Vue templates."
3736
3775
  },
3737
3776
  {
3738
3777
  "name": "input",
@@ -3741,7 +3780,7 @@
3741
3780
  },
3742
3781
  {
3743
3782
  "name": "update:value",
3744
- "type": "CustomEvent<CSelectItem | null | number | string>",
3783
+ "type": "CustomEvent<CSelectValue>",
3745
3784
  "description": "Fired alongside `changeValue` with the same detail — the `v-model`\ncontract."
3746
3785
  }
3747
3786
  ]
@@ -4842,6 +4881,11 @@
4842
4881
  "description": "Mark tag as closeable",
4843
4882
  "value": { "type": "boolean", "default": "false" }
4844
4883
  },
4884
+ {
4885
+ "name": "close-label",
4886
+ "description": "Accessible name of the close button rendered when `closeable`",
4887
+ "value": { "type": "string", "default": "'Remove'" }
4888
+ },
4845
4889
  {
4846
4890
  "name": "flat",
4847
4891
  "description": "Remove the hover effect",
@@ -4878,6 +4922,11 @@
4878
4922
  "description": "Mark tag as closeable",
4879
4923
  "type": "boolean"
4880
4924
  },
4925
+ {
4926
+ "name": "closeLabel",
4927
+ "description": "Accessible name of the close button rendered when `closeable`",
4928
+ "type": "string"
4929
+ },
4881
4930
  {
4882
4931
  "name": "flat",
4883
4932
  "description": "Remove the hover effect",
@@ -5514,10 +5563,35 @@
5514
5563
  "name": "part(list)",
5515
5564
  "description": "The scrollable options listbox"
5516
5565
  },
5566
+ { "name": "part(item)", "description": "One option row in the list" },
5567
+ {
5568
+ "name": "part(indicator)",
5569
+ "description": "The decorative checkbox box on an option row in `multiple` mode; border, fill and glyph draw with `currentColor`, so `color` recolours them together (the c-checkbox recipe)"
5570
+ },
5571
+ {
5572
+ "name": "part(mark)",
5573
+ "description": "The check glyph inside a row indicator; draws with `currentColor`"
5574
+ },
5575
+ {
5576
+ "name": "part(match)",
5577
+ "description": "A run of an option's label equal to the query, in the row; underlined in the primary colour, text inherits the row"
5578
+ },
5517
5579
  {
5518
5580
  "name": "part(info)",
5519
5581
  "description": "The info row: loading while `loading` with an empty list, otherwise no-results when the query matches no options"
5520
5582
  },
5583
+ {
5584
+ "name": "part(tags)",
5585
+ "description": "The row of selected-value tags inside the field (`multiple` mode)"
5586
+ },
5587
+ {
5588
+ "name": "part(tag)",
5589
+ "description": "One selected-value tag: the `c-tag` host, including the overflow tag"
5590
+ },
5591
+ {
5592
+ "name": "part(tag-root)",
5593
+ "description": "The pill box inside each tag (the `c-tag` `root` part), for colours and borders"
5594
+ },
5521
5595
  {
5522
5596
  "name": "part(root)",
5523
5597
  "description": "The badge pill itself, absolutely positioned at the top right corner of its parent"
@@ -5658,6 +5732,14 @@
5658
5732
  },
5659
5733
  { "name": "part(list)", "description": "The scrolling listbox" },
5660
5734
  { "name": "part(item)", "description": "One option row" },
5735
+ {
5736
+ "name": "part(indicator)",
5737
+ "description": "The decorative checkbox box on an option row in `multiple` mode; border, fill and glyph draw with `currentColor`, so `color` recolours them together"
5738
+ },
5739
+ {
5740
+ "name": "part(mark)",
5741
+ "description": "The check glyph inside a row indicator; draws with `currentColor`"
5742
+ },
5661
5743
  {
5662
5744
  "name": "part(root)",
5663
5745
  "description": "The `<svg>` element rendering the icon"
@@ -5940,6 +6022,26 @@
5940
6022
  "name": "part(item)",
5941
6023
  "description": "One option row in the list. Any `part` attribute set on content inside a slotted `<c-option>` is exported too, so `c-select::part(<name>)` reaches the consumer's own option markup"
5942
6024
  },
6025
+ {
6026
+ "name": "part(indicator)",
6027
+ "description": "The decorative checkbox box on an option row in `multiple` mode; border, fill and glyph draw with `currentColor`, so `color` recolours them together (the c-checkbox recipe)"
6028
+ },
6029
+ {
6030
+ "name": "part(mark)",
6031
+ "description": "The check glyph inside a row indicator; draws with `currentColor`"
6032
+ },
6033
+ {
6034
+ "name": "part(tags)",
6035
+ "description": "The row of selected-value tags inside the field (`multiple` mode)"
6036
+ },
6037
+ {
6038
+ "name": "part(tag)",
6039
+ "description": "One selected-value tag: the `c-tag` host, including the overflow tag"
6040
+ },
6041
+ {
6042
+ "name": "part(tag-root)",
6043
+ "description": "The pill box inside each tag (the `c-tag` `root` part), for colours and borders"
6044
+ },
5943
6045
  { "name": "part(root)", "description": "The outer drawer container" },
5944
6046
  {
5945
6047
  "name": "part(nav)",
@@ -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;
78
81
  /**
79
- * Message shown when the query matches no options
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;
89
+ /**
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
  *
@@ -95,11 +106,57 @@ export interface CAutocompleteProps {
95
106
  shadow?: boolean;
96
107
  /** Field height: the 44px default or the 36px `small` box */
97
108
  size?: CFieldSize;
109
+ /**
110
+ * UI text overrides (i18n), merged over the English defaults. Objects have
111
+ * no attribute form — bind as a DOM property (`:texts.prop` in Vue)
112
+ */
113
+ texts?: CAutocompleteTexts;
98
114
  /** Set the validity of the input */
99
115
  valid?: boolean;
100
- /** Selected value (scalar, or object when return-object is set) */
101
- value?: CAutocompleteItem | null | number | string;
116
+ /**
117
+ * Selected value: the option's value, or the whole item with
118
+ * `return-object`; an array of them in `multiple` mode
119
+ */
120
+ value?: CAutocompleteValue;
102
121
  }
122
+ /**
123
+ * UI texts of `c-autocomplete`, shallow-merged over the English defaults.
124
+ * Static labels are strings; count- or label-interpolated ones are
125
+ * functions.
126
+ */
127
+ export interface CAutocompleteTexts {
128
+ /** Accessible label of the clear button. */
129
+ clearSelection?: string;
130
+ /** Accessible label of the search input inside the panel. */
131
+ filterOptions?: string;
132
+ /** Text of the loading row shown while `loading` with nothing to list. */
133
+ loading?: string;
134
+ /**
135
+ * Text of the overflow tag when `max-tags` folds the selection; receives the
136
+ * number of hidden tags.
137
+ */
138
+ more?: (count: number) => string;
139
+ /** Text of the row shown when the query matches no options. */
140
+ noResults?: string;
141
+ /** Accessible label of a tag's remove button; receives the option label. */
142
+ remove?: (label: string) => string;
143
+ /** Placeholder of the search input when the `placeholder` prop is empty. */
144
+ searchPlaceholder?: string;
145
+ /**
146
+ * Field text when `max-tags="0"` shows no tags; receives the selection
147
+ * count.
148
+ */
149
+ selected?: (count: number) => string;
150
+ /** Accessible label of the chevron button that opens and closes the panel. */
151
+ toggleOptions?: string;
152
+ }
153
+ /**
154
+ * Selection value of `c-autocomplete`: the committed option's value — or the
155
+ * whole `{ name, value }` item with `return-object` — and `null` when
156
+ * cleared. In `multiple` mode an array of them in the order they were
157
+ * picked, `[]` when empty.
158
+ */
159
+ export type CAutocompleteValue = (number | string)[] | CAutocompleteItem | CAutocompleteItem[] | null | number | string;
103
160
  declare const _default: typeof __VLS_export;
104
161
  export default _default;
105
162
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAutocompleteProps, {
@@ -107,8 +164,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAutoc
107
164
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CAutocompleteProps> & Readonly<{}>, {
108
165
  label: string;
109
166
  filter: CAutocompleteFilter;
110
- value: CAutocompleteItem | null | number | string;
167
+ value: CAutocompleteValue;
111
168
  name: string;
169
+ multiple: boolean;
112
170
  clearable: boolean;
113
171
  disabled: boolean;
114
172
  errorMessage: string;
@@ -120,12 +178,13 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CAutoc
120
178
  itemsPerPage: number;
121
179
  labelOnTop: boolean;
122
180
  loading: boolean;
123
- noResultsText: string;
181
+ maxTags: number;
124
182
  placeholder: string;
125
183
  required: boolean;
126
184
  returnObject: boolean;
127
185
  shadow: boolean;
128
186
  size: CFieldSize;
187
+ texts: CAutocompleteTexts;
129
188
  valid: boolean;
130
189
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
131
190
  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
  } & {