@cscfi/csc-ui 4.0.0-alpha.28 → 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.
- package/dist/csc-ui.js +9542 -9275
- package/dist/custom-elements.json +134 -7
- package/dist/docs/c-date-picker/usage.md +37 -3
- package/dist/docs/c-number-field/usage.md +39 -9
- package/dist/docs/c-time-picker/usage.md +31 -4
- package/dist/vscode.css-custom-data.json +32 -0
- package/dist/vscode.html-custom-data.json +18 -3
- package/dist/web-types.json +74 -7
- package/dist-types/components/c-date-picker/CDatePicker.vue.d.ts +14 -0
- package/dist-types/components/c-number-field/CNumberField.vue.d.ts +21 -0
- package/dist-types/components/c-number-field/numbers.d.ts +16 -0
- package/dist-types/components/c-slider/CSlider.vue.d.ts +1 -1
- package/dist-types/components/c-time-picker/CTimePicker.vue.d.ts +11 -0
- package/dist-types/components/c-time-picker/times.d.ts +1 -1
- package/dist-types/index.d.ts +1 -1
- package/dist-types/shared/TypedField.vue.d.ts +7 -1
- package/dist-types/tag-name-map.d.ts +23 -11
- package/package.json +1 -1
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
"owner": "c-date-picker"
|
|
265
265
|
},
|
|
266
266
|
{
|
|
267
|
-
"declaration": "export interface CDatePickerProps {\n /**\n * Make the value clearable\n */\n clearable?: boolean;\n /**\n * Disable the field\n */\n disabled?: boolean;\n /**\n * Dates that cannot be picked: ISO dates and inclusive `{ start, end }`\n * spans. Arrays have no attribute form — bind as a DOM property\n */\n disabledDates?: CDatePickerDisabledDate[];\n /**\n * Error message shown in place of the hint while the field is invalid\n *\n * @freeform\n */\n errorMessage?: string;\n /**\n * First day of the week in the calendar, numbered like `Date.getDay()`:\n * 0 = Sunday, 1 = Monday … 6 = Saturday\n *\n * @defaultable 1\n */\n firstDayOfWeek?: CDatePickerWeekday;\n /**\n * 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`\n *\n * @defaultable 'dd.MM.yyyy'\n * @freeform\n */\n format?: string;\n /**\n * Hide the hint and error messages\n *\n * @defaultable false\n */\n hideDetails?: boolean;\n /**\n * Hint text for the field\n *\n * @freeform\n */\n hint?: string;\n /**\n * Id of the element\n *\n * @freeform\n */\n hostId?: string;\n /**\n * Predicate for dates that cannot be picked (weekends, say); receives an\n * ISO date. Functions have no attribute form — bind as a DOM property\n */\n isDateDisabled?: (iso: string) => boolean;\n /**\n * Element label\n *\n * @freeform\n */\n label?: string;\n /**\n * Label on top of the field\n *\n * @defaultable false\n */\n labelOnTop?: boolean;\n /**\n * The latest date that can be picked or typed, as an ISO date; also bounds\n * the calendar's navigation\n *\n * @freeform\n */\n max?: string;\n /**\n * The earliest date that can be picked or typed, as an ISO date; also\n * bounds the calendar's navigation\n *\n * @freeform\n */\n min?: string;\n /**\n * Input field name\n *\n * @freeform\n */\n name?: string;\n /**\n * Placeholder of the input; the `format` pattern when empty\n *\n * @freeform\n */\n placeholder?: string;\n /**\n * Pick a range: the value becomes `{ start, end }` and the field holds two\n * inputs\n */\n range?: boolean;\n /**\n * Set the field as required\n */\n required?: boolean;\n /**\n * Shadow variant\n *\n * @defaultable false\n */\n shadow?: boolean;\n /**\n * Show ISO 8601 week numbers beside the calendar rows (meaningful with a\n * Monday week start)\n *\n * @defaultable false\n */\n showWeekNumbers?: boolean;\n /**\n * Field height: the 52px default (the shared control height) or the 36px `small` box\n *\n * @defaultable 'default'\n */\n size?: CFieldSize;\n /**\n * UI text overrides (i18n), merged over the names `Intl` gives for the\n * page's `lang` and the English defaults. Objects have no attribute form —\n * bind as a DOM property\n *\n * @defaultable {}\n */\n texts?: CDatePickerTexts;\n /**\n * What the field picks: a calendar date, or a year and a month\n * (`'YYYY-MM'`)\n */\n type?: CDatePickerType;\n /**\n * Set the validity of the field\n */\n valid?: boolean;\n /**\n * 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\n */\n value?: CDatePickerValue;\n}",
|
|
267
|
+
"declaration": "export interface CDatePickerProps {\n /**\n * Make the value clearable\n */\n clearable?: boolean;\n /**\n * Disable the field\n */\n disabled?: boolean;\n /**\n * Dates that cannot be picked: ISO dates and inclusive `{ start, end }`\n * spans. Arrays have no attribute form — bind as a DOM property\n */\n disabledDates?: CDatePickerDisabledDate[];\n /**\n * Error message shown in place of the hint while the field is invalid\n *\n * @freeform\n */\n errorMessage?: string;\n /**\n * First day of the week in the calendar, numbered like `Date.getDay()`:\n * 0 = Sunday, 1 = Monday … 6 = Saturday\n *\n * @defaultable 1\n */\n firstDayOfWeek?: CDatePickerWeekday;\n /**\n * 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`\n *\n * @defaultable 'dd.MM.yyyy'\n * @freeform\n */\n format?: string;\n /**\n * Hide the hint and error messages\n *\n * @defaultable false\n */\n hideDetails?: boolean;\n /**\n * Hint text for the field\n *\n * @freeform\n */\n hint?: string;\n /**\n * Id of the element\n *\n * @freeform\n */\n hostId?: string;\n /**\n * Predicate for dates that cannot be picked (weekends, say); receives an\n * ISO date. Functions have no attribute form — bind as a DOM property\n */\n isDateDisabled?: (iso: string) => boolean;\n /**\n * Element label\n *\n * @freeform\n */\n label?: string;\n /**\n * Label on top of the field\n *\n * @defaultable false\n */\n labelOnTop?: boolean;\n /**\n * The latest date that can be picked or typed, as an ISO date; also bounds\n * the calendar's navigation\n *\n * @freeform\n */\n max?: string;\n /**\n * The earliest date that can be picked or typed, as an ISO date; also\n * bounds the calendar's navigation\n *\n * @freeform\n */\n min?: string;\n /**\n * Input field name\n *\n * @freeform\n */\n name?: string;\n /**\n * Placeholder of the input; the `format` pattern when empty\n *\n * @freeform\n */\n placeholder?: string;\n /**\n * Pick a range: the value becomes `{ start, end }` and the field holds two\n * inputs\n */\n range?: boolean;\n /**\n * Set the field as required\n */\n required?: boolean;\n /**\n * Shadow variant\n *\n * @defaultable false\n */\n shadow?: boolean;\n /**\n * Show a Today button under the calendar that picks today (\"This month\"\n * under `type=\"month\"`)\n *\n * @defaultable false\n */\n showToday?: boolean;\n /**\n * Show ISO 8601 week numbers beside the calendar rows (meaningful with a\n * Monday week start)\n *\n * @defaultable false\n */\n showWeekNumbers?: boolean;\n /**\n * Field height: the 52px default (the shared control height) or the 36px `small` box\n *\n * @defaultable 'default'\n */\n size?: CFieldSize;\n /**\n * UI text overrides (i18n), merged over the names `Intl` gives for the\n * page's `lang` and the English defaults. Objects have no attribute form —\n * bind as a DOM property\n *\n * @defaultable {}\n */\n texts?: CDatePickerTexts;\n /**\n * What the field picks: a calendar date, or a year and a month\n * (`'YYYY-MM'`)\n */\n type?: CDatePickerType;\n /**\n * Set the validity of the field\n */\n valid?: boolean;\n /**\n * 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\n */\n value?: CDatePickerValue;\n}",
|
|
268
268
|
"description": "",
|
|
269
269
|
"kind": "interface",
|
|
270
270
|
"name": "CDatePickerProps",
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
"owner": "c-date-picker"
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
|
-
"declaration": "export interface CDatePickerTexts {\n /** Accessible name of the dialog when the field has no label. */\n chooseDate?: string;\n /** Accessible label of the clear button. */\n clearSelection?: string;\n /** Accessible label of the close button in the fullscreen panel (narrow viewports). */\n closePanel?: string;\n /** A day's accessible name in the grid; receives the ISO date. */\n date?: (iso: string) => string;\n /** Accessible name of the end input under `range`. */\n end?: string;\n /** Label of the end's month step under `type=\"month\"` and `range`; also the end input's name there. */\n endMonth?: string;\n /** Label of the end's year step under `type=\"month\"` and `range`. */\n endYear?: string;\n /** Label of the month step under `type=\"month\"`. */\n month?: string;\n /** Twelve month names, January first. */\n months?: string[];\n /** Twelve short month names, January first — shown on the month button. */\n monthsShort?: string[];\n /** Accessible label of the next-month arrow. */\n nextMonth?: string;\n /** Accessible label of the next-year arrow. */\n nextYear?: string;\n /** Accessible label of the calendar button. */\n openCalendar?: string;\n /** Announcement once a range's first day is picked; receives that day's name. */\n pendingStart?: (date: string) => string;\n /** Accessible label of the previous-month arrow. */\n previousMonth?: string;\n /** Accessible label of the previous-year arrow. */\n previousYear?: string;\n /** Accessible label of the month button and the month list. */\n selectMonth?: string;\n /** Accessible label of the year button and the year list. */\n selectYear?: string;\n /** Accessible name of the start input under `range`. */\n start?: string;\n /** Label of the start's month step under `type=\"month\"` and `range`; also the start input's name there. */\n startMonth?: string;\n /** Label of the start's year step under `type=\"month\"` and `range`. */\n startYear?: string;\n /** Appended to the accessible name of a day that cannot be picked. */\n unavailable?: string;\n /** Seven weekday names, Sunday first. */\n weekdays?: string[];\n /** Seven short weekday names, Sunday first — the grid's column heads. */\n weekdaysShort?: string[];\n /** Accessible name of the week-number column. */\n weekNumber?: string;\n /** Label of the year step under `type=\"month\"`. */\n year?: string;\n}",
|
|
288
|
+
"declaration": "export interface CDatePickerTexts {\n /** Accessible name of the dialog when the field has no label. */\n chooseDate?: string;\n /** Accessible label of the clear button. */\n clearSelection?: string;\n /** Accessible label of the close button in the fullscreen panel (narrow viewports). */\n closePanel?: string;\n /** A day's accessible name in the grid; receives the ISO date. */\n date?: (iso: string) => string;\n /** Label of the Done button in the fullscreen panel (narrow viewports). */\n done?: string;\n /** Accessible name of the end input under `range`. */\n end?: string;\n /** Label of the end's month step under `type=\"month\"` and `range`; also the end input's name there. */\n endMonth?: string;\n /** Label of the end's year step under `type=\"month\"` and `range`. */\n endYear?: string;\n /** Label of the month step under `type=\"month\"`. */\n month?: string;\n /** Twelve month names, January first. */\n months?: string[];\n /** Twelve short month names, January first — shown on the month button. */\n monthsShort?: string[];\n /** Accessible label of the next-month arrow. */\n nextMonth?: string;\n /** Accessible label of the next-year arrow. */\n nextYear?: string;\n /** Accessible label of the calendar button. */\n openCalendar?: string;\n /** Announcement once a range's first day is picked; receives that day's name. */\n pendingStart?: (date: string) => string;\n /** Accessible label of the previous-month arrow. */\n previousMonth?: string;\n /** Accessible label of the previous-year arrow. */\n previousYear?: string;\n /** Accessible label of the month button and the month list. */\n selectMonth?: string;\n /** Accessible label of the year button and the year list. */\n selectYear?: string;\n /** Accessible name of the start input under `range`. */\n start?: string;\n /** Label of the start's month step under `type=\"month\"` and `range`; also the start input's name there. */\n startMonth?: string;\n /** Label of the start's year step under `type=\"month\"` and `range`. */\n startYear?: string;\n /** Label of the Today button under `type=\"month\"`. */\n thisMonth?: string;\n /** Label of the Today button (`show-today`). */\n today?: string;\n /** Appended to the accessible name of a day that cannot be picked. */\n unavailable?: string;\n /** Seven weekday names, Sunday first. */\n weekdays?: string[];\n /** Seven short weekday names, Sunday first — the grid's column heads. */\n weekdaysShort?: string[];\n /** Accessible name of the week-number column. */\n weekNumber?: string;\n /** Label of the year step under `type=\"month\"`. */\n year?: string;\n}",
|
|
289
289
|
"description": "UI texts of `c-date-picker`, merged key by key over the names `Intl`\ngives for the page's `lang` and the English defaults. Weekday arrays are\nindexed like `Date.getDay()`: Sunday first.",
|
|
290
290
|
"kind": "interface",
|
|
291
291
|
"name": "CDatePickerTexts",
|
|
@@ -362,12 +362,19 @@
|
|
|
362
362
|
"owner": "c-login-card-actions"
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
|
-
"declaration": "export interface CNumberFieldProps {\n /**\n * The most fraction digits the field takes; `0` makes it an integer field\n *\n * @defaultable 0\n */\n decimals?: number;\n /**\n * The decimal separator. Empty follows the page's `lang` (`,` for `fi`, `.` for `en`)\n *\n * @defaultable ''\n * @freeform one character\n */\n decimalSeparator?: string;\n /**\n * Disable the field\n */\n disabled?: boolean;\n /**\n * Error message shown in place of the hint while the field is invalid\n *\n * @freeform\n */\n errorMessage?: string;\n /**\n * Pad the fraction to exactly `decimals` digits when the field is left (`12,5` → `12,50`)\n *\n * @defaultable false\n */\n fixedDecimals?: boolean;\n /**\n * The thousands separator. Empty follows the page's `lang` (a space for `fi`, `,` for `en`)\n *\n * @defaultable ''\n * @freeform one character\n */\n groupSeparator?: string;\n /**\n * Hide the hint and error messages\n *\n * @defaultable false\n */\n hideDetails?: boolean;\n /**\n * Hint text for the field\n *\n * @freeform\n */\n hint?: string;\n /**\n * Id of the input\n *\n * @freeform\n */\n hostId?: string;\n /**\n * Label of the field\n *\n * @freeform\n */\n label?: string;\n /**\n * Label on top of the field\n *\n * @defaultable false\n */\n labelOnTop?: boolean;\n /**\n * The largest number in range; a larger one is kept and reported as out of range\n */\n max?: null | number;\n /**\n * 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\n */\n min?: null | number;\n /**\n * Name of the input\n *\n * @freeform\n */\n name?: string;\n /**\n * Placeholder of the input\n *\n * @freeform\n */\n placeholder?: string;\n /**\n * Mark as readonly\n */\n readonly?: boolean;\n /**\n * Set the field as required\n */\n required?: boolean;\n /**\n * Shadow variant of the field\n *\n * @defaultable false\n */\n shadow?: boolean;\n /**\n * Field height: the 52px default (the shared control height) or the 36px `small` box\n *\n * @defaultable 'default'\n */\n size?: CFieldSize;\n /**\n * Set the validity of the field\n */\n valid?: boolean;\n /**\n * 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`\n */\n value?: null | number | string;\n}",
|
|
365
|
+
"declaration": "export interface CNumberFieldProps {\n /**\n * The most fraction digits the field takes; `0` makes it an integer field\n *\n * @defaultable 0\n */\n decimals?: number;\n /**\n * The decimal separator. Empty follows the page's `lang` (`,` for `fi`, `.` for `en`)\n *\n * @defaultable ''\n * @freeform one character\n */\n decimalSeparator?: string;\n /**\n * Disable the field\n */\n disabled?: boolean;\n /**\n * Error message shown in place of the hint while the field is invalid\n *\n * @freeform\n */\n errorMessage?: string;\n /**\n * Pad the fraction to exactly `decimals` digits when the field is left (`12,5` → `12,50`)\n *\n * @defaultable false\n */\n fixedDecimals?: boolean;\n /**\n * The thousands separator. Empty follows the page's `lang` (a space for `fi`, `,` for `en`)\n *\n * @defaultable ''\n * @freeform one character\n */\n groupSeparator?: string;\n /**\n * Hide the hint and error messages\n *\n * @defaultable false\n */\n hideDetails?: boolean;\n /**\n * Hint text for the field\n *\n * @freeform\n */\n hint?: string;\n /**\n * Id of the input\n *\n * @freeform\n */\n hostId?: string;\n /**\n * Label of the field\n *\n * @freeform\n */\n label?: string;\n /**\n * Label on top of the field\n *\n * @defaultable false\n */\n labelOnTop?: boolean;\n /**\n * The largest number in range; a larger one is kept and reported as out of range\n */\n max?: null | number;\n /**\n * 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\n */\n min?: null | number;\n /**\n * Name of the input\n *\n * @freeform\n */\n name?: string;\n /**\n * Placeholder of the input\n *\n * @freeform\n */\n placeholder?: string;\n /**\n * Mark as readonly\n */\n readonly?: boolean;\n /**\n * Set the field as required\n */\n required?: boolean;\n /**\n * Shadow variant of the field\n *\n * @defaultable false\n */\n shadow?: boolean;\n /**\n * Field height: the 52px default (the shared control height) or the 36px `small` box\n *\n * @defaultable 'default'\n */\n size?: CFieldSize;\n /**\n * The spacing of the grid the step buttons and arrow keys move along, counted from `min` (or `0`)\n *\n * @defaultable 1\n */\n step?: number;\n /**\n * UI text overrides (i18n), merged over the English defaults. Objects have no attribute form — bind as a DOM property\n *\n * @defaultable {}\n */\n texts?: CNumberFieldTexts;\n /**\n * Set the validity of the field\n */\n valid?: boolean;\n /**\n * 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`\n */\n value?: null | number | string;\n}",
|
|
366
366
|
"description": "",
|
|
367
367
|
"kind": "interface",
|
|
368
368
|
"name": "CNumberFieldProps",
|
|
369
369
|
"owner": "c-number-field"
|
|
370
370
|
},
|
|
371
|
+
{
|
|
372
|
+
"declaration": "export interface CNumberFieldTexts {\n /** Accessible label of the step-down button. */\n decrease?: string;\n /** Accessible label of the step-up button. */\n increase?: string;\n}",
|
|
373
|
+
"description": "UI texts of `c-number-field`, merged key by key over the English defaults.",
|
|
374
|
+
"kind": "interface",
|
|
375
|
+
"name": "CNumberFieldTexts",
|
|
376
|
+
"owner": "c-number-field"
|
|
377
|
+
},
|
|
371
378
|
{
|
|
372
379
|
"declaration": "export interface CPaginationOptions {\n currentPage?: number;\n endTo?: number;\n itemCount: number;\n itemsPerPage?: number;\n pageSizes?: number[];\n startFrom?: number;\n textOverrides?: Record<string, unknown>;\n totalVisible?: number;\n}",
|
|
373
380
|
"description": "",
|
|
@@ -509,7 +516,7 @@
|
|
|
509
516
|
"owner": "c-text-field"
|
|
510
517
|
},
|
|
511
518
|
{
|
|
512
|
-
"declaration": "export interface CTimePickerProps {\n /**\n * Make the value clearable\n */\n clearable?: boolean;\n /**\n * Disable the field\n */\n disabled?: boolean;\n /**\n * Error message shown in place of the hint while the field is invalid\n *\n * @freeform\n */\n errorMessage?: string;\n /**\n * 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\n * any separators, e.g. `HH:mm` or `h:mm a`\n *\n * @defaultable 'HH.mm'\n * @freeform\n */\n format?: string;\n /**\n * Hide the hint and error messages\n *\n * @defaultable false\n */\n hideDetails?: boolean;\n /**\n * Hint text for the field\n *\n * @freeform\n */\n hint?: string;\n /**\n * Id of the element\n *\n * @freeform\n */\n hostId?: string;\n /**\n * Element label\n *\n * @freeform\n */\n label?: string;\n /**\n * Label on top of the field\n *\n * @defaultable false\n */\n labelOnTop?: boolean;\n /**\n * The latest time that can be picked or typed, as an ISO `HH:mm` time\n *\n * @freeform\n */\n max?: string;\n /**\n * The earliest time that can be picked or typed, as an ISO `HH:mm` time;\n * a `min` after `max` is invalid and both are ignored\n *\n * @freeform\n */\n min?: string;\n /**\n * Minutes between the minute column's rows; typed times need not fall on\n * the step\n */\n minuteStep?: number;\n /**\n * Input field name\n *\n * @freeform\n */\n name?: string;\n /**\n * Placeholder of the input; the `format` pattern when empty\n *\n * @freeform\n */\n placeholder?: string;\n /**\n * Pick a range: the value becomes `{ start, end }` and the field holds two\n * inputs\n */\n range?: boolean;\n /**\n * Set the field as required\n */\n required?: boolean;\n /**\n * Shadow variant\n *\n * @defaultable false\n */\n shadow?: boolean;\n /**\n * Field height: the 52px default (the shared control height) or the 36px `small` box\n *\n * @defaultable 'default'\n */\n size?: CFieldSize;\n /**\n * UI text overrides (i18n), merged over the AM/PM texts `Intl` gives for\n * the page's `lang` and the English defaults. Objects have no attribute\n * form — bind as a DOM property\n *\n * @defaultable {}\n */\n texts?: CTimePickerTexts;\n /**\n * Set the validity of the field\n */\n valid?: boolean;\n /**\n * The time as an ISO `HH:mm` string on a 24-hour clock, or `{ start, end }`\n * under `range`; `null` when empty\n */\n value?: CTimePickerValue;\n}",
|
|
519
|
+
"declaration": "export interface CTimePickerProps {\n /**\n * Make the value clearable\n */\n clearable?: boolean;\n /**\n * Disable the field\n */\n disabled?: boolean;\n /**\n * Error message shown in place of the hint while the field is invalid\n *\n * @freeform\n */\n errorMessage?: string;\n /**\n * 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\n * any separators, e.g. `HH:mm` or `h:mm a`\n *\n * @defaultable 'HH.mm'\n * @freeform\n */\n format?: string;\n /**\n * Hide the hint and error messages\n *\n * @defaultable false\n */\n hideDetails?: boolean;\n /**\n * Hint text for the field\n *\n * @freeform\n */\n hint?: string;\n /**\n * Id of the element\n *\n * @freeform\n */\n hostId?: string;\n /**\n * Element label\n *\n * @freeform\n */\n label?: string;\n /**\n * Label on top of the field\n *\n * @defaultable false\n */\n labelOnTop?: boolean;\n /**\n * The latest time that can be picked or typed, as an ISO `HH:mm` time\n *\n * @freeform\n */\n max?: string;\n /**\n * The earliest time that can be picked or typed, as an ISO `HH:mm` time;\n * a `min` after `max` is invalid and both are ignored\n *\n * @freeform\n */\n min?: string;\n /**\n * Minutes between the minute column's rows; typed times need not fall on\n * the step\n */\n minuteStep?: number;\n /**\n * Input field name\n *\n * @freeform\n */\n name?: string;\n /**\n * Placeholder of the input; the `format` pattern when empty\n *\n * @freeform\n */\n placeholder?: string;\n /**\n * Pick a range: the value becomes `{ start, end }` and the field holds two\n * inputs\n */\n range?: boolean;\n /**\n * Set the field as required\n */\n required?: boolean;\n /**\n * Shadow variant\n *\n * @defaultable false\n */\n shadow?: boolean;\n /**\n * Show a Now button under the columns that commits the current time\n *\n * @defaultable false\n */\n showNow?: boolean;\n /**\n * Field height: the 52px default (the shared control height) or the 36px `small` box\n *\n * @defaultable 'default'\n */\n size?: CFieldSize;\n /**\n * UI text overrides (i18n), merged over the AM/PM texts `Intl` gives for\n * the page's `lang` and the English defaults. Objects have no attribute\n * form — bind as a DOM property\n *\n * @defaultable {}\n */\n texts?: CTimePickerTexts;\n /**\n * Set the validity of the field\n */\n valid?: boolean;\n /**\n * The time as an ISO `HH:mm` string on a 24-hour clock, or `{ start, end }`\n * under `range`; `null` when empty\n */\n value?: CTimePickerValue;\n}",
|
|
513
520
|
"description": "",
|
|
514
521
|
"kind": "interface",
|
|
515
522
|
"name": "CTimePickerProps",
|
|
@@ -530,7 +537,7 @@
|
|
|
530
537
|
"owner": "c-time-picker"
|
|
531
538
|
},
|
|
532
539
|
{
|
|
533
|
-
"declaration": "export interface CTimePickerTexts {\n /** The period before noon in a 12-hour `format`. */\n am?: string;\n /** Accessible name of the dialog when the field has no label. */\n chooseTime?: string;\n /** Accessible label of the clear button. */\n clearSelection?: string;\n /** Accessible label of the close button in the fullscreen panel (narrow viewports). */\n closePanel?: string;\n /** Name of the end input and the end tab under `range`. */\n end?: string;\n /** Accessible name of the hour column. */\n hours?: string;\n /** Accessible name of the minute column. */\n minutes?: string;\n /** Accessible label of the clock button. */\n openClock?: string;\n /** Accessible name of the AM/PM column. */\n period?: string;\n /** The period from noon in a 12-hour `format`. */\n pm?: string;\n /** Name of the start input and the start tab under `range`. */\n start?: string;\n}",
|
|
540
|
+
"declaration": "export interface CTimePickerTexts {\n /** The period before noon in a 12-hour `format`. */\n am?: string;\n /** Accessible name of the dialog when the field has no label. */\n chooseTime?: string;\n /** Accessible label of the clear button. */\n clearSelection?: string;\n /** Accessible label of the close button in the fullscreen panel (narrow viewports). */\n closePanel?: string;\n /** Label of the Done button in the fullscreen panel (narrow viewports). */\n done?: string;\n /** Name of the end input and the end tab under `range`. */\n end?: string;\n /** Accessible name of the hour column. */\n hours?: string;\n /** Accessible name of the minute column. */\n minutes?: string;\n /** Label of the Now button (`show-now`). */\n now?: string;\n /** Accessible label of the clock button. */\n openClock?: string;\n /** Accessible name of the AM/PM column. */\n period?: string;\n /** The period from noon in a 12-hour `format`. */\n pm?: string;\n /** Name of the start input and the start tab under `range`. */\n start?: string;\n}",
|
|
534
541
|
"description": "UI texts of `c-time-picker`, merged key by key over the AM/PM texts\n`Intl` gives for the page's `lang` and the English defaults.",
|
|
535
542
|
"kind": "interface",
|
|
536
543
|
"name": "CTimePickerTexts",
|
|
@@ -3899,6 +3906,18 @@
|
|
|
3899
3906
|
"defaultable": true
|
|
3900
3907
|
}
|
|
3901
3908
|
},
|
|
3909
|
+
{
|
|
3910
|
+
"fieldName": "showToday",
|
|
3911
|
+
"name": "show-today",
|
|
3912
|
+
"description": "Show a Today button under the calendar that picks today (\"This month\"\nunder `type=\"month\"`)",
|
|
3913
|
+
"type": {
|
|
3914
|
+
"text": "boolean"
|
|
3915
|
+
},
|
|
3916
|
+
"default": "false",
|
|
3917
|
+
"csc": {
|
|
3918
|
+
"defaultable": true
|
|
3919
|
+
}
|
|
3920
|
+
},
|
|
3902
3921
|
{
|
|
3903
3922
|
"fieldName": "showWeekNumbers",
|
|
3904
3923
|
"name": "show-week-numbers",
|
|
@@ -4051,6 +4070,18 @@
|
|
|
4051
4070
|
{
|
|
4052
4071
|
"name": "step-summary",
|
|
4053
4072
|
"description": "A finished step under `type=\"month\"`, its label and pick; pressing it returns to that step"
|
|
4073
|
+
},
|
|
4074
|
+
{
|
|
4075
|
+
"name": "actions",
|
|
4076
|
+
"description": "The row under the calendar body holding the Today button (`show-today`) and, in the fullscreen panel, the Done button"
|
|
4077
|
+
},
|
|
4078
|
+
{
|
|
4079
|
+
"name": "today",
|
|
4080
|
+
"description": "The Today button: picks today, or the current month under `type=\"month\"`"
|
|
4081
|
+
},
|
|
4082
|
+
{
|
|
4083
|
+
"name": "done",
|
|
4084
|
+
"description": "The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes"
|
|
4054
4085
|
}
|
|
4055
4086
|
],
|
|
4056
4087
|
"cssProperties": [],
|
|
@@ -4328,6 +4359,19 @@
|
|
|
4328
4359
|
"defaultable": true
|
|
4329
4360
|
}
|
|
4330
4361
|
},
|
|
4362
|
+
{
|
|
4363
|
+
"kind": "field",
|
|
4364
|
+
"name": "showToday",
|
|
4365
|
+
"privacy": "public",
|
|
4366
|
+
"description": "Show a Today button under the calendar that picks today (\"This month\"\nunder `type=\"month\"`)",
|
|
4367
|
+
"type": {
|
|
4368
|
+
"text": "boolean"
|
|
4369
|
+
},
|
|
4370
|
+
"default": "false",
|
|
4371
|
+
"csc": {
|
|
4372
|
+
"defaultable": true
|
|
4373
|
+
}
|
|
4374
|
+
},
|
|
4331
4375
|
{
|
|
4332
4376
|
"kind": "field",
|
|
4333
4377
|
"name": "showWeekNumbers",
|
|
@@ -7958,6 +8002,18 @@
|
|
|
7958
8002
|
"defaultable": true
|
|
7959
8003
|
}
|
|
7960
8004
|
},
|
|
8005
|
+
{
|
|
8006
|
+
"fieldName": "step",
|
|
8007
|
+
"name": "step",
|
|
8008
|
+
"description": "The spacing of the grid the step buttons and arrow keys move along, counted from `min` (or `0`)",
|
|
8009
|
+
"type": {
|
|
8010
|
+
"text": "number"
|
|
8011
|
+
},
|
|
8012
|
+
"default": "1",
|
|
8013
|
+
"csc": {
|
|
8014
|
+
"defaultable": true
|
|
8015
|
+
}
|
|
8016
|
+
},
|
|
7961
8017
|
{
|
|
7962
8018
|
"fieldName": "valid",
|
|
7963
8019
|
"name": "valid",
|
|
@@ -7981,6 +8037,14 @@
|
|
|
7981
8037
|
{
|
|
7982
8038
|
"name": "input",
|
|
7983
8039
|
"description": "The text input"
|
|
8040
|
+
},
|
|
8041
|
+
{
|
|
8042
|
+
"name": "step-up",
|
|
8043
|
+
"description": "The button that steps the number up"
|
|
8044
|
+
},
|
|
8045
|
+
{
|
|
8046
|
+
"name": "step-down",
|
|
8047
|
+
"description": "The button that steps the number down"
|
|
7984
8048
|
}
|
|
7985
8049
|
],
|
|
7986
8050
|
"cssProperties": [],
|
|
@@ -7996,7 +8060,7 @@
|
|
|
7996
8060
|
"type": {
|
|
7997
8061
|
"text": "CustomEvent<null | number>"
|
|
7998
8062
|
},
|
|
7999
|
-
"description": "Fired whenever typing changes the number, carrying it — `null
|
|
8063
|
+
"description": "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."
|
|
8000
8064
|
},
|
|
8001
8065
|
{
|
|
8002
8066
|
"name": "input",
|
|
@@ -8249,6 +8313,32 @@
|
|
|
8249
8313
|
"defaultable": true
|
|
8250
8314
|
}
|
|
8251
8315
|
},
|
|
8316
|
+
{
|
|
8317
|
+
"kind": "field",
|
|
8318
|
+
"name": "step",
|
|
8319
|
+
"privacy": "public",
|
|
8320
|
+
"description": "The spacing of the grid the step buttons and arrow keys move along, counted from `min` (or `0`)",
|
|
8321
|
+
"type": {
|
|
8322
|
+
"text": "number"
|
|
8323
|
+
},
|
|
8324
|
+
"default": "1",
|
|
8325
|
+
"csc": {
|
|
8326
|
+
"defaultable": true
|
|
8327
|
+
}
|
|
8328
|
+
},
|
|
8329
|
+
{
|
|
8330
|
+
"kind": "field",
|
|
8331
|
+
"name": "texts",
|
|
8332
|
+
"privacy": "public",
|
|
8333
|
+
"description": "UI text overrides (i18n), merged over the English defaults. Objects have no attribute form — bind as a DOM property",
|
|
8334
|
+
"type": {
|
|
8335
|
+
"text": "CNumberFieldTexts"
|
|
8336
|
+
},
|
|
8337
|
+
"default": "{}",
|
|
8338
|
+
"csc": {
|
|
8339
|
+
"defaultable": true
|
|
8340
|
+
}
|
|
8341
|
+
},
|
|
8252
8342
|
{
|
|
8253
8343
|
"kind": "field",
|
|
8254
8344
|
"name": "valid",
|
|
@@ -8287,7 +8377,7 @@
|
|
|
8287
8377
|
},
|
|
8288
8378
|
{
|
|
8289
8379
|
"name": "post",
|
|
8290
|
-
"description": "Content after the number, such as a unit"
|
|
8380
|
+
"description": "Content after the number, such as a unit; the step buttons follow it"
|
|
8291
8381
|
}
|
|
8292
8382
|
]
|
|
8293
8383
|
}
|
|
@@ -14044,6 +14134,18 @@
|
|
|
14044
14134
|
"defaultable": true
|
|
14045
14135
|
}
|
|
14046
14136
|
},
|
|
14137
|
+
{
|
|
14138
|
+
"fieldName": "showNow",
|
|
14139
|
+
"name": "show-now",
|
|
14140
|
+
"description": "Show a Now button under the columns that commits the current time",
|
|
14141
|
+
"type": {
|
|
14142
|
+
"text": "boolean"
|
|
14143
|
+
},
|
|
14144
|
+
"default": "false",
|
|
14145
|
+
"csc": {
|
|
14146
|
+
"defaultable": true
|
|
14147
|
+
}
|
|
14148
|
+
},
|
|
14047
14149
|
{
|
|
14048
14150
|
"fieldName": "size",
|
|
14049
14151
|
"name": "size",
|
|
@@ -14124,6 +14226,18 @@
|
|
|
14124
14226
|
{
|
|
14125
14227
|
"name": "option",
|
|
14126
14228
|
"description": "One row of a time column"
|
|
14229
|
+
},
|
|
14230
|
+
{
|
|
14231
|
+
"name": "actions",
|
|
14232
|
+
"description": "The row under the columns holding the Now button (`show-now`) and, in the fullscreen panel, the Done button"
|
|
14233
|
+
},
|
|
14234
|
+
{
|
|
14235
|
+
"name": "now",
|
|
14236
|
+
"description": "The Now button: commits the current time"
|
|
14237
|
+
},
|
|
14238
|
+
{
|
|
14239
|
+
"name": "done",
|
|
14240
|
+
"description": "The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes"
|
|
14127
14241
|
}
|
|
14128
14242
|
],
|
|
14129
14243
|
"cssProperties": [],
|
|
@@ -14371,6 +14485,19 @@
|
|
|
14371
14485
|
"defaultable": true
|
|
14372
14486
|
}
|
|
14373
14487
|
},
|
|
14488
|
+
{
|
|
14489
|
+
"kind": "field",
|
|
14490
|
+
"name": "showNow",
|
|
14491
|
+
"privacy": "public",
|
|
14492
|
+
"description": "Show a Now button under the columns that commits the current time",
|
|
14493
|
+
"type": {
|
|
14494
|
+
"text": "boolean"
|
|
14495
|
+
},
|
|
14496
|
+
"default": "false",
|
|
14497
|
+
"csc": {
|
|
14498
|
+
"defaultable": true
|
|
14499
|
+
}
|
|
14500
|
+
},
|
|
14374
14501
|
{
|
|
14375
14502
|
"kind": "field",
|
|
14376
14503
|
"name": "size",
|
|
@@ -64,9 +64,11 @@ moment to read `badInput`, as above.
|
|
|
64
64
|
The calendar button at the field's trailing edge, or Alt+ArrowDown in the
|
|
65
65
|
input, opens the calendar panel. It is a dialog: focus moves onto the selected
|
|
66
66
|
day, else today, else the nearest day that can be picked, and Tab cycles
|
|
67
|
-
through the month and year controls
|
|
67
|
+
through the month and year controls, the grid and the Today button
|
|
68
|
+
(`show-today`) until the panel closes.
|
|
68
69
|
Picking a day commits it and closes the panel; Escape closes it without a
|
|
69
|
-
change. Focus returns to the input either way.
|
|
70
|
+
change. Focus returns to the input either way. On a narrow viewport a pick
|
|
71
|
+
waits for a Done button instead (see [Narrow viewports](#narrow-viewports)).
|
|
70
72
|
|
|
71
73
|
| Key | In the day grid |
|
|
72
74
|
| ----------------------- | ------------------------------------- |
|
|
@@ -163,6 +165,27 @@ months open.
|
|
|
163
165
|
`change:month` names the displayed month of the day grid, so it is never
|
|
164
166
|
fired in month mode.
|
|
165
167
|
|
|
168
|
+
## Today
|
|
169
|
+
|
|
170
|
+
`show-today` adds a Today button under the calendar. Pressing it does what
|
|
171
|
+
pressing today in the grid would: it commits today and closes the panel.
|
|
172
|
+
Under `range` the first press makes today the pending start and moves focus
|
|
173
|
+
onto it in the grid; a press while a start is pending completes the range.
|
|
174
|
+
Under `type="month"` the button reads "This month" and picks the current
|
|
175
|
+
month, its month and year at once.
|
|
176
|
+
|
|
177
|
+
```vue
|
|
178
|
+
<c-date-picker v-model="due" label="Due date" show-today />
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
The button is disabled, never hidden, while today cannot be picked: outside
|
|
182
|
+
`min` and `max`, in `disabled-dates`, or ruled out by `is-date-disabled`. It
|
|
183
|
+
goes by the rules assigned at that moment, as typed text does, so when
|
|
184
|
+
`disabled-dates` is loaded per displayed month, keep today's dates in the
|
|
185
|
+
list or express the rule as `is-date-disabled`. Leave the button off where
|
|
186
|
+
today is never the answer, such as a birthdate, or turn it on app-wide with
|
|
187
|
+
`applyDefaults({ 'c-date-picker': { showToday: true } })`.
|
|
188
|
+
|
|
166
189
|
## Texts
|
|
167
190
|
|
|
168
191
|
Month and weekday names and each day's accessible name come from `texts` when
|
|
@@ -177,7 +200,18 @@ English unless `texts` replaces them. Weekday arrays are indexed like
|
|
|
177
200
|
|
|
178
201
|
On a viewport narrower than 760px the calendar opens as a **fullscreen
|
|
179
202
|
panel**: a heading row with the field's `label` and a close button above the
|
|
180
|
-
calendar.
|
|
203
|
+
calendar, and a Done button below it. There a pick only selects: the day, the
|
|
204
|
+
range or the month waits in the panel, and nothing is emitted until Done
|
|
205
|
+
commits it and closes the panel. The close button and Escape close the panel
|
|
206
|
+
without a change, discarding what was picked, and so does the window growing
|
|
207
|
+
past 760px while it is open.
|
|
208
|
+
|
|
209
|
+
The Today button selects today the same way. Enter on a day picks it and
|
|
210
|
+
presses Done at once. Under `range` Done stays disabled until the second pick
|
|
211
|
+
completes the range, and under `type="month"` the panel stays on the year
|
|
212
|
+
step, the year checked, until Done. Pressing Done before picking anything
|
|
213
|
+
closes the panel and changes nothing. The field stays typeable at every
|
|
214
|
+
width.
|
|
181
215
|
|
|
182
216
|
## Native date input
|
|
183
217
|
|
|
@@ -12,12 +12,11 @@ or listen for `change`:
|
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
The value follows the text on every keystroke: typing `1234,` gives `1234`,
|
|
15
|
-
a lone `-` gives `null`. Only typing
|
|
16
|
-
without emitting it.
|
|
15
|
+
a lone `-` gives `null`. Only typing and stepping emit; setting `value` shows
|
|
16
|
+
the number without emitting it.
|
|
17
17
|
|
|
18
18
|
Unlike `c-text-field type="number"`, the native number input, the field shows
|
|
19
|
-
separators
|
|
20
|
-
scroll or an arrow key.
|
|
19
|
+
separators and never changes the number on a scroll.
|
|
21
20
|
|
|
22
21
|
## Separators
|
|
23
22
|
|
|
@@ -74,9 +73,40 @@ read-only `outOfRange` property. The field shows no error of its own:
|
|
|
74
73
|
/>
|
|
75
74
|
```
|
|
76
75
|
|
|
77
|
-
With `min` at `0` or above, the minus key is ignored.
|
|
78
|
-
for the numeric keyboard on a phone (a decimal one when `decimals` is set);
|
|
79
|
-
a field that takes negative numbers keeps the regular keyboard, because
|
|
80
|
-
numeric keyboards on iOS have no minus key.
|
|
76
|
+
With `min` at `0` or above, the minus key is ignored.
|
|
81
77
|
|
|
82
|
-
|
|
78
|
+
## Step
|
|
79
|
+
|
|
80
|
+
The buttons at the end of the field move the number one `step` up or down
|
|
81
|
+
(`1` by default); holding one repeats. The arrow keys do the same, and Page Up
|
|
82
|
+
and Page Down move ten steps:
|
|
83
|
+
|
|
84
|
+
```vue
|
|
85
|
+
<c-number-field v-model="volume" label="Volume" max="100" min="0" step="5" />
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
A step lands on the grid of `step` counted from `min` (or `0`): from a typed
|
|
89
|
+
`12`, a step of `5` goes up to `15` or down to `10`. A typed number off the
|
|
90
|
+
grid stays as typed.
|
|
91
|
+
|
|
92
|
+
Stepping never leaves `min` and `max`: it stops on the bound, and the button
|
|
93
|
+
for that direction is disabled there. From an out-of-range number, a step
|
|
94
|
+
goes back to the nearest bound. An empty field counts from `0`.
|
|
95
|
+
|
|
96
|
+
A stepped number is rounded to `decimals`, so a `step` finer than `decimals`
|
|
97
|
+
allows (`0.5` on an integer field) does not step as written; keep the two
|
|
98
|
+
in line.
|
|
99
|
+
|
|
100
|
+
The buttons stay out of the tab order and never take focus, so tapping one
|
|
101
|
+
on a phone does not open the keyboard. To translate their accessible labels,
|
|
102
|
+
set `texts`: `{ increase: 'Lisää', decrease: 'Vähennä' }`, or app-wide with
|
|
103
|
+
`applyDefaults`.
|
|
104
|
+
|
|
105
|
+
## Keyboard
|
|
106
|
+
|
|
107
|
+
On a phone the field asks for the numeric keyboard, or a decimal one when
|
|
108
|
+
`decimals` is set. Numeric keyboards on iOS have no minus key: there, a
|
|
109
|
+
negative number is reached by stepping below zero.
|
|
110
|
+
|
|
111
|
+
Use the `pre` and `post` slots for a currency sign or a unit; the step
|
|
112
|
+
buttons follow the `post` content.
|
|
@@ -68,10 +68,12 @@ The clock button at the field's trailing edge, or Alt+ArrowDown in the input,
|
|
|
68
68
|
opens the columns: hours and minutes side by side, and an AM/PM column in a
|
|
69
69
|
12-hour format. The panel is a dialog: focus moves onto the hour column —
|
|
70
70
|
the value's hour, or the current hour when the field is empty — and Tab
|
|
71
|
-
cycles through the columns until the panel
|
|
71
|
+
cycles through the columns and the Now button (`show-now`) until the panel
|
|
72
|
+
closes.
|
|
72
73
|
|
|
73
74
|
Every pick commits at once and the panel stays open, so the hour can be fixed
|
|
74
|
-
after the minutes are picked
|
|
75
|
+
after the minutes are picked (on a narrow viewport picks wait for a Done
|
|
76
|
+
button instead; see [Narrow viewports](#narrow-viewports)). The selected row rests at the top of its column:
|
|
75
77
|
it opens there and returns there after each pick, and so does a minute a pick
|
|
76
78
|
fills in. Scrolling a column only looks; it never picks. Picking into an empty field fills in the rest:
|
|
77
79
|
minute `00`, and the hour the hour column rests on. Moving in a column is
|
|
@@ -121,6 +123,22 @@ const sameDay =
|
|
|
121
123
|
!value || !value.start || !value.end || value.start <= value.end;
|
|
122
124
|
```
|
|
123
125
|
|
|
126
|
+
## Now
|
|
127
|
+
|
|
128
|
+
`show-now` adds a Now button under the columns. Pressing it commits the
|
|
129
|
+
current time and closes the panel, unlike a pick in the columns, which leaves
|
|
130
|
+
it open. The time is the exact minute whatever `minute-step`: at 14:07 with a
|
|
131
|
+
step of 15 it commits `14:07`. Under `range` it sets the end the Start | End
|
|
132
|
+
switch shows.
|
|
133
|
+
|
|
134
|
+
```vue
|
|
135
|
+
<c-time-picker v-model="arrival" label="Arrival" show-now />
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The button is disabled, never hidden, while the current time is outside
|
|
139
|
+
`min` and `max`. Turn it on app-wide with
|
|
140
|
+
`applyDefaults({ 'c-time-picker': { showNow: true } })`.
|
|
141
|
+
|
|
124
142
|
## Texts
|
|
125
143
|
|
|
126
144
|
The AM and PM texts come from `texts` when given, then from the browser's
|
|
@@ -133,8 +151,17 @@ them app-wide with `applyDefaults({ 'c-time-picker': { texts } })`.
|
|
|
133
151
|
|
|
134
152
|
On a viewport narrower than 760px the columns open as a **fullscreen panel**:
|
|
135
153
|
a heading row with the field's `label` and a close button above the columns.
|
|
136
|
-
There the selected row rests in the middle of its column instead of the top
|
|
137
|
-
|
|
154
|
+
There the selected row rests in the middle of its column instead of the top,
|
|
155
|
+
in every column, so the selections line up even when a column fits.
|
|
156
|
+
|
|
157
|
+
The fullscreen panel ends in a Done button, and there picks wait in the
|
|
158
|
+
panel instead of committing: nothing is emitted until Done commits the time
|
|
159
|
+
— under `range` both ends at once — and closes the panel. The close button
|
|
160
|
+
and Escape close the panel without a change, discarding what was picked, and
|
|
161
|
+
so does the window growing past 760px while it is open. The Now button moves
|
|
162
|
+
the columns to the current time the same way, and Enter picks the focused
|
|
163
|
+
row and presses Done at once. Pressing Done before picking anything closes
|
|
164
|
+
the panel and changes nothing. The field stays typeable at every width.
|
|
138
165
|
|
|
139
166
|
## Related
|
|
140
167
|
|
|
@@ -326,6 +326,18 @@
|
|
|
326
326
|
"name": "::part(step-summary)",
|
|
327
327
|
"description": "A finished step under `type=\"month\"`, its label and pick; pressing it returns to that step"
|
|
328
328
|
},
|
|
329
|
+
{
|
|
330
|
+
"name": "::part(actions)",
|
|
331
|
+
"description": "The row under the calendar body holding the Today button (`show-today`) and, in the fullscreen panel, the Done button"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "::part(today)",
|
|
335
|
+
"description": "The Today button: picks today, or the current month under `type=\"month\"`"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "::part(done)",
|
|
339
|
+
"description": "The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes"
|
|
340
|
+
},
|
|
329
341
|
{
|
|
330
342
|
"name": "::part(root)",
|
|
331
343
|
"description": "The separator line element itself"
|
|
@@ -526,6 +538,14 @@
|
|
|
526
538
|
"description": "The inner c-icon-button carrying the menu icon"
|
|
527
539
|
},
|
|
528
540
|
{ "name": "::part(input)", "description": "The text input" },
|
|
541
|
+
{
|
|
542
|
+
"name": "::part(step-up)",
|
|
543
|
+
"description": "The button that steps the number up"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"name": "::part(step-down)",
|
|
547
|
+
"description": "The button that steps the number down"
|
|
548
|
+
},
|
|
529
549
|
{
|
|
530
550
|
"name": "::part(root)",
|
|
531
551
|
"description": "The wrapper laying out the label, the digit inputs and the message"
|
|
@@ -878,6 +898,18 @@
|
|
|
878
898
|
"description": "One time column: hours, minutes or AM/PM"
|
|
879
899
|
},
|
|
880
900
|
{ "name": "::part(option)", "description": "One row of a time column" },
|
|
901
|
+
{
|
|
902
|
+
"name": "::part(actions)",
|
|
903
|
+
"description": "The row under the columns holding the Now button (`show-now`) and, in the fullscreen panel, the Done button"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"name": "::part(now)",
|
|
907
|
+
"description": "The Now button: commits the current time"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"name": "::part(done)",
|
|
911
|
+
"description": "The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes"
|
|
912
|
+
},
|
|
881
913
|
{
|
|
882
914
|
"name": "::part(root)",
|
|
883
915
|
"description": "The toast's outer box: the inverted-surface pill carrying the shadow"
|
|
@@ -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\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",
|
|
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)",
|
|
@@ -1197,7 +1202,7 @@
|
|
|
1197
1202
|
},
|
|
1198
1203
|
{
|
|
1199
1204
|
"name": "c-number-field",
|
|
1200
|
-
"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
|
|
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",
|
|
1201
1206
|
"attributes": [
|
|
1202
1207
|
{
|
|
1203
1208
|
"name": "decimals",
|
|
@@ -1278,6 +1283,11 @@
|
|
|
1278
1283
|
"description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
|
|
1279
1284
|
"values": [{ "name": "default" }, { "name": "small" }]
|
|
1280
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
|
+
},
|
|
1281
1291
|
{
|
|
1282
1292
|
"name": "valid",
|
|
1283
1293
|
"description": "Set the validity of the field",
|
|
@@ -2165,7 +2175,7 @@
|
|
|
2165
2175
|
},
|
|
2166
2176
|
{
|
|
2167
2177
|
"name": "c-time-picker",
|
|
2168
|
-
"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",
|
|
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",
|
|
2169
2179
|
"attributes": [
|
|
2170
2180
|
{
|
|
2171
2181
|
"name": "clearable",
|
|
@@ -2236,6 +2246,11 @@
|
|
|
2236
2246
|
"values": []
|
|
2237
2247
|
},
|
|
2238
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
|
+
},
|
|
2239
2254
|
{
|
|
2240
2255
|
"name": "size",
|
|
2241
2256
|
"description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
|