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

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.
@@ -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-alpha.27",
4
+ "version": "4.0.0-alpha.28",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1445,7 +1445,7 @@
1445
1445
  },
1446
1446
  {
1447
1447
  "name": "c-date-picker",
1448
- "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",
1448
+ "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",
1449
1449
  "doc-url": "",
1450
1450
  "attributes": [
1451
1451
  {
@@ -1543,6 +1543,11 @@
1543
1543
  "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
1544
1544
  "value": { "type": "'default' | 'small'", "default": "'default'" }
1545
1545
  },
1546
+ {
1547
+ "name": "type",
1548
+ "description": "What the field picks: a calendar date, or a year and a month\n(`'YYYY-MM'`)",
1549
+ "value": { "type": "'date' | 'month'", "default": "'date'" }
1550
+ },
1546
1551
  {
1547
1552
  "name": "valid",
1548
1553
  "description": "Set the validity of the field",
@@ -1550,7 +1555,7 @@
1550
1555
  },
1551
1556
  {
1552
1557
  "name": "value",
1553
- "description": "The date as an ISO `YYYY-MM-DD` string, or `{ start, end }` under\n`range`; `null` when empty",
1558
+ "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",
1554
1559
  "value": { "type": "CDatePickerValue", "default": "null" }
1555
1560
  }
1556
1561
  ],
@@ -1694,6 +1699,11 @@
1694
1699
  "description": "UI text overrides (i18n), merged over the names `Intl` gives for the\npage's `lang` and the English defaults. Objects have no attribute form —\nbind as a DOM property",
1695
1700
  "type": "CDatePickerTexts"
1696
1701
  },
1702
+ {
1703
+ "name": "type",
1704
+ "description": "What the field picks: a calendar date, or a year and a month\n(`'YYYY-MM'`)",
1705
+ "type": "'date' | 'month'"
1706
+ },
1697
1707
  {
1698
1708
  "name": "valid",
1699
1709
  "description": "Set the validity of the field",
@@ -1701,7 +1711,7 @@
1701
1711
  },
1702
1712
  {
1703
1713
  "name": "value",
1704
- "description": "The date as an ISO `YYYY-MM-DD` string, or `{ start, end }` under\n`range`; `null` when empty",
1714
+ "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",
1705
1715
  "type": "CDatePickerValue"
1706
1716
  },
1707
1717
  {
@@ -5962,6 +5972,272 @@
5962
5972
  ]
5963
5973
  }
5964
5974
  },
