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

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.
@@ -503,6 +503,110 @@
503
503
  ],
504
504
  "references": []
505
505
  },
506
+ {
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",
509
+ "attributes": [
510
+ {
511
+ "name": "clearable",
512
+ "description": "Make the value clearable",
513
+ "values": []
514
+ },
515
+ {
516
+ "name": "disabled",
517
+ "description": "Disable the field",
518
+ "values": []
519
+ },
520
+ {
521
+ "name": "error-message",
522
+ "description": "Error message shown in place of the hint while the field is invalid",
523
+ "values": []
524
+ },
525
+ {
526
+ "name": "first-day-of-week",
527
+ "description": "First day of the week in the calendar, numbered like `Date.getDay()`:\n0 = Sunday, 1 = Monday … 6 = Saturday",
528
+ "values": [
529
+ { "name": "0" },
530
+ { "name": "1" },
531
+ { "name": "2" },
532
+ { "name": "3" },
533
+ { "name": "4" },
534
+ { "name": "5" },
535
+ { "name": "6" }
536
+ ]
537
+ },
538
+ {
539
+ "name": "format",
540
+ "description": "How dates are shown and read from typing: a pattern of the tokens `d`,\n`dd`, `M`, `MM` and `yyyy` with any separators, e.g. `yyyy-MM-dd`",
541
+ "values": []
542
+ },
543
+ {
544
+ "name": "hide-details",
545
+ "description": "Hide the hint and error messages",
546
+ "values": []
547
+ },
548
+ {
549
+ "name": "hint",
550
+ "description": "Hint text for the field",
551
+ "values": []
552
+ },
553
+ { "name": "host-id", "description": "Id of the element", "values": [] },
554
+ { "name": "label", "description": "Element label", "values": [] },
555
+ {
556
+ "name": "label-on-top",
557
+ "description": "Label on top of the field",
558
+ "values": []
559
+ },
560
+ {
561
+ "name": "max",
562
+ "description": "The latest date that can be picked or typed, as an ISO date; also bounds\nthe calendar's navigation",
563
+ "values": []
564
+ },
565
+ {
566
+ "name": "min",
567
+ "description": "The earliest date that can be picked or typed, as an ISO date; also\nbounds the calendar's navigation",
568
+ "values": []
569
+ },
570
+ { "name": "name", "description": "Input field name", "values": [] },
571
+ {
572
+ "name": "placeholder",
573
+ "description": "Placeholder of the input; the `format` pattern when empty",
574
+ "values": []
575
+ },
576
+ {
577
+ "name": "range",
578
+ "description": "Pick a range: the value becomes `{ start, end }` and the field holds two\ninputs",
579
+ "values": []
580
+ },
581
+ {
582
+ "name": "required",
583
+ "description": "Set the field as required",
584
+ "values": []
585
+ },
586
+ { "name": "shadow", "description": "Shadow variant", "values": [] },
587
+ {
588
+ "name": "show-week-numbers",
589
+ "description": "Show ISO 8601 week numbers beside the calendar rows (meaningful with a\nMonday week start)",
590
+ "values": []
591
+ },
592
+ {
593
+ "name": "size",
594
+ "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
595
+ "values": [{ "name": "default" }, { "name": "small" }]
596
+ },
597
+ {
598
+ "name": "valid",
599
+ "description": "Set the validity of the field",
600
+ "values": []
601
+ },
602
+ {
603
+ "name": "value",
604
+ "description": "The date as an ISO `YYYY-MM-DD` string, or `{ start, end }` under\n`range`; `null` when empty",
605
+ "values": [{ "name": "CDatePickerValue" }]
606
+ }
607
+ ],
608
+ "references": []
609
+ },
506
610
  {
507
611
  "name": "c-divider",
508
612
  "description": "\n---\n\n\n### **CSS Parts:**\n - **root** - The separator line element itself",
@@ -1086,6 +1190,102 @@
1086
1190
  "attributes": [],
1087
1191
  "references": []
1088
1192
  },
