input-duration 3.1.0 → 3.2.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 CHANGED
@@ -69,7 +69,7 @@ The control's styles are scoped inside its Shadow DOM, so global styles and rese
69
69
  </a> ·
70
70
  <a href="https://6mxpg2.csb.app/" target="_blank">Fiddle's Output</a>
71
71
  ·
72
- <a href="https://stephanluis.github.io/input-duration/" target="_blank">Docs</a>
72
+ <a href="https://stephanluis.github.io/input-duration/InputDuration.html" target="_blank">API Docs</a>
73
73
  ·
74
74
  <a href="https://github.com/StephanLuis/input-duration/issues">Bugs</a>
75
75
  ·
@@ -254,6 +254,22 @@ input-duration requires a `<input-duration>` element . There's no more HTML tha
254
254
 
255
255
  ```
256
256
 
257
+ Individual duration fields can be hidden with boolean attributes:
258
+
259
+ ```html
260
+ <input-duration no-hours no-minutes no-seconds no-microseconds></input-duration>
261
+ ```
262
+
263
+ Use `hideHours()`, `hideMinutes()`, `hideSeconds()`, and `hideMicroSeconds()` to hide fields, and the corresponding `show*()` methods to show them again. The existing `noHours()`, `noMinutes()`, `noSeconds()`, and `noMicroSeconds()` methods remain available as aliases for the `hide*()` methods. Hidden fields do not change the component's `HH:mm:ss.SSS` value format.
264
+
265
+ Customize the separators with the `hours-divider`, `minutes-divider`, `seconds-divider`, and `microseconds-divider` attributes. The first three replace the separators between fields; `microseconds-divider` adds an optional suffix after milliseconds. For example:
266
+
267
+ ```html
268
+ <input-duration hours-divider="h " minutes-divider="m " seconds-divider="s " microseconds-divider="ms"></input-duration>
269
+ ```
270
+
271
+ The equivalent methods are `setHoursDivider(text)`, `setMinutesDivider(text)`, `setSecondsDivider(text)`, and `setMicroSecondsDivider(text)`. Pass text as a string; it is rendered as text, not HTML. Remove an attribute to restore its default separator (or remove the milliseconds suffix).
272
+
257
273
  If you would like to get or set values or to disable input-duration elemet, javascipt can do that:
258
274
 
259
275
  ```sh
@@ -300,7 +316,7 @@ document.querySelector('#bob').disable()
300
316
  ```
301
317
  so the inputs are modified.
302
318
 
303
- _For more documentation, please refer to the jscocs on [input-duration Docs](https://stephanluis.github.io/input-duration/)_
319
+ For the generated JSDoc API reference, see the [input-duration API documentation](https://stephanluis.github.io/input-duration/InputDuration.html).
304
320
 
305
321
  <p align="right">(<a href="#top">back to top</a>)</p>
306
322