5975
+ {
5976
+ "name": "c-time-picker",
5977
+ "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",
5978
+ "doc-url": "",
5979
+ "attributes": [
5980
+ {
5981
+ "name": "clearable",
5982
+ "description": "Make the value clearable",
5983
+ "value": { "type": "boolean", "default": "false" }
5984
+ },
5985
+ {
5986
+ "name": "disabled",
5987
+ "description": "Disable the field",
5988
+ "value": { "type": "boolean", "default": "false" }
5989
+ },
5990
+ {
5991
+ "name": "error-message",
5992
+ "description": "Error message shown in place of the hint while the field is invalid",
5993
+ "value": { "type": "string", "default": "''" }
5994
+ },
5995
+ {
5996
+ "name": "format",
5997
+ "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`",
5998
+ "value": { "type": "string", "default": "'HH.mm'" }
5999
+ },
6000
+ {
6001
+ "name": "hide-details",
6002
+ "description": "Hide the hint and error messages",
6003
+ "value": { "type": "boolean", "default": "false" }
6004
+ },
6005
+ {
6006
+ "name": "hint",
6007
+ "description": "Hint text for the field",
6008
+ "value": { "type": "string", "default": "''" }
6009
+ },
6010
+ {
6011
+ "name": "host-id",
6012
+ "description": "Id of the element",
6013
+ "value": { "type": "string", "default": "''" }
6014
+ },
6015
+ {
6016
+ "name": "label",
6017
+ "description": "Element label",
6018
+ "value": { "type": "string", "default": "''" }
6019
+ },
6020
+ {
6021
+ "name": "label-on-top",
6022
+ "description": "Label on top of the field",
6023
+ "value": { "type": "boolean", "default": "false" }
6024
+ },
6025
+ {
6026
+ "name": "max",
6027
+ "description": "The latest time that can be picked or typed, as an ISO `HH:mm` time",
6028
+ "value": { "type": "string", "default": "''" }
6029
+ },
6030
+ {
6031
+ "name": "min",
6032
+ "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",
6033
+ "value": { "type": "string", "default": "''" }
6034
+ },
6035
+ {
6036
+ "name": "minute-step",
6037
+ "description": "Minutes between the minute column's rows; typed times need not fall on\nthe step",
6038
+ "value": { "type": "number", "default": "1" }
6039
+ },
6040
+ {
6041
+ "name": "name",
6042
+ "description": "Input field name",
6043
+ "value": { "type": "string", "default": "''" }
6044
+ },
6045
+ {
6046
+ "name": "placeholder",
6047
+ "description": "Placeholder of the input; the `format` pattern when empty",
6048
+ "value": { "type": "string", "default": "''" }
6049
+ },
6050
+ {
6051
+ "name": "range",
6052
+ "description": "Pick a range: the value becomes `{ start, end }` and the field holds two\ninputs",
6053
+ "value": { "type": "boolean", "default": "false" }
6054
+ },
6055
+ {
6056
+ "name": "required",
6057
+ "description": "Set the field as required",
6058
+ "value": { "type": "boolean", "default": "false" }
6059
+ },
6060
+ {
6061
+ "name": "shadow",
6062
+ "description": "Shadow variant",
6063
+ "value": { "type": "boolean", "default": "false" }
6064
+ },
6065
+ {
6066
+ "name": "size",
6067
+ "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
6068
+ "value": { "type": "'default' | 'small'", "default": "'default'" }
6069
+ },
6070
+ {
6071
+ "name": "valid",
6072
+ "description": "Set the validity of the field",
6073
+ "value": { "type": "boolean", "default": "true" }
6074
+ },
6075
+ {
6076
+ "name": "value",
6077
+ "description": "The time as an ISO `HH:mm` string on a 24-hour clock, or `{ start, end }`\nunder `range`; `null` when empty",
6078
+ "value": { "type": "CTimePickerValue", "default": "null" }
6079
+ }
6080
+ ],
6081
+ "slots": [],
6082
+ "events": [
6083
+ {
6084
+ "name": "change",
6085
+ "type": "CustomEvent<CTimePickerValue>",
6086
+ "description": "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`."
6087
+ },
6088
+ {
6089
+ "name": "change:text",
6090
+ "type": "CustomEvent<CTimePickerText>",
6091
+ "description": "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."
6092
+ },
6093
+ {
6094
+ "name": "input",
6095
+ "type": "CustomEvent<void>",
6096
+ "description": "Native bubbling input event dispatched alongside every value change so a\nplain `v-model` stays in sync. Carries no detail."
6097
+ },
6098
+ {
6099
+ "name": "update:value",
6100
+ "type": "CustomEvent<CTimePickerValue>",
6101
+ "description": "Fired alongside `change` with the same detail — the `v-model` contract."
6102
+ }
6103
+ ],
6104
+ "js": {
6105
+ "properties": [
6106
+ {
6107
+ "name": "clearable",
6108
+ "description": "Make the value clearable",
6109
+ "type": "boolean"
6110
+ },
6111
+ {
6112
+ "name": "disabled",
6113
+ "description": "Disable the field",
6114
+ "type": "boolean"
6115
+ },
6116
+ {
6117
+ "name": "errorMessage",
6118
+ "description": "Error message shown in place of the hint while the field is invalid",
6119
+ "type": "string"
6120
+ },
6121
+ {
6122
+ "name": "format",
6123
+ "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`",
6124
+ "type": "string"
6125
+ },
6126
+ {
6127
+ "name": "hideDetails",
6128
+ "description": "Hide the hint and error messages",
6129
+ "type": "boolean"
6130
+ },
6131
+ {
6132
+ "name": "hint",
6133
+ "description": "Hint text for the field",
6134
+ "type": "string"
6135
+ },
6136
+ {
6137
+ "name": "hostId",
6138
+ "description": "Id of the element",
6139
+ "type": "string"
6140
+ },
6141
+ {
6142
+ "name": "label",
6143
+ "description": "Element label",
6144
+ "type": "string"
6145
+ },
6146
+ {
6147
+ "name": "labelOnTop",
6148
+ "description": "Label on top of the field",
6149
+ "type": "boolean"
6150
+ },
6151
+ {
6152
+ "name": "max",
6153
+ "description": "The latest time that can be picked or typed, as an ISO `HH:mm` time",
6154
+ "type": "string"
6155
+ },
6156
+ {
6157
+ "name": "min",
6158
+ "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",
6159
+ "type": "string"
6160
+ },
6161
+ {
6162
+ "name": "minuteStep",
6163
+ "description": "Minutes between the minute column's rows; typed times need not fall on\nthe step",
6164
+ "type": "number"
6165
+ },
6166
+ {
6167
+ "name": "name",
6168
+ "description": "Input field name",
6169
+ "type": "string"
6170
+ },
6171
+ {
6172
+ "name": "placeholder",
6173
+ "description": "Placeholder of the input; the `format` pattern when empty",
6174
+ "type": "string"
6175
+ },
6176
+ {
6177
+ "name": "range",
6178
+ "description": "Pick a range: the value becomes `{ start, end }` and the field holds two\ninputs",
6179
+ "type": "boolean"
6180
+ },
6181
+ {
6182
+ "name": "required",
6183
+ "description": "Set the field as required",
6184
+ "type": "boolean"
6185
+ },
6186
+ {
6187
+ "name": "shadow",
6188
+ "description": "Shadow variant",
6189
+ "type": "boolean"
6190
+ },
6191
+ {
6192
+ "name": "size",
6193
+ "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
6194
+ "type": "'default' | 'small'"
6195
+ },
6196
+ {
6197
+ "name": "texts",
6198
+ "description": "UI text overrides (i18n), merged over the AM/PM texts `Intl` gives for\nthe page's `lang` and the English defaults. Objects have no attribute\nform — bind as a DOM property",
6199
+ "type": "CTimePickerTexts"
6200
+ },
6201
+ {
6202
+ "name": "valid",
6203
+ "description": "Set the validity of the field",
6204
+ "type": "boolean"
6205
+ },
6206
+ {
6207
+ "name": "value",
6208
+ "description": "The time as an ISO `HH:mm` string on a 24-hour clock, or `{ start, end }`\nunder `range`; `null` when empty",
6209
+ "type": "CTimePickerValue"
6210
+ },
6211
+ {
6212
+ "name": "badInput",
6213
+ "description": "Whether the committed text names no time that can be picked — the value is then `null` (CONTEXT.md \"Bad input\").",
6214
+ "type": "boolean"
6215
+ }
6216
+ ],
6217
+ "events": [
6218
+ {
6219
+ "name": "change",
6220
+ "type": "CustomEvent<CTimePickerValue>",
6221
+ "description": "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`."
6222
+ },
6223
+ {
6224
+ "name": "change:text",
6225
+ "type": "CustomEvent<CTimePickerText>",
6226
+ "description": "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."
6227
+ },
6228
+ {
6229
+ "name": "input",
6230
+ "type": "CustomEvent<void>",
6231
+ "description": "Native bubbling input event dispatched alongside every value change so a\nplain `v-model` stays in sync. Carries no detail."
6232
+ },
6233
+ {
6234
+ "name": "update:value",
6235
+ "type": "CustomEvent<CTimePickerValue>",
6236
+ "description": "Fired alongside `change` with the same detail — the `v-model` contract."
6237
+ }
6238
+ ]
6239
+ }
6240
+ },
5965
6241
  {
5966
6242
  "name": "c-toast",
5967
6243
  "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",
@@ -6760,6 +7036,14 @@
6760
7036
  "name": "part(option)",
6761
7037
  "description": "One month or year in the list"
6762
7038
  },
