@cscfi/csc-ui 4.0.0-rc.3 → 4.0.0-rc.5
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 +12632 -11979
- package/dist/custom-elements.json +204 -28
- package/dist/docs/c-button/usage.md +93 -14
- package/dist/docs/c-color-picker/usage.md +2 -1
- package/dist/docs/c-date-picker/usage.md +2 -1
- package/dist/docs/c-file-upload/usage.md +3 -3
- package/dist/docs/c-icon-button/usage.md +19 -8
- package/dist/docs/c-otp-input/usage.md +4 -1
- package/dist/docs/c-radio-group/usage.md +3 -1
- package/dist/docs/c-slider/usage.md +2 -2
- package/dist/docs/c-text-field/usage.md +53 -1
- package/dist/styles/css/tailwind-theme.css +6 -0
- package/dist/styles/css/tokens.css +107 -96
- package/dist/vscode.css-custom-data.json +2 -2
- package/dist/vscode.html-custom-data.json +88 -16
- package/dist/web-types.json +118 -34
- package/dist-types/components/c-autocomplete/CAutocomplete.vue.d.ts +2 -1
- package/dist-types/components/c-button/CButton.vue.d.ts +23 -5
- package/dist-types/components/c-button/injectButtonStyles.d.ts +1 -0
- package/dist-types/components/c-button-group/CButtonGroup.vue.d.ts +8 -0
- package/dist-types/components/c-checkbox/CCheckbox.vue.d.ts +3 -3
- package/dist-types/components/c-color-picker/CColorPicker.vue.d.ts +2 -1
- package/dist-types/components/c-date-picker/CDatePicker.vue.d.ts +2 -1
- package/dist-types/components/c-icon-button/CIconButton.vue.d.ts +18 -2
- package/dist-types/components/c-list-item/CListItem.vue.d.ts +1 -1
- package/dist-types/components/c-number-field/CNumberField.vue.d.ts +2 -1
- package/dist-types/components/c-otp-input/COtpInput.vue.d.ts +7 -0
- package/dist-types/components/c-radio-group/CRadioGroup.vue.d.ts +8 -0
- package/dist-types/components/c-select/CSelect.vue.d.ts +2 -1
- package/dist-types/components/c-side-navigation-item/CSideNavigationItem.vue.d.ts +1 -1
- package/dist-types/components/c-slider/CSlider.vue.d.ts +2 -3
- package/dist-types/components/c-sub-navigation-item/CSubNavigationItem.vue.d.ts +1 -1
- package/dist-types/components/c-switch/CSwitch.vue.d.ts +8 -0
- package/dist-types/components/c-text-field/CTextField.vue.d.ts +3 -2
- package/dist-types/components/c-text-field/injectTextFieldStyles.d.ts +1 -0
- package/dist-types/components/c-time-picker/CTimePicker.vue.d.ts +2 -1
- package/dist-types/components/c-tree-select/CTreeSelect.vue.d.ts +1 -1
- package/dist-types/index.d.ts +2 -2
- package/dist-types/registry.d.ts +7 -0
- package/dist-types/shared/appDefaults.d.ts +8 -1
- package/dist-types/shared/buttonVariant.d.ts +5 -0
- package/dist-types/shared/defineElement.d.ts +5 -1
- package/dist-types/shared/implicitSubmission.d.ts +31 -0
- package/dist-types/shared/useElementInternals.d.ts +7 -0
- package/dist-types/shared/useFormAssociation.d.ts +88 -0
- package/dist-types/shared/useHostStates.d.ts +5 -4
- package/dist-types/shared/useTypedField.d.ts +7 -0
- package/dist-types/shared/valueEvents.d.ts +6 -0
- package/dist-types/tag-name-map.d.ts +75 -28
- package/package.json +3 -2
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "c-accordion-item",
|
|
34
|
-
"description": "One collapsible section of a `c-accordion`: a header button showing its `heading` (or the `heading` slot) and an optional icon, above the content in the default slot. Place it directly inside the accordion and give it a `value`: the accordion expands items by value and leaves an item without one collapsed.\n---\n\n\n### **Slots:**\n - **heading** - Rich heading content, replacing the `heading` prop; no interactive content\n- **icon** - Icon shown in the header before the heading\n- **default** - The content shown while the item is expanded\n\n### **CSS Parts:**\n - **root** - The item's box: its share of the accordion frame, the lifted outline and
|
|
34
|
+
"description": "One collapsible section of a `c-accordion`: a header button showing its `heading` (or the `heading` slot) and an optional icon, above the content in the default slot. Place it directly inside the accordion and give it a `value`: the accordion expands items by value and leaves an item without one collapsed.\n---\n\n\n### **Slots:**\n - **heading** - Rich heading content, replacing the `heading` prop; no interactive content\n- **icon** - Icon shown in the header before the heading\n- **default** - The content shown while the item is expanded\n\n### **CSS Parts:**\n - **root** - The item's box: its share of the accordion frame, the lifted outline and tint while expanded, and the ring the accordion's `outlined` adds\n- **header** - The toggle button row containing the icon, heading and indicator\n- **indicator** - The rotating chevron at the end of the header\n- **content** - The padded card around the slotted content inside the collapsing region",
|
|
35
35
|
"attributes": [
|
|
36
36
|
{
|
|
37
37
|
"name": "heading",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"name": "c-alert",
|
|
51
|
-
"description": "A persistent, in-flow status message: a tinted box whose type carries a status family's colours through the icon, heading and accent edge, while the body copy stays neutral.\n---\n\n\n### **Events:**\n - **close** - Fired when the close button is pressed. The alert does not hide\nitself — the consumer owns removal.\n\n### **Slots:**\n - **heading** - Rich heading content; overrides the `heading` prop\n- **default** - The message\n\n### **CSS Parts:**\n - **root** - The
|
|
51
|
+
"description": "A persistent, in-flow status message: a tinted box whose type carries a status family's colours through the icon, heading and accent edge, while the body copy stays neutral.\n---\n\n\n### **Events:**\n - **close** - Fired when the close button is pressed. The alert does not hide\nitself — the consumer owns removal.\n\n### **Slots:**\n - **heading** - Rich heading content; overrides the `heading` prop\n- **default** - The message\n\n### **CSS Parts:**\n - **root** - The box carrying the type's tint, hairline border and accent edge\n- **icon** - The status icon, rendered only when a `type` is set\n- **content** - The wrapper around the heading and message content\n- **heading** - The heading paragraph rendered from the `heading` prop\n- **close** - The close button rendered when `closeable` is set",
|
|
52
52
|
"attributes": [
|
|
53
53
|
{
|
|
54
54
|
"name": "closeable",
|
|
@@ -143,7 +143,11 @@
|
|
|
143
143
|
"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",
|
|
144
144
|
"values": []
|
|
145
145
|
},
|
|
146
|
-
{
|
|
146
|
+
{
|
|
147
|
+
"name": "name",
|
|
148
|
+
"description": "The name the picked value submits under in a native `<form>` — one entry\nper value with `multiple`",
|
|
149
|
+
"values": []
|
|
150
|
+
},
|
|
147
151
|
{
|
|
148
152
|
"name": "placeholder",
|
|
149
153
|
"description": "Placeholder for the in-panel search input",
|
|
@@ -209,7 +213,7 @@
|
|
|
209
213
|
},
|
|
210
214
|
{
|
|
211
215
|
"name": "c-button",
|
|
212
|
-
"description": "Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one
|
|
216
|
+
"description": "Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one filled button (the default `appearance`) per view for its main action; other actions use `appearance=\"outlined\"`, `\"ghost\"` or `\"text\"`.\n---\n\n\n### **Slots:**\n - **default** - Button label content, or a slotted `<button>` (ADR-0085):\nthe page's own native button, which a password manager reading the form's\nsubmit button finds. Its own `type`, `disabled`, `name`, `value` and\n`form` apply; the element paints its look.\n- **icon** - Leading icon, vertically centered before the label.\n- **description** - Secondary text rendered below the label.\n\n### **CSS Parts:**\n - **root** - The native `<button>` / `<a>` element carrying the visual styling.\n- **content** - Layout wrapper for the label, icon and description.\n- **description** - Wrapper of the `description` slot.",
|
|
213
217
|
"attributes": [
|
|
214
218
|
{
|
|
215
219
|
"name": "active",
|
|
@@ -228,7 +232,7 @@
|
|
|
228
232
|
},
|
|
229
233
|
{
|
|
230
234
|
"name": "danger",
|
|
231
|
-
"description": "
|
|
235
|
+
"description": "@deprecated Use `variant=\"danger\"`.\n\nDanger look for a destructive action: the error colour.",
|
|
232
236
|
"values": []
|
|
233
237
|
},
|
|
234
238
|
{
|
|
@@ -303,6 +307,18 @@
|
|
|
303
307
|
"name": "value",
|
|
304
308
|
"description": "The button's value in a `c-button-group`; in `c-tab-buttons`, the `value`\nof the `c-tab-item` panel it shows.",
|
|
305
309
|
"values": []
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "variant",
|
|
313
|
+
"description": "The button's colour, in every appearance: `primary` unless set (or\nchanged app-wide), `secondary`, `success`, `info`, `warning`, or `danger`\nfor a destructive action.",
|
|
314
|
+
"values": [
|
|
315
|
+
{ "name": "danger" },
|
|
316
|
+
{ "name": "info" },
|
|
317
|
+
{ "name": "primary" },
|
|
318
|
+
{ "name": "secondary" },
|
|
319
|
+
{ "name": "success" },
|
|
320
|
+
{ "name": "warning" }
|
|
321
|
+
]
|
|
306
322
|
}
|
|
307
323
|
],
|
|
308
324
|
"references": []
|
|
@@ -331,6 +347,11 @@
|
|
|
331
347
|
"description": "Allow several buttons to be active at once. The value becomes an array\nof the active buttons' values (in DOM order). Arrays have no attribute\nform — bind `value` as a DOM property (`:value.prop` in Vue).",
|
|
332
348
|
"values": []
|
|
333
349
|
},
|
|
350
|
+
{
|
|
351
|
+
"name": "name",
|
|
352
|
+
"description": "The name the active button's value submits under in a native `<form>` —\none entry per active button with `multiple`, nothing while none is active",
|
|
353
|
+
"values": []
|
|
354
|
+
},
|
|
334
355
|
{
|
|
335
356
|
"name": "required",
|
|
336
357
|
"description": "Set as required — shows the required marker on the label",
|
|
@@ -475,7 +496,7 @@
|
|
|
475
496
|
},
|
|
476
497
|
{
|
|
477
498
|
"name": "name",
|
|
478
|
-
"description": "
|
|
499
|
+
"description": "The name the checkbox submits under in a native `<form>` while it is\nchecked: its `true-value`, or `on` when that is `true`",
|
|
479
500
|
"values": []
|
|
480
501
|
},
|
|
481
502
|
{
|
|
@@ -551,7 +572,11 @@
|
|
|
551
572
|
"description": "Label on top of the field",
|
|
552
573
|
"values": []
|
|
553
574
|
},
|
|
554
|
-
{
|
|
575
|
+
{
|
|
576
|
+
"name": "name",
|
|
577
|
+
"description": "The name the colour submits under in a native `<form>`, in the\npicker's notation",
|
|
578
|
+
"values": []
|
|
579
|
+
},
|
|
555
580
|
{
|
|
556
581
|
"name": "placeholder",
|
|
557
582
|
"description": "Placeholder of the input; an example of the notation when empty",
|
|
@@ -728,7 +753,11 @@
|
|
|
728
753
|
"description": "The earliest date that can be picked or typed, as an ISO date; also\nbounds the calendar's navigation",
|
|
729
754
|
"values": []
|
|
730
755
|
},
|
|
731
|
-
{
|
|
756
|
+
{
|
|
757
|
+
"name": "name",
|
|
758
|
+
"description": "The name the date submits under in a native `<form>`, as its ISO text;\na `range` as one ISO 8601 interval, `start/end`",
|
|
759
|
+
"values": []
|
|
760
|
+
},
|
|
732
761
|
{
|
|
733
762
|
"name": "placeholder",
|
|
734
763
|
"description": "Placeholder of the input; the `format` pattern when empty",
|
|
@@ -898,7 +927,7 @@
|
|
|
898
927
|
},
|
|
899
928
|
{
|
|
900
929
|
"name": "danger",
|
|
901
|
-
"description": "
|
|
930
|
+
"description": "@deprecated Use `variant=\"danger\"`.\n\nDanger look for a destructive action: the error colour.",
|
|
902
931
|
"values": []
|
|
903
932
|
},
|
|
904
933
|
{
|
|
@@ -944,6 +973,18 @@
|
|
|
944
973
|
"name": "text",
|
|
945
974
|
"description": "@deprecated Use `appearance=\"text\"`.\n\nText appearance: no fill or outline, the lightest look.",
|
|
946
975
|
"values": []
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"name": "variant",
|
|
979
|
+
"description": "The button's colour, in every appearance: `primary` unless set (or\nchanged app-wide), `secondary`, `success`, `info`, `warning`, or `danger`\nfor a destructive action.",
|
|
980
|
+
"values": [
|
|
981
|
+
{ "name": "danger" },
|
|
982
|
+
{ "name": "info" },
|
|
983
|
+
{ "name": "primary" },
|
|
984
|
+
{ "name": "secondary" },
|
|
985
|
+
{ "name": "success" },
|
|
986
|
+
{ "name": "warning" }
|
|
987
|
+
]
|
|
947
988
|
}
|
|
948
989
|
],
|
|
949
990
|
"references": []
|
|
@@ -1407,7 +1448,11 @@
|
|
|
1407
1448
|
"description": "The smallest number in range; a smaller one is kept and reported as out of range. At `0` or above, the minus key is ignored",
|
|
1408
1449
|
"values": []
|
|
1409
1450
|
},
|
|
1410
|
-
{
|
|
1451
|
+
{
|
|
1452
|
+
"name": "name",
|
|
1453
|
+
"description": "The name the number submits under in a native `<form>`, written as a\nplain JS number (`1234.5`)",
|
|
1454
|
+
"values": []
|
|
1455
|
+
},
|
|
1411
1456
|
{
|
|
1412
1457
|
"name": "placeholder",
|
|
1413
1458
|
"description": "Placeholder of the input",
|
|
@@ -1515,6 +1560,11 @@
|
|
|
1515
1560
|
"description": "Number of digits in the code, one box each",
|
|
1516
1561
|
"values": []
|
|
1517
1562
|
},
|
|
1563
|
+
{
|
|
1564
|
+
"name": "name",
|
|
1565
|
+
"description": "The name the code submits under in a native `<form>`, as typed so far",
|
|
1566
|
+
"values": []
|
|
1567
|
+
},
|
|
1518
1568
|
{
|
|
1519
1569
|
"name": "required",
|
|
1520
1570
|
"description": "Set as required — shows the required marker on the label",
|
|
@@ -1723,6 +1773,11 @@
|
|
|
1723
1773
|
"description": "Label of the radio group",
|
|
1724
1774
|
"values": []
|
|
1725
1775
|
},
|
|
1776
|
+
{
|
|
1777
|
+
"name": "name",
|
|
1778
|
+
"description": "The name the picked radio's value submits under in a native `<form>`;\nnothing submits while no radio is picked",
|
|
1779
|
+
"values": []
|
|
1780
|
+
},
|
|
1726
1781
|
{ "name": "required", "description": "Set as required", "values": [] },
|
|
1727
1782
|
{
|
|
1728
1783
|
"name": "value",
|
|
@@ -1797,7 +1852,11 @@
|
|
|
1797
1852
|
"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",
|
|
1798
1853
|
"values": []
|
|
1799
1854
|
},
|
|
1800
|
-
{
|
|
1855
|
+
{
|
|
1856
|
+
"name": "name",
|
|
1857
|
+
"description": "The name the picked value submits under in a native `<form>` — one entry\nper value with `multiple`",
|
|
1858
|
+
"values": []
|
|
1859
|
+
},
|
|
1801
1860
|
{
|
|
1802
1861
|
"name": "option-as-selection",
|
|
1803
1862
|
"description": "Display the option as selection (only with <c-option> elements)",
|
|
@@ -1926,7 +1985,7 @@
|
|
|
1926
1985
|
{ "name": "min", "description": "The smallest value.", "values": [] },
|
|
1927
1986
|
{
|
|
1928
1987
|
"name": "name",
|
|
1929
|
-
"description": "
|
|
1988
|
+
"description": "The name the value submits under in a native `<form>`",
|
|
1930
1989
|
"values": []
|
|
1931
1990
|
},
|
|
1932
1991
|
{
|
|
@@ -2082,6 +2141,11 @@
|
|
|
2082
2141
|
"description": "Show a spinner in place of the handle, such as while the change is\nsaved. The switch ignores toggles meanwhile and is announced as busy",
|
|
2083
2142
|
"values": []
|
|
2084
2143
|
},
|
|
2144
|
+
{
|
|
2145
|
+
"name": "name",
|
|
2146
|
+
"description": "The name the switch submits under in a native `<form>` while it is on:\nits `true-value`, or `on` when that is `true`",
|
|
2147
|
+
"values": []
|
|
2148
|
+
},
|
|
2085
2149
|
{
|
|
2086
2150
|
"name": "required",
|
|
2087
2151
|
"description": "Set as required — shows the required marker on the label",
|
|
@@ -2272,7 +2336,7 @@
|
|
|
2272
2336
|
},
|
|
2273
2337
|
{
|
|
2274
2338
|
"name": "c-text-field",
|
|
2275
|
-
"description": "A text field for a single line of text, or several lines under `rows`, with a label, a hint and an error message.\n---\n\n\n### **Events:**\n - **change** - Fired when typed text is committed — Enter, or leaving the field after\nediting it — carrying the text, trimmed when `trim-whitespace` is set.\n- **input** - Native bubbling input event fired alongside every value change so a\nplain Vue `v-model` stays in sync. No detail.\n- **update:value** - v-model contract event fired on every keystroke, carrying the current\ntext — trimmed when `trim-whitespace` is set.\n\n### **Methods:**\n - **focus()** - Focus its input, as `focus()` does on a native control: the element renders\nno box of its own to take it.\n\n### **Slots:**\n - **pre** - Content inside the field, before the input, such as an icon\n- **post** - Content inside the field, after the input and its password or date button\n\n### **CSS Parts:**\n - **mask-guide** - The faint rest of the input mask, shown behind the typed text\n- **message** - The hint / error message area below the field (always reserved unless `hide-message`)",
|
|
2339
|
+
"description": "A text field for a single line of text, or several lines under `rows`, with a label, a hint and an error message.\n---\n\n\n### **Events:**\n - **change** - Fired when typed text is committed — Enter, or leaving the field after\nediting it — carrying the text, trimmed when `trim-whitespace` is set.\n- **input** - Native bubbling input event fired alongside every value change so a\nplain Vue `v-model` stays in sync. No detail.\n- **update:value** - v-model contract event fired on every keystroke, carrying the current\ntext — trimmed when `trim-whitespace` is set.\n\n### **Methods:**\n - **focus()** - Focus its input, as `focus()` does on a native control: the element renders\nno box of its own to take it.\n\n### **Slots:**\n - **default** - A page's own `<input>`, framed in place of the field's own so that every password manager can fill it; its native attributes are its own\n- **pre** - Content inside the field, before the input, such as an icon\n- **post** - Content inside the field, after the input and its password or date button\n\n### **CSS Parts:**\n - **mask-guide** - The faint rest of the input mask, shown behind the typed text\n- **message** - The hint / error message area below the field (always reserved unless `hide-message`)",
|
|
2276
2340
|
"attributes": [
|
|
2277
2341
|
{
|
|
2278
2342
|
"name": "autocapitalize",
|
|
@@ -2354,7 +2418,7 @@
|
|
|
2354
2418
|
},
|
|
2355
2419
|
{
|
|
2356
2420
|
"name": "name",
|
|
2357
|
-
"description": "
|
|
2421
|
+
"description": "The name the text submits under in a native `<form>`",
|
|
2358
2422
|
"values": []
|
|
2359
2423
|
},
|
|
2360
2424
|
{
|
|
@@ -2484,7 +2548,11 @@
|
|
|
2484
2548
|
"description": "Minutes between the minute column's rows; typed times need not fall on\nthe step",
|
|
2485
2549
|
"values": []
|
|
2486
2550
|
},
|
|
2487
|
-
{
|
|
2551
|
+
{
|
|
2552
|
+
"name": "name",
|
|
2553
|
+
"description": "The name the time submits under in a native `<form>`, as its ISO text;\na `range` as one ISO 8601 interval, `start/end`",
|
|
2554
|
+
"values": []
|
|
2555
|
+
},
|
|
2488
2556
|
{
|
|
2489
2557
|
"name": "placeholder",
|
|
2490
2558
|
"description": "Placeholder of the input; the `format` pattern when empty",
|
|
@@ -2679,7 +2747,11 @@
|
|
|
2679
2747
|
"description": "Label on top of the field",
|
|
2680
2748
|
"values": []
|
|
2681
2749
|
},
|
|
2682
|
-
{
|
|
2750
|
+
{
|
|
2751
|
+
"name": "name",
|
|
2752
|
+
"description": "The name the picked value submits under in a native `<form>`",
|
|
2753
|
+
"values": []
|
|
2754
|
+
},
|
|
2683
2755
|
{
|
|
2684
2756
|
"name": "placeholder",
|
|
2685
2757
|
"description": "Placeholder for the search input inside the panel",
|