@cscfi/csc-ui 4.0.0-alpha.27 → 4.0.0-alpha.29

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.
@@ -505,7 +505,7 @@
505
505
  },
506
506
  {
507
507
  "name": "c-date-picker",
508
- "description": "A date field that takes a typed date, or opens a calendar panel for picking one, or a start and end date under `range`.\n---\n\n\n### **Events:**\n - **change** - Fired when the value changes — a day or range is picked, typed text is\ncommitted, or the field is cleared — carrying the new value: an ISO\ndate, `{ start, end }` under `range`, or `null`.\n- **change:month** - Fired with the displayed month as `YYYY-MM` whenever it changes, and\nwhen the panel opens — the signal to load that month's `disabled-dates`.\n- **change:text** - Fired on every commit of typed text (Enter or leaving the input) with the\ntext as typed — `{ start, end }` under `range`. Read `badInput` to tell\nwhether it named a date that can be picked.\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 `change` with the same detail — the `v-model` contract.\n\n### **CSS Parts:**\n - **input** - The text input; under `range` both the start and the end input\n- **separator** - The dash between the start and end inputs under `range`\n- **panel** - The top-layer popover container anchored below the field\n- **card** - The dialog surface inside the panel holding the header and the calendar body\n- **heading-row** - The top row of the fullscreen panel (narrow viewports): the field label as heading and the close button\n- **heading** - The field label naming the fullscreen panel\n- **close** - The close button of the fullscreen panel\n- **header** - The row of month and year controls above the calendar body\n- **previous-month** - The arrow to the previous month\n- **next-month** - The arrow to the next month\n- **month-button** - The button showing the displayed month that opens the month list\n- **previous-year** - The arrow to the same month a year earlier\n- **next-year** - The arrow to the same month a year later\n- **year-button** - The button showing the displayed year that opens the year list\n- **grid** - The day grid of the displayed month\n- **weekday** - A weekday column head in the grid\n- **week-number** - An ISO week number beside a grid row (`show-week-numbers`)\n- **cell** - One day's cell in the grid\n- **day** - The circle showing a day's number inside its cell\n- **range-band** - The strip joining a range's days behind their circles\n- **list** - The month or year list swapped in for the grid\n- **option** - One month or year in the list",
508
+ "description": "A date field that takes a typed date, or opens a calendar panel for picking one, or a start and end date under `range`.\n---\n\n\n### **Events:**\n - **change** - Fired when the value changes — a day or range is picked, typed text is\ncommitted, or the field is cleared — carrying the new value: an ISO\ndate, `{ start, end }` under `range`, or `null`.\n- **change:month** - Fired with the displayed month as `YYYY-MM` whenever it changes, and\nwhen the panel opens — the signal to load that month's `disabled-dates`.\n- **change:text** - Fired on every commit of typed text (Enter or leaving the input) with the\ntext as typed — `{ start, end }` under `range`. Read `badInput` to tell\nwhether it named a date that can be picked.\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 `change` with the same detail — the `v-model` contract.\n\n### **CSS Parts:**\n - **input** - The text input; under `range` both the start and the end input\n- **separator** - The dash between the start and end inputs under `range`\n- **panel** - The top-layer popover container anchored below the field\n- **card** - The dialog surface inside the panel holding the header and the calendar body\n- **heading-row** - The top row of the fullscreen panel (narrow viewports): the field label as heading and the close button\n- **heading** - The field label naming the fullscreen panel\n- **close** - The close button of the fullscreen panel\n- **header** - The row of month and year controls above the calendar body\n- **previous-month** - The arrow to the previous month\n- **next-month** - The arrow to the next month\n- **month-button** - The button showing the displayed month that opens the month list\n- **previous-year** - The arrow to the same month a year earlier\n- **next-year** - The arrow to the same month a year later\n- **year-button** - The button showing the displayed year that opens the year list\n- **grid** - The day grid of the displayed month\n- **weekday** - A weekday column head in the grid\n- **week-number** - An ISO week number beside a grid row (`show-week-numbers`)\n- **cell** - One day's cell in the grid\n- **day** - The circle showing a day's number inside its cell\n- **range-band** - The strip joining a range's days behind their circles\n- **list** - The month or year list swapped in for the grid\n- **option** - One month or year in the list\n- **step-label** - The label above the current list under `type=\"month\"`: month or year, and under `range` start or end\n- **step-summary** - A finished step under `type=\"month\"`, its label and pick; pressing it returns to that step\n- **actions** - The row under the calendar body holding the Today button (`show-today`) and, in the fullscreen panel, the Done button\n- **today** - The Today button: picks today, or the current month under `type=\"month\"`\n- **done** - The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes",
509
509
  "attributes": [
510
510
  {
511
511
  "name": "clearable",
@@ -584,6 +584,11 @@
584
584
  "values": []
585
585
  },
586
586
  { "name": "shadow", "description": "Shadow variant", "values": [] },
587
+ {
588
+ "name": "show-today",
589
+ "description": "Show a Today button under the calendar that picks today (\"This month\"\nunder `type=\"month\"`)",
590
+ "values": []
591
+ },
587
592
  {
588
593
  "name": "show-week-numbers",
589
594
  "description": "Show ISO 8601 week numbers beside the calendar rows (meaningful with a\nMonday week start)",
@@ -594,6 +599,11 @@
594
599
  "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
595
600
  "values": [{ "name": "default" }, { "name": "small" }]
596
601
  },
602
+ {
603
+ "name": "type",
604
+ "description": "What the field picks: a calendar date, or a year and a month\n(`'YYYY-MM'`)",
605
+ "values": [{ "name": "date" }, { "name": "month" }]
606
+ },
597
607
  {
598
608
  "name": "valid",
599
609
  "description": "Set the validity of the field",
@@ -601,7 +611,7 @@
601
611
  },
602
612
  {
603
613
  "name": "value",
604
- "description": "The date as an ISO `YYYY-MM-DD` string, or `{ start, end }` under\n`range`; `null` when empty",
614
+ "description": "The date as an ISO `YYYY-MM-DD` string (an ISO `YYYY-MM` month under\n`type=\"month\"`), or `{ start, end }` under `range`; `null` when empty",
605
615
  "values": [{ "name": "CDatePickerValue" }]
606
616
  }
607
617
  ],
@@ -1192,7 +1202,7 @@
1192
1202
  },