7039
+ {
7040
+ "name": "part(step-label)",
7041
+ "description": "The label above the current list under `type=\"month\"`: month or year, and under `range` start or end"
7042
+ },
7043
+ {
7044
+ "name": "part(step-summary)",
7045
+ "description": "A finished step under `type=\"month\"`, its label and pick; pressing it returns to that step"
7046
+ },
6763
7047
  {
6764
7048
  "name": "part(root)",
6765
7049
  "description": "The separator line element itself"
@@ -7273,6 +7557,48 @@
7273
7557
  "name": "part(mask-guide)",
7274
7558
  "description": "The faint rest of the input mask, shown behind the typed text"
7275
7559
  },
7560
+ {
7561
+ "name": "part(input)",
7562
+ "description": "The text input; under `range` both the start and the end input"
7563
+ },
7564
+ {
7565
+ "name": "part(separator)",
7566
+ "description": "The dash between the start and end inputs under `range`"
7567
+ },
7568
+ {
7569
+ "name": "part(panel)",
7570
+ "description": "The top-layer popover container anchored below the field"
7571
+ },
7572
+ {
7573
+ "name": "part(card)",
7574
+ "description": "The dialog surface inside the panel holding the columns"
7575
+ },
7576
+ {
7577
+ "name": "part(heading-row)",
7578
+ "description": "The top row of the fullscreen panel (narrow viewports): the field label as heading and the close button"
7579
+ },
7580
+ {
7581
+ "name": "part(heading)",
7582
+ "description": "The field label naming the fullscreen panel"
7583
+ },
7584
+ {
7585
+ "name": "part(close)",
7586
+ "description": "The close button of the fullscreen panel"
7587
+ },
7588
+ {
7589
+ "name": "part(end-switch)",
7590
+ "description": "The Start | End switch above the columns under `range`"
7591
+ },
7592
+ {
7593
+ "name": "part(end-tab)",
7594
+ "description": "One end's button in the end switch"
7595
+ },
7596
+ { "name": "part(columns)", "description": "The row of time columns" },
7597
+ {
7598
+ "name": "part(column)",
7599
+ "description": "One time column: hours, minutes or AM/PM"
7600
+ },
7601
+ { "name": "part(option)", "description": "One row of a time column" },
7276
7602
  {
7277
7603
  "name": "part(root)",
7278
7604
  "description": "The toast's outer box: the inverted-surface pill carrying the shadow"
@@ -136,17 +136,22 @@ export interface CDatePickerProps {
136
136
  * @defaultable {}
137
137
  */
138
138
  texts?: CDatePickerTexts;
139
+ /**
140
+ * What the field picks: a calendar date, or a year and a month
141
+ * (`'YYYY-MM'`)
142
+ */
143
+ type?: CDatePickerType;
139
144
  /**
140
145
  * Set the validity of the field
141
146
  */
142
147
  valid?: boolean;
143
148
  /**
144
- * The date as an ISO `YYYY-MM-DD` string, or `{ start, end }` under
145
- * `range`; `null` when empty
149
+ * The date as an ISO `YYYY-MM-DD` string (an ISO `YYYY-MM` month under
150
+ * `type="month"`), or `{ start, end }` under `range`; `null` when empty
146
151
  */
147
152
  value?: CDatePickerValue;
148
153
  }
149
- /** A date range: ISO `YYYY-MM-DD` ends, either of which may be `null` while only one is typed. */
154
+ /** A date range: ISO `YYYY-MM-DD` ends (`YYYY-MM` under `type="month"`), either of which may be `null` while only one is typed. */
150
155
  export interface CDatePickerRange {
151
156
  /** The last day of the range, inclusive. */
152
157
  end: null | string;
@@ -177,6 +182,12 @@ export interface CDatePickerTexts {
177
182
  date?: (iso: string) => string;
178
183
  /** Accessible name of the end input under `range`. */
179
184
  end?: string;
185
+ /** Label of the end's month step under `type="month"` and `range`; also the end input's name there. */
186
+ endMonth?: string;
187
+ /** Label of the end's year step under `type="month"` and `range`. */
188
+ endYear?: string;
189
+ /** Label of the month step under `type="month"`. */
190
+ month?: string;
180
191
  /** Twelve month names, January first. */
181
192
  months?: string[];
182
193
  /** Twelve short month names, January first — shown on the month button. */
@@ -199,6 +210,10 @@ export interface CDatePickerTexts {
199
210
  selectYear?: string;
200
211
  /** Accessible name of the start input under `range`. */
201
212
  start?: string;
213
+ /** Label of the start's month step under `type="month"` and `range`; also the start input's name there. */
214
+ startMonth?: string;
215
+ /** Label of the start's year step under `type="month"` and `range`. */
216
+ startYear?: string;
202
217
  /** Appended to the accessible name of a day that cannot be picked. */
203
218
  unavailable?: string;
204
219
  /** Seven weekday names, Sunday first. */
@@ -207,10 +222,15 @@ export interface CDatePickerTexts {
207
222
  weekdaysShort?: string[];
208
223
  /** Accessible name of the week-number column. */
209
224
  weekNumber?: string;
225
+ /** Label of the year step under `type="month"`. */
226
+ year?: string;
210
227
  }
228
+ /** What `c-date-picker` picks: a calendar date, or a year and a month (ADR-0063). */
229
+ export type CDatePickerType = 'date' | 'month';
211
230
  /**
212
- * Value of `c-date-picker`: an ISO `YYYY-MM-DD` string, a
213
- * {@link CDatePickerRange} under `range`, or `null` when empty.
231
+ * Value of `c-date-picker`: an ISO `YYYY-MM-DD` string (`YYYY-MM` under
232
+ * `type="month"`), a {@link CDatePickerRange} under `range`, or `null` when
233
+ * empty.
214
234
  */
215
235
  export type CDatePickerValue = CDatePickerRange | null | string;
216
236
  /** A day of the week numbered like `Date.getDay()`: 0 = Sunday … 6 = Saturday. */
@@ -222,6 +242,7 @@ declare const __VLS_export: import("vue").DefineComponent<CDatePickerProps, {
222
242
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CDatePickerProps> & Readonly<{}>, {
223
243
  label: string;
224
244
  value: CDatePickerValue;
245
+ type: CDatePickerType;
225
246
  name: string;
226
247
  required: boolean;
227
248
  disabled: boolean;
@@ -52,8 +52,7 @@ export declare const formatDate: (iso: string, pattern: string) => string;
52
52
  * Read typed text against a pattern (ADR-0057). Lenient: a day or month
53
53
  * takes one or two digits whatever its token, and any run of `.`, `/`, `-`
54
54
  * or spaces separates the fields; the year must have four digits. Returns
55
- * the ISO date, or `null` when the text names no real date. Text with no
56
- * separators at all is read by the pattern's digit widths (`ddMMyyyy`).
55
+ * the ISO date, or `null` when the text names no real date.
57
56
  */
58
57
  export declare const parseDate: (text: string, pattern: string) => null | string;
59
58
  /**
@@ -64,6 +63,22 @@ export declare const parseDate: (text: string, pattern: string) => null | string
64
63
  * any of `. / - space` typed in its place and shows as the pattern's own.
65
64
  */
66
65
  export declare const compileDateMask: (pattern: string) => MaskSlot[];
66
+ /** A well-formed ISO `YYYY-MM` month. */
67
+ export declare const isIsoMonth: (month: unknown) => month is string;
68
+ /** The month an ISO month or ISO date names; `null` for anything else. */
69
+ export declare const toMonth: (value: unknown) => null | string;
70
+ /** Whether `pattern` is a usable month pattern: one month and one year token, no day. */
71
+ export declare const isValidMonthPattern: (pattern: string) => boolean;
72
+ /**
73
+ * The month pattern of a date pattern: the day token goes, with the
74
+ * separator after it — or before it when the day comes last (`dd.MM.yyyy` →
75
+ * `MM.yyyy`, `yyyy-MM-dd` → `yyyy-MM`). A pattern that is already a month
76
+ * pattern is kept; anything else falls back to `MM.yyyy`.
77
+ */
78
+ export declare const monthPattern: (pattern: string) => string;
79
+ export declare const formatMonth: (month: string, pattern: string) => string;
80
+ /** Read typed text against a month pattern, as leniently as `parseDate`. */
81
+ export declare const parseMonth: (text: string, pattern: string) => null | string;
67
82
  export interface CDatePickerDisabling {
68
83
  isDateDisabled?: (iso: string) => boolean;
69
84
  list?: readonly CDatePickerDisabledDate[];
@@ -74,6 +89,20 @@ export interface CDatePickerDisabling {
74
89
  export declare const isOutOfRange: (iso: string, { max, min }: CDatePickerDisabling) => boolean;
75
90
  /** Disabled when `min`/`max`, the list or the predicate says so (ADR-0057). */
76
91
  export declare const isDisabledDate: (iso: string, rules: CDatePickerDisabling) => boolean;
92
+ /** Outside `min` / `max` read by their months (ADR-0063). */
93
+ export declare const isMonthOutOfRange: (month: string, { max, min }: CDatePickerDisabling) => boolean;
94
+ /**
95
+ * A month is disabled when it is out of range, or when the list and the
96
+ * predicate rule out every one of its days (ADR-0063). Stops at the first
97
+ * enabled day, so a sparse predicate costs one call a month.
98
+ */
99
+ export declare const isDisabledMonth: (month: string, rules: CDatePickerDisabling) => boolean;
100
+ /**
101
+ * Month mode's month step (ADR-0063): month `m` (1–12) is out when it is
102
+ * disabled in every year of `[from, to]`, so no pick leads to an empty year
103
+ * step. Stops at the first year that takes it.
104
+ */
105
+ export declare const isMonthDisabledEverywhere: (m: number, [from, to]: readonly number[], rules: CDatePickerDisabling) => boolean;
77
106
  /** The name texts `Intl` can supply for a language. */
78
107
  export interface CDatePickerIntlNames {
79
108
  date: (iso: string) => string;