input-duration 3.0.0 → 3.0.1
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/README.md +4 -0
- package/docs/index.html +259 -189
- package/index.js +66 -59
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,7 +49,11 @@
|
|
|
49
49
|
|
|
50
50
|
Use `input-duration` when users need to enter a duration rather than a time of day: for example, a countdown, elapsed-time limit, or media offset. Its displayed value uses `HH:mm:ss.SSS` on every locale, without a locale-specific AM/PM presentation, and supports durations greater than 24 hours (currently up to 99 hours) with millisecond values, such as `30:00:00.125`.
|
|
51
51
|
|
|
52
|
+
HTML's built-in `<input type="time">` is for choosing a time of day, not entering elapsed time. HTML does not provide a native duration input with a fixed `HH:mm:ss.SSS` format or support for values over 24 hours; this web component fills that gap.
|
|
53
|
+
|
|
52
54
|
The component supplies its own segmented layout instead of the browser's native time-picker UI, so the displayed format does not change with browser or locale. It is built from native number inputs, however, so details such as the on-screen keyboard and interaction can still vary by device and browser; this is consistency of the value's presentation, not a guarantee of pixel-identical rendering. Milliseconds can be entered as three digits; the input's step controls increment in 10 ms intervals.
|
|
55
|
+
|
|
56
|
+
The control's styles are scoped inside its Shadow DOM, so global styles and resets from Tailwind or other CSS libraries do not leak into its internal layout. The control inherits its font and text color from its surrounding page.
|
|
53
57
|
<br>
|
|
54
58
|
<p>
|
|
55
59
|
<div>
|
package/docs/index.html
CHANGED
|
@@ -1,196 +1,266 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<meta name="description" content="A tiny demo of why a time-of-day input is not the same thing as a duration input.">
|
|
7
|
+
<title>Time is not a duration — input-duration</title>
|
|
8
|
+
<style>
|
|
9
|
+
:root {
|
|
10
|
+
color-scheme: light;
|
|
11
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
12
|
+
color: #17201c;
|
|
13
|
+
background: #f5f7f3;
|
|
14
|
+
font-synthesis: none;
|
|
15
|
+
text-rendering: optimizeLegibility;
|
|
16
|
+
--green: #176b4a;
|
|
17
|
+
--muted: #64716a;
|
|
18
|
+
--line: #dce4dd;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
* {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
min-width: 320px;
|
|
27
|
+
margin: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
main {
|
|
31
|
+
width: min(100% - 40px, 960px);
|
|
32
|
+
margin: 0 auto;
|
|
33
|
+
padding: 48px 0 32px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
header {
|
|
37
|
+
max-width: 720px;
|
|
38
|
+
margin: 0 auto 34px;
|
|
39
|
+
text-align: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.eyebrow {
|
|
43
|
+
margin: 0 0 14px;
|
|
44
|
+
color: var(--green);
|
|
45
|
+
font-size: .78rem;
|
|
46
|
+
font-weight: 750;
|
|
47
|
+
letter-spacing: .12em;
|
|
48
|
+
text-transform: uppercase;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
h1 {
|
|
52
|
+
margin: 0;
|
|
53
|
+
font-size: clamp(2.35rem, 7vw, 4.5rem);
|
|
54
|
+
letter-spacing: -.065em;
|
|
55
|
+
line-height: 1.02;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.intro {
|
|
59
|
+
max-width: 610px;
|
|
60
|
+
margin: 20px auto 0;
|
|
61
|
+
color: var(--muted);
|
|
62
|
+
font-size: 1.08rem;
|
|
63
|
+
line-height: 1.6;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.scenario {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
margin-top: 20px;
|
|
69
|
+
padding: 10px 15px;
|
|
70
|
+
border: 1px solid #d6e8dc;
|
|
71
|
+
border-radius: 999px;
|
|
72
|
+
background: #eaf4ed;
|
|
73
|
+
color: #25513b;
|
|
74
|
+
font-size: .95rem;
|
|
75
|
+
font-weight: 650;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.comparison {
|
|
79
|
+
display: grid;
|
|
80
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
81
|
+
gap: 18px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
article {
|
|
85
|
+
display: flex;
|
|
86
|
+
min-height: 300px;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
align-items: flex-start;
|
|
89
|
+
padding: 26px;
|
|
90
|
+
border: 1px solid var(--line);
|
|
91
|
+
border-radius: 18px;
|
|
92
|
+
background: #fff;
|
|
93
|
+
box-shadow: 0 12px 32px rgb(23 32 28 / 5%);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
article.duration {
|
|
97
|
+
border-color: #b7d9c4;
|
|
98
|
+
box-shadow: 0 12px 32px rgb(23 107 74 / 9%);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.card-label {
|
|
102
|
+
margin: 0 0 8px;
|
|
103
|
+
color: var(--muted);
|
|
104
|
+
font-size: .76rem;
|
|
105
|
+
font-weight: 750;
|
|
106
|
+
letter-spacing: .1em;
|
|
107
|
+
text-transform: uppercase;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
h2 {
|
|
111
|
+
margin: 0;
|
|
112
|
+
font-size: 1.45rem;
|
|
113
|
+
letter-spacing: -.03em;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.card-copy {
|
|
117
|
+
min-height: 52px;
|
|
118
|
+
margin: 10px 0 20px;
|
|
119
|
+
color: var(--muted);
|
|
120
|
+
line-height: 1.5;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.field {
|
|
124
|
+
display: flex;
|
|
125
|
+
min-height: 54px;
|
|
126
|
+
align-items: center;
|
|
127
|
+
margin: 0 0 18px;
|
|
128
|
+
padding: 8px 12px;
|
|
129
|
+
border: 1px solid #bdc9c0;
|
|
130
|
+
border-radius: 10px;
|
|
131
|
+
background: #fff;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
input[type="time"] {
|
|
135
|
+
width: 100%;
|
|
136
|
+
border: 0;
|
|
137
|
+
background: transparent;
|
|
138
|
+
color: inherit;
|
|
139
|
+
font: inherit;
|
|
140
|
+
font-size: 1.2rem;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
input[type="time"]:focus-visible {
|
|
144
|
+
outline: 2px solid var(--green);
|
|
145
|
+
outline-offset: 3px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
input-duration {
|
|
149
|
+
display: block;
|
|
150
|
+
max-width: 100%;
|
|
151
|
+
font-size: 1.2rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.result {
|
|
155
|
+
margin: auto 0 0;
|
|
156
|
+
color: #33463a;
|
|
157
|
+
font-size: .94rem;
|
|
158
|
+
line-height: 1.5;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.result strong {
|
|
162
|
+
color: #a23e2c;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.duration .result strong {
|
|
166
|
+
color: var(--green);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
footer {
|
|
170
|
+
margin-top: 28px;
|
|
171
|
+
color: var(--muted);
|
|
172
|
+
font-size: .92rem;
|
|
173
|
+
line-height: 1.6;
|
|
174
|
+
text-align: center;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
a {
|
|
178
|
+
color: var(--green);
|
|
179
|
+
font-weight: 650;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@media (max-width: 650px) {
|
|
183
|
+
main {
|
|
184
|
+
width: min(100% - 28px, 480px);
|
|
185
|
+
padding-top: 34px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.comparison {
|
|
189
|
+
grid-template-columns: 1fr;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
article {
|
|
193
|
+
min-height: 270px;
|
|
194
|
+
padding: 22px;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
</style>
|
|
33
198
|
</head>
|
|
34
|
-
|
|
35
199
|
<body>
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<dt class="tag-author">Author:</dt>
|
|
111
|
-
<dd class="tag-author">
|
|
112
|
-
<ul>
|
|
113
|
-
<li>Stephan Luis</li>
|
|
114
|
-
</ul>
|
|
115
|
-
</dd>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<dt class="tag-copyright">Copyright:</dt>
|
|
120
|
-
<dd class="tag-copyright"><ul class="dummy"><li>MIT License, Copyright (c) 2022</li></ul></dd>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<dt class="tag-source">Source:</dt>
|
|
129
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
130
|
-
<a href="index.js.html">index.js</a>, <a href="index.js.html#line1">line 1</a>
|
|
131
|
-
</li></ul></dd>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<dt class="tag-see">See:</dt>
|
|
138
|
-
<dd class="tag-see">
|
|
139
|
-
<ul>
|
|
140
|
-
<li><a href="https://www.npmjs.com/package/input-duration">NPM input-duration</a></li>
|
|
141
|
-
|
|
142
|
-
<li><a href="https://github.com/StephanLuis/input-duration">GitHub input-duration</a></li>
|
|
143
|
-
</ul>
|
|
144
|
-
</dd>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</dl>
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
</div>
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
</article>
|
|
175
|
-
|
|
176
|
-
</section>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
</div>
|
|
182
|
-
|
|
183
|
-
<nav>
|
|
184
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="InputDuration.html">InputDuration</a></li></ul>
|
|
185
|
-
</nav>
|
|
186
|
-
|
|
187
|
-
<br class="clear">
|
|
188
|
-
|
|
189
|
-
<footer>
|
|
190
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Fri Sep 29 2023 11:02:59 GMT+0000 (GMT)
|
|
191
|
-
</footer>
|
|
192
|
-
|
|
193
|
-
<script> prettyPrint(); </script>
|
|
194
|
-
<script src="scripts/linenumber.js"> </script>
|
|
200
|
+
<main>
|
|
201
|
+
<header>
|
|
202
|
+
<p class="eyebrow">A small input, a very different question</p>
|
|
203
|
+
<h1>Time is not a duration.</h1>
|
|
204
|
+
<p class="intro">You need to set a maintenance window. It’ll take 30 hours. Surely a time picker can handle that?</p>
|
|
205
|
+
<p class="scenario">The task: run for 30 hours</p>
|
|
206
|
+
</header>
|
|
207
|
+
|
|
208
|
+
<section class="comparison" aria-label="Compare a time-of-day input with a duration input">
|
|
209
|
+
<article>
|
|
210
|
+
<p class="card-label">The time picker</p>
|
|
211
|
+
<h2>“What time is it?”</h2>
|
|
212
|
+
<p class="card-copy">HTML's built-in time input asks for a time of day—not an elapsed duration. The clock has other plans.</p>
|
|
213
|
+
<label class="field" for="clock-time">
|
|
214
|
+
<input id="clock-time" type="time" value="06:00" step="60">
|
|
215
|
+
</label>
|
|
216
|
+
<p class="result" id="clock-result" aria-live="polite">06:00 is a time of day—not how long the task takes.</p>
|
|
217
|
+
</article>
|
|
218
|
+
|
|
219
|
+
<article class="duration">
|
|
220
|
+
<p class="card-label">The duration input</p>
|
|
221
|
+
<h2>“How long does it take?”</h2>
|
|
222
|
+
<p class="card-copy">HTML has no built-in duration input. This one handles 30 hours, with a fixed HH:mm:ss.SSS display.</p>
|
|
223
|
+
<input-duration id="duration" role="group" aria-label="Duration in hours, minutes, seconds, and milliseconds" value="30:00:00.000"></input-duration>
|
|
224
|
+
<p class="result" id="duration-result" aria-live="polite"><strong>30:00:00.000</strong> — a 30-hour duration, exactly as requested.</p>
|
|
225
|
+
</article>
|
|
226
|
+
</section>
|
|
227
|
+
|
|
228
|
+
<footer>
|
|
229
|
+
Native HTML time inputs are for times of day; HTML has no built-in control for entering a duration like 30:00:00.000.
|
|
230
|
+
That's the gap <a href="InputDuration.html">input-duration</a> fills. Read the
|
|
231
|
+
<a href="https://github.com/StephanLuis/input-duration">source on GitHub</a>.
|
|
232
|
+
</footer>
|
|
233
|
+
</main>
|
|
234
|
+
<script type="module">
|
|
235
|
+
import '../index.js';
|
|
236
|
+
|
|
237
|
+
const clockInput = document.querySelector('#clock-time');
|
|
238
|
+
const clockResult = document.querySelector('#clock-result');
|
|
239
|
+
const durationInput = document.querySelector('#duration');
|
|
240
|
+
const durationResult = document.querySelector('#duration-result');
|
|
241
|
+
|
|
242
|
+
clockInput.addEventListener('input', () => {
|
|
243
|
+
clockResult.textContent = clockInput.value
|
|
244
|
+
? `${clockInput.value} is a time of day—not how long the task takes.`
|
|
245
|
+
: 'No time picked. Still not a duration.';
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
const updateDurationResult = () => {
|
|
249
|
+
const value = durationInput.value;
|
|
250
|
+
if (/^[0-9]{2}:[0-5][0-9]:[0-5][0-9]\.[0-9]{3}$/.test(value)) {
|
|
251
|
+
const formattedValue = document.createElement('strong');
|
|
252
|
+
formattedValue.textContent = value;
|
|
253
|
+
durationResult.replaceChildren(
|
|
254
|
+
formattedValue,
|
|
255
|
+
document.createTextNode(' — a duration, exactly as requested.')
|
|
256
|
+
);
|
|
257
|
+
} else {
|
|
258
|
+
durationResult.textContent = 'Keep going—finish entering the duration.';
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
durationInput.addEventListener('input', updateDurationResult);
|
|
263
|
+
durationInput.addEventListener('change', updateDurationResult);
|
|
264
|
+
</script>
|
|
195
265
|
</body>
|
|
196
266
|
</html>
|
package/index.js
CHANGED
|
@@ -256,82 +256,89 @@ class InputDuration extends HTMLElement {
|
|
|
256
256
|
</svg>
|
|
257
257
|
</div>
|
|
258
258
|
<style>
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
:host {
|
|
260
|
+
display: inline-block;
|
|
261
|
+
color: inherit;
|
|
262
|
+
font: inherit;
|
|
263
|
+
vertical-align: middle;
|
|
261
264
|
}
|
|
262
265
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
266
|
+
.timeCase {
|
|
267
|
+
display: inline-flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
gap: 0.08em;
|
|
270
|
+
max-width: 100%;
|
|
271
|
+
padding: 0.4em 0.55em;
|
|
272
|
+
border: 1px solid #9aa6b2;
|
|
273
|
+
border-radius: 0.4em;
|
|
274
|
+
background: transparent;
|
|
275
|
+
color: inherit;
|
|
276
|
+
font-variant-numeric: tabular-nums;
|
|
277
|
+
line-height: 1.4;
|
|
278
|
+
white-space: nowrap;
|
|
272
279
|
}
|
|
273
280
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
width: 15px;
|
|
279
|
-
padding-top:1px;
|
|
281
|
+
.timeCase:focus-within {
|
|
282
|
+
border-color: #176b4a;
|
|
283
|
+
outline: 3px solid #176b4a;
|
|
284
|
+
outline-offset: 2px;
|
|
280
285
|
}
|
|
281
286
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
287
|
+
.timeCase input {
|
|
288
|
+
box-sizing: content-box;
|
|
289
|
+
width: 2ch;
|
|
290
|
+
min-width: 2ch;
|
|
291
|
+
margin: 0;
|
|
292
|
+
padding: 0;
|
|
293
|
+
border: 0;
|
|
294
|
+
outline: 0;
|
|
295
|
+
background: transparent;
|
|
296
|
+
color: inherit;
|
|
297
|
+
font: inherit;
|
|
298
|
+
font-variant-numeric: tabular-nums;
|
|
299
|
+
text-align: center;
|
|
300
|
+
caret-color: transparent;
|
|
301
|
+
appearance: textfield;
|
|
285
302
|
}
|
|
286
303
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
/* Chrome, Safari, Edge, Opera */
|
|
291
|
-
|
|
292
|
-
input::-webkit-outer-spin-button,
|
|
293
|
-
input::-webkit-inner-spin-button {
|
|
294
|
-
-webkit-appearance: none;
|
|
295
|
-
margin: 0;
|
|
304
|
+
.timeCase input.D3 {
|
|
305
|
+
width: 3ch;
|
|
306
|
+
min-width: 3ch;
|
|
296
307
|
}
|
|
297
308
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
/* -moz-appearance: textfield; */
|
|
303
|
-
-moz-appearance: textarea;
|
|
304
|
-
-webkit-appearance: textarea;
|
|
309
|
+
.timeCase input::-webkit-outer-spin-button,
|
|
310
|
+
.timeCase input::-webkit-inner-spin-button {
|
|
311
|
+
margin: 0;
|
|
312
|
+
appearance: none;
|
|
305
313
|
}
|
|
306
314
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
padding: 2px;
|
|
315
|
+
.timeCase span {
|
|
316
|
+
color: currentColor;
|
|
317
|
+
opacity: 0.7;
|
|
311
318
|
}
|
|
312
319
|
|
|
320
|
+
#svgContainer {
|
|
321
|
+
display: inline-flex;
|
|
322
|
+
width: 1em;
|
|
323
|
+
height: 1em;
|
|
324
|
+
flex: 0 0 auto;
|
|
325
|
+
align-items: center;
|
|
326
|
+
justify-content: center;
|
|
327
|
+
margin-left: 0.2em;
|
|
328
|
+
color: inherit;
|
|
329
|
+
}
|
|
313
330
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
/* between digit span */
|
|
319
|
-
.bds{
|
|
320
|
-
padding-bottom: 1px;
|
|
331
|
+
#svgContainer svg {
|
|
332
|
+
display: block;
|
|
333
|
+
width: 100%;
|
|
334
|
+
height: 100%;
|
|
321
335
|
}
|
|
322
336
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
color: black;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
*:disabled {
|
|
332
|
-
background-color: grey;
|
|
333
|
-
color: lightgrey;
|
|
334
|
-
opacity: .6;
|
|
337
|
+
.timeCase input:disabled {
|
|
338
|
+
background: transparent;
|
|
339
|
+
color: GrayText;
|
|
340
|
+
cursor: not-allowed;
|
|
341
|
+
opacity: 0.65;
|
|
335
342
|
}
|
|
336
343
|
</style> `
|
|
337
344
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "input-duration",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"author": "Stephan Luis <stephan@learnsense.org>",
|
|
5
5
|
"description": "A JavaScript web component for entering durations up to 99 hours in a fixed HH:mm:ss.SSS format, with millisecond precision for countdown timers and elapsed time.",
|
|
6
6
|
"browser": "./index.js",
|