@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.
@@ -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.28",
4
+ "version": "4.0.0-alpha.29",
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\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",
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\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",
1449
1449
  "doc-url": "",
1450
1450
  "attributes": [
1451
1451
  {
@@ -1533,6 +1533,11 @@
1533
1533
  "description": "Shadow variant",
1534
1534
  "value": { "type": "boolean", "default": "false" }
1535
1535
  },
1536
+ {
1537
+ "name": "show-today",
1538
+ "description": "Show a Today button under the calendar that picks today (\"This month\"\nunder `type=\"month\"`)",
1539
+ "value": { "type": "boolean", "default": "false" }
1540
+ },
1536
1541
  {
1537
1542
  "name": "show-week-numbers",
1538
1543
  "description": "Show ISO 8601 week numbers beside the calendar rows (meaningful with a\nMonday week start)",
@@ -1684,6 +1689,11 @@
1684
1689
  "description": "Shadow variant",
1685
1690
  "type": "boolean"
1686
1691
  },
1692
+ {
1693
+ "name": "showToday",
1694
+ "description": "Show a Today button under the calendar that picks today (\"This month\"\nunder `type=\"month\"`)",
1695
+ "type": "boolean"
1696
+ },
1687
1697
  {
1688
1698
  "name": "showWeekNumbers",
1689
1699
  "description": "Show ISO 8601 week numbers beside the calendar rows (meaningful with a\nMonday week start)",
@@ -3134,7 +3144,7 @@
3134
3144
  },
3135
3145
  {
3136
3146
  "name": "c-number-field",
3137
- "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",
3147
+ "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",
3138
3148
  "doc-url": "",
3139
3149
  "attributes": [
3140
3150
  {
@@ -3232,6 +3242,11 @@
3232
3242
  "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
3233
3243
  "value": { "type": "'default' | 'small'", "default": "'default'" }
3234
3244
  },
3245
+ {
3246
+ "name": "step",
3247
+ "description": "The spacing of the grid the step buttons and arrow keys move along, counted from `min` (or `0`)",
3248
+ "value": { "type": "number", "default": "1" }
3249
+ },
3235
3250
  {
3236
3251
  "name": "valid",
3237
3252
  "description": "Set the validity of the field",
@@ -3250,14 +3265,14 @@
3250
3265
  },
3251
3266
  {
3252
3267
  "name": "post",
3253
- "description": "Content after the number, such as a unit"
3268
+ "description": "Content after the number, such as a unit; the step buttons follow it"
3254
3269
  }
3255
3270
  ],
3256
3271
  "events": [
3257
3272
  {
3258
3273
  "name": "change",
3259
3274
  "type": "CustomEvent<null | number>",
3260
- "description": "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."
3275
+ "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."
3261
3276
  },
3262
3277
  {
3263
3278
  "name": "input",
@@ -3367,6 +3382,16 @@
3367
3382
  "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
3368
3383
  "type": "'default' | 'small'"
3369
3384
  },
3385
+ {
3386
+ "name": "step",
3387
+ "description": "The spacing of the grid the step buttons and arrow keys move along, counted from `min` (or `0`)",
3388
+ "type": "number"
3389
+ },
3390
+ {
3391
+ "name": "texts",
3392
+ "description": "UI text overrides (i18n), merged over the English defaults. Objects have no attribute form — bind as a DOM property",
3393
+ "type": "CNumberFieldTexts"
3394
+ },
3370
3395
  {
3371
3396
  "name": "valid",
3372
3397
  "description": "Set the validity of the field",
@@ -3387,7 +3412,7 @@
3387
3412
  {
3388
3413
  "name": "change",
3389
3414
  "type": "CustomEvent<null | number>",
3390
- "description": "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."
3415
+ "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."
3391
3416
  },
3392
3417
  {
3393
3418
  "name": "input",
@@ -5974,7 +5999,7 @@
5974
5999
  },
5975
6000
  {
5976
6001
  "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",
6002
+ "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",
5978
6003
  "doc-url": "",
5979
6004
  "attributes": [
5980
6005
  {
@@ -6062,6 +6087,11 @@
6062
6087
  "description": "Shadow variant",
6063
6088
  "value": { "type": "boolean", "default": "false" }
6064
6089
  },
6090
+ {
6091
+ "name": "show-now",
6092
+ "description": "Show a Now button under the columns that commits the current time",
6093
+ "value": { "type": "boolean", "default": "false" }
6094
+ },
6065
6095
  {
6066
6096
  "name": "size",
6067
6097
  "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
@@ -6188,6 +6218,11 @@
6188
6218
  "description": "Shadow variant",
6189
6219
  "type": "boolean"
6190
6220
  },
6221
+ {
6222
+ "name": "showNow",
6223
+ "description": "Show a Now button under the columns that commits the current time",
6224
+ "type": "boolean"
6225
+ },
6191
6226
  {
6192
6227
  "name": "size",
6193
6228
  "description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
@@ -7044,6 +7079,18 @@
7044
7079
  "name": "part(step-summary)",
7045
7080
  "description": "A finished step under `type=\"month\"`, its label and pick; pressing it returns to that step"
7046
7081
  },
7082
+ {
7083
+ "name": "part(actions)",
7084
+ "description": "The row under the calendar body holding the Today button (`show-today`) and, in the fullscreen panel, the Done button"
7085
+ },
7086
+ {
7087
+ "name": "part(today)",
7088
+ "description": "The Today button: picks today, or the current month under `type=\"month\"`"
7089
+ },
7090
+ {
7091
+ "name": "part(done)",
7092
+ "description": "The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes"
7093
+ },
7047
7094
  {
7048
7095
  "name": "part(root)",
7049
7096
  "description": "The separator line element itself"
@@ -7244,6 +7291,14 @@
7244
7291
  "description": "The inner c-icon-button carrying the menu icon"
7245
7292
  },
7246
7293
  { "name": "part(input)", "description": "The text input" },
7294
+ {
7295
+ "name": "part(step-up)",
7296
+ "description": "The button that steps the number up"
7297
+ },
7298
+ {
7299
+ "name": "part(step-down)",
7300
+ "description": "The button that steps the number down"
7301
+ },
7247
7302
  {
7248
7303
  "name": "part(root)",
7249
7304
  "description": "The wrapper laying out the label, the digit inputs and the message"
@@ -7599,6 +7654,18 @@
7599
7654
  "description": "One time column: hours, minutes or AM/PM"
7600
7655
  },
7601
7656
  { "name": "part(option)", "description": "One row of a time column" },
7657
+ {
7658
+ "name": "part(actions)",
7659
+ "description": "The row under the columns holding the Now button (`show-now`) and, in the fullscreen panel, the Done button"
7660
+ },
7661
+ {
7662
+ "name": "part(now)",
7663
+ "description": "The Now button: commits the current time"
7664
+ },
7665
+ {
7666
+ "name": "part(done)",
7667
+ "description": "The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes"
7668
+ },
7602
7669
  {
7603
7670
  "name": "part(root)",
7604
7671
  "description": "The toast's outer box: the inverted-surface pill carrying the shadow"
@@ -115,6 +115,13 @@ export interface CDatePickerProps {
115
115
  * @defaultable false
116
116
  */
117
117
  shadow?: boolean;
118
+ /**
119
+ * Show a Today button under the calendar that picks today ("This month"
120
+ * under `type="month"`)
121
+ *
122
+ * @defaultable false
123
+ */
124
+ showToday?: boolean;
118
125
  /**
119
126
  * Show ISO 8601 week numbers beside the calendar rows (meaningful with a
120
127
  * Monday week start)
@@ -180,6 +187,8 @@ export interface CDatePickerTexts {
180
187
  closePanel?: string;
181
188
  /** A day's accessible name in the grid; receives the ISO date. */
182
189
  date?: (iso: string) => string;
190
+ /** Label of the Done button in the fullscreen panel (narrow viewports). */
191
+ done?: string;
183
192
  /** Accessible name of the end input under `range`. */
184
193
  end?: string;
185
194
  /** Label of the end's month step under `type="month"` and `range`; also the end input's name there. */
@@ -214,6 +223,10 @@ export interface CDatePickerTexts {
214
223
  startMonth?: string;
215
224
  /** Label of the start's year step under `type="month"` and `range`. */
216
225
  startYear?: string;
226
+ /** Label of the Today button under `type="month"`. */
227
+ thisMonth?: string;
228
+ /** Label of the Today button (`show-today`). */
229
+ today?: string;
217
230
  /** Appended to the accessible name of a day that cannot be picked. */
218
231
  unavailable?: string;
219
232
  /** Seven weekday names, Sunday first. */
@@ -264,5 +277,6 @@ declare const __VLS_export: import("vue").DefineComponent<CDatePickerProps, {
264
277
  max: string;
265
278
  min: string;
266
279
  range: boolean;
280
+ showToday: boolean;
267
281
  showWeekNumbers: boolean;
268
282
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -106,6 +106,18 @@ export interface CNumberFieldProps {
106
106
  * @defaultable 'default'
107
107
  */
108
108
  size?: CFieldSize;
109
+ /**
110
+ * The spacing of the grid the step buttons and arrow keys move along, counted from `min` (or `0`)
111
+ *
112
+ * @defaultable 1
113
+ */
114
+ step?: number;
115
+ /**
116
+ * UI text overrides (i18n), merged over the English defaults. Objects have no attribute form — bind as a DOM property
117
+ *
118
+ * @defaultable {}
119
+ */
120
+ texts?: CNumberFieldTexts;
109
121
  /**
110
122
  * Set the validity of the field
111
123
  */
@@ -115,6 +127,13 @@ export interface CNumberFieldProps {
115
127
  */
116
128
  value?: null | number | string;
117
129
  }
130
+ /** UI texts of `c-number-field`, merged key by key over the English defaults. */
131
+ export interface CNumberFieldTexts {
132
+ /** Accessible label of the step-down button. */
133
+ decrease?: string;
134
+ /** Accessible label of the step-up button. */
135
+ increase?: string;
136
+ }
118
137
  declare const _default: typeof __VLS_export;
119
138
  export default _default;
120
139
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CNumberFieldProps, {
@@ -133,6 +152,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CNumbe
133
152
  labelOnTop: boolean;
134
153
  placeholder: string;
135
154
  shadow: boolean;
155
+ texts: CNumberFieldTexts;
136
156
  valid: boolean;
137
157
  max: null | number;
138
158
  min: null | number;
@@ -141,6 +161,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CNumbe
141
161
  fixedDecimals: boolean;
142
162
  groupSeparator: string;
143
163
  readonly: boolean;
164
+ step: number;
144
165
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
145
166
  pre?: (props: {}) => any;
146
167
  } & {
@@ -40,3 +40,19 @@ export declare const readNumber: (text: string, format: CNumberFieldFormat) => n
40
40
  * zeros kept only when `fixed`. A non-finite value or `null` shows as empty.
41
41
  */
42
42
  export declare const formatNumber: (value: null | number | undefined, format: CNumberFieldFormat, fixed?: boolean) => string;
43
+ export interface CNumberFieldStepOptions {
44
+ /** The most fraction digits; a stepped number is rounded to them. */
45
+ decimals: number;
46
+ max: null | number;
47
+ min: null | number;
48
+ /** The spacing of the grid, counted from `min` (or `0`); not a positive number reads as `1`. */
49
+ step: number;
50
+ }
51
+ /**
52
+ * Move a number `count` points along its step grid (ADR-0064): to the next
53
+ * point of `base + k·step` above it (`direction` 1) or below it (-1), where
54
+ * `base` is `min`, or `0`. The result is rounded to `decimals` and held in
55
+ * `min`–`max`: a move that would pass a bound lands on it, and a number at or
56
+ * beyond the bound in `direction` stays put. An empty field counts from `0`.
57
+ */
58
+ export declare const stepNumber: (current: null | number, direction: -1 | 1, options: CNumberFieldStepOptions, count?: number) => null | number;
@@ -97,11 +97,11 @@ declare const __VLS_export: import("vue").DefineComponent<CSliderProps, {}, {},
97
97
  hostName: string;
98
98
  max: number | string;
99
99
  min: number | string;
100
+ step: number | string;
100
101
  ariaLabelInternal: string;
101
102
  disableTooltip: boolean;
102
103
  labels: boolean;
103
104
  segments: number | string;
104
- step: number | string;
105
105
  ticks: boolean;
106
106
  unit: string;
107
107
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -98,6 +98,12 @@ export interface CTimePickerProps {
98
98
  * @defaultable false
99
99
  */
100
100
  shadow?: boolean;
101
+ /**
102
+ * Show a Now button under the columns that commits the current time
103
+ *
104
+ * @defaultable false
105
+ */
106
+ showNow?: boolean;
101
107
  /**
102
108
  * Field height: the 52px default (the shared control height) or the 36px `small` box
103
109
  *
@@ -150,12 +156,16 @@ export interface CTimePickerTexts {
150
156
  clearSelection?: string;
151
157
  /** Accessible label of the close button in the fullscreen panel (narrow viewports). */
152
158
  closePanel?: string;
159
+ /** Label of the Done button in the fullscreen panel (narrow viewports). */
160
+ done?: string;
153
161
  /** Name of the end input and the end tab under `range`. */
154
162
  end?: string;
155
163
  /** Accessible name of the hour column. */
156
164
  hours?: string;
157
165
  /** Accessible name of the minute column. */
158
166
  minutes?: string;
167
+ /** Label of the Now button (`show-now`). */
168
+ now?: string;
159
169
  /** Accessible label of the clock button. */
160
170
  openClock?: string;
161
171
  /** Accessible name of the AM/PM column. */
@@ -196,4 +206,5 @@ declare const __VLS_export: import("vue").DefineComponent<CTimePickerProps, {
196
206
  min: string;
197
207
  range: boolean;
198
208
  minuteStep: number;
209
+ showNow: boolean;
199
210
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -65,7 +65,7 @@ export declare const clampToBounds: (minutes: number, b: CTimePickerBounds) => n
65
65
  export declare const hourDisabled: (hour: number, b: CTimePickerBounds) => boolean;
66
66
  /** Whether no minute of the half day is inside the bounds. */
67
67
  export declare const periodDisabled: (period: "am" | "pm", b: CTimePickerBounds) => boolean;
68
- /** The hour column's hours (0–23) in row order: `0…23`, or `12, 1…11` of one half day. */
68
+ /** The hour column's hours (0–23) in row order: `0…23`, or `1…11, 12` of one half day. */
69
69
  export declare const hourRows: (twelve: boolean, pm?: boolean) => number[];
70
70
  /**
71
71
  * The minute column's minutes: every `step` from 0, plus `current` sorted in
@@ -8,7 +8,7 @@ export type { CDatePickerDisabledDate, CDatePickerProps, CDatePickerRange, CDate
8
8
  export type { CIconButtonProps, CIconButtonSize, } from './components/c-icon-button/CIconButton.vue';
9
9
  export type { CLoginCardActionsAlign, CLoginCardActionsJustify, CLoginCardActionsProps, } from './components/c-login-card-actions/CLoginCardActions.vue';
10
10
  export type { CLoginCardBlendMode, CLoginCardProps, } from './components/c-login-card/CLoginCard.vue';
11
- export type { CNumberFieldProps } from './components/c-number-field/CNumberField.vue';
11
+ export type { CNumberFieldProps, CNumberFieldTexts, } from './components/c-number-field/CNumberField.vue';
12
12
  export type { CPaginationOptions, CPaginationProps, CPaginationSize, } from './components/c-pagination/CPagination.vue';
13
13
  export type { CPopoverProps } from './components/c-popover/CPopover.vue';
14
14
  export type { CProgressCircleProps } from './components/c-progress-circle/CProgressCircle.vue';
@@ -25,7 +25,13 @@ type __VLS_Props = {
25
25
  size: CFieldSize;
26
26
  valid: boolean;
27
27
  };
28
- declare var __VLS_20: {};
28
+ declare var __VLS_20: {
29
+ buttonSize: "x-small";
30
+ iconSize: number;
31
+ } | {
32
+ buttonSize: "default";
33
+ iconSize: number;
34
+ };
29
35
  type __VLS_Slots = {} & {
30
36
  trigger?: (props: typeof __VLS_20) => any;
31
37
  };
@@ -13,6 +13,7 @@ import type { CAutocompleteFilter, CAutocompleteItem, CAutocompleteTexts, CAutoc
13
13
  import type { CButtonGroupValue } from './components/c-button-group/CButtonGroup.vue';
14
14
  import type { CDataTableCellContent, CDataTableColumn, CDataTableExpandedContext, CDataTableRow, CDataTableSort, CDataTableTexts } from './components/c-data-table/CDataTable.vue';
15
15
  import type { CDatePickerDisabledDate, CDatePickerText, CDatePickerTexts, CDatePickerValue } from './components/c-date-picker/CDatePicker.vue';
16
+ import type { CNumberFieldTexts } from './components/c-number-field/CNumberField.vue';
16
17
  import type { CPaginationOptions } from './components/c-pagination/CPagination.vue';
17
18
  import type { CSelectTexts, CSelectValue } from './components/c-select/CSelect.vue';
18
19
  import type { CTimePickerText, CTimePickerTexts, CTimePickerValue } from './components/c-time-picker/CTimePicker.vue';
@@ -544,7 +545,7 @@ export interface CDatePickerElementEventMap {
544
545
  'update:value': CustomEvent<CDatePickerValue>;
545
546
  }
546
547
  /** A date field that takes a typed date, or opens a calendar panel for picking one, or a start and end date under `range`. */
547
- export interface CDatePickerElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'disabledDates' | 'errorMessage' | 'firstDayOfWeek' | 'format' | 'hideDetails' | 'hint' | 'hostId' | 'isDateDisabled' | 'label' | 'labelOnTop' | 'max' | 'min' | 'name' | 'placeholder' | 'range' | 'required' | 'shadow' | 'showWeekNumbers' | 'size' | 'texts' | 'type' | 'valid' | 'value'> {
548
+ export interface CDatePickerElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'disabledDates' | 'errorMessage' | 'firstDayOfWeek' | 'format' | 'hideDetails' | 'hint' | 'hostId' | 'isDateDisabled' | 'label' | 'labelOnTop' | 'max' | 'min' | 'name' | 'placeholder' | 'range' | 'required' | 'shadow' | 'showToday' | 'showWeekNumbers' | 'size' | 'texts' | 'type' | 'valid' | 'value'> {
548
549
  /** Make the value clearable */
549
550
  clearable?: boolean;
550
551
  /** Disable the field */
@@ -604,6 +605,11 @@ export interface CDatePickerElement extends Omit<HTMLElement, 'clearable' | 'dis
604
605
  required?: boolean;
605
606
  /** Shadow variant */
606
607
  shadow?: boolean;
608
+ /**
609
+ * Show a Today button under the calendar that picks today ("This month"
610
+ * under `type="month"`)
611
+ */
612
+ showToday?: boolean;
607
613
  /**
608
614
  * Show ISO 8601 week numbers beside the calendar rows (meaningful with a
609
615
  * Monday week start)
@@ -997,8 +1003,8 @@ export interface CNavigationButtonElement extends HTMLElement {
997
1003
  /** Events dispatched by `<c-number-field>`. */
998
1004
  export interface CNumberFieldElementEventMap {
999
1005
  /**
1000
- * Fired whenever typing changes the number, carrying it — `null` once the
1001
- * field holds no digit. Not fired when only the text changes (a group
1006
+ * Fired whenever typing or a step changes the number, carrying it — `null`
1007
+ * once the field holds no digit. Not fired when only the text changes (a group
1002
1008
  * separator, a trailing decimal separator) or when `value` is set.
1003
1009
  */
1004
1010
  change: CustomEvent<null | number>;
@@ -1011,7 +1017,7 @@ export interface CNumberFieldElementEventMap {
1011
1017
  'update:value': CustomEvent<null | number>;
1012
1018
  }
1013
1019
  /** A field for a number — an integer, or one with decimals — shown with thousands separators as it is typed. */
1014
- export interface CNumberFieldElement extends Omit<HTMLElement, 'decimals' | 'decimalSeparator' | 'disabled' | 'errorMessage' | 'fixedDecimals' | 'groupSeparator' | 'hideDetails' | 'hint' | 'hostId' | 'label' | 'labelOnTop' | 'max' | 'min' | 'name' | 'placeholder' | 'readonly' | 'required' | 'shadow' | 'size' | 'valid' | 'value'> {
1020
+ export interface CNumberFieldElement extends Omit<HTMLElement, 'decimals' | 'decimalSeparator' | 'disabled' | 'errorMessage' | 'fixedDecimals' | 'groupSeparator' | 'hideDetails' | 'hint' | 'hostId' | 'label' | 'labelOnTop' | 'max' | 'min' | 'name' | 'placeholder' | 'readonly' | 'required' | 'shadow' | 'size' | 'step' | 'texts' | 'valid' | 'value'> {
1015
1021
  /** The most fraction digits the field takes; `0` makes it an integer field */
1016
1022
  decimals?: number;
1017
1023
  /** The decimal separator. Empty follows the page's `lang` (`,` for `fi`, `.` for `en`) */
@@ -1050,6 +1056,10 @@ export interface CNumberFieldElement extends Omit<HTMLElement, 'decimals' | 'dec
1050
1056
  shadow?: boolean;
1051
1057
  /** Field height: the 52px default (the shared control height) or the 36px `small` box */
1052
1058
  size?: 'default' | 'small';
1059
+ /** The spacing of the grid the step buttons and arrow keys move along, counted from `min` (or `0`) */
1060
+ step?: number;
1061
+ /** UI text overrides (i18n), merged over the English defaults. Objects have no attribute form — bind as a DOM property */
1062
+ texts?: CNumberFieldTexts;
1053
1063
  /** Set the validity of the field */
1054
1064
  valid?: boolean;
1055
1065
  /** 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` */
@@ -1860,7 +1870,7 @@ export interface CTimePickerElementEventMap {
1860
1870
  'update:value': CustomEvent<CTimePickerValue>;
1861
1871
  }
1862
1872
  /** 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`. */
1863
- export interface CTimePickerElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'errorMessage' | 'format' | 'hideDetails' | 'hint' | 'hostId' | 'label' | 'labelOnTop' | 'max' | 'min' | 'minuteStep' | 'name' | 'placeholder' | 'range' | 'required' | 'shadow' | 'size' | 'texts' | 'valid' | 'value'> {
1873
+ export interface CTimePickerElement extends Omit<HTMLElement, 'clearable' | 'disabled' | 'errorMessage' | 'format' | 'hideDetails' | 'hint' | 'hostId' | 'label' | 'labelOnTop' | 'max' | 'min' | 'minuteStep' | 'name' | 'placeholder' | 'range' | 'required' | 'shadow' | 'showNow' | 'size' | 'texts' | 'valid' | 'value'> {
1864
1874
  /** Make the value clearable */
1865
1875
  clearable?: boolean;
1866
1876
  /** Disable the field */
@@ -1908,6 +1918,8 @@ export interface CTimePickerElement extends Omit<HTMLElement, 'clearable' | 'dis
1908
1918
  required?: boolean;
1909
1919
  /** Shadow variant */
1910
1920
  shadow?: boolean;
1921
+ /** Show a Now button under the columns that commits the current time */
1922
+ showNow?: boolean;
1911
1923
  /** Field height: the 52px default (the shared control height) or the 36px `small` box */
1912
1924
  size?: 'default' | 'small';
1913
1925
  /**
@@ -2118,22 +2130,22 @@ export interface CTreeSelectElement extends Omit<HTMLElement, 'allowBranch' | 'c
2118
2130
  export interface AppDefaults {
2119
2131
  'c-autocomplete'?: Partial<Pick<CAutocompleteElement, 'hideDetails' | 'itemsPerPage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
2120
2132
  'c-data-table'?: Partial<Pick<CDataTableElement, 'texts'>>;
2121
- 'c-date-picker'?: Partial<Pick<CDatePickerElement, 'firstDayOfWeek' | 'format' | 'hideDetails' | 'labelOnTop' | 'shadow' | 'showWeekNumbers' | 'size' | 'texts'>>;
2122
- 'c-number-field'?: Partial<Pick<CNumberFieldElement, 'decimalSeparator' | 'decimals' | 'fixedDecimals' | 'groupSeparator' | 'hideDetails' | 'labelOnTop' | 'shadow' | 'size'>>;
2133
+ 'c-date-picker'?: Partial<Pick<CDatePickerElement, 'firstDayOfWeek' | 'format' | 'hideDetails' | 'labelOnTop' | 'shadow' | 'showToday' | 'showWeekNumbers' | 'size' | 'texts'>>;
2134
+ 'c-number-field'?: Partial<Pick<CNumberFieldElement, 'decimalSeparator' | 'decimals' | 'fixedDecimals' | 'groupSeparator' | 'hideDetails' | 'labelOnTop' | 'shadow' | 'size' | 'step' | 'texts'>>;
2123
2135
  'c-select'?: Partial<Pick<CSelectElement, 'hideDetails' | 'itemsPerPage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
2124
2136
  'c-text-field'?: Partial<Pick<CTextFieldElement, 'hideDetails' | 'labelOnTop' | 'shadow' | 'size'>>;
2125
- 'c-time-picker'?: Partial<Pick<CTimePickerElement, 'format' | 'hideDetails' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
2137
+ 'c-time-picker'?: Partial<Pick<CTimePickerElement, 'format' | 'hideDetails' | 'labelOnTop' | 'shadow' | 'showNow' | 'size' | 'texts'>>;
2126
2138
  'c-tree-select'?: Partial<Pick<CTreeSelectElement, 'hideDetails' | 'itemsPerPage' | 'labelOnTop' | 'shadow' | 'size' | 'texts'>>;
2127
2139
  }
2128
2140
  /** Runtime allow-list behind `applyDefaults()` validation — the same data as `AppDefaults`. */
2129
2141
  export declare const DEFAULTABLE_PROPS: {
2130
2142
  readonly 'c-autocomplete': readonly ["hideDetails", "itemsPerPage", "labelOnTop", "shadow", "size", "texts"];
2131
2143
  readonly 'c-data-table': readonly ["texts"];
2132
- readonly 'c-date-picker': readonly ["firstDayOfWeek", "format", "hideDetails", "labelOnTop", "shadow", "showWeekNumbers", "size", "texts"];
2133
- readonly 'c-number-field': readonly ["decimalSeparator", "decimals", "fixedDecimals", "groupSeparator", "hideDetails", "labelOnTop", "shadow", "size"];
2144
+ readonly 'c-date-picker': readonly ["firstDayOfWeek", "format", "hideDetails", "labelOnTop", "shadow", "showToday", "showWeekNumbers", "size", "texts"];
2145
+ readonly 'c-number-field': readonly ["decimalSeparator", "decimals", "fixedDecimals", "groupSeparator", "hideDetails", "labelOnTop", "shadow", "size", "step", "texts"];
2134
2146
  readonly 'c-select': readonly ["hideDetails", "itemsPerPage", "labelOnTop", "shadow", "size", "texts"];
2135
2147
  readonly 'c-text-field': readonly ["hideDetails", "labelOnTop", "shadow", "size"];
2136
- readonly 'c-time-picker': readonly ["format", "hideDetails", "labelOnTop", "shadow", "size", "texts"];
2148
+ readonly 'c-time-picker': readonly ["format", "hideDetails", "labelOnTop", "shadow", "showNow", "size", "texts"];
2137
2149
  readonly 'c-tree-select': readonly ["hideDetails", "itemsPerPage", "labelOnTop", "shadow", "size", "texts"];
2138
2150
  };
2139
2151
  /** Tags dispatching the v-model contract event `update:value` — the value controls (CONTEXT.md). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cscfi/csc-ui",
3
- "version": "4.0.0-alpha.28",
3
+ "version": "4.0.0-alpha.29",
4
4
  "description": "Vue 3-based replacement for @cscfi/csc-ui — same custom element tag names, Vue v-model contract.",
5
5
  "type": "module",
6
6
  "main": "./dist/csc-ui.js",