@cscfi/csc-ui 4.0.0-alpha.27 → 4.0.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/csc-ui.js +10570 -9366
- package/dist/custom-elements.json +822 -9
- package/dist/docs/c-date-picker/usage.md +86 -3
- package/dist/docs/c-number-field/usage.md +39 -9
- package/dist/docs/c-time-picker/usage.md +170 -0
- package/dist/styles/css/tailwind-theme.css +1 -0
- package/dist/styles/css/tokens.css +8 -0
- package/dist/vscode.css-custom-data.json +82 -0
- package/dist/vscode.html-custom-data.json +114 -3
- package/dist/web-types.json +401 -8
- package/dist-types/components/c-date-picker/CDatePicker.vue.d.ts +40 -5
- package/dist-types/components/c-date-picker/dates.d.ts +31 -2
- 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 +210 -0
- package/dist-types/components/c-time-picker/times.d.ts +82 -0
- package/dist-types/index.d.ts +3 -2
- package/dist-types/shared/TypedField.vue.d.ts +46 -0
- package/dist-types/shared/inputMask.d.ts +9 -0
- package/dist-types/shared/useTypedField.d.ts +103 -0
- package/dist-types/tag-name-map.d.ts +125 -11
- package/package.json +1 -1
|
@@ -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
|
| ----------------------- | ------------------------------------- |
|
|
@@ -118,6 +120,72 @@ Availability that comes from a server can follow the calendar: load the
|
|
|
118
120
|
disabled dates of the month `change:month` names and assign `disabled-dates`
|
|
119
121
|
again.
|
|
120
122
|
|
|
123
|
+
## Months
|
|
124
|
+
|
|
125
|
+
With `type="month"` the field picks a year and a month instead of a day. The
|
|
126
|
+
value is an ISO `YYYY-MM` string — `'2026-03'` — or `{ start, end }` of them
|
|
127
|
+
under `range`, like the native `<input type="month">`:
|
|
128
|
+
|
|
129
|
+
```vue
|
|
130
|
+
<c-date-picker v-model="billing" label="Billing month" type="month" />
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The format is the `format` with its day left out, so one app default serves
|
|
134
|
+
both kinds of field: `dd.MM.yyyy` shows months as `MM.yyyy`, `yyyy-MM-dd` as
|
|
135
|
+
`yyyy-MM`. A `format` with no day, such as `MM/yyyy`, is used as given.
|
|
136
|
+
Typing is as lenient as for dates: `3.2026` and `032026` both commit as
|
|
137
|
+
`03.2026`. A full date bound as the value is shown as its month and emits
|
|
138
|
+
nothing; the next pick or commit emits the month.
|
|
139
|
+
|
|
140
|
+
The panel asks for the month first, then the year. It opens on the twelve
|
|
141
|
+
months under a "Month" label, with the selected month marked and focused.
|
|
142
|
+
Picking one collapses it to a summary row and the years unroll beneath it,
|
|
143
|
+
focused on the selected year — else this year, else the nearest year that can
|
|
144
|
+
be picked. Picking a year commits the month and closes the panel; pressing the
|
|
145
|
+
summary row goes back to the months. Both lists take the arrows, Home and End,
|
|
146
|
+
and Enter or Space to pick.
|
|
147
|
+
|
|
148
|
+
Under `range` the steps run twice, labelled "Start month", "Start year", "End
|
|
149
|
+
month" and "End year". The finished start shows as a summary row and is only
|
|
150
|
+
pending, as in the day grid: nothing is emitted until the end's year completes
|
|
151
|
+
the range, a range picked backwards is swapped, and dismissing the panel
|
|
152
|
+
discards the start.
|
|
153
|
+
|
|
154
|
+
`min` and `max` may be months or full dates; a full date counts by its month,
|
|
155
|
+
so `min="2026-03-15"` still allows March. A month is disabled only when every
|
|
156
|
+
one of its days is — by `min` and `max`, `disabled-dates` or
|
|
157
|
+
`is-date-disabled` — so a "no weekends" predicate disables no month, and a
|
|
158
|
+
span covering all of July disables July. In the month list a month is disabled
|
|
159
|
+
when no allowed year takes it; in the year list a year is disabled when the
|
|
160
|
+
picked month is disabled in it, so no pick leads to an empty list. The
|
|
161
|
+
predicate is asked about each day until one is enabled, so in most months it
|
|
162
|
+
runs once; one that disables nearly every day is asked many times when the
|
|
163
|
+
months open.
|
|
164
|
+
|
|
165
|
+
`change:month` names the displayed month of the day grid, so it is never
|
|
166
|
+
fired in month mode.
|
|
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
|
+
|
|
121
189
|
## Texts
|
|
122
190
|
|
|
123
191
|
Month and weekday names and each day's accessible name come from `texts` when
|
|
@@ -132,10 +200,25 @@ English unless `texts` replaces them. Weekday arrays are indexed like
|
|
|
132
200
|
|
|
133
201
|
On a viewport narrower than 760px the calendar opens as a **fullscreen
|
|
134
202
|
panel**: a heading row with the field's `label` and a close button above the
|
|
135
|
-
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.
|
|
136
215
|
|
|
137
216
|
## Native date input
|
|
138
217
|
|
|
139
218
|
`c-text-field type="date"` remains the browser's own date input — no custom
|
|
140
219
|
calendar, the browser's format, and no ranges or disabled dates. Reach for
|
|
141
220
|
`c-date-picker` when the format, the calendar's look or those features matter.
|
|
221
|
+
`c-text-field` has no month type: for a year and a month, use
|
|
222
|
+
`type="month"` here.
|
|
223
|
+
|
|
224
|
+
`c-time-picker` is the same typeable field for times of day.
|
|
@@ -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.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
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`.
|
|
2
|
+
|
|
3
|
+
## Value
|
|
4
|
+
|
|
5
|
+
The value is a time of day as an ISO `HH:mm` string on a 24-hour clock —
|
|
6
|
+
`'14:05'` — or `null` when the field is empty. It carries no seconds, no date
|
|
7
|
+
and no timezone, and whatever the displayed `format` it keeps this one shape:
|
|
8
|
+
a field showing `14.05` or `2:05 PM` holds `'14:05'`. Bind it with `v-model`,
|
|
9
|
+
or listen for `change`:
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<c-time-picker v-model="time" label="Start time" />
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Under `range` the value becomes `{ start, end }`. Either end may be `null`
|
|
16
|
+
while only one is set — `{ start: '09:00', end: null }` — and a range with
|
|
17
|
+
neither end is `null`.
|
|
18
|
+
|
|
19
|
+
## Typing
|
|
20
|
+
|
|
21
|
+
The field is typeable first: clicking into it or focusing it never opens the
|
|
22
|
+
columns. Text is read when the user presses Enter or leaves the input, never
|
|
23
|
+
per keystroke. The `format` prop sets how times are shown and read — a pattern
|
|
24
|
+
of the tokens `H` or `HH` (a 24-hour hour), `h` or `hh` (a 12-hour hour, which
|
|
25
|
+
needs the period `a`) and `mm`, with any separators. The default is `HH.mm`;
|
|
26
|
+
`HH:mm` and `h:mm a` are common alternatives. The format is an app default, so
|
|
27
|
+
an app can set it once with `applyDefaults({ 'c-time-picker': { format: 'HH:mm' } })`.
|
|
28
|
+
|
|
29
|
+
Typing follows the format as it goes: the separator appears on its own (`930`
|
|
30
|
+
shows `9.30`), an hour closes early when its first digit can start no
|
|
31
|
+
two-digit hour, any of `.`, `:` or a space typed in place of the separator
|
|
32
|
+
shows as the format's own, and in a 12-hour format a typed `a` or `p` fills in
|
|
33
|
+
the whole AM or PM text. Reading is lenient:
|
|
34
|
+
|
|
35
|
+
| Typed | Reads as |
|
|
36
|
+
| ------- | -------------------------------------------- |
|
|
37
|
+
| `9` | `09:00` — a bare hour is on the hour |
|
|
38
|
+
| `930` | `09:30` — three or four digits split |
|
|
39
|
+
| `9.3` | `09:03` — one minute digit is that minute |
|
|
40
|
+
| `2 pm` | `14:00` — a period makes the hour 12-hour |
|
|
41
|
+
| `14.00` | `14:00`, also in a 12-hour field (`2:00 PM`) |
|
|
42
|
+
|
|
43
|
+
In a 12-hour field an hour typed without a period reads as AM.
|
|
44
|
+
|
|
45
|
+
Text that names no time that can be picked — `25.00`, a time outside `min`
|
|
46
|
+
and `max` — is **bad input**: the text stays as the user typed it, the value
|
|
47
|
+
becomes `null`, and the host exposes the `bad-input` custom state and a
|
|
48
|
+
read-only `badInput` property. The component never shows an error of its own;
|
|
49
|
+
deciding whether bad input is an error, and saying so, is the consumer's
|
|
50
|
+
validation:
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<c-time-picker
|
|
54
|
+
v-model="time"
|
|
55
|
+
:error-message="error"
|
|
56
|
+
:valid="!error"
|
|
57
|
+
label="Start time"
|
|
58
|
+
@change:text="error = $event.target.badInput ? 'Enter a time as hh.mm' : ''"
|
|
59
|
+
/>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Every commit of typed text fires `change:text` with the text as typed
|
|
63
|
+
(`{ start, end }` under `range`), whether or not it changed the value.
|
|
64
|
+
|
|
65
|
+
## The columns
|
|
66
|
+
|
|
67
|
+
The clock button at the field's trailing edge, or Alt+ArrowDown in the input,
|
|
68
|
+
opens the columns: hours and minutes side by side, and an AM/PM column in a
|
|
69
|
+
12-hour format. The panel is a dialog: focus moves onto the hour column —
|
|
70
|
+
the value's hour, or the current hour when the field is empty — and Tab
|
|
71
|
+
cycles through the columns and the Now button (`show-now`) until the panel
|
|
72
|
+
closes.
|
|
73
|
+
|
|
74
|
+
Every pick commits at once and the panel stays open, so the hour can be fixed
|
|
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:
|
|
77
|
+
it opens there and returns there after each pick, and so does a minute a pick
|
|
78
|
+
fills in. Scrolling a column only looks; it never picks. Picking into an empty field fills in the rest:
|
|
79
|
+
minute `00`, and the hour the hour column rests on. Moving in a column is
|
|
80
|
+
picking — each arrow key press commits, so a `change` handler doing network
|
|
81
|
+
work should debounce.
|
|
82
|
+
|
|
83
|
+
| Key | In a column |
|
|
84
|
+
| ------------------- | ------------------------------------------ |
|
|
85
|
+
| ArrowUp / ArrowDown | Previous / next row |
|
|
86
|
+
| Home / End | First / last row |
|
|
87
|
+
| PageUp / PageDown | Five rows up / down |
|
|
88
|
+
| Space | Pick the focused row |
|
|
89
|
+
| Enter | Pick the focused row and close |
|
|
90
|
+
| Escape | Close; what was picked stays |
|
|
91
|
+
| Tab | Next column (the end switch under `range`) |
|
|
92
|
+
|
|
93
|
+
Focus returns to the input when the panel closes.
|
|
94
|
+
|
|
95
|
+
## Minute step
|
|
96
|
+
|
|
97
|
+
`minute-step` spaces the minute column's rows: `15` lists `00`, `15`, `30`
|
|
98
|
+
and `45`. It only shapes the column — a typed `14.07` commits as `14:07` and
|
|
99
|
+
shows as an extra row between `00` and `15`. Require a step with your own
|
|
100
|
+
validation if it matters.
|
|
101
|
+
|
|
102
|
+
## Min and max
|
|
103
|
+
|
|
104
|
+
`min` and `max` are ISO `HH:mm` times. Rows outside them are disabled — an
|
|
105
|
+
hour only when none of its minutes fit — and a typed time outside them is bad
|
|
106
|
+
input. A pick never leaves them: picking hour 9 at `10:15` with `min="09:30"`
|
|
107
|
+
commits `09:30`. A `min` later than `max` is not a range across midnight; it
|
|
108
|
+
is ignored with a console warning.
|
|
109
|
+
|
|
110
|
+
## Ranges
|
|
111
|
+
|
|
112
|
+
With `range` the field holds two inputs, the start and the end, in one field
|
|
113
|
+
box, and the panel shows a Start | End switch above the columns. It opens on
|
|
114
|
+
the end last typed in; each end commits on its own as it is picked.
|
|
115
|
+
|
|
116
|
+
An end earlier than the start is an **overnight range** — `22:00` to `06:00`
|
|
117
|
+
spans midnight — and is kept as it is, never swapped or flagged. Where a range
|
|
118
|
+
must stay within one day, check it in your validation; ISO times compare
|
|
119
|
+
correctly as strings:
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
const sameDay =
|
|
123
|
+
!value || !value.start || !value.end || value.start <= value.end;
|
|
124
|
+
```
|
|
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
|
+
|
|
142
|
+
## Texts
|
|
143
|
+
|
|
144
|
+
The AM and PM texts come from `texts` when given, then from the browser's
|
|
145
|
+
`Intl` data for the page's `lang`, then from the English built-ins — so a page
|
|
146
|
+
with `<html lang="fi">` shows `ap.` and `ip.` without any configuration. The
|
|
147
|
+
button, column and range labels are English unless `texts` replaces them. Set
|
|
148
|
+
them app-wide with `applyDefaults({ 'c-time-picker': { texts } })`.
|
|
149
|
+
|
|
150
|
+
## Narrow viewports
|
|
151
|
+
|
|
152
|
+
On a viewport narrower than 760px the columns open as a **fullscreen panel**:
|
|
153
|
+
a heading row with the field's `label` and a close button above the columns.
|
|
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.
|
|
165
|
+
|
|
166
|
+
## Related
|
|
167
|
+
|
|
168
|
+
`c-date-picker` is the same field for calendar dates. `c-text-field
|
|
169
|
+
type="time"` remains the browser's own time input — no columns, the browser's
|
|
170
|
+
format, and no ranges.
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
--color-on-surface: var(--c-on-surface);
|
|
33
33
|
--color-on-surface-muted: var(--c-on-surface-muted);
|
|
34
34
|
--color-on-surface-faint: var(--c-on-surface-faint);
|
|
35
|
+
--color-on-surface-disabled: var(--c-on-surface-disabled);
|
|
35
36
|
--color-on-surface-sunken: var(--c-on-surface-sunken);
|
|
36
37
|
--color-border: var(--c-border);
|
|
37
38
|
--color-border-strong: var(--c-border-strong);
|
|
@@ -170,6 +170,7 @@
|
|
|
170
170
|
--c-on-surface: var(--c-primary-900);
|
|
171
171
|
--c-on-surface-muted: var(--c-tertiary-500);
|
|
172
172
|
--c-on-surface-faint: var(--c-tertiary-500);
|
|
173
|
+
--c-on-surface-disabled: var(--c-tertiary-300);
|
|
173
174
|
--c-on-surface-sunken: var(--c-primary-700);
|
|
174
175
|
--c-border: var(--c-tertiary-200);
|
|
175
176
|
--c-border-strong: var(--c-tertiary-600);
|
|
@@ -268,6 +269,7 @@
|
|
|
268
269
|
--c-on-surface: var(--c-slate-100);
|
|
269
270
|
--c-on-surface-muted: var(--c-slate-300);
|
|
270
271
|
--c-on-surface-faint: var(--c-slate-400);
|
|
272
|
+
--c-on-surface-disabled: var(--c-slate-500);
|
|
271
273
|
--c-on-surface-sunken: var(--c-slate-100);
|
|
272
274
|
--c-border: var(--c-slate-700);
|
|
273
275
|
--c-border-strong: var(--c-slate-400);
|
|
@@ -367,6 +369,7 @@
|
|
|
367
369
|
--c-on-surface: var(--c-slate-100);
|
|
368
370
|
--c-on-surface-muted: var(--c-slate-300);
|
|
369
371
|
--c-on-surface-faint: var(--c-slate-400);
|
|
372
|
+
--c-on-surface-disabled: var(--c-slate-500);
|
|
370
373
|
--c-on-surface-sunken: var(--c-slate-100);
|
|
371
374
|
--c-border: var(--c-slate-700);
|
|
372
375
|
--c-border-strong: var(--c-slate-400);
|
|
@@ -472,6 +475,7 @@
|
|
|
472
475
|
--c-on-surface: var(--c-slate-100);
|
|
473
476
|
--c-on-surface-muted: var(--c-slate-300);
|
|
474
477
|
--c-on-surface-faint: var(--c-slate-400);
|
|
478
|
+
--c-on-surface-disabled: var(--c-slate-500);
|
|
475
479
|
--c-on-surface-sunken: var(--c-slate-100);
|
|
476
480
|
--c-border: var(--c-slate-700);
|
|
477
481
|
--c-border-strong: var(--c-slate-400);
|
|
@@ -571,6 +575,7 @@
|
|
|
571
575
|
--c-on-surface: var(--c-primary-900);
|
|
572
576
|
--c-on-surface-muted: var(--c-tertiary-500);
|
|
573
577
|
--c-on-surface-faint: var(--c-tertiary-500);
|
|
578
|
+
--c-on-surface-disabled: var(--c-tertiary-300);
|
|
574
579
|
--c-on-surface-sunken: var(--c-primary-700);
|
|
575
580
|
--c-border: var(--c-tertiary-200);
|
|
576
581
|
--c-border-strong: var(--c-tertiary-600);
|
|
@@ -675,6 +680,7 @@
|
|
|
675
680
|
--c-on-surface: var(--c-primary-900);
|
|
676
681
|
--c-on-surface-muted: var(--c-tertiary-500);
|
|
677
682
|
--c-on-surface-faint: var(--c-tertiary-500);
|
|
683
|
+
--c-on-surface-disabled: var(--c-tertiary-300);
|
|
678
684
|
--c-on-surface-sunken: var(--c-primary-700);
|
|
679
685
|
--c-border: var(--c-tertiary-200);
|
|
680
686
|
--c-border-strong: var(--c-tertiary-600);
|
|
@@ -774,6 +780,7 @@
|
|
|
774
780
|
--c-on-surface: var(--c-slate-100);
|
|
775
781
|
--c-on-surface-muted: var(--c-slate-300);
|
|
776
782
|
--c-on-surface-faint: var(--c-slate-400);
|
|
783
|
+
--c-on-surface-disabled: var(--c-slate-500);
|
|
777
784
|
--c-on-surface-sunken: var(--c-slate-100);
|
|
778
785
|
--c-border: var(--c-slate-700);
|
|
779
786
|
--c-border-strong: var(--c-slate-400);
|
|
@@ -933,6 +940,7 @@ c-tabs:not(:defined),
|
|
|
933
940
|
c-tag:not(:defined),
|
|
934
941
|
c-tags:not(:defined),
|
|
935
942
|
c-text-field:not(:defined),
|
|
943
|
+
c-time-picker:not(:defined),
|
|
936
944
|
c-toast:not(:defined),
|
|
937
945
|
c-toasts:not(:defined),
|
|
938
946
|
c-toolbar:not(:defined),
|
|
@@ -318,6 +318,26 @@
|
|
|
318
318
|
"name": "::part(option)",
|
|
319
319
|
"description": "One month or year in the list"
|
|
320
320
|
},
|
|
321
|
+
{
|
|
322
|
+
"name": "::part(step-label)",
|
|
323
|
+
"description": "The label above the current list under `type=\"month\"`: month or year, and under `range` start or end"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "::part(step-summary)",
|
|
327
|
+
"description": "A finished step under `type=\"month\"`, its label and pick; pressing it returns to that step"
|
|
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
|
+
},
|
|
321
341
|
{
|
|
322
342
|
"name": "::part(root)",
|
|
323
343
|
"description": "The separator line element itself"
|
|
@@ -518,6 +538,14 @@
|
|
|
518
538
|
"description": "The inner c-icon-button carrying the menu icon"
|
|
519
539
|
},
|
|
520
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
|
+
},
|
|
521
549
|
{
|
|
522
550
|
"name": "::part(root)",
|
|
523
551
|
"description": "The wrapper laying out the label, the digit inputs and the message"
|
|
@@ -828,6 +856,60 @@
|
|
|
828
856
|
"name": "::part(mask-guide)",
|
|
829
857
|
"description": "The faint rest of the input mask, shown behind the typed text"
|
|
830
858
|
},
|
|
859
|
+
{
|
|
860
|
+
"name": "::part(input)",
|
|
861
|
+
"description": "The text input; under `range` both the start and the end input"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"name": "::part(separator)",
|
|
865
|
+
"description": "The dash between the start and end inputs under `range`"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"name": "::part(panel)",
|
|
869
|
+
"description": "The top-layer popover container anchored below the field"
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"name": "::part(card)",
|
|
873
|
+
"description": "The dialog surface inside the panel holding the columns"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"name": "::part(heading-row)",
|
|
877
|
+
"description": "The top row of the fullscreen panel (narrow viewports): the field label as heading and the close button"
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"name": "::part(heading)",
|
|
881
|
+
"description": "The field label naming the fullscreen panel"
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"name": "::part(close)",
|
|
885
|
+
"description": "The close button of the fullscreen panel"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"name": "::part(end-switch)",
|
|
889
|
+
"description": "The Start | End switch above the columns under `range`"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"name": "::part(end-tab)",
|
|
893
|
+
"description": "One end's button in the end switch"
|
|
894
|
+
},
|
|
895
|
+
{ "name": "::part(columns)", "description": "The row of time columns" },
|
|
896
|
+
{
|
|
897
|
+
"name": "::part(column)",
|
|
898
|
+
"description": "One time column: hours, minutes or AM/PM"
|
|
899
|
+
},
|
|
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
|
+
},
|
|
831
913
|
{
|
|
832
914
|
"name": "::part(root)",
|
|
833
915
|
"description": "The toast's outer box: the inverted-surface pill carrying the shadow"
|