@cscfi/csc-ui 4.0.0-alpha.3 → 4.0.0-alpha.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.
@@ -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 outer bordered box carrying the type's accent color\n- **icon** - The status icon svg shown for the error/info/success/warning types\n- **content** - The wrapper around the slotted title and message content",
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,9 +1168,49 @@
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
- "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",
1213
+ "description": "A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label.\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",
1154
1214
  "attributes": [
1155
1215
  {
1156
1216
  "name": "hide-details",
@@ -1181,14 +1241,31 @@
1181
1241
  "references": []
1182
1242
  },
1183
1243
  {
1184
- "name": "c-radio",
1185
- "description": "\n---\n\n\n### **Slots:**\n - **default** - The radio button's label text, read by the parent c-radio-group",
1244
+ "name": "c-progress-circle",
1245
+ "description": "A circular progress indicator that draws a known completion percentage as an arc around a track — the circular counterpart of `c-progress-bar`.\n---\n\n\n### **Slots:**\n - **default** - Optional content centered inside the circle, e.g. '57%' or an icon\n\n### **CSS Parts:**\n - **root** - The wrapper around the ring and the centered content\n- **track** - The background ring (SVG circle)\n- **bar** - The value arc (SVG circle)\n- **content** - The centered slot-content wrapper",
1186
1246
  "attributes": [
1187
1247
  {
1188
- "name": "checked",
1189
- "description": "Set option as checked",
1248
+ "name": "size",
1249
+ "description": "Diameter of the circle in pixels",
1190
1250
  "values": []
1191
1251
  },
1252
+ {
1253
+ "name": "value",
1254
+ "description": "Progress value in percentage (0 to 100)",
1255
+ "values": []
1256
+ },
1257
+ {
1258
+ "name": "width",
1259
+ "description": "Stroke width of the track in pixels; the value arc draws at half this\nwidth, inset within the track",
1260
+ "values": []
1261
+ }
1262
+ ],
1263
+ "references": []
1264
+ },
1265
+ {
1266
+ "name": "c-radio",
1267
+ "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",
1268
+ "attributes": [
1192
1269
  {
1193
1270
  "name": "disabled",
1194
1271
  "description": "Disable the radio button",
@@ -1200,7 +1277,7 @@
1200
1277
  },
1201
1278
  {
1202
1279
  "name": "c-radio-group",
1203
- "description": "\n---\n\n\n### **Events:**\n - **changeValue** - Fired when a radio option is selected, carrying the selected item's\nvalue — or the whole item object when `return-object` is set. 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 item's\nvalue — or the whole item object when `return-object` is set.\n\n### **Slots:**\n - **default** - Default slot for the label\n\n### **CSS Parts:**\n - **root** - The radiogroup wrapper element carrying the disabled/error states\n- **label** - The group label above the radio buttons\n- **items** - The wrapper around the rendered radio button rows\n- **message** - The hint/error message line below the radios",
1280
+ "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
1281
  "attributes": [
1205
1282
  {
1206
1283
  "name": "disabled",
@@ -1222,7 +1299,6 @@
1222
1299
  "description": "Hint text for the input",
1223
1300
  "values": []
1224
1301
  },
1225
- { "name": "host-id", "description": "Id of the element", "values": [] },
1226
1302
  {
1227
1303
  "name": "inline",
1228
1304
  "description": "Display radio buttons inline",
@@ -1234,11 +1310,6 @@
1234
1310
  "values": []
1235
1311
  },
1236
1312
  { "name": "required", "description": "Set as required", "values": [] },
1237
- {
1238
- "name": "return-object",
1239
- "description": "Return the whole item object",
1240
- "values": []
1241
- },
1242
1313
  {
1243
1314
  "name": "valid",
1244
1315
  "description": "Set the validity of the input",
@@ -1246,8 +1317,8 @@
1246
1317
  },
1247
1318
  {
1248
1319
  "name": "value",
1249
- "description": "Value of the radio group",
1250
- "values": [{ "name": "RadioItem" }]
1320
+ "description": "Value of the radio group; matched against each radio's `value` by strict\nstring equality",
1321
+ "values": []
1251
1322
  }
1252
1323
  ],
1253
1324
  "references": []
@@ -1416,7 +1487,7 @@
1416
1487
  },
1417
1488
  {
1418
1489
  "name": "c-spinner",
1419
- "description": "\n---\n\n\n### **CSS Parts:**\n - **root** - The `<svg>` element that draws the spinning circle",
1490
+ "description": "A circular indeterminate activity indicator — pure motion with no value, for waits of unknown duration.\n---\n\n\n### **CSS Parts:**\n - **root** - The `<svg>` element that draws the spinning circle",
1420
1491
  "attributes": [
1421
1492
  {
1422
1493
  "name": "color",
@@ -1829,7 +1900,7 @@
1829
1900
  },
1830
1901
  {
1831
1902
  "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 carrying the accent border and 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: type icon, message body and close button\n- **progress** - The track of the auto-close progress bar",
1903
+ "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
1904
  "attributes": [
1834
1905
  {
1835
1906
  "name": "message",
@@ -1870,6 +1941,51 @@
1870
1941
  "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
1942
  "attributes": [],
1872
1943
  "references": []
1944
+ },
1945
+ {
1946
+ "name": "c-tooltip",
1947
+ "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",
1948
+ "attributes": [
1949
+ {
1950
+ "name": "delay",
1951
+ "description": "Delay before the tooltip shows on hover, in milliseconds. Keyboard focus\nshows the tooltip immediately, regardless of this value. Defaults to\n`400`.",
1952
+ "values": []
1953
+ },
1954
+ {
1955
+ "name": "distance",
1956
+ "description": "Distance from the trigger to the tooltip, in pixels. Defaults to `4`.",
1957
+ "values": []
1958
+ },
1959
+ {
1960
+ "name": "open",
1961
+ "description": "Whether the tooltip is open. Two-way: emits `change:open`.",
1962
+ "values": []
1963
+ },
1964
+ {
1965
+ "name": "position",
1966
+ "description": "Preferred placement of the tooltip relative to the trigger.",
1967
+ "values": [
1968
+ { "name": "bottom-end" },
1969
+ { "name": "bottom-start" },
1970
+ { "name": "bottom" },
1971
+ { "name": "left-end" },
1972
+ { "name": "left-start" },
1973
+ { "name": "left" },
1974
+ { "name": "right-end" },
1975
+ { "name": "right-start" },
1976
+ { "name": "right" },
1977
+ { "name": "top-end" },
1978
+ { "name": "top-start" },
1979
+ { "name": "top" }
1980
+ ]
1981
+ },
1982
+ {
1983
+ "name": "text",
1984
+ "description": "The tooltip text. Overridden by the `content` slot when that is\npopulated.",
1985
+ "values": []
1986
+ }
1987
+ ],
1988
+ "references": []
1873
1989
  }
1874
1990
  ]
1875
1991
  }