@cscfi/csc-ui 4.0.0-alpha.3 → 4.0.0-alpha.4
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 +5710 -5414
- package/dist/custom-elements.json +523 -96
- package/dist/docs/c-popover/usage.md +27 -0
- package/dist/docs/c-radio/usage.md +29 -0
- package/dist/docs/c-radio-group/usage.md +67 -0
- package/dist/docs/c-tooltip/usage.md +30 -0
- package/dist/styles/css/tailwind-theme.css +30 -0
- package/dist/styles/css/tokens.css +77 -1
- package/dist/vscode.css-custom-data.json +56 -10
- package/dist/vscode.html-custom-data.json +112 -18
- package/dist/web-types.json +320 -72
- package/dist-types/components/c-alert/CAlert.vue.d.ts +10 -3
- package/dist-types/components/c-menu/CMenu.vue.d.ts +3 -3
- package/dist-types/components/c-menu-item/CMenuItem.vue.d.ts +29 -3
- package/dist-types/components/c-popover/CPopover.vue.d.ts +34 -0
- package/dist-types/components/c-radio/CRadio.vue.d.ts +0 -10
- package/dist-types/components/c-radio-group/CRadioGroup.vue.d.ts +8 -46
- package/dist-types/components/c-tooltip/CTooltip.vue.d.ts +39 -0
- package/dist-types/index.d.ts +3 -1
- package/dist-types/shared/FieldMessage.vue.d.ts +21 -0
- package/dist-types/shared/positionArea.d.ts +13 -0
- package/dist-types/tag-name-map.d.ts +130 -27
- package/dist-types/types.d.ts +7 -0
- package/package.json +1 -1
|
@@ -58,8 +58,13 @@
|
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"name": "c-alert",
|
|
61
|
-
"description": "\n---\n\n\n### **Slots:**\n - **title** - Title slot\n- **default** - Default slot\n\n### **CSS Parts:**\n - **root** - The
|
|
61
|
+
"description": "\n---\n\n\n### **Events:**\n - **dismiss** - Fired when the dismiss button is pressed. The alert does not hide\nitself — the consumer owns removal.\n\n### **Slots:**\n - **title** - Title slot\n- **default** - Default slot\n\n### **CSS Parts:**\n - **root** - The tinted box carrying the type's wash, hairline border and accent edge\n- **icon** - The status icon svg\n- **content** - The wrapper around the slotted title and message content\n- **dismiss** - The dismiss button rendered when `dismissible` is set",
|
|
62
62
|
"attributes": [
|
|
63
|
+
{
|
|
64
|
+
"name": "dismissible",
|
|
65
|
+
"description": "Show a dismiss button. The alert only emits `dismiss` — removing it from\nthe page stays the consumer's job.",
|
|
66
|
+
"values": []
|
|
67
|
+
},
|
|
63
68
|
{
|
|
64
69
|
"name": "type",
|
|
65
70
|
"description": "Type of the alert",
|
|
@@ -949,8 +954,18 @@
|
|
|
949
954
|
},
|
|
950
955
|
{
|
|
951
956
|
"name": "c-menu-item",
|
|
952
|
-
"description": "A single command in a `c-menu`.\n---\n\n\n### **Slots:**\n - **default** - The item's content: label text plus optional icons or shortcut hint\n- **submenu** - c-menu-item components for the nested submenu\n\n### **CSS Parts:**\n - **root** - The item row containing the content and the submenu chevron\n- **content** - The flex wrapper around the default-slot content\n- **submenu-panel** - The floating popover holding the submenu\n- **submenu** - The submenu list surface inside the popover",
|
|
957
|
+
"description": "A single command in a `c-menu`.\n---\n\n\n### **Slots:**\n - **default** - The item's content: label text plus optional icons or shortcut hint\n- **submenu** - c-menu-item components for the nested submenu\n\n### **CSS Parts:**\n - **root** - The item row containing the content and the submenu chevron\n- **content** - The flex wrapper around the default-slot content\n- **icon** - The leading icon rendered from the `icon` prop\n- **check** - The trailing indicator icon shown while the item is active\n- **submenu-panel** - The floating popover holding the submenu\n- **submenu** - The submenu list surface inside the popover",
|
|
953
958
|
"attributes": [
|
|
959
|
+
{
|
|
960
|
+
"name": "active",
|
|
961
|
+
"description": "Marks the item as the currently selected choice: renders the trailing\nindicator icon and stamps `role=\"menuitemradio\"` + `aria-checked`. Leave\nunset for regular command items — only a true/false value marks the item\nas a selectable choice. The state is consumer-owned: the menu emits\n`select` as usual and never toggles this itself. Distinct from the\nkeyboard highlight (the `data-active` attribute the controlling menu\nmoves between rows).",
|
|
962
|
+
"values": []
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"name": "active-icon",
|
|
966
|
+
"description": "SVG path for the trailing indicator shown while `active`; defaults to a\ncheck mark.",
|
|
967
|
+
"values": []
|
|
968
|
+
},
|
|
954
969
|
{
|
|
955
970
|
"name": "danger",
|
|
956
971
|
"description": "Marks the action as destructive (renders in the error colour).",
|
|
@@ -961,6 +976,11 @@
|
|
|
961
976
|
"description": "Disables the item — it is skipped by keyboard nav and emits no select.",
|
|
962
977
|
"values": []
|
|
963
978
|
},
|
|
979
|
+
{
|
|
980
|
+
"name": "icon",
|
|
981
|
+
"description": "SVG path for a leading icon rendered before the item's content.",
|
|
982
|
+
"values": []
|
|
983
|
+
},
|
|
964
984
|
{
|
|
965
985
|
"name": "value",
|
|
966
986
|
"description": "Value reported in the menu's `select` event when this item is chosen.",
|
|
@@ -1148,6 +1168,46 @@
|
|
|
1148
1168
|
],
|
|
1149
1169
|
"references": []
|
|
1150
1170
|
},
|
|
1171
|
+
{
|
|
1172
|
+
"name": "c-popover",
|
|
1173
|
+
"description": "A click-opened, non-modal surface anchored to its trigger, floating in the top layer; its content may be interactive.\n---\n\n\n### **Events:**\n - **change:open** - Fired whenever the popover 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\n### **Slots:**\n - **trigger** - The element that opens the popover (e.g. a c-button)\n- **default** - The popover's content; may contain interactive elements\n\n### **CSS Parts:**\n - **trigger** - The inline wrapper around the slotted trigger, serving as the panel's anchor\n- **panel** - The floating popover surface positioned against the trigger\n- **heading** - The heading rendered from the `heading` prop",
|
|
1174
|
+
"attributes": [
|
|
1175
|
+
{
|
|
1176
|
+
"name": "distance",
|
|
1177
|
+
"description": "Distance from the trigger to the panel, in pixels. Defaults to `0`.",
|
|
1178
|
+
"values": []
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
"name": "heading",
|
|
1182
|
+
"description": "Heading rendered at the top of the panel, doubling as its accessible\nname. Without it, set `aria-label` on the host. Named `heading`, not\n`title`: a `title` attribute on the host would trigger the browser's\nnative tooltip and collides with `HTMLElement.title`.",
|
|
1183
|
+
"values": []
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"name": "open",
|
|
1187
|
+
"description": "Whether the popover is open. Two-way: emits `change:open`.",
|
|
1188
|
+
"values": []
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
"name": "position",
|
|
1192
|
+
"description": "Preferred placement of the panel relative to the trigger.",
|
|
1193
|
+
"values": [
|
|
1194
|
+
{ "name": "bottom-end" },
|
|
1195
|
+
{ "name": "bottom-start" },
|
|
1196
|
+
{ "name": "bottom" },
|
|
1197
|
+
{ "name": "left-end" },
|
|
1198
|
+
{ "name": "left-start" },
|
|
1199
|
+
{ "name": "left" },
|
|
1200
|
+
{ "name": "right-end" },
|
|
1201
|
+
{ "name": "right-start" },
|
|
1202
|
+
{ "name": "right" },
|
|
1203
|
+
{ "name": "top-end" },
|
|
1204
|
+
{ "name": "top-start" },
|
|
1205
|
+
{ "name": "top" }
|
|
1206
|
+
]
|
|
1207
|
+
}
|
|
1208
|
+
],
|
|
1209
|
+
"references": []
|
|
1210
|
+
},
|
|
1151
1211
|
{
|
|
1152
1212
|
"name": "c-progress-bar",
|
|
1153
1213
|
"description": "\n---\n\n\n### **CSS Parts:**\n - **root** - The outer flex wrapper around the bar and the details line\n- **bar** - The visible track of the progress bar, wrapping the native `<progress>` element\n- **details** - The percentage and label text line",
|
|
@@ -1182,13 +1242,8 @@
|
|
|
1182
1242
|
},
|
|
1183
1243
|
{
|
|
1184
1244
|
"name": "c-radio",
|
|
1185
|
-
"description": "
|
|
1245
|
+
"description": "A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label.\n---\n\n\n### **Events:**\n - **change** - Fired when the radio is selected by the user, carrying its `value`.\nBubbles composed so the parent `<c-radio-group>` — whose shadow root a\nlight-DOM event never enters — catches it on its host; a consumer\nlistening on the group hears it too, with the radio as `target`.\n\n### **Slots:**\n - **default** - The radio's label content, rendered inside the shadow `<label>` so it stays click-associated and announced\n\n### **CSS Parts:**\n - **root** - The `<label>` row wrapping the input, indicator and label content\n- **indicator** - The circular ripple surface holding the radio ring and dot\n- **content** - Wrapper around the slotted label content",
|
|
1186
1246
|
"attributes": [
|
|
1187
|
-
{
|
|
1188
|
-
"name": "checked",
|
|
1189
|
-
"description": "Set option as checked",
|
|
1190
|
-
"values": []
|
|
1191
|
-
},
|
|
1192
1247
|
{
|
|
1193
1248
|
"name": "disabled",
|
|
1194
1249
|
"description": "Disable the radio button",
|
|
@@ -1200,7 +1255,7 @@
|
|
|
1200
1255
|
},
|
|
1201
1256
|
{
|
|
1202
1257
|
"name": "c-radio-group",
|
|
1203
|
-
"description": "
|
|
1258
|
+
"description": "A radio group is a set of mutually exclusive choices where exactly one can be selected, authored as slotted `c-radio` children. Give the group a `label` so the choice it represents is named for every user, and a `hint` describing how to answer.\n---\n\n\n### **Events:**\n - **changeValue** - Fired when a radio is selected, carrying the selected radio's value. Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event fired on selection so a plain Vue `v-model`\nworks without the `v-control` directive. No detail.\n- **update:value** - v-model contract event fired on selection, carrying the selected radio's\nvalue.\n\n### **Slots:**\n - **default** - The radios' home: `<c-radio>` children, wrappable in arbitrary layout elements at any depth\n- **label** - Group label content, used when the `label` prop is not set\n\n### **CSS Parts:**\n - **root** - The radiogroup wrapper element\n- **label** - The group label above the radio buttons\n- **items** - The container the radios are slotted into\n- **message** - The hint/error message area below the radios (always reserved unless `hide-details`)",
|
|
1204
1259
|
"attributes": [
|
|
1205
1260
|
{
|
|
1206
1261
|
"name": "disabled",
|
|
@@ -1222,7 +1277,6 @@
|
|
|
1222
1277
|
"description": "Hint text for the input",
|
|
1223
1278
|
"values": []
|
|
1224
1279
|
},
|
|
1225
|
-
{ "name": "host-id", "description": "Id of the element", "values": [] },
|
|
1226
1280
|
{
|
|
1227
1281
|
"name": "inline",
|
|
1228
1282
|
"description": "Display radio buttons inline",
|
|
@@ -1234,11 +1288,6 @@
|
|
|
1234
1288
|
"values": []
|
|
1235
1289
|
},
|
|
1236
1290
|
{ "name": "required", "description": "Set as required", "values": [] },
|
|
1237
|
-
{
|
|
1238
|
-
"name": "return-object",
|
|
1239
|
-
"description": "Return the whole item object",
|
|
1240
|
-
"values": []
|
|
1241
|
-
},
|
|
1242
1291
|
{
|
|
1243
1292
|
"name": "valid",
|
|
1244
1293
|
"description": "Set the validity of the input",
|
|
@@ -1246,8 +1295,8 @@
|
|
|
1246
1295
|
},
|
|
1247
1296
|
{
|
|
1248
1297
|
"name": "value",
|
|
1249
|
-
"description": "Value of the radio group",
|
|
1250
|
-
"values": [
|
|
1298
|
+
"description": "Value of the radio group; matched against each radio's `value` by strict\nstring equality",
|
|
1299
|
+
"values": []
|
|
1251
1300
|
}
|
|
1252
1301
|
],
|
|
1253
1302
|
"references": []
|
|
@@ -1829,7 +1878,7 @@
|
|
|
1829
1878
|
},
|
|
1830
1879
|
{
|
|
1831
1880
|
"name": "c-toast",
|
|
1832
|
-
"description": "A single toast notification, rendered and managed by c-toasts\n---\n\n\n### **Events:**\n - **close** - Fired once the toast's leave transition has finished (after a manual\ndismiss or the auto-close timer), carrying the dismissed toast's message\nobject.\n\n### **Slots:**\n - **default** - Custom toast content, shown when the message is flagged `custom`\n\n### **CSS Parts:**\n - **root** - The toast's outer box
|
|
1881
|
+
"description": "A single toast notification, rendered and managed by c-toasts\n---\n\n\n### **Events:**\n - **close** - Fired once the toast's leave transition has finished (after a manual\ndismiss or the auto-close timer), carrying the dismissed toast's message\nobject.\n\n### **Slots:**\n - **default** - Custom toast content, shown when the message is flagged `custom`\n\n### **CSS Parts:**\n - **root** - The toast's outer box: the inverted-surface pill carrying the shadow\n- **custom** - Wrapper shown for custom messages in place of the standard item layout\n- **content** - The message body holding the title and text, or the slotted custom content\n- **item** - Row layout of a standard toast: status badge, message body and dismiss button\n- **badge** - The circular tinted badge holding the status icon\n- **dismiss** - The dismiss button (icon-only, or labelled when the message sets `closeText`)\n- **progress** - The track of the auto-close progress bar",
|
|
1833
1882
|
"attributes": [
|
|
1834
1883
|
{
|
|
1835
1884
|
"name": "message",
|
|
@@ -1870,6 +1919,51 @@
|
|
|
1870
1919
|
"description": "\n---\n\n\n### **Slots:**\n - **default** - Content of toolbar\n\n### **CSS Parts:**\n - **root** - The toolbar bar itself, fixed to the top of the viewport",
|
|
1871
1920
|
"attributes": [],
|
|
1872
1921
|
"references": []
|
|
1922
|
+
},
|
|
1923
|
+
{
|
|
1924
|
+
"name": "c-tooltip",
|
|
1925
|
+
"description": "A non-interactive text hint shown when its trigger is hovered or keyboard-focused, floating in the top layer on the inverted surface tier.\n---\n\n\n### **Events:**\n - **change:open** - Fired whenever the tooltip shows or hides, 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\n### **Slots:**\n - **trigger** - The element the tooltip describes (e.g. a c-icon-button)\n- **content** - Formatted tooltip content, overriding the `text` prop; must stay non-interactive (ADR-0033)\n\n### **CSS Parts:**\n - **trigger** - The inline wrapper around the slotted trigger, serving as the panel's anchor\n- **panel** - The floating tooltip bubble positioned against the trigger",
|
|
1926
|
+
"attributes": [
|
|
1927
|
+
{
|
|
1928
|
+
"name": "delay",
|
|
1929
|
+
"description": "Delay before the tooltip shows on hover, in milliseconds. Keyboard focus\nshows the tooltip immediately, regardless of this value. Defaults to\n`400`.",
|
|
1930
|
+
"values": []
|
|
1931
|
+
},
|
|
1932
|
+
{
|
|
1933
|
+
"name": "distance",
|
|
1934
|
+
"description": "Distance from the trigger to the tooltip, in pixels. Defaults to `4`.",
|
|
1935
|
+
"values": []
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
"name": "open",
|
|
1939
|
+
"description": "Whether the tooltip is open. Two-way: emits `change:open`.",
|
|
1940
|
+
"values": []
|
|
1941
|
+
},
|
|
1942
|
+
{
|
|
1943
|
+
"name": "position",
|
|
1944
|
+
"description": "Preferred placement of the tooltip relative to the trigger.",
|
|
1945
|
+
"values": [
|
|
1946
|
+
{ "name": "bottom-end" },
|
|
1947
|
+
{ "name": "bottom-start" },
|
|
1948
|
+
{ "name": "bottom" },
|
|
1949
|
+
{ "name": "left-end" },
|
|
1950
|
+
{ "name": "left-start" },
|
|
1951
|
+
{ "name": "left" },
|
|
1952
|
+
{ "name": "right-end" },
|
|
1953
|
+
{ "name": "right-start" },
|
|
1954
|
+
{ "name": "right" },
|
|
1955
|
+
{ "name": "top-end" },
|
|
1956
|
+
{ "name": "top-start" },
|
|
1957
|
+
{ "name": "top" }
|
|
1958
|
+
]
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
"name": "text",
|
|
1962
|
+
"description": "The tooltip text. Overridden by the `content` slot when that is\npopulated.",
|
|
1963
|
+
"values": []
|
|
1964
|
+
}
|
|
1965
|
+
],
|
|
1966
|
+
"references": []
|
|
1873
1967
|
}
|
|
1874
1968
|
]
|
|
1875
1969
|
}
|