1193
+ {
1194
+ "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",
1196
+ "attributes": [
1197
+ {
1198
+ "name": "decimals",
1199
+ "description": "The most fraction digits the field takes; `0` makes it an integer field",
1200
+ "values": []
1201
+ },
1202
+ {
1203
+ "name": "decimal-separator",
1204
+ "description": "The decimal separator. Empty follows the page's `lang` (`,` for `fi`, `.` for `en`)",
1205
+ "values": []
1206
+ },
1207
+ {
1208
+ "name": "disabled",
1209
+ "description": "Disable the field",
1210
+ "values": []
1211
+ },
1212
+ {
1213
+ "name": "error-message",
1214
+ "description": "Error message shown in place of the hint while the field is invalid",
1215
+ "values": []
1216
+ },
1217
+ {
1218
+ "name": "fixed-decimals",
1219
+ "description": "Pad the fraction to exactly `decimals` digits when the field is left (`12,5` → `12,50`)",
1220
+ "values": []
1221
+ },
1222
+ {
1223
+ "name": "group-separator",
1224
+ "description": "The thousands separator. Empty follows the page's `lang` (a space for `fi`, `,` for `en`)",
1225
+ "values": []
1226
+ },
1227
+ {
1228
+ "name": "hide-details",
1229
+ "description": "Hide the hint and error messages",
1230
+ "values": []
1231
+ },
1232
+ {
1233
+ "name": "hint",
1234
+ "description": "Hint text for the field",
1235
+ "values": []
1236
+ },
1237
+ { "name": "host-id", "description": "Id of the input", "values": [] },
1238
+ { "name": "label", "description": "Label of the field", "values": [] },
1239
+ {
1240
+ "name": "label-on-top",
1241
+ "description": "Label on top of the field",
1242
+ "values": []
1243
+ },
1244
+ {
1245
+ "name": "max",
1246
+ "description": "The largest number in range; a larger one is kept and reported as out of range",
1247
+ "values": []
1248
+ },
1249
+ {
1250
+ "name": "min",
1251
+ "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",
1252
+ "values": []
1253
+ },
1254
+ { "name": "name", "description": "Name of the input", "values": [] },
1255
+ {
1256
+ "name": "placeholder",
1257
+ "description": "Placeholder of the input",
1258
+ "values": []
1259
+ },
1260
+ { "name": "readonly", "description": "Mark as readonly", "values": [] },
1261
+ {
1262
+ "name": "required",
1263
+ "description": "Set the field as required",
1264
+ "values": []
1265
+ },
1266
+ {
1267
+ "name": "shadow",
1268
+ "description": "Shadow variant of the field",
1269
+ "values": []
1270
+ },
1271
+ {
1272
+ "name": "size",
1273
+ "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
1274
+ "values": [{ "name": "default" }, { "name": "small" }]
1275
+ },
1276
+ {
1277
+ "name": "valid",
1278
+ "description": "Set the validity of the field",
1279
+ "values": []
1280
+ },
1281
+ {
1282
+ "name": "value",
1283
+ "description": "The number, or `null` when the field is empty. A string is read as the number it spells, and `''` as empty — what an attribute, or a plain `v-model` holding `null`, writes; the field always emits a number or `null`",
1284
+ "values": []
1285
+ }
1286
+ ],
1287
+ "references": []
1288
+ },
1089
1289
  {
1090
1290
  "name": "c-option",
1091
1291
  "description": "\n---\n\n\n### **Slots:**\n - **default** - The option's content, rendered in the list row; wrap the label text in c-option-value when the option carries more than its label",
@@ -1836,7 +2036,7 @@
1836
2036
  },
1837
2037
  {
1838
2038
  "name": "c-text-field",
1839
- "description": "\n---\n\n\n### **Events:**\n - **change** - Standard bubbling DOM change event, re-dispatched from the host when the\ninner input/textarea fires its native change (which does not cross the\nshadow boundary). No detail; read the current text from the host's\n`value` property.\n- **changeValue** - Fired on every keystroke (and on native change), carrying the current\ntext — trimmed when `trim-whitespace` is set. Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event fired alongside every value change so a\nplain Vue `v-model` works without the `v-control` directive. No detail.\n- **update:value** - v-model contract event fired on every keystroke (and on native change),\ncarrying the current text — trimmed when `trim-whitespace` is set.\n\n### **Slots:**\n - **pre** - Content added before the input\n- **post** - Content added after the input",
2039
+ "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** - Standard bubbling DOM change event, re-dispatched from the host when the\ninner input/textarea fires its native change (which does not cross the\nshadow boundary). No detail; read the current text from the host's\n`value` property.\n- **changeValue** - Fired on every keystroke (and on native change), carrying the current\ntext — trimmed when `trim-whitespace` is set. Also dispatched as `change-value` — bind that name in Vue templates.\n- **input** - Native bubbling input event fired alongside every value change so a\nplain Vue `v-model` works without the `v-control` directive. No detail.\n- **update:value** - v-model contract event fired on every keystroke (and on native change),\ncarrying the current text — trimmed when `trim-whitespace` is set.\n\n### **Slots:**\n - **pre** - Content added before the input\n- **post** - Content added after the input\n\n### **CSS Parts:**\n - **mask-guide** - The faint rest of the input mask, shown behind the typed text",
1840
2040
  "attributes": [
1841
2041
  {
1842
2042
  "name": "autocomplete",
@@ -1887,6 +2087,11 @@
1887
2087
  "description": "Label on top of the input",
1888
2088
  "values": []
1889
2089
  },
2090
+ {
2091
+ "name": "mask",
2092
+ "description": "Input mask the typed text follows: `#` a digit, `A` a letter, `*` a letter or a digit, `\\` escapes the next character, `[…]` wraps a trailing optional section, anything else is a literal. Applies to a single-line `text`, `tel` or `search` field",
2093
+ "values": []
2094
+ },
1890
2095
  {
1891
2096
  "name": "max",
1892
2097
  "description": "Maximum value on a numeric input",