@servicetitan/anvil2 1.42.2 → 1.43.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/CHANGELOG.md +24 -0
- package/dist/{Combobox-D2aSaDkz.js → Combobox-Ct30JT3y.js} +8 -8
- package/dist/{Combobox-D2aSaDkz.js.map → Combobox-Ct30JT3y.js.map} +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DateField-D28_sa7P.js → DateField-_TqCdcYv.js} +4 -3
- package/dist/{DateField-D28_sa7P.js.map → DateField-_TqCdcYv.js.map} +1 -1
- package/dist/DateField.js +1 -1
- package/dist/{DateFieldRange--oSGfjYa.js → DateFieldRange-Dk8WA52F.js} +2 -2
- package/dist/{DateFieldRange--oSGfjYa.js.map → DateFieldRange-Dk8WA52F.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-0a8Bk7Yj.js → DateFieldSingle-D3xD8YZk.js} +2 -2
- package/dist/{DateFieldSingle-0a8Bk7Yj.js.map → DateFieldSingle-D3xD8YZk.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-DCv9WJdu.js → DateFieldYearless-BxkCSNk5.js} +2 -2
- package/dist/{DateFieldYearless-DCv9WJdu.js.map → DateFieldYearless-BxkCSNk5.js.map} +1 -1
- package/dist/DateFieldYearless-CAUHW6Ow-EUWxJ0OY.js +1431 -0
- package/dist/DateFieldYearless-CAUHW6Ow-EUWxJ0OY.js.map +1 -0
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{Page-KN0DLtcf.js → Page-CxB5N9dR.js} +36 -36
- package/dist/{Page-KN0DLtcf.js.map → Page-CxB5N9dR.js.map} +1 -1
- package/dist/Page.css +72 -72
- package/dist/Page.js +1 -1
- package/dist/{Popover-B1HaUjGI.js → Popover-BPiqdyu1.js} +2 -2
- package/dist/{Popover-B1HaUjGI.js.map → Popover-BPiqdyu1.js.map} +1 -1
- package/dist/{Popover-CU2cGVD8-FWJOuFRj.js → Popover-CU2cGVD8-Casl3vM1.js} +2 -2
- package/dist/{Popover-CU2cGVD8-FWJOuFRj.js.map → Popover-CU2cGVD8-Casl3vM1.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/TimeField-DRHLRqN3.js +913 -0
- package/dist/TimeField-DRHLRqN3.js.map +1 -0
- package/dist/TimeField.css +10 -0
- package/dist/TimeField.d.ts +2 -0
- package/dist/TimeField.js +2 -0
- package/dist/TimeField.js.map +1 -0
- package/dist/{Toolbar-BznMJKGJ.js → Toolbar-CSWhVSUM.js} +2 -2
- package/dist/{Toolbar-BznMJKGJ.js.map → Toolbar-CSWhVSUM.js.map} +1 -1
- package/dist/Toolbar.js +1 -1
- package/dist/assets/icons/st/gnav_field_pro_active.svg +1 -1
- package/dist/assets/icons/st/gnav_field_pro_inactive.svg +1 -1
- package/dist/assets/icons/st/gnav_home_filled.svg +1 -0
- package/dist/assets/icons/st/gnav_home_outline.svg +1 -0
- package/dist/assets/icons/st.ts +2 -0
- package/dist/components/TimeField/TimeField.d.ts +53 -0
- package/dist/components/TimeField/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/event-BEJFimi3.js +6 -0
- package/dist/event-BEJFimi3.js.map +1 -0
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/usePopoverCloseDelayWorkaround-BZcjPkvT-BZcjPkvT.js +18 -0
- package/dist/usePopoverCloseDelayWorkaround-BZcjPkvT-BZcjPkvT.js.map +1 -0
- package/dist/{DateFieldYearless-C3_oGDr3-5meexzZO.js → usePopoverSupport-B9Lsqryr-DhZHMoNb.js} +470 -1429
- package/dist/usePopoverSupport-B9Lsqryr-DhZHMoNb.js.map +1 -0
- package/package.json +5 -5
- package/dist/DateFieldYearless-C3_oGDr3-5meexzZO.js.map +0 -1
- package/dist/usePopoverCloseDelayWorkaround-BhhG-xEB-hfJZaXHC.js +0 -21
- package/dist/usePopoverCloseDelayWorkaround-BhhG-xEB-hfJZaXHC.js.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TimeFieldProps as CoreTimeFieldProps, TimeFieldChange } from '@servicetitan/hammer-react';
|
|
2
|
+
import { DataTrackingId } from '../../types/DataTrackingId';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the TimeField component
|
|
5
|
+
* @property {string | null} [value] - The current value of the time field
|
|
6
|
+
* @property {string | null} [defaultValue] - The default value for uncontrolled mode
|
|
7
|
+
* @property {TimeFieldChangeHandler} [onChange] - Callback when the time value changes
|
|
8
|
+
* @property {TimeFormat} [format] - Time format to use
|
|
9
|
+
* @property {number} [step] - Time increment in minutes
|
|
10
|
+
* @property {string | null} [min] - Minimum allowed time
|
|
11
|
+
* @property {string | null} [max] - Maximum allowed time
|
|
12
|
+
* @property {boolean} [autoround] - Whether to automatically round to the nearest step
|
|
13
|
+
* @property {boolean} [disableSuggestions] - Whether to disable the dropdown suggestions
|
|
14
|
+
* @extends DataTrackingId
|
|
15
|
+
*/
|
|
16
|
+
export type TimeFieldProps = CoreTimeFieldProps & DataTrackingId;
|
|
17
|
+
/**
|
|
18
|
+
* Change event data for TimeField onChange callback.
|
|
19
|
+
*/
|
|
20
|
+
export type { TimeFieldChange };
|
|
21
|
+
/**
|
|
22
|
+
* TimeField component for entering time values with auto-rounding and suggestions.
|
|
23
|
+
*
|
|
24
|
+
* Features:
|
|
25
|
+
* - Supports 12-hour and 24-hour time formats
|
|
26
|
+
* - Min/max time constraints handled during input parsing
|
|
27
|
+
* - Auto-rounding to step intervals when autoround is true
|
|
28
|
+
* - Dropdown suggestions for quick time selection
|
|
29
|
+
* - Controlled and uncontrolled modes
|
|
30
|
+
* - Smart input masking with placeholders
|
|
31
|
+
* - Integration with MaskedTimeInput for auto-complete
|
|
32
|
+
* - Validation handled by implementors using onChange callback
|
|
33
|
+
* - Automatic tracking ID generation for analytics
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <TimeField
|
|
37
|
+
* label="Meeting Time"
|
|
38
|
+
* value="14:30"
|
|
39
|
+
* format={24}
|
|
40
|
+
* step={30}
|
|
41
|
+
* min="09:00"
|
|
42
|
+
* max="17:00"
|
|
43
|
+
* autoround
|
|
44
|
+
* disableSuggestions
|
|
45
|
+
* onChange={(change) => {
|
|
46
|
+
* // Handle time change and validation
|
|
47
|
+
* if (change.isInputEmpty && required) {
|
|
48
|
+
* // Show required error
|
|
49
|
+
* }
|
|
50
|
+
* }}
|
|
51
|
+
* />
|
|
52
|
+
*/
|
|
53
|
+
export declare const TimeField: import('react').ForwardRefExoticComponent<TimeFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TimeField';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
const SvgEvent = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M16 13h-3c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1zm0-10v1H8V3c0-.55-.45-1-1-1s-1 .45-1 1v1H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-1V3c0-.55-.45-1-1-1s-1 .45-1 1zm2 17H6c-.55 0-1-.45-1-1V9h14v10c0 .55-.45 1-1 1z" }));
|
|
4
|
+
|
|
5
|
+
export { SvgEvent as S };
|
|
6
|
+
//# sourceMappingURL=event-BEJFimi3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-BEJFimi3.js","sources":["../../hammer-icon/mdi/round/event.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgEvent = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M16 13h-3c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1zm0-10v1H8V3c0-.55-.45-1-1-1s-1 .45-1 1v1H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-1V3c0-.55-.45-1-1-1s-1 .45-1 1zm2 17H6c-.55 0-1-.45-1-1V9h14v10c0 .55-.45 1-1 1z\" }));\nexport default SvgEvent;\n"],"names":[],"mappings":";;AACK,MAAC,QAAQ,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,2RAA2R,EAAE,CAAC;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -11,11 +11,11 @@ export { C as Calendar, b as CalendarMonth, e as CalendarMonthButton, c as Calen
|
|
|
11
11
|
export { C as Card } from './Card-U2IJPk8B.js';
|
|
12
12
|
export { C as Checkbox, a as CheckboxGroup } from './Checkbox-zg8LVvB6.js';
|
|
13
13
|
export { C as Chip } from './Chip-DXQiqF8k.js';
|
|
14
|
-
export { C as Combobox, c as ComboboxContent, a as ComboboxElement, i as ComboboxEmpty, g as ComboboxItem, h as ComboboxItemAddNew, f as ComboboxList, d as ComboboxSearchField, b as ComboboxSelect, e as ComboboxSelectTrigger, u as useInfiniteCombobox } from './Combobox-
|
|
15
|
-
export { D as DateField } from './DateField-
|
|
16
|
-
export { D as DateFieldRange } from './DateFieldRange
|
|
17
|
-
export { D as DateFieldSingle } from './DateFieldSingle-
|
|
18
|
-
export { D as DateFieldYearless } from './DateFieldYearless-
|
|
14
|
+
export { C as Combobox, c as ComboboxContent, a as ComboboxElement, i as ComboboxEmpty, g as ComboboxItem, h as ComboboxItemAddNew, f as ComboboxList, d as ComboboxSearchField, b as ComboboxSelect, e as ComboboxSelectTrigger, u as useInfiniteCombobox } from './Combobox-Ct30JT3y.js';
|
|
15
|
+
export { D as DateField } from './DateField-_TqCdcYv.js';
|
|
16
|
+
export { D as DateFieldRange } from './DateFieldRange-Dk8WA52F.js';
|
|
17
|
+
export { D as DateFieldSingle } from './DateFieldSingle-D3xD8YZk.js';
|
|
18
|
+
export { D as DateFieldYearless } from './DateFieldYearless-BxkCSNk5.js';
|
|
19
19
|
export { D as DaysOfTheWeek } from './DaysOfTheWeek-ImBPjEvl.js';
|
|
20
20
|
export { D as Details, b as DetailsContent, a as DetailsSummary } from './Details-DVg0EOkv.js';
|
|
21
21
|
export { D as Dialog, d as DialogCancelButton, c as DialogContent, b as DialogFooter, a as DialogHeader } from './Dialog-BR6f-XRH.js';
|
|
@@ -36,9 +36,9 @@ export { L as Listbox, a as ListboxOption, b as ListboxOptionGroup } from './Lis
|
|
|
36
36
|
export { L as ListView, a as ListViewOption, b as ListViewOptionCell } from './ListView-DdHpJHTc.js';
|
|
37
37
|
export { M as Menu, a as MenuItem } from './Menu-DHCOMJx2.js';
|
|
38
38
|
export { O as Overflow, a as OverflowText } from './Overflow-w-3_04fS.js';
|
|
39
|
-
export { P as Page } from './Page-
|
|
39
|
+
export { P as Page } from './Page-CxB5N9dR.js';
|
|
40
40
|
export { P as Pagination } from './Pagination-DU_qvFRR.js';
|
|
41
|
-
export { P as Popover, d as PopoverButton, c as PopoverClose, b as PopoverContent, a as PopoverTrigger } from './Popover-
|
|
41
|
+
export { P as Popover, d as PopoverButton, c as PopoverClose, b as PopoverContent, a as PopoverTrigger } from './Popover-BPiqdyu1.js';
|
|
42
42
|
export { P as ProgressBar } from './ProgressBar-lPKNTz6i.js';
|
|
43
43
|
export { R as Radio, a as RadioGroup } from './Radio-DnOuBPi_.js';
|
|
44
44
|
export { S as SearchField } from './SearchField-BGPqpnVd.js';
|
|
@@ -55,8 +55,9 @@ export { T as Tab, a as TabButton, b as TabList, c as TabPanel } from './Tab-BSC
|
|
|
55
55
|
export { T as Text } from './Text-35Ve4Uq0.js';
|
|
56
56
|
export { T as Textarea } from './Textarea-DohNOiIp.js';
|
|
57
57
|
export { T as TextField } from './TextField-gYAqTpcX.js';
|
|
58
|
+
export { T as TimeField } from './TimeField-DRHLRqN3.js';
|
|
58
59
|
export { T as Toaster, t as toast } from './toast-BhV_Ask2.js';
|
|
59
|
-
export { T as Toolbar, b as ToolbarButton, d as ToolbarButtonLink, c as ToolbarButtonToggle, a as ToolbarElement, e as ToolbarSelect } from './Toolbar-
|
|
60
|
+
export { T as Toolbar, b as ToolbarButton, d as ToolbarButtonLink, c as ToolbarButtonToggle, a as ToolbarElement, e as ToolbarSelect } from './Toolbar-CSWhVSUM.js';
|
|
60
61
|
export { T as Tooltip, b as TooltipContent, a as TooltipTrigger } from './Tooltip-C2HQDvYj.js';
|
|
61
62
|
export { u as useAccessibleColor } from './useAccessibleColor-Dc6B_M-Z-BYKjkGRg.js';
|
|
62
63
|
export { u as useBreakpoint } from './useBreakpoint-7QkBkSeP-Cv5fnZxs.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const usePopoverCloseDelayWorkaround = (popoverOpen, delay = 300) => {
|
|
4
|
+
const [shouldShowContent, setShouldShowContent] = useState(popoverOpen);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
if (!popoverOpen) {
|
|
7
|
+
const timeout = setTimeout(() => {
|
|
8
|
+
setShouldShowContent(false);
|
|
9
|
+
}, delay);
|
|
10
|
+
return () => clearTimeout(timeout);
|
|
11
|
+
}
|
|
12
|
+
setShouldShowContent(true);
|
|
13
|
+
}, [popoverOpen, delay]);
|
|
14
|
+
return shouldShowContent;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { usePopoverCloseDelayWorkaround as u };
|
|
18
|
+
//# sourceMappingURL=usePopoverCloseDelayWorkaround-BZcjPkvT-BZcjPkvT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePopoverCloseDelayWorkaround-BZcjPkvT-BZcjPkvT.js","sources":["../../hammer-react/dist/usePopoverCloseDelayWorkaround-BZcjPkvT.js"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nconst usePopoverCloseDelayWorkaround = (popoverOpen, delay = 300) => {\n const [shouldShowContent, setShouldShowContent] = useState(popoverOpen);\n useEffect(() => {\n if (!popoverOpen) {\n const timeout = setTimeout(() => {\n setShouldShowContent(false);\n }, delay);\n return () => clearTimeout(timeout);\n }\n setShouldShowContent(true);\n }, [popoverOpen, delay]);\n return shouldShowContent;\n};\n\nexport { usePopoverCloseDelayWorkaround as u };\n//# sourceMappingURL=usePopoverCloseDelayWorkaround-BZcjPkvT.js.map\n"],"names":[],"mappings":";;AAEK,MAAC,8BAA8B,GAAG,CAAC,WAAW,EAAE,KAAK,GAAG,GAAG,KAAK;AACrE,EAAE,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC;AACzE,EAAE,SAAS,CAAC,MAAM;AAClB,IAAI,IAAI,CAAC,WAAW,EAAE;AACtB,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM;AACvC,QAAQ,oBAAoB,CAAC,KAAK,CAAC;AACnC,OAAO,EAAE,KAAK,CAAC;AACf,MAAM,OAAO,MAAM,YAAY,CAAC,OAAO,CAAC;AACxC;AACA,IAAI,oBAAoB,CAAC,IAAI,CAAC;AAC9B,GAAG,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAC1B,EAAE,OAAO,iBAAiB;AAC1B;;;;"}
|