@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.
- package/dist/csc-ui.js +7677 -7042
- package/dist/custom-elements.json +337 -58
- package/dist/docs/c-autocomplete/usage.md +129 -0
- package/dist/docs/c-menu/usage.md +15 -0
- package/dist/docs/c-menu-item/usage.md +6 -0
- package/dist/docs/c-option-value/usage.md +1 -0
- package/dist/docs/c-select/usage.md +104 -0
- package/dist/vscode.css-custom-data.json +65 -0
- package/dist/vscode.html-custom-data.json +50 -20
- package/dist/web-types.json +210 -53
- package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +84 -11
- package/dist-types/components/c-checkbox/CCheckbox.vue.d.ts +2 -2
- package/dist-types/components/c-data-table/CDataTable.vue.d.ts +1 -1
- package/dist-types/components/c-dropdown/CDropdown.vue.d.ts +32 -4
- package/dist-types/components/c-input/CInput.vue.d.ts +1 -1
- package/dist-types/components/c-menu/CMenu.vue.d.ts +1 -1
- package/dist-types/components/c-popover/CPopover.vue.d.ts +1 -1
- package/dist-types/components/c-select/CSelect.vue.d.ts +81 -17
- package/dist-types/components/c-side-navigation/CSideNavigation.vue.d.ts +1 -1
- package/dist-types/components/c-tag/CTag.vue.d.ts +7 -0
- package/dist-types/components/c-text-field/CTextField.vue.d.ts +3 -3
- package/dist-types/components/c-tooltip/CTooltip.vue.d.ts +1 -1
- package/dist-types/index.d.ts +2 -1
- package/dist-types/shared/FormLabel.vue.d.ts +1 -1
- package/dist-types/shared/SelectionIndicator.vue.d.ts +21 -0
- package/dist-types/shared/optionLabel.d.ts +18 -0
- package/dist-types/shared/peekCap.d.ts +35 -0
- package/dist-types/shared/selectAll.d.ts +29 -0
- package/dist-types/shared/splitMatches.d.ts +18 -0
- package/dist-types/tag-name-map.d.ts +110 -18
- package/package.json +1 -1
package/dist/web-types.json
CHANGED
|
@@ -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.
|
|
4
|
+
"version": "4.0.0-alpha.13",
|
|
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- **select-all** - The pinned select-all row at the top of the list (`multiple` mode with `select-all`); carries the same indicator / mark parts as an 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 (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",
|
|
@@ -335,6 +340,11 @@
|
|
|
335
340
|
"description": "Return object instead of value",
|
|
336
341
|
"value": { "type": "boolean", "default": "false" }
|
|
337
342
|
},
|
|
343
|
+
{
|
|
344
|
+
"name": "select-all",
|
|
345
|
+
"description": "In `multiple` mode, pin a select-all row at the top of the list. Its\ncheckbox shows whether none, some or all enabled options currently listed\n— the matches while a query is typed, the given `items` with `external` —\nare selected; activating it selects them all, or, when all are selected,\nunselects them. Ignored in single mode",
|
|
346
|
+
"value": { "type": "boolean", "default": "false" }
|
|
347
|
+
},
|
|
338
348
|
{
|
|
339
349
|
"name": "shadow",
|
|
340
350
|
"description": "Shadow variant",
|
|
@@ -349,14 +359,6 @@
|
|
|
349
359
|
"name": "valid",
|
|
350
360
|
"description": "Set the validity of the input",
|
|
351
361
|
"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
362
|
}
|
|
361
363
|
],
|
|
362
364
|
"slots": [
|
|
@@ -386,8 +388,8 @@
|
|
|
386
388
|
},
|
|
387
389
|
{
|
|
388
390
|
"name": "changeValue",
|
|
389
|
-
"type": "CustomEvent<
|
|
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."
|
|
391
|
+
"type": "CustomEvent<CAutocompleteValue>",
|
|
392
|
+
"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
393
|
},
|
|
392
394
|
{
|
|
393
395
|
"name": "input",
|
|
@@ -396,7 +398,7 @@
|
|
|
396
398
|
},
|
|
397
399
|
{
|
|
398
400
|
"name": "update:value",
|
|
399
|
-
"type": "CustomEvent<
|
|
401
|
+
"type": "CustomEvent<CAutocompleteValue>",
|
|
400
402
|
"description": "Fired alongside `changeValue` with the same detail — the `v-model`\ncontract."
|
|
401
403
|
}
|
|
402
404
|
],
|
|
@@ -468,13 +470,18 @@
|
|
|
468
470
|
"type": "boolean"
|
|
469
471
|
},
|
|
470
472
|
{
|
|
471
|
-
"name": "
|
|
472
|
-
"description": "
|
|
473
|
-
"type": "
|
|
473
|
+
"name": "maxTags",
|
|
474
|
+
"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",
|
|
475
|
+
"type": "number"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"name": "multiple",
|
|
479
|
+
"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",
|
|
480
|
+
"type": "boolean"
|
|
474
481
|
},
|
|
475
482
|
{
|
|
476
|
-
"name": "
|
|
477
|
-
"description": "
|
|
483
|
+
"name": "name",
|
|
484
|
+
"description": "Input field name",
|
|
478
485
|
"type": "string"
|
|
479
486
|
},
|
|
480
487
|
{
|
|
@@ -492,6 +499,11 @@
|
|
|
492
499
|
"description": "Return object instead of value",
|
|
493
500
|
"type": "boolean"
|
|
494
501
|
},
|
|
502
|
+
{
|
|
503
|
+
"name": "selectAll",
|
|
504
|
+
"description": "In `multiple` mode, pin a select-all row at the top of the list. Its\ncheckbox shows whether none, some or all enabled options currently listed\n— the matches while a query is typed, the given `items` with `external` —\nare selected; activating it selects them all, or, when all are selected,\nunselects them. Ignored in single mode",
|
|
505
|
+
"type": "boolean"
|
|
506
|
+
},
|
|
495
507
|
{
|
|
496
508
|
"name": "shadow",
|
|
497
509
|
"description": "Shadow variant",
|
|
@@ -502,6 +514,11 @@
|
|
|
502
514
|
"description": "Field height: the 44px default or the 36px `small` box",
|
|
503
515
|
"type": "'default' | 'small'"
|
|
504
516
|
},
|
|
517
|
+
{
|
|
518
|
+
"name": "texts",
|
|
519
|
+
"description": "UI text overrides (i18n), merged over the English defaults. Objects have\nno attribute form — bind as a DOM property (`:texts.prop` in Vue)",
|
|
520
|
+
"type": "CAutocompleteTexts"
|
|
521
|
+
},
|
|
505
522
|
{
|
|
506
523
|
"name": "valid",
|
|
507
524
|
"description": "Set the validity of the input",
|
|
@@ -509,8 +526,8 @@
|
|
|
509
526
|
},
|
|
510
527
|
{
|
|
511
528
|
"name": "value",
|
|
512
|
-
"description": "Selected value
|
|
513
|
-
"type": "
|
|
529
|
+
"description": "Selected value: the option's value, or the whole item with\n`return-object`; an array of them in `multiple` mode",
|
|
530
|
+
"type": "CAutocompleteValue"
|
|
514
531
|
}
|
|
515
532
|
],
|
|
516
533
|
"events": [
|
|
@@ -526,8 +543,8 @@
|
|
|
526
543
|
},
|
|
527
544
|
{
|
|
528
545
|
"name": "changeValue",
|
|
529
|
-
"type": "CustomEvent<
|
|
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."
|
|
546
|
+
"type": "CustomEvent<CAutocompleteValue>",
|
|
547
|
+
"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
548
|
},
|
|
532
549
|
{
|
|
533
550
|
"name": "input",
|
|
@@ -536,7 +553,7 @@
|
|
|
536
553
|
},
|
|
537
554
|
{
|
|
538
555
|
"name": "update:value",
|
|
539
|
-
"type": "CustomEvent<
|
|
556
|
+
"type": "CustomEvent<CAutocompleteValue>",
|
|
540
557
|
"description": "Fired alongside `changeValue` with the same detail — the `v-model`\ncontract."
|
|
541
558
|
}
|
|
542
559
|
]
|
|
@@ -1452,7 +1469,7 @@
|
|
|
1452
1469
|
},
|
|
1453
1470
|
{
|
|
1454
1471
|
"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",
|
|
1472
|
+
"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- **selectall** - Fired when the select-all row is activated; the parent (c-select) toggles\nevery listed enabled option.\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- **select-all** - The pinned select-all row at the top of the list in `multiple` mode; carries the same indicator / mark parts as an 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
1473
|
"doc-url": "",
|
|
1457
1474
|
"attributes": [
|
|
1458
1475
|
{
|
|
@@ -1467,7 +1484,7 @@
|
|
|
1467
1484
|
},
|
|
1468
1485
|
{
|
|
1469
1486
|
"name": "index",
|
|
1470
|
-
"description": "Current highlighted index",
|
|
1487
|
+
"description": "Current highlighted index; `-1` (`SELECT_ALL_INDEX`) is the select-all row",
|
|
1471
1488
|
"value": { "type": "null | number", "default": "null" }
|
|
1472
1489
|
},
|
|
1473
1490
|
{
|
|
@@ -1483,11 +1500,24 @@
|
|
|
1483
1500
|
"description": "Items per page before adding scroll",
|
|
1484
1501
|
"value": { "type": "number", "default": "0" }
|
|
1485
1502
|
},
|
|
1503
|
+
{
|
|
1504
|
+
"name": "multiple",
|
|
1505
|
+
"description": "Multi-select mode: rows toggle instead of committing, each carries a\ndecorative checkbox indicator, and the listbox is `aria-multiselectable`",
|
|
1506
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1507
|
+
},
|
|
1486
1508
|
{
|
|
1487
1509
|
"name": "parent",
|
|
1488
1510
|
"description": "Dropdown parent (the c-select / c-autocomplete host element)",
|
|
1489
1511
|
"value": { "type": "HTMLElement | null", "default": "null" }
|
|
1490
1512
|
},
|
|
1513
|
+
{
|
|
1514
|
+
"name": "select-all-row",
|
|
1515
|
+
"description": "The select-all row in `multiple` mode, as the parent computes it (label,\ntri-state, counts for the live region); `null` renders no row",
|
|
1516
|
+
"value": {
|
|
1517
|
+
"type": "CDropdownSelectAllRow | null",
|
|
1518
|
+
"default": "null"
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1491
1521
|
{
|
|
1492
1522
|
"name": "type",
|
|
1493
1523
|
"description": "Parent type — drives autocomplete-only behaviour (highlight, messages)",
|
|
@@ -1521,6 +1551,11 @@
|
|
|
1521
1551
|
"name": "selectOption",
|
|
1522
1552
|
"type": "CustomEvent<{ name: string; value: number | string }>",
|
|
1523
1553
|
"description": "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."
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
"name": "selectall",
|
|
1557
|
+
"type": "CustomEvent<void>",
|
|
1558
|
+
"description": "Fired when the select-all row is activated; the parent (c-select) toggles\nevery listed enabled option."
|
|
1524
1559
|
}
|
|
1525
1560
|
],
|
|
1526
1561
|
"js": {
|
|
@@ -1537,7 +1572,7 @@
|
|
|
1537
1572
|
},
|
|
1538
1573
|
{
|
|
1539
1574
|
"name": "index",
|
|
1540
|
-
"description": "Current highlighted index",
|
|
1575
|
+
"description": "Current highlighted index; `-1` (`SELECT_ALL_INDEX`) is the select-all row",
|
|
1541
1576
|
"type": "null | number"
|
|
1542
1577
|
},
|
|
1543
1578
|
{
|
|
@@ -1550,11 +1585,26 @@
|
|
|
1550
1585
|
"description": "Items per page before adding scroll",
|
|
1551
1586
|
"type": "number"
|
|
1552
1587
|
},
|
|
1588
|
+
{
|
|
1589
|
+
"name": "multiple",
|
|
1590
|
+
"description": "Multi-select mode: rows toggle instead of committing, each carries a\ndecorative checkbox indicator, and the listbox is `aria-multiselectable`",
|
|
1591
|
+
"type": "boolean"
|
|
1592
|
+
},
|
|
1553
1593
|
{
|
|
1554
1594
|
"name": "parent",
|
|
1555
1595
|
"description": "Dropdown parent (the c-select / c-autocomplete host element)",
|
|
1556
1596
|
"type": "HTMLElement | null"
|
|
1557
1597
|
},
|
|
1598
|
+
{
|
|
1599
|
+
"name": "selectAllRow",
|
|
1600
|
+
"description": "The select-all row in `multiple` mode, as the parent computes it (label,\ntri-state, counts for the live region); `null` renders no row",
|
|
1601
|
+
"type": "CDropdownSelectAllRow | null"
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
"name": "selected",
|
|
1605
|
+
"description": "Values of the currently selected items in `multiple` mode; drives each\nrow's `aria-selected` and its indicator",
|
|
1606
|
+
"type": "(number | string)[]"
|
|
1607
|
+
},
|
|
1558
1608
|
{
|
|
1559
1609
|
"name": "type",
|
|
1560
1610
|
"description": "Parent type — drives autocomplete-only behaviour (highlight, messages)",
|
|
@@ -1571,6 +1621,11 @@
|
|
|
1571
1621
|
"name": "selectOption",
|
|
1572
1622
|
"type": "CustomEvent<{ name: string; value: number | string }>",
|
|
1573
1623
|
"description": "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."
|
|
1624
|
+
},
|
|
1625
|
+
{
|
|
1626
|
+
"name": "selectall",
|
|
1627
|
+
"type": "CustomEvent<void>",
|
|
1628
|
+
"description": "Fired when the select-all row is activated; the parent (c-select) toggles\nevery listed enabled option."
|
|
1574
1629
|
}
|
|
1575
1630
|
]
|
|
1576
1631
|
}
|
|
@@ -2407,7 +2462,7 @@
|
|
|
2407
2462
|
},
|
|
2408
2463
|
{
|
|
2409
2464
|
"name": "c-menu",
|
|
2410
|
-
"description": "
|
|
2465
|
+
"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
2466
|
"doc-url": "",
|
|
2412
2467
|
"attributes": [
|
|
2413
2468
|
{
|
|
@@ -2746,7 +2801,7 @@
|
|
|
2746
2801
|
},
|
|
2747
2802
|
{
|
|
2748
2803
|
"name": "c-option",
|
|
2749
|
-
"description": "\n---\n\n\n### **Slots:**\n - **default** - The option's
|
|
2804
|
+
"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
2805
|
"doc-url": "",
|
|
2751
2806
|
"attributes": [
|
|
2752
2807
|
{
|
|
@@ -2773,7 +2828,7 @@
|
|
|
2773
2828
|
"slots": [
|
|
2774
2829
|
{
|
|
2775
2830
|
"name": "default",
|
|
2776
|
-
"description": "The option's
|
|
2831
|
+
"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
2832
|
}
|
|
2778
2833
|
],
|
|
2779
2834
|
"events": [],
|
|
@@ -2805,13 +2860,13 @@
|
|
|
2805
2860
|
},
|
|
2806
2861
|
{
|
|
2807
2862
|
"name": "c-option-value",
|
|
2808
|
-
"description": "
|
|
2863
|
+
"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
2864
|
"doc-url": "",
|
|
2810
2865
|
"attributes": [],
|
|
2811
2866
|
"slots": [
|
|
2812
2867
|
{
|
|
2813
2868
|
"name": "default",
|
|
2814
|
-
"description": "The
|
|
2869
|
+
"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
2870
|
}
|
|
2816
2871
|
],
|
|
2817
2872
|
"events": [],
|
|
@@ -3495,7 +3550,7 @@
|
|
|
3495
3550
|
},
|
|
3496
3551
|
{
|
|
3497
3552
|
"name": "c-select",
|
|
3498
|
-
"description": "
|
|
3553
|
+
"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- **select-all** - The pinned select-all row at the top of the list (`multiple` mode with `select-all`); carries the same indicator / mark parts as an 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 (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
3554
|
"doc-url": "",
|
|
3500
3555
|
"attributes": [
|
|
3501
3556
|
{
|
|
@@ -3548,6 +3603,16 @@
|
|
|
3548
3603
|
"description": "Show loading state",
|
|
3549
3604
|
"value": { "type": "boolean", "default": "false" }
|
|
3550
3605
|
},
|
|
3606
|
+
{
|
|
3607
|
+
"name": "max-tags",
|
|
3608
|
+
"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",
|
|
3609
|
+
"value": { "type": "number" }
|
|
3610
|
+
},
|
|
3611
|
+
{
|
|
3612
|
+
"name": "multiple",
|
|
3613
|
+
"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",
|
|
3614
|
+
"value": { "type": "boolean", "default": "false" }
|
|
3615
|
+
},
|
|
3551
3616
|
{
|
|
3552
3617
|
"name": "name",
|
|
3553
3618
|
"description": "Input field name",
|
|
@@ -3573,6 +3638,11 @@
|
|
|
3573
3638
|
"description": "Return object instead of value",
|
|
3574
3639
|
"value": { "type": "boolean", "default": "false" }
|
|
3575
3640
|
},
|
|
3641
|
+
{
|
|
3642
|
+
"name": "select-all",
|
|
3643
|
+
"description": "In `multiple` mode, pin a select-all row at the top of the list. Its\ncheckbox shows whether none, some or all enabled options are selected;\nactivating it selects every enabled option — or, when all are selected,\nunselects them. Ignored in single mode",
|
|
3644
|
+
"value": { "type": "boolean", "default": "false" }
|
|
3645
|
+
},
|
|
3576
3646
|
{
|
|
3577
3647
|
"name": "shadow",
|
|
3578
3648
|
"description": "Shadow variant",
|
|
@@ -3587,14 +3657,6 @@
|
|
|
3587
3657
|
"name": "valid",
|
|
3588
3658
|
"description": "Set the validity of the input",
|
|
3589
3659
|
"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
3660
|
}
|
|
3599
3661
|
],
|
|
3600
3662
|
"slots": [
|
|
@@ -3611,8 +3673,8 @@
|
|
|
3611
3673
|
"events": [
|
|
3612
3674
|
{
|
|
3613
3675
|
"name": "changeValue",
|
|
3614
|
-
"type": "CustomEvent<
|
|
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."
|
|
3676
|
+
"type": "CustomEvent<CSelectValue>",
|
|
3677
|
+
"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
3678
|
},
|
|
3617
3679
|
{
|
|
3618
3680
|
"name": "input",
|
|
@@ -3621,7 +3683,7 @@
|
|
|
3621
3683
|
},
|
|
3622
3684
|
{
|
|
3623
3685
|
"name": "update:value",
|
|
3624
|
-
"type": "CustomEvent<
|
|
3686
|
+
"type": "CustomEvent<CSelectValue>",
|
|
3625
3687
|
"description": "Fired alongside `changeValue` with the same detail — the `v-model`\ncontract."
|
|
3626
3688
|
}
|
|
3627
3689
|
],
|
|
@@ -3682,6 +3744,16 @@
|
|
|
3682
3744
|
"description": "Show loading state",
|
|
3683
3745
|
"type": "boolean"
|
|
3684
3746
|
},
|
|
3747
|
+
{
|
|
3748
|
+
"name": "maxTags",
|
|
3749
|
+
"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",
|
|
3750
|
+
"type": "number"
|
|
3751
|
+
},
|
|
3752
|
+
{
|
|
3753
|
+
"name": "multiple",
|
|
3754
|
+
"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",
|
|
3755
|
+
"type": "boolean"
|
|
3756
|
+
},
|
|
3685
3757
|
{
|
|
3686
3758
|
"name": "name",
|
|
3687
3759
|
"description": "Input field name",
|
|
@@ -3707,6 +3779,11 @@
|
|
|
3707
3779
|
"description": "Return object instead of value",
|
|
3708
3780
|
"type": "boolean"
|
|
3709
3781
|
},
|
|
3782
|
+
{
|
|
3783
|
+
"name": "selectAll",
|
|
3784
|
+
"description": "In `multiple` mode, pin a select-all row at the top of the list. Its\ncheckbox shows whether none, some or all enabled options are selected;\nactivating it selects every enabled option — or, when all are selected,\nunselects them. Ignored in single mode",
|
|
3785
|
+
"type": "boolean"
|
|
3786
|
+
},
|
|
3710
3787
|
{
|
|
3711
3788
|
"name": "shadow",
|
|
3712
3789
|
"description": "Shadow variant",
|
|
@@ -3717,6 +3794,11 @@
|
|
|
3717
3794
|
"description": "Field height: the 44px default or the 36px `small` box",
|
|
3718
3795
|
"type": "'default' | 'small'"
|
|
3719
3796
|
},
|
|
3797
|
+
{
|
|
3798
|
+
"name": "texts",
|
|
3799
|
+
"description": "UI text overrides (i18n), merged over the English defaults. Objects have\nno attribute form — bind as a DOM property (`:texts.prop` in Vue)",
|
|
3800
|
+
"type": "CSelectTexts"
|
|
3801
|
+
},
|
|
3720
3802
|
{
|
|
3721
3803
|
"name": "valid",
|
|
3722
3804
|
"description": "Set the validity of the input",
|
|
@@ -3724,15 +3806,15 @@
|
|
|
3724
3806
|
},
|
|
3725
3807
|
{
|
|
3726
3808
|
"name": "value",
|
|
3727
|
-
"description": "Selected value
|
|
3728
|
-
"type": "
|
|
3809
|
+
"description": "Selected value: the option's value, or the whole item with\n`return-object`; an array of them in `multiple` mode",
|
|
3810
|
+
"type": "CSelectValue"
|
|
3729
3811
|
}
|
|
3730
3812
|
],
|
|
3731
3813
|
"events": [
|
|
3732
3814
|
{
|
|
3733
3815
|
"name": "changeValue",
|
|
3734
|
-
"type": "CustomEvent<
|
|
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."
|
|
3816
|
+
"type": "CustomEvent<CSelectValue>",
|
|
3817
|
+
"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
3818
|
},
|
|
3737
3819
|
{
|
|
3738
3820
|
"name": "input",
|
|
@@ -3741,7 +3823,7 @@
|
|
|
3741
3823
|
},
|
|
3742
3824
|
{
|
|
3743
3825
|
"name": "update:value",
|
|
3744
|
-
"type": "CustomEvent<
|
|
3826
|
+
"type": "CustomEvent<CSelectValue>",
|
|
3745
3827
|
"description": "Fired alongside `changeValue` with the same detail — the `v-model`\ncontract."
|
|
3746
3828
|
}
|
|
3747
3829
|
]
|
|
@@ -4842,6 +4924,11 @@
|
|
|
4842
4924
|
"description": "Mark tag as closeable",
|
|
4843
4925
|
"value": { "type": "boolean", "default": "false" }
|
|
4844
4926
|
},
|
|
4927
|
+
{
|
|
4928
|
+
"name": "close-label",
|
|
4929
|
+
"description": "Accessible name of the close button rendered when `closeable`",
|
|
4930
|
+
"value": { "type": "string", "default": "'Remove'" }
|
|
4931
|
+
},
|
|
4845
4932
|
{
|
|
4846
4933
|
"name": "flat",
|
|
4847
4934
|
"description": "Remove the hover effect",
|
|
@@ -4878,6 +4965,11 @@
|
|
|
4878
4965
|
"description": "Mark tag as closeable",
|
|
4879
4966
|
"type": "boolean"
|
|
4880
4967
|
},
|
|
4968
|
+
{
|
|
4969
|
+
"name": "closeLabel",
|
|
4970
|
+
"description": "Accessible name of the close button rendered when `closeable`",
|
|
4971
|
+
"type": "string"
|
|
4972
|
+
},
|
|
4881
4973
|
{
|
|
4882
4974
|
"name": "flat",
|
|
4883
4975
|
"description": "Remove the hover effect",
|
|
@@ -5514,10 +5606,39 @@
|
|
|
5514
5606
|
"name": "part(list)",
|
|
5515
5607
|
"description": "The scrollable options listbox"
|
|
5516
5608
|
},
|
|
5609
|
+
{ "name": "part(item)", "description": "One option row in the list" },
|
|
5610
|
+
{
|
|
5611
|
+
"name": "part(select-all)",
|
|
5612
|
+
"description": "The pinned select-all row at the top of the list (`multiple` mode with `select-all`); carries the same indicator / mark parts as an option row"
|
|
5613
|
+
},
|
|
5614
|
+
{
|
|
5615
|
+
"name": "part(indicator)",
|
|
5616
|
+
"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)"
|
|
5617
|
+
},
|
|
5618
|
+
{
|
|
5619
|
+
"name": "part(mark)",
|
|
5620
|
+
"description": "The check glyph inside a row indicator; draws with `currentColor`"
|
|
5621
|
+
},
|
|
5622
|
+
{
|
|
5623
|
+
"name": "part(match)",
|
|
5624
|
+
"description": "A run of an option's label equal to the query, in the row; underlined in the primary colour, text inherits the row"
|
|
5625
|
+
},
|
|
5517
5626
|
{
|
|
5518
5627
|
"name": "part(info)",
|
|
5519
5628
|
"description": "The info row: loading while `loading` with an empty list, otherwise no-results when the query matches no options"
|
|
5520
5629
|
},
|
|
5630
|
+
{
|
|
5631
|
+
"name": "part(tags)",
|
|
5632
|
+
"description": "The row of selected-value tags inside the field (`multiple` mode)"
|
|
5633
|
+
},
|
|
5634
|
+
{
|
|
5635
|
+
"name": "part(tag)",
|
|
5636
|
+
"description": "One selected-value tag: the `c-tag` host, including the overflow tag"
|
|
5637
|
+
},
|
|
5638
|
+
{
|
|
5639
|
+
"name": "part(tag-root)",
|
|
5640
|
+
"description": "The pill box inside each tag (the `c-tag` `root` part), for colours and borders"
|
|
5641
|
+
},
|
|
5521
5642
|
{
|
|
5522
5643
|
"name": "part(root)",
|
|
5523
5644
|
"description": "The badge pill itself, absolutely positioned at the top right corner of its parent"
|
|
@@ -5658,6 +5779,18 @@
|
|
|
5658
5779
|
},
|
|
5659
5780
|
{ "name": "part(list)", "description": "The scrolling listbox" },
|
|
5660
5781
|
{ "name": "part(item)", "description": "One option row" },
|
|
5782
|
+
{
|
|
5783
|
+
"name": "part(select-all)",
|
|
5784
|
+
"description": "The pinned select-all row at the top of the list in `multiple` mode; carries the same indicator / mark parts as an option row"
|
|
5785
|
+
},
|
|
5786
|
+
{
|
|
5787
|
+
"name": "part(indicator)",
|
|
5788
|
+
"description": "The decorative checkbox box on an option row in `multiple` mode; border, fill and glyph draw with `currentColor`, so `color` recolours them together"
|
|
5789
|
+
},
|
|
5790
|
+
{
|
|
5791
|
+
"name": "part(mark)",
|
|
5792
|
+
"description": "The check glyph inside a row indicator; draws with `currentColor`"
|
|
5793
|
+
},
|
|
5661
5794
|
{
|
|
5662
5795
|
"name": "part(root)",
|
|
5663
5796
|
"description": "The `<svg>` element rendering the icon"
|
|
@@ -5940,6 +6073,30 @@
|
|
|
5940
6073
|
"name": "part(item)",
|
|
5941
6074
|
"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
6075
|
},
|
|
6076
|
+
{
|
|
6077
|
+
"name": "part(select-all)",
|
|
6078
|
+
"description": "The pinned select-all row at the top of the list (`multiple` mode with `select-all`); carries the same indicator / mark parts as an option row"
|
|
6079
|
+
},
|
|
6080
|
+
{
|
|
6081
|
+
"name": "part(indicator)",
|
|
6082
|
+
"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)"
|
|
6083
|
+
},
|
|
6084
|
+
{
|
|
6085
|
+
"name": "part(mark)",
|
|
6086
|
+
"description": "The check glyph inside a row indicator; draws with `currentColor`"
|
|
6087
|
+
},
|
|
6088
|
+
{
|
|
6089
|
+
"name": "part(tags)",
|
|
6090
|
+
"description": "The row of selected-value tags inside the field (`multiple` mode)"
|
|
6091
|
+
},
|
|
6092
|
+
{
|
|
6093
|
+
"name": "part(tag)",
|
|
6094
|
+
"description": "One selected-value tag: the `c-tag` host, including the overflow tag"
|
|
6095
|
+
},
|
|
6096
|
+
{
|
|
6097
|
+
"name": "part(tag-root)",
|
|
6098
|
+
"description": "The pill box inside each tag (the `c-tag` `root` part), for colours and borders"
|
|
6099
|
+
},
|
|
5943
6100
|
{ "name": "part(root)", "description": "The outer drawer container" },
|
|
5944
6101
|
{
|
|
5945
6102
|
"name": "part(nav)",
|