@jobber/components 8.1.1 → 8.3.0

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.
Files changed (52) hide show
  1. package/dist/Autocomplete/Autocomplete.d.ts +2 -3
  2. package/dist/Autocomplete/Autocomplete.types.d.ts +4 -9
  3. package/dist/Autocomplete/index.cjs +7 -8
  4. package/dist/Autocomplete/index.d.ts +3 -4
  5. package/dist/Autocomplete/index.mjs +6 -7
  6. package/dist/DataList/components/DataListSearch/index.cjs +1 -2
  7. package/dist/DataList/components/DataListSearch/index.mjs +1 -2
  8. package/dist/DataList/index.cjs +1 -2
  9. package/dist/DataList/index.mjs +1 -2
  10. package/dist/DataListSearch-cjs.js +12 -6
  11. package/dist/DataListSearch-es.js +11 -5
  12. package/dist/InputDate/index.cjs +1 -2
  13. package/dist/InputDate/index.mjs +1 -2
  14. package/dist/InputDate-cjs.js +2 -2
  15. package/dist/InputDate-es.js +2 -2
  16. package/dist/InputText/InputText.d.ts +2 -70
  17. package/dist/InputText/InputText.types.d.ts +2 -30
  18. package/dist/InputText/index.cjs +12 -268
  19. package/dist/InputText/index.d.ts +2 -5
  20. package/dist/InputText/index.mjs +11 -271
  21. package/dist/InputText/useInputTextActions.d.ts +2 -2
  22. package/dist/InputText-cjs.js +199 -0
  23. package/dist/InputText-es.js +197 -0
  24. package/dist/docs/Autocomplete/AutocompleteV1.md +1 -2
  25. package/dist/docs/Autocomplete/AutocompleteV2.md +1 -1
  26. package/dist/docs/Banner/Banner.md +2 -2
  27. package/dist/docs/Box/Box.md +2 -2
  28. package/dist/docs/Countdown/Countdown.md +0 -1
  29. package/dist/docs/Glimmer/Glimmer.md +1 -1
  30. package/dist/docs/Icon/Icon.md +1 -1
  31. package/dist/docs/InputText/InputText.md +152 -106
  32. package/dist/docs/Menu/Menu.md +1 -1
  33. package/dist/docs/Modal/Modal.md +1 -1
  34. package/dist/docs/Stack/Stack.md +1 -1
  35. package/dist/docs/index.md +0 -1
  36. package/dist/docs/usage-guidelines/usage-guidelines.md +0 -2
  37. package/dist/index.cjs +2 -4
  38. package/dist/index.d.mts +0 -1
  39. package/dist/index.d.ts +0 -1
  40. package/dist/index.mjs +1 -2
  41. package/dist/utils/meta/meta.json +0 -1
  42. package/package.json +2 -7
  43. package/FormatTime.d.ts +0 -1
  44. package/FormatTime.js +0 -17
  45. package/dist/FormatTime/FormatTime.d.ts +0 -15
  46. package/dist/FormatTime/index.cjs +0 -8
  47. package/dist/FormatTime/index.d.ts +0 -1
  48. package/dist/FormatTime/index.mjs +0 -2
  49. package/dist/FormatTime-cjs.js +0 -24
  50. package/dist/FormatTime-es.js +0 -22
  51. package/dist/InputText/InputText.rebuilt.d.ts +0 -3
  52. package/dist/docs/FormatTime/FormatTime.md +0 -32
@@ -1,22 +0,0 @@
1
- import React__default from 'react';
2
-
3
- function FormatTime({ time: inputTime, use24HourClock, }) {
4
- let dateObject;
5
- if (inputTime instanceof Date) {
6
- dateObject = inputTime;
7
- }
8
- else {
9
- dateObject = new Date(inputTime);
10
- }
11
- return React__default.createElement(React__default.Fragment, null, dateToLocaleTimeString(dateObject, use24HourClock));
12
- }
13
- function dateToLocaleTimeString(date, use24HourClock) {
14
- const language = (globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) ? navigator.language : "en";
15
- return date.toLocaleTimeString(language, {
16
- hourCycle: use24HourClock ? "h23" : "h12",
17
- minute: "2-digit",
18
- hour: "numeric",
19
- });
20
- }
21
-
22
- export { FormatTime as F };
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- import type { InputTextRebuiltProps } from "./InputText.types";
3
- export declare const InputTextSPAR: React.ForwardRefExoticComponent<InputTextRebuiltProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
@@ -1,32 +0,0 @@
1
- # FormatTime
2
-
3
- In Jobber a FormatTime is used to ensure that time is displayed in the expected
4
- format. No text styling is applied, this simply formats the text.
5
-
6
- ## Specify format
7
-
8
- You can select a specific format to use in FormatTime.
9
-
10
- In the following example, we create a new `Date` object and set its time to
11
- 22:35:00 (10:35 PM) using the `setHours` method. The `setHours` method sets the
12
- hours, minutes, seconds, and milliseconds for a specified date.
13
-
14
- ```tsx
15
- const newDate = new Date();
16
- newDate.setHours(22, 35, 0, 0);
17
-
18
- <FormatTime time={newDate} use24HourClock={true} /> // prints 22:35
19
-
20
- <FormatTime time={newDate} use24HourClock={false} /> // prints 10:35 PM
21
-
22
- ```
23
-
24
-
25
- ## Props
26
-
27
- ### Web
28
-
29
- | Prop | Type | Required | Default | Description |
30
- |------|------|----------|---------|-------------|
31
- | `time` | `Date | string` | Yes | — | Time (as JS Date) to be displayed. A `string` should be an ISO 8601 format date string. |
32
- | `use24HourClock` | `boolean` | No | — | Optionally specify clock format. If `undefined` system format will be respected. |