1193
1203
  {
1194
1204
  "name": "c-number-field",
1195
- "description": "A field for a number — an integer, or one with decimals — shown with thousands separators as it is typed.\n---\n\n\n### **Events:**\n - **change** - Fired whenever typing changes the number, carrying it — `null` once the\nfield holds no digit. Not fired when only the text changes (a group\nseparator, a trailing decimal separator) or when `value` is set.\n- **input** - Native bubbling input event fired alongside every value change so a\nplain Vue `v-model` works. No detail.\n- **update:value** - v-model contract event, fired with `change`.\n\n### **Slots:**\n - **pre** - Content before the number, such as a currency sign\n- **post** - Content after the number, such as a unit\n\n### **CSS Parts:**\n - **input** - The text input",
1205
+ "description": "A field for a number — an integer, or one with decimals — shown with thousands separators as it is typed.\n---\n\n\n### **Events:**\n - **change** - Fired whenever typing or a step changes the number, carrying it — `null`\nonce the field holds no digit. Not fired when only the text changes (a group\nseparator, a trailing decimal separator) or when `value` is set.\n- **input** - Native bubbling input event fired alongside every value change so a\nplain Vue `v-model` works. No detail.\n- **update:value** - v-model contract event, fired with `change`.\n\n### **Slots:**\n - **pre** - Content before the number, such as a currency sign\n- **post** - Content after the number, such as a unit; the step buttons follow it\n\n### **CSS Parts:**\n - **input** - The text input\n- **step-up** - The button that steps the number up\n- **step-down** - The button that steps the number down",
1196
1206
  "attributes": [
1197
1207
  {
1198
1208
  "name": "decimals",
@@ -1273,6 +1283,11 @@
1273
1283
  "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
1274
1284
  "values": [{ "name": "default" }, { "name": "small" }]
1275
1285
  },
1286
+ {
1287
+ "name": "step",
1288
+ "description": "The spacing of the grid the step buttons and arrow keys move along, counted from `min` (or `0`)",
1289
+ "values": []
1290
+ },
1276
1291
  {
1277
1292
  "name": "valid",
1278
1293
  "description": "Set the validity of the field",
@@ -2158,6 +2173,102 @@
2158
2173
  ],
2159
2174
  "references": []
2160
2175
  },
2176
+ {
2177
+ "name": "c-time-picker",
2178
+ "description": "A time field that takes a typed time, or opens hour and minute columns for picking one, or a start and end time under `range`.\n---\n\n\n### **Events:**\n - **change** - Fired when the value changes — a row is picked or moved to in a column,\ntyped text is committed, or the field is cleared — carrying the new\nvalue: an ISO `HH:mm` time, `{ start, end }` under `range`, or `null`.\n- **change:text** - Fired on every commit of typed text (Enter or leaving the input) with the\ntext as typed — `{ start, end }` under `range`. Read `badInput` to tell\nwhether it named a time that can be picked.\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 `change` with the same detail — the `v-model` contract.\n\n### **CSS Parts:**\n - **input** - The text input; under `range` both the start and the end input\n- **separator** - The dash between the start and end inputs under `range`\n- **panel** - The top-layer popover container anchored below the field\n- **card** - The dialog surface inside the panel holding the columns\n- **heading-row** - The top row of the fullscreen panel (narrow viewports): the field label as heading and the close button\n- **heading** - The field label naming the fullscreen panel\n- **close** - The close button of the fullscreen panel\n- **end-switch** - The Start | End switch above the columns under `range`\n- **end-tab** - One end's button in the end switch\n- **columns** - The row of time columns\n- **column** - One time column: hours, minutes or AM/PM\n- **option** - One row of a time column\n- **actions** - The row under the columns holding the Now button (`show-now`) and, in the fullscreen panel, the Done button\n- **now** - The Now button: commits the current time\n- **done** - The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes",
2179
+ "attributes": [
2180
+ {
2181
+ "name": "clearable",
2182
+ "description": "Make the value clearable",
2183
+ "values": []
2184
+ },
2185
+ {
2186
+ "name": "disabled",
2187
+ "description": "Disable the field",
2188
+ "values": []
2189
+ },
2190
+ {
2191
+ "name": "error-message",
2192
+ "description": "Error message shown in place of the hint while the field is invalid",
2193
+ "values": []
2194
+ },
2195
+ {
2196
+ "name": "format",
2197
+ "description": "How times are shown and read from typing: a pattern of the tokens `H`,\n`HH` (24-hour), `h`, `hh` (12-hour, with the period `a`) and `mm` with\nany separators, e.g. `HH:mm` or `h:mm a`",
2198
+ "values": []
2199
+ },
2200
+ {
2201
+ "name": "hide-details",
2202
+ "description": "Hide the hint and error messages",
2203
+ "values": []
2204
+ },
2205
+ {
2206
+ "name": "hint",
2207
+ "description": "Hint text for the field",
2208
+ "values": []
2209
+ },
2210
+ { "name": "host-id", "description": "Id of the element", "values": [] },
2211
+ { "name": "label", "description": "Element label", "values": [] },
2212
+ {
2213
+ "name": "label-on-top",
2214
+ "description": "Label on top of the field",
2215
+ "values": []
2216
+ },
2217
+ {
2218
+ "name": "max",
2219
+ "description": "The latest time that can be picked or typed, as an ISO `HH:mm` time",
2220
+ "values": []
2221
+ },
2222
+ {
2223
+ "name": "min",
2224
+ "description": "The earliest time that can be picked or typed, as an ISO `HH:mm` time;\na `min` after `max` is invalid and both are ignored",
2225
+ "values": []
2226
+ },
2227
+ {
2228
+ "name": "minute-step",
2229
+ "description": "Minutes between the minute column's rows; typed times need not fall on\nthe step",
2230
+ "values": []
2231
+ },
2232
+ { "name": "name", "description": "Input field name", "values": [] },
2233
+ {
2234
+ "name": "placeholder",
2235
+ "description": "Placeholder of the input; the `format` pattern when empty",
2236
+ "values": []
2237
+ },
2238
+ {
2239
+ "name": "range",
2240
+ "description": "Pick a range: the value becomes `{ start, end }` and the field holds two\ninputs",
2241
+ "values": []
2242
+ },
2243
+ {
2244
+ "name": "required",
2245
+ "description": "Set the field as required",
2246
+ "values": []
2247
+ },
2248
+ { "name": "shadow", "description": "Shadow variant", "values": [] },
2249
+ {
2250
+ "name": "show-now",
2251
+ "description": "Show a Now button under the columns that commits the current time",
2252
+ "values": []
2253
+ },
2254
+ {
2255
+ "name": "size",
2256
+ "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
2257
+ "values": [{ "name": "default" }, { "name": "small" }]
2258
+ },
2259
+ {
2260
+ "name": "valid",
2261
+ "description": "Set the validity of the field",
2262
+ "values": []
2263
+ },
2264
+ {
2265
+ "name": "value",
2266
+ "description": "The time as an ISO `HH:mm` string on a 24-hour clock, or `{ start, end }`\nunder `range`; `null` when empty",
2267
+ "values": [{ "name": "CTimePickerValue" }]
2268
+ }
2269
+ ],
2270
+ "references": []
2271
+ },
2161
2272
  {
2162
2273
  "name": "c-toast",
2163
2274
  "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",