@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
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-rc.
|
|
4
|
+
"version": "4.0.0-rc.5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
"name": "c-accordion-item",
|
|
114
|
-
"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
|
|
114
|
+
"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",
|
|
115
115
|
"doc-url": "",
|
|
116
116
|
"attributes": [
|
|
117
117
|
{
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
"name": "c-alert",
|
|
166
|
-
"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
|
|
166
|
+
"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",
|
|
167
167
|
"doc-url": "",
|
|
168
168
|
"attributes": [
|
|
169
169
|
{
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
354
|
"name": "name",
|
|
355
|
-
"description": "
|
|
355
|
+
"description": "The name the picked value submits under in a native `<form>` — one entry\nper value with `multiple`",
|
|
356
356
|
"value": {
|
|
357
357
|
"type": "string",
|
|
358
358
|
"default": "''"
|
|
@@ -535,7 +535,7 @@
|
|
|
535
535
|
},
|
|
536
536
|
{
|
|
537
537
|
"name": "name",
|
|
538
|
-
"description": "
|
|
538
|
+
"description": "The name the picked value submits under in a native `<form>` — one entry\nper value with `multiple`",
|
|
539
539
|
"type": "string"
|
|
540
540
|
},
|
|
541
541
|
{
|
|
@@ -694,7 +694,7 @@
|
|
|
694
694
|
},
|
|
695
695
|
{
|
|
696
696
|
"name": "c-button",
|
|
697
|
-
"description": "Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one
|
|
697
|
+
"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.",
|
|
698
698
|
"doc-url": "",
|
|
699
699
|
"attributes": [
|
|
700
700
|
{
|
|
@@ -713,11 +713,12 @@
|
|
|
713
713
|
},
|
|
714
714
|
{
|
|
715
715
|
"name": "danger",
|
|
716
|
-
"description": "
|
|
716
|
+
"description": "@deprecated Use `variant=\"danger\"`.\n\nDanger look for a destructive action: the error colour.",
|
|
717
717
|
"value": {
|
|
718
718
|
"type": "boolean",
|
|
719
719
|
"default": "false"
|
|
720
|
-
}
|
|
720
|
+
},
|
|
721
|
+
"deprecated": "Use `variant=\"danger\"`."
|
|
721
722
|
},
|
|
722
723
|
{
|
|
723
724
|
"name": "disabled",
|
|
@@ -824,12 +825,20 @@
|
|
|
824
825
|
"value": {
|
|
825
826
|
"type": "number | string"
|
|
826
827
|
}
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"name": "variant",
|
|
831
|
+
"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.",
|
|
832
|
+
"value": {
|
|
833
|
+
"type": "'danger' | 'info' | 'primary' | 'secondary' | 'success' | 'warning'",
|
|
834
|
+
"default": "'primary'"
|
|
835
|
+
}
|
|
827
836
|
}
|
|
828
837
|
],
|
|
829
838
|
"slots": [
|
|
830
839
|
{
|
|
831
840
|
"name": "default",
|
|
832
|
-
"description": "Button label content."
|
|
841
|
+
"description": "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."
|
|
833
842
|
},
|
|
834
843
|
{
|
|
835
844
|
"name": "icon",
|
|
@@ -855,7 +864,7 @@
|
|
|
855
864
|
},
|
|
856
865
|
{
|
|
857
866
|
"name": "danger",
|
|
858
|
-
"description": "Danger look for a destructive action: the
|
|
867
|
+
"description": "Danger look for a destructive action: the error colour.",
|
|
859
868
|
"type": "boolean"
|
|
860
869
|
},
|
|
861
870
|
{
|
|
@@ -922,6 +931,11 @@
|
|
|
922
931
|
"name": "value",
|
|
923
932
|
"description": "The button's value in a `c-button-group`; in `c-tab-buttons`, the `value`\nof the `c-tab-item` panel it shows.",
|
|
924
933
|
"type": "number | string"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "variant",
|
|
937
|
+
"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.",
|
|
938
|
+
"type": "'danger' | 'info' | 'primary' | 'secondary' | 'success' | 'warning'"
|
|
925
939
|
}
|
|
926
940
|
],
|
|
927
941
|
"events": []
|
|
@@ -964,6 +978,14 @@
|
|
|
964
978
|
"default": "false"
|
|
965
979
|
}
|
|
966
980
|
},
|
|
981
|
+
{
|
|
982
|
+
"name": "name",
|
|
983
|
+
"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",
|
|
984
|
+
"value": {
|
|
985
|
+
"type": "string",
|
|
986
|
+
"default": "''"
|
|
987
|
+
}
|
|
988
|
+
},
|
|
967
989
|
{
|
|
968
990
|
"name": "required",
|
|
969
991
|
"description": "Set as required — shows the required marker on the label",
|
|
@@ -1034,6 +1056,11 @@
|
|
|
1034
1056
|
"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).",
|
|
1035
1057
|
"type": "boolean"
|
|
1036
1058
|
},
|
|
1059
|
+
{
|
|
1060
|
+
"name": "name",
|
|
1061
|
+
"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",
|
|
1062
|
+
"type": "string"
|
|
1063
|
+
},
|
|
1037
1064
|
{
|
|
1038
1065
|
"name": "required",
|
|
1039
1066
|
"description": "Set as required — shows the required marker on the label",
|
|
@@ -1299,7 +1326,7 @@
|
|
|
1299
1326
|
},
|
|
1300
1327
|
{
|
|
1301
1328
|
"name": "name",
|
|
1302
|
-
"description": "
|
|
1329
|
+
"description": "The name the checkbox submits under in a native `<form>` while it is\nchecked: its `true-value`, or `on` when that is `true`",
|
|
1303
1330
|
"value": {
|
|
1304
1331
|
"type": "string",
|
|
1305
1332
|
"default": "''"
|
|
@@ -1406,7 +1433,7 @@
|
|
|
1406
1433
|
},
|
|
1407
1434
|
{
|
|
1408
1435
|
"name": "name",
|
|
1409
|
-
"description": "
|
|
1436
|
+
"description": "The name the checkbox submits under in a native `<form>` while it is\nchecked: its `true-value`, or `on` when that is `true`",
|
|
1410
1437
|
"type": "string"
|
|
1411
1438
|
},
|
|
1412
1439
|
{
|
|
@@ -1540,7 +1567,7 @@
|
|
|
1540
1567
|
},
|
|
1541
1568
|
{
|
|
1542
1569
|
"name": "name",
|
|
1543
|
-
"description": "
|
|
1570
|
+
"description": "The name the colour submits under in a native `<form>`, in the\npicker's notation",
|
|
1544
1571
|
"value": {
|
|
1545
1572
|
"type": "string",
|
|
1546
1573
|
"default": "''"
|
|
@@ -1677,7 +1704,7 @@
|
|
|
1677
1704
|
},
|
|
1678
1705
|
{
|
|
1679
1706
|
"name": "name",
|
|
1680
|
-
"description": "
|
|
1707
|
+
"description": "The name the colour submits under in a native `<form>`, in the\npicker's notation",
|
|
1681
1708
|
"type": "string"
|
|
1682
1709
|
},
|
|
1683
1710
|
{
|
|
@@ -2153,7 +2180,7 @@
|
|
|
2153
2180
|
},
|
|
2154
2181
|
{
|
|
2155
2182
|
"name": "name",
|
|
2156
|
-
"description": "
|
|
2183
|
+
"description": "The name the date submits under in a native `<form>`, as its ISO text;\na `range` as one ISO 8601 interval, `start/end`",
|
|
2157
2184
|
"value": {
|
|
2158
2185
|
"type": "string",
|
|
2159
2186
|
"default": "''"
|
|
@@ -2339,7 +2366,7 @@
|
|
|
2339
2366
|
},
|
|
2340
2367
|
{
|
|
2341
2368
|
"name": "name",
|
|
2342
|
-
"description": "
|
|
2369
|
+
"description": "The name the date submits under in a native `<form>`, as its ISO text;\na `range` as one ISO 8601 interval, `start/end`",
|
|
2343
2370
|
"type": "string"
|
|
2344
2371
|
},
|
|
2345
2372
|
{
|
|
@@ -2795,11 +2822,12 @@
|
|
|
2795
2822
|
},
|
|
2796
2823
|
{
|
|
2797
2824
|
"name": "danger",
|
|
2798
|
-
"description": "
|
|
2825
|
+
"description": "@deprecated Use `variant=\"danger\"`.\n\nDanger look for a destructive action: the error colour.",
|
|
2799
2826
|
"value": {
|
|
2800
2827
|
"type": "boolean",
|
|
2801
2828
|
"default": "false"
|
|
2802
|
-
}
|
|
2829
|
+
},
|
|
2830
|
+
"deprecated": "Use `variant=\"danger\"`."
|
|
2803
2831
|
},
|
|
2804
2832
|
{
|
|
2805
2833
|
"name": "disabled",
|
|
@@ -2867,6 +2895,14 @@
|
|
|
2867
2895
|
"default": "false"
|
|
2868
2896
|
},
|
|
2869
2897
|
"deprecated": "Use `appearance=\"text\"`."
|
|
2898
|
+
},
|
|
2899
|
+
{
|
|
2900
|
+
"name": "variant",
|
|
2901
|
+
"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.",
|
|
2902
|
+
"value": {
|
|
2903
|
+
"type": "'danger' | 'info' | 'primary' | 'secondary' | 'success' | 'warning'",
|
|
2904
|
+
"default": "'primary'"
|
|
2905
|
+
}
|
|
2870
2906
|
}
|
|
2871
2907
|
],
|
|
2872
2908
|
"slots": [
|
|
@@ -2890,7 +2926,7 @@
|
|
|
2890
2926
|
},
|
|
2891
2927
|
{
|
|
2892
2928
|
"name": "danger",
|
|
2893
|
-
"description": "Danger look for a destructive action: the
|
|
2929
|
+
"description": "Danger look for a destructive action: the error colour.",
|
|
2894
2930
|
"type": "boolean"
|
|
2895
2931
|
},
|
|
2896
2932
|
{
|
|
@@ -2932,6 +2968,11 @@
|
|
|
2932
2968
|
"name": "text",
|
|
2933
2969
|
"description": "Text appearance: no fill or outline, the lightest look.",
|
|
2934
2970
|
"type": "boolean"
|
|
2971
|
+
},
|
|
2972
|
+
{
|
|
2973
|
+
"name": "variant",
|
|
2974
|
+
"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.",
|
|
2975
|
+
"type": "'danger' | 'info' | 'primary' | 'secondary' | 'success' | 'warning'"
|
|
2935
2976
|
}
|
|
2936
2977
|
],
|
|
2937
2978
|
"events": []
|
|
@@ -4037,7 +4078,7 @@
|
|
|
4037
4078
|
},
|
|
4038
4079
|
{
|
|
4039
4080
|
"name": "name",
|
|
4040
|
-
"description": "
|
|
4081
|
+
"description": "The name the number submits under in a native `<form>`, written as a\nplain JS number (`1234.5`)",
|
|
4041
4082
|
"value": {
|
|
4042
4083
|
"type": "string",
|
|
4043
4084
|
"default": "''"
|
|
@@ -4201,7 +4242,7 @@
|
|
|
4201
4242
|
},
|
|
4202
4243
|
{
|
|
4203
4244
|
"name": "name",
|
|
4204
|
-
"description": "
|
|
4245
|
+
"description": "The name the number submits under in a native `<form>`, written as a\nplain JS number (`1234.5`)",
|
|
4205
4246
|
"type": "string"
|
|
4206
4247
|
},
|
|
4207
4248
|
{
|
|
@@ -4424,6 +4465,14 @@
|
|
|
4424
4465
|
"default": "6"
|
|
4425
4466
|
}
|
|
4426
4467
|
},
|
|
4468
|
+
{
|
|
4469
|
+
"name": "name",
|
|
4470
|
+
"description": "The name the code submits under in a native `<form>`, as typed so far",
|
|
4471
|
+
"value": {
|
|
4472
|
+
"type": "string",
|
|
4473
|
+
"default": "''"
|
|
4474
|
+
}
|
|
4475
|
+
},
|
|
4427
4476
|
{
|
|
4428
4477
|
"name": "required",
|
|
4429
4478
|
"description": "Set as required — shows the required marker on the label",
|
|
@@ -4511,6 +4560,11 @@
|
|
|
4511
4560
|
"description": "Number of digits in the code, one box each",
|
|
4512
4561
|
"type": "number"
|
|
4513
4562
|
},
|
|
4563
|
+
{
|
|
4564
|
+
"name": "name",
|
|
4565
|
+
"description": "The name the code submits under in a native `<form>`, as typed so far",
|
|
4566
|
+
"type": "string"
|
|
4567
|
+
},
|
|
4514
4568
|
{
|
|
4515
4569
|
"name": "required",
|
|
4516
4570
|
"description": "Set as required — shows the required marker on the label",
|
|
@@ -5040,6 +5094,14 @@
|
|
|
5040
5094
|
"default": "''"
|
|
5041
5095
|
}
|
|
5042
5096
|
},
|
|
5097
|
+
{
|
|
5098
|
+
"name": "name",
|
|
5099
|
+
"description": "The name the picked radio's value submits under in a native `<form>`;\nnothing submits while no radio is picked",
|
|
5100
|
+
"value": {
|
|
5101
|
+
"type": "string",
|
|
5102
|
+
"default": "''"
|
|
5103
|
+
}
|
|
5104
|
+
},
|
|
5043
5105
|
{
|
|
5044
5106
|
"name": "required",
|
|
5045
5107
|
"description": "Set as required",
|
|
@@ -5126,6 +5188,11 @@
|
|
|
5126
5188
|
"description": "Label of the radio group",
|
|
5127
5189
|
"type": "string"
|
|
5128
5190
|
},
|
|
5191
|
+
{
|
|
5192
|
+
"name": "name",
|
|
5193
|
+
"description": "The name the picked radio's value submits under in a native `<form>`;\nnothing submits while no radio is picked",
|
|
5194
|
+
"type": "string"
|
|
5195
|
+
},
|
|
5129
5196
|
{
|
|
5130
5197
|
"name": "required",
|
|
5131
5198
|
"description": "Set as required",
|
|
@@ -5267,7 +5334,7 @@
|
|
|
5267
5334
|
},
|
|
5268
5335
|
{
|
|
5269
5336
|
"name": "name",
|
|
5270
|
-
"description": "
|
|
5337
|
+
"description": "The name the picked value submits under in a native `<form>` — one entry\nper value with `multiple`",
|
|
5271
5338
|
"value": {
|
|
5272
5339
|
"type": "string",
|
|
5273
5340
|
"default": "''"
|
|
@@ -5443,7 +5510,7 @@
|
|
|
5443
5510
|
},
|
|
5444
5511
|
{
|
|
5445
5512
|
"name": "name",
|
|
5446
|
-
"description": "
|
|
5513
|
+
"description": "The name the picked value submits under in a native `<form>` — one entry\nper value with `multiple`",
|
|
5447
5514
|
"type": "string"
|
|
5448
5515
|
},
|
|
5449
5516
|
{
|
|
@@ -5765,7 +5832,7 @@
|
|
|
5765
5832
|
},
|
|
5766
5833
|
{
|
|
5767
5834
|
"name": "name",
|
|
5768
|
-
"description": "
|
|
5835
|
+
"description": "The name the value submits under in a native `<form>`",
|
|
5769
5836
|
"value": {
|
|
5770
5837
|
"type": "string",
|
|
5771
5838
|
"default": "''"
|
|
@@ -5871,7 +5938,7 @@
|
|
|
5871
5938
|
},
|
|
5872
5939
|
{
|
|
5873
5940
|
"name": "name",
|
|
5874
|
-
"description": "
|
|
5941
|
+
"description": "The name the value submits under in a native `<form>`",
|
|
5875
5942
|
"type": "string"
|
|
5876
5943
|
},
|
|
5877
5944
|
{
|
|
@@ -6223,6 +6290,14 @@
|
|
|
6223
6290
|
"default": "false"
|
|
6224
6291
|
}
|
|
6225
6292
|
},
|
|
6293
|
+
{
|
|
6294
|
+
"name": "name",
|
|
6295
|
+
"description": "The name the switch submits under in a native `<form>` while it is on:\nits `true-value`, or `on` when that is `true`",
|
|
6296
|
+
"value": {
|
|
6297
|
+
"type": "string",
|
|
6298
|
+
"default": "''"
|
|
6299
|
+
}
|
|
6300
|
+
},
|
|
6226
6301
|
{
|
|
6227
6302
|
"name": "required",
|
|
6228
6303
|
"description": "Set as required — shows the required marker on the label",
|
|
@@ -6297,6 +6372,11 @@
|
|
|
6297
6372
|
"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",
|
|
6298
6373
|
"type": "boolean"
|
|
6299
6374
|
},
|
|
6375
|
+
{
|
|
6376
|
+
"name": "name",
|
|
6377
|
+
"description": "The name the switch submits under in a native `<form>` while it is on:\nits `true-value`, or `on` when that is `true`",
|
|
6378
|
+
"type": "string"
|
|
6379
|
+
},
|
|
6300
6380
|
{
|
|
6301
6381
|
"name": "required",
|
|
6302
6382
|
"description": "Set as required — shows the required marker on the label",
|
|
@@ -6817,7 +6897,7 @@
|
|
|
6817
6897
|
},
|
|
6818
6898
|
{
|
|
6819
6899
|
"name": "c-text-field",
|
|
6820
|
-
"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`)",
|
|
6900
|
+
"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`)",
|
|
6821
6901
|
"doc-url": "",
|
|
6822
6902
|
"attributes": [
|
|
6823
6903
|
{
|
|
@@ -6941,7 +7021,7 @@
|
|
|
6941
7021
|
},
|
|
6942
7022
|
{
|
|
6943
7023
|
"name": "name",
|
|
6944
|
-
"description": "
|
|
7024
|
+
"description": "The name the text submits under in a native `<form>`",
|
|
6945
7025
|
"value": {
|
|
6946
7026
|
"type": "string",
|
|
6947
7027
|
"default": "''"
|
|
@@ -7029,6 +7109,10 @@
|
|
|
7029
7109
|
}
|
|
7030
7110
|
],
|
|
7031
7111
|
"slots": [
|
|
7112
|
+
{
|
|
7113
|
+
"name": "default",
|
|
7114
|
+
"description": "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"
|
|
7115
|
+
},
|
|
7032
7116
|
{
|
|
7033
7117
|
"name": "pre",
|
|
7034
7118
|
"description": "Content inside the field, before the input, such as an icon"
|
|
@@ -7134,7 +7218,7 @@
|
|
|
7134
7218
|
},
|
|
7135
7219
|
{
|
|
7136
7220
|
"name": "name",
|
|
7137
|
-
"description": "
|
|
7221
|
+
"description": "The name the text submits under in a native `<form>`",
|
|
7138
7222
|
"type": "string"
|
|
7139
7223
|
},
|
|
7140
7224
|
{
|
|
@@ -7329,7 +7413,7 @@
|
|
|
7329
7413
|
},
|
|
7330
7414
|
{
|
|
7331
7415
|
"name": "name",
|
|
7332
|
-
"description": "
|
|
7416
|
+
"description": "The name the time submits under in a native `<form>`, as its ISO text;\na `range` as one ISO 8601 interval, `start/end`",
|
|
7333
7417
|
"value": {
|
|
7334
7418
|
"type": "string",
|
|
7335
7419
|
"default": "''"
|
|
@@ -7484,7 +7568,7 @@
|
|
|
7484
7568
|
},
|
|
7485
7569
|
{
|
|
7486
7570
|
"name": "name",
|
|
7487
|
-
"description": "
|
|
7571
|
+
"description": "The name the time submits under in a native `<form>`, as its ISO text;\na `range` as one ISO 8601 interval, `start/end`",
|
|
7488
7572
|
"type": "string"
|
|
7489
7573
|
},
|
|
7490
7574
|
{
|
|
@@ -7894,7 +7978,7 @@
|
|
|
7894
7978
|
},
|
|
7895
7979
|
{
|
|
7896
7980
|
"name": "name",
|
|
7897
|
-
"description": "
|
|
7981
|
+
"description": "The name the picked value submits under in a native `<form>`",
|
|
7898
7982
|
"value": {
|
|
7899
7983
|
"type": "string",
|
|
7900
7984
|
"default": "''"
|
|
@@ -8046,7 +8130,7 @@
|
|
|
8046
8130
|
},
|
|
8047
8131
|
{
|
|
8048
8132
|
"name": "name",
|
|
8049
|
-
"description": "
|
|
8133
|
+
"description": "The name the picked value submits under in a native `<form>`",
|
|
8050
8134
|
"type": "string"
|
|
8051
8135
|
},
|
|
8052
8136
|
{
|
|
@@ -8125,7 +8209,7 @@
|
|
|
8125
8209
|
},
|
|
8126
8210
|
{
|
|
8127
8211
|
"name": "part(root)",
|
|
8128
|
-
"description": "The item's box: its share of the accordion frame, the lifted outline and
|
|
8212
|
+
"description": "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"
|
|
8129
8213
|
},
|
|
8130
8214
|
{
|
|
8131
8215
|
"name": "part(header)",
|
|
@@ -8141,7 +8225,7 @@
|
|
|
8141
8225
|
},
|
|
8142
8226
|
{
|
|
8143
8227
|
"name": "part(root)",
|
|
8144
|
-
"description": "The
|
|
8228
|
+
"description": "The box carrying the type's tint, hairline border and accent edge"
|
|
8145
8229
|
},
|
|
8146
8230
|
{
|
|
8147
8231
|
"name": "part(icon)",
|
|
@@ -12,6 +12,12 @@ export type CButtonSize = 'default' | 'large' | 'small';
|
|
|
12
12
|
* turns the component into a link.
|
|
13
13
|
*/
|
|
14
14
|
export type CButtonType = 'button' | 'reset' | 'submit';
|
|
15
|
+
/**
|
|
16
|
+
* The colour a button takes: `primary` (unless set) and `secondary`, the
|
|
17
|
+
* brand families, or a status colour — `success`, `info`, `warning` and
|
|
18
|
+
* `danger`, a destructive action in the error colour.
|
|
19
|
+
*/
|
|
20
|
+
export type CButtonVariant = 'danger' | 'info' | 'primary' | 'secondary' | 'success' | 'warning';
|
|
15
21
|
interface CButtonProps {
|
|
16
22
|
/**
|
|
17
23
|
* Pressed (toggle) state — renders the selected look and sets
|
|
@@ -34,8 +40,9 @@ interface CButtonProps {
|
|
|
34
40
|
*/
|
|
35
41
|
asTab?: boolean;
|
|
36
42
|
/**
|
|
37
|
-
* Danger look for a destructive action: the
|
|
38
|
-
*
|
|
43
|
+
* Danger look for a destructive action: the error colour.
|
|
44
|
+
*
|
|
45
|
+
* @deprecated Use `variant="danger"`.
|
|
39
46
|
*/
|
|
40
47
|
danger?: boolean;
|
|
41
48
|
/**
|
|
@@ -117,6 +124,14 @@ interface CButtonProps {
|
|
|
117
124
|
* of the `c-tab-item` panel it shows.
|
|
118
125
|
*/
|
|
119
126
|
value?: number | string;
|
|
127
|
+
/**
|
|
128
|
+
* The button's colour, in every appearance: `primary` unless set (or
|
|
129
|
+
* changed app-wide), `secondary`, `success`, `info`, `warning`, or `danger`
|
|
130
|
+
* for a destructive action.
|
|
131
|
+
*
|
|
132
|
+
* @defaultable 'primary'
|
|
133
|
+
*/
|
|
134
|
+
variant?: CButtonVariant;
|
|
120
135
|
}
|
|
121
136
|
declare const _default: typeof __VLS_export;
|
|
122
137
|
export default _default;
|
|
@@ -127,22 +142,25 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButto
|
|
|
127
142
|
type: CButtonType;
|
|
128
143
|
size: CButtonSize;
|
|
129
144
|
fit: boolean;
|
|
145
|
+
variant: CButtonVariant;
|
|
130
146
|
disabled: boolean;
|
|
131
147
|
loading: boolean;
|
|
132
|
-
href: string;
|
|
133
|
-
target: string;
|
|
134
148
|
active: boolean;
|
|
135
149
|
appearance: CButtonAppearance;
|
|
136
150
|
asTab: boolean;
|
|
137
151
|
danger: boolean;
|
|
138
152
|
ghost: boolean;
|
|
153
|
+
href: string;
|
|
139
154
|
inverted: boolean;
|
|
140
155
|
noRadius: boolean;
|
|
141
156
|
noRipple: boolean;
|
|
157
|
+
target: string;
|
|
142
158
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
143
159
|
icon?: (props: {}) => any;
|
|
144
160
|
} & {
|
|
145
|
-
default?: (props: {
|
|
161
|
+
default?: (props: {
|
|
162
|
+
class: string;
|
|
163
|
+
}) => any;
|
|
146
164
|
} & {
|
|
147
165
|
description?: (props: {}) => any;
|
|
148
166
|
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ensureButtonStyles: () => void;
|
|
@@ -31,6 +31,13 @@ interface CButtonGroupProps {
|
|
|
31
31
|
* form — bind `value` as a DOM property (`:value.prop` in Vue).
|
|
32
32
|
*/
|
|
33
33
|
multiple?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The name the active button's value submits under in a native `<form>` —
|
|
36
|
+
* one entry per active button with `multiple`, nothing while none is active
|
|
37
|
+
*
|
|
38
|
+
* @freeform
|
|
39
|
+
*/
|
|
40
|
+
name?: string;
|
|
34
41
|
/**
|
|
35
42
|
* Set as required — shows the required marker on the label
|
|
36
43
|
*/
|
|
@@ -52,6 +59,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButto
|
|
|
52
59
|
focus: (options?: FocusOptions) => void;
|
|
53
60
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CButtonGroupProps> & Readonly<{}>, {
|
|
54
61
|
label: string;
|
|
62
|
+
name: string;
|
|
55
63
|
value: CButtonGroupValue;
|
|
56
64
|
mandatory: boolean;
|
|
57
65
|
multiple: boolean;
|
|
@@ -56,8 +56,8 @@ interface CCheckboxProps {
|
|
|
56
56
|
*/
|
|
57
57
|
label?: string;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
59
|
+
* The name the checkbox submits under in a native `<form>` while it is
|
|
60
|
+
* checked: its `true-value`, or `on` when that is `true`
|
|
61
61
|
*
|
|
62
62
|
* @freeform
|
|
63
63
|
*/
|
|
@@ -95,8 +95,8 @@ declare const __VLS_base: import("vue").DefineComponent<CCheckboxProps, {
|
|
|
95
95
|
hint: string;
|
|
96
96
|
required: boolean;
|
|
97
97
|
checked: boolean;
|
|
98
|
-
falseValue: boolean | number | string;
|
|
99
98
|
indeterminate: boolean;
|
|
99
|
+
falseValue: boolean | number | string;
|
|
100
100
|
trueValue: boolean | number | string;
|
|
101
101
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
102
102
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|