@televet/kibble-ui 5.0.20 → 5.0.21-alpha.hunter.19

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/chunks/dateTimePicker.component-BQlvgxLx.js +2 -0
  2. package/dist/chunks/{dateTimePicker.component-BlWhC5aT.js.map → dateTimePicker.component-BQlvgxLx.js.map} +1 -1
  3. package/dist/chunks/dateTimePicker.component-Ba3eNQdB.js +324 -0
  4. package/dist/chunks/{dateTimePicker.component-DnYStcAJ.js.map → dateTimePicker.component-Ba3eNQdB.js.map} +1 -1
  5. package/dist/chunks/timePicker.component-B4Py1wGA.js +259 -0
  6. package/dist/chunks/timePicker.component-B4Py1wGA.js.map +1 -0
  7. package/dist/chunks/timePicker.component-DK-Djh9H.js +2 -0
  8. package/dist/chunks/timePicker.component-DK-Djh9H.js.map +1 -0
  9. package/dist/chunks/timeRange.component-BOicUMic.js +26 -0
  10. package/dist/chunks/{timeRange.component-D3Db8lvh.js.map → timeRange.component-BOicUMic.js.map} +1 -1
  11. package/dist/chunks/timeRange.component-D8kEOwwe.js +2 -0
  12. package/dist/chunks/{timeRange.component-BZHpZeAX.js.map → timeRange.component-D8kEOwwe.js.map} +1 -1
  13. package/dist/cjs/components/DateTimePicker/index.cjs +1 -1
  14. package/dist/cjs/components/Icon/generated/index.cjs +1 -1
  15. package/dist/cjs/components/Icon/generated/index.cjs.map +1 -1
  16. package/dist/cjs/components/TimePicker/index.cjs +1 -1
  17. package/dist/cjs/components/TimeRange/index.cjs +1 -1
  18. package/dist/cjs/components/index.cjs +1 -1
  19. package/dist/cjs/index.cjs +1 -1
  20. package/dist/esm/components/DateTimePicker/index.js +1 -1
  21. package/dist/esm/components/Icon/generated/index.js +562 -318
  22. package/dist/esm/components/Icon/generated/index.js.map +1 -1
  23. package/dist/esm/components/TimePicker/index.js +1 -1
  24. package/dist/esm/components/TimeRange/index.js +1 -1
  25. package/dist/esm/components/index.js +3 -3
  26. package/dist/esm/index.js +3 -3
  27. package/dist/types/components/DateTimePicker/components/DateTimePickerCustomView/dateTimePickerCustomView.component.d.ts +2 -1
  28. package/dist/types/components/DateTimePicker/components/DateTimePickerRangeSelector/dateTimePickerRangeSelector.component.d.ts +2 -1
  29. package/dist/types/components/DateTimePicker/dateTimePicker.component.d.ts +6 -1
  30. package/dist/types/components/Icon/generated/BarcodeReader.d.ts +10 -0
  31. package/dist/types/components/Icon/generated/Battery.d.ts +10 -0
  32. package/dist/types/components/Icon/generated/BatteryCharging.d.ts +10 -0
  33. package/dist/types/components/Icon/generated/BatteryFull.d.ts +10 -0
  34. package/dist/types/components/Icon/generated/BatteryLow.d.ts +10 -0
  35. package/dist/types/components/Icon/generated/Connect.d.ts +10 -0
  36. package/dist/types/components/Icon/generated/MagicPen.d.ts +10 -0
  37. package/dist/types/components/Icon/generated/Wifi.d.ts +10 -0
  38. package/dist/types/components/Icon/generated/WifiOff.d.ts +10 -0
  39. package/dist/types/components/Icon/generated/WifiWarning.d.ts +10 -0
  40. package/dist/types/components/Icon/generated/Workflows.d.ts +10 -0
  41. package/dist/types/components/Icon/generated/index.d.ts +1 -1
  42. package/dist/types/components/TimePicker/timePicker.component.d.ts +9 -1
  43. package/dist/types/shared/utils/localToClinicTimezone.d.ts +6 -0
  44. package/package.json +16 -14
  45. package/dist/chunks/dateTimePicker.component-BlWhC5aT.js +0 -2
  46. package/dist/chunks/dateTimePicker.component-DnYStcAJ.js +0 -317
  47. package/dist/chunks/timePicker.component-BCMX6aqb.js +0 -220
  48. package/dist/chunks/timePicker.component-BCMX6aqb.js.map +0 -1
  49. package/dist/chunks/timePicker.component-D5hw80VV.js +0 -2
  50. package/dist/chunks/timePicker.component-D5hw80VV.js.map +0 -1
  51. package/dist/chunks/timeRange.component-BZHpZeAX.js +0 -19
  52. package/dist/chunks/timeRange.component-D3Db8lvh.js +0 -2
@@ -1,4 +1,4 @@
1
- import { M as r, T as m } from "../../../chunks/timePicker.component-BCMX6aqb.js";
1
+ import { M as r, T as m } from "../../../chunks/timePicker.component-B4Py1wGA.js";
2
2
  export {
3
3
  r as Meridiem,
4
4
  m as TimePicker
@@ -1,4 +1,4 @@
1
- import { T as m } from "../../../chunks/timeRange.component-BZHpZeAX.js";
1
+ import { T as m } from "../../../chunks/timeRange.component-BOicUMic.js";
2
2
  export {
3
3
  m as TimeRange
4
4
  };
@@ -14,7 +14,7 @@ import { W as h } from "../../chunks/checkboxGroup.component-DW9qUlSm.js";
14
14
  import { C as R } from "../../chunks/conversationCard.component-HYxRoILR.js";
15
15
  import { D as w } from "../../chunks/datePicker.component-Dq2vL7Mk.js";
16
16
  import { D as N } from "../../chunks/datePicker.provider-CavuOZl4.js";
17
- import { D as F, a as H, c as j } from "../../chunks/dateTimePicker.component-DnYStcAJ.js";
17
+ import { D as F, a as H, c as j } from "../../chunks/dateTimePicker.component-Ba3eNQdB.js";
18
18
  import { D as E } from "../../chunks/divider.component-CFOh4Nw3.js";
19
19
  import { d as K, a as Q, b as U } from "../../chunks/divider.types-6MEkMNbx.js";
20
20
  import { W as Y } from "../../chunks/heading.component-CpSAN3cv.js";
@@ -48,8 +48,8 @@ import { T as da, a as la } from "../../chunks/tagBlock.component-R4FY7ytN.js";
48
48
  import { W as Ta } from "../../chunks/text.component-DhuUgP3j.js";
49
49
  import { W as ba } from "../../chunks/textInput.component-BeiTxTkS.js";
50
50
  import { W as Ca } from "../../chunks/textarea.component-C6Wt1Pk8.js";
51
- import { M as ga, T as Da } from "../../chunks/timePicker.component-BCMX6aqb.js";
52
- import { T as za } from "../../chunks/timeRange.component-BZHpZeAX.js";
51
+ import { M as ga, T as Da } from "../../chunks/timePicker.component-B4Py1wGA.js";
52
+ import { T as za } from "../../chunks/timeRange.component-BOicUMic.js";
53
53
  import { T as Aa } from "../../chunks/timestamp.component-DkLjxUsy.js";
54
54
  import { useToast as Ba } from "./Toast/index.js";
55
55
  import { T as Va } from "../../chunks/tooltip.component-CHohp2qn.js";
package/dist/esm/index.js CHANGED
@@ -14,7 +14,7 @@ import { W as B } from "../chunks/checkboxGroup.component-DW9qUlSm.js";
14
14
  import { C as I } from "../chunks/conversationCard.component-HYxRoILR.js";
15
15
  import { D as R } from "../chunks/datePicker.component-Dq2vL7Mk.js";
16
16
  import { D as K } from "../chunks/datePicker.provider-CavuOZl4.js";
17
- import { D as O, a as F, c as H } from "../chunks/dateTimePicker.component-DnYStcAJ.js";
17
+ import { D as O, a as F, c as H } from "../chunks/dateTimePicker.component-Ba3eNQdB.js";
18
18
  import { D as q } from "../chunks/divider.component-CFOh4Nw3.js";
19
19
  import { d as J, a as Q, b as U } from "../chunks/divider.types-6MEkMNbx.js";
20
20
  import { W as Y } from "../chunks/heading.component-CpSAN3cv.js";
@@ -48,8 +48,8 @@ import { T as lr, a as dr } from "../chunks/tagBlock.component-R4FY7ytN.js";
48
48
  import { W as Tr } from "../chunks/text.component-DhuUgP3j.js";
49
49
  import { W as br } from "../chunks/textInput.component-BeiTxTkS.js";
50
50
  import { W as gr } from "../chunks/textarea.component-C6Wt1Pk8.js";
51
- import { M as Dr, T as Pr } from "../chunks/timePicker.component-BCMX6aqb.js";
52
- import { T as kr } from "../chunks/timeRange.component-BZHpZeAX.js";
51
+ import { M as Dr, T as Pr } from "../chunks/timePicker.component-B4Py1wGA.js";
52
+ import { T as kr } from "../chunks/timeRange.component-BOicUMic.js";
53
53
  import { T as Wr } from "../chunks/timestamp.component-DkLjxUsy.js";
54
54
  import { useToast as Mr } from "./components/Toast/index.js";
55
55
  import { T as Ar } from "../chunks/tooltip.component-CHohp2qn.js";
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  interface DateTimePickerCustomViewProps {
3
3
  /** Determines if the calendar view is single. */
4
4
  isSingleView: boolean;
5
+ timezone?: string;
5
6
  }
6
- export declare const DateTimePickerCustomView: ({ isSingleView }: DateTimePickerCustomViewProps) => React.JSX.Element;
7
+ export declare const DateTimePickerCustomView: ({ isSingleView, timezone, }: DateTimePickerCustomViewProps) => React.JSX.Element;
7
8
  export {};
@@ -5,6 +5,7 @@ interface DateTimePickerRangeSelectorProps {
5
5
  label: string;
6
6
  /** Type of range selector. */
7
7
  rangeType: FocusedInput;
8
+ timezone?: string;
8
9
  }
9
- export declare const DateTimePickerRangeSelector: ({ label, rangeType, }: DateTimePickerRangeSelectorProps) => React.JSX.Element;
10
+ export declare const DateTimePickerRangeSelector: ({ label, rangeType, timezone, }: DateTimePickerRangeSelectorProps) => React.JSX.Element;
10
11
  export {};
@@ -25,9 +25,14 @@ export interface DateTimePickerProps extends DateProps {
25
25
  * @default true
26
26
  */
27
27
  showQuickOptions?: boolean;
28
+ /**
29
+ * Whether a specific timezone should override the default timezone we detect from the browser,
30
+ * typically used for impersonations
31
+ */
32
+ timezone?: string;
28
33
  /** Data test id for the date time picker.
29
34
  * @default kibble-datetime-picker
30
35
  */
31
36
  'data-testid'?: string;
32
37
  }
33
- export declare const DateTimePicker: ({ trigger, calendarView, portalled, showQuickOptions, ["data-testid"]: dataTestId, ...rest }: DateTimePickerProps) => React.JSX.Element;
38
+ export declare const DateTimePicker: ({ trigger, calendarView, portalled, showQuickOptions, ["data-testid"]: dataTestId, timezone, ...rest }: DateTimePickerProps) => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ interface SVGRProps {
3
+ color?: string;
4
+ height?: string;
5
+ width?: string;
6
+ title?: string;
7
+ titleId?: string;
8
+ }
9
+ declare const ForwardRef: React.ForwardRefExoticComponent<SVGRProps & React.RefAttributes<SVGSVGElement>>;
10
+ export default ForwardRef;
@@ -1,2 +1,2 @@
1
- export type IconName = 'aiMicrophone' | 'alertCircle' | 'animalBird' | 'animalCat' | 'animalCow' | 'animalDog' | 'animalHorse' | 'animalMouse' | 'animalPig' | 'animalSnake' | 'archive' | 'arrowCircle' | 'arrowDownRight' | 'arrowDown' | 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowsIn' | 'arrowsOut' | 'article' | 'award' | 'backspace' | 'bank' | 'bellCancel' | 'bell' | 'bone' | 'bookmark' | 'bulkSelect' | 'buttons' | 'calendarCheck' | 'calendarDate' | 'calendarInfo' | 'calendarPen' | 'calendarPlus' | 'cameraOff' | 'camera' | 'cancel' | 'caretDown' | 'caretLeft' | 'caretUp' | 'cellphoneCancel' | 'cellphone' | 'chainLink' | 'chatBubble' | 'checkList' | 'checkmarkBox' | 'checkmarkCircle' | 'checkmark' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'clinic' | 'clock' | 'closeCircleSolid' | 'closeCircle' | 'close' | 'code' | 'creditCardLogoAmex' | 'creditCardLogoDiners' | 'creditCardLogoDiscover' | 'creditCardLogoGeneric' | 'creditCardLogoJcb' | 'creditCardLogoMastercard' | 'creditCardLogoUnionpay' | 'creditCardLogoVisa' | 'creditCard' | 'cut' | 'dollarCircle' | 'dollar' | 'dotsHorizontal' | 'dotsVertical' | 'doubleArrowCircle' | 'download' | 'emailSend' | 'envelopeCancel' | 'envelope' | 'externalLink' | 'eyeOpen' | 'eyeSlash' | 'eyedropper' | 'fileHealth' | 'filter' | 'form' | 'gear' | 'gif' | 'globe' | 'grid' | 'hashtag' | 'health' | 'heartSolid' | 'heart' | 'house' | 'image' | 'infoCircle' | 'inputAlt' | 'input' | 'invoice' | 'kanbanBoard' | 'lightBulb' | 'list' | 'liveagent' | 'loader' | 'locationMarker' | 'lock' | 'logo' | 'loudspeaker' | 'magic' | 'magnifyingGlass' | 'mailbox' | 'menu' | 'messageDetail' | 'messageWarning' | 'message' | 'messages' | 'microphoneMute' | 'microphone' | 'minus' | 'moveDown' | 'moveLeft' | 'moveRight' | 'moveUp' | 'notification' | 'package' | 'paperclip' | 'pause' | 'paw' | 'penSquare' | 'pen' | 'personAdd' | 'personCircle' | 'person' | 'phoneButtons' | 'phoneCancel' | 'phone' | 'pill' | 'pinCancel' | 'pin' | 'play' | 'plus' | 'popup' | 'printer' | 'questionMarkCircleSolid' | 'questionMarkCircle' | 'questionMark' | 'record' | 'report' | 'ribbon' | 'robot' | 'selectDropDown' | 'send' | 'sliders' | 'smileyFace' | 'sort' | 'starCircle' | 'starSolid' | 'star' | 'stopRecording' | 'stop' | 'support' | 'table' | 'tag' | 'targetSolid' | 'target' | 'taskList' | 'team' | 'textArea' | 'textBlock' | 'thumbsDown' | 'thumbsUp' | 'transfer' | 'trashcan' | 'twoSquares' | 'upload' | 'videoCamera' | 'warningSign' | 'website' | 'wrench';
1
+ export type IconName = 'aiMicrophone' | 'alertCircle' | 'animalBird' | 'animalCat' | 'animalCow' | 'animalDog' | 'animalHorse' | 'animalMouse' | 'animalPig' | 'animalSnake' | 'archive' | 'arrowCircle' | 'arrowDownRight' | 'arrowDown' | 'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowsIn' | 'arrowsOut' | 'article' | 'award' | 'backspace' | 'bank' | 'barcodeReader' | 'batteryCharging' | 'batteryFull' | 'batteryLow' | 'battery' | 'bellCancel' | 'bell' | 'bone' | 'bookmark' | 'bulkSelect' | 'buttons' | 'calendarCheck' | 'calendarDate' | 'calendarInfo' | 'calendarPen' | 'calendarPlus' | 'cameraOff' | 'camera' | 'cancel' | 'caretDown' | 'caretLeft' | 'caretUp' | 'cellphoneCancel' | 'cellphone' | 'chainLink' | 'chatBubble' | 'checkList' | 'checkmarkBox' | 'checkmarkCircle' | 'checkmark' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'clinic' | 'clock' | 'closeCircleSolid' | 'closeCircle' | 'close' | 'code' | 'connect' | 'creditCardLogoAmex' | 'creditCardLogoDiners' | 'creditCardLogoDiscover' | 'creditCardLogoGeneric' | 'creditCardLogoJcb' | 'creditCardLogoMastercard' | 'creditCardLogoUnionpay' | 'creditCardLogoVisa' | 'creditCard' | 'cut' | 'dollarCircle' | 'dollar' | 'dotsHorizontal' | 'dotsVertical' | 'doubleArrowCircle' | 'download' | 'emailSend' | 'envelopeCancel' | 'envelope' | 'externalLink' | 'eyeOpen' | 'eyeSlash' | 'eyedropper' | 'fileHealth' | 'filter' | 'form' | 'gear' | 'gif' | 'globe' | 'grid' | 'hashtag' | 'health' | 'heartSolid' | 'heart' | 'house' | 'image' | 'infoCircle' | 'inputAlt' | 'input' | 'invoice' | 'kanbanBoard' | 'lightBulb' | 'list' | 'liveagent' | 'loader' | 'locationMarker' | 'lock' | 'logo' | 'loudspeaker' | 'magicPen' | 'magic' | 'magnifyingGlass' | 'mailbox' | 'menu' | 'messageDetail' | 'messageWarning' | 'message' | 'messages' | 'microphoneMute' | 'microphone' | 'minus' | 'moveDown' | 'moveLeft' | 'moveRight' | 'moveUp' | 'notification' | 'package' | 'paperclip' | 'pause' | 'paw' | 'penSquare' | 'pen' | 'personAdd' | 'personCircle' | 'person' | 'phoneButtons' | 'phoneCancel' | 'phone' | 'pill' | 'pinCancel' | 'pin' | 'play' | 'plus' | 'popup' | 'printer' | 'questionMarkCircleSolid' | 'questionMarkCircle' | 'questionMark' | 'record' | 'report' | 'ribbon' | 'robot' | 'selectDropDown' | 'send' | 'sliders' | 'smileyFace' | 'sort' | 'starCircle' | 'starSolid' | 'star' | 'stopRecording' | 'stop' | 'support' | 'table' | 'tag' | 'targetSolid' | 'target' | 'taskList' | 'team' | 'textArea' | 'textBlock' | 'thumbsDown' | 'thumbsUp' | 'transfer' | 'trashcan' | 'twoSquares' | 'upload' | 'videoCamera' | 'warningSign' | 'website' | 'wifiOff' | 'wifiWarning' | 'wifi' | 'workflows' | 'wrench';
2
2
  export declare const IconMap: Record<IconName, any>;
@@ -20,10 +20,18 @@ export interface TimePickerProps {
20
20
  * @default bottom
21
21
  */
22
22
  placement?: Placement;
23
+ /**
24
+ * If set, display and process the time in a specific timezone (typically for impersonation)
25
+ */
26
+ timezone?: string;
27
+ /**
28
+ * Show the timezone abbreviation (if available) beside the component
29
+ */
30
+ showTimezoneAbr?: boolean;
23
31
  /**
24
32
  * Data test id for the time picker.
25
33
  * @default kibble-timepicker
26
34
  */
27
35
  'data-testid'?: string;
28
36
  }
29
- export declare const TimePicker: ({ initialTime, inputProps, minuteInterval, onTimeChange, onClose, placement, ["data-testid"]: dataTestId, }: TimePickerProps) => React.JSX.Element;
37
+ export declare const TimePicker: ({ initialTime, inputProps, minuteInterval, onTimeChange, onClose, placement, timezone, showTimezoneAbr, ["data-testid"]: dataTestId, }: TimePickerProps) => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ export declare const localToClinicTimezone: ({ date, timezone, reverse, }: {
2
+ date: Date;
3
+ timezone: string;
4
+ reverse?: boolean;
5
+ }) => Date;
6
+ export declare const timezoneAbbreviations: Record<string, string>;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "packages/*"
5
5
  ],
6
6
  "description": "Kibble Design System by Otto",
7
- "version": "5.0.20",
7
+ "version": "5.0.21-alpha.hunter.19",
8
8
  "type": "module",
9
9
  "main": "./dist/cjs/index.cjs",
10
10
  "module": "./dist/esm/index.js",
@@ -34,9 +34,10 @@
34
34
  "predeploy": "npm run build",
35
35
  "prepare": "husky",
36
36
  "publishBeta": "npm run build && npm publish --tag beta",
37
- "start": "npm run generate:icons & npm run generate:logos & npm run theme:watch & storybook dev -p 6006",
37
+ "start": "WATCHPACK_POLLING=1 npm run generate:icons & WATCHPACK_POLLING=1 npm run generate:logos & WATCHPACK_POLLING=1 npm run theme:watch & WATCHPACK_POLLING=1 storybook dev -p 6006",
38
38
  "test-storybook": "npm run build:preparation && vitest --project=storybook",
39
- "theme:watch": "chakra typegen ./src/theme/theme.config.ts --watch"
39
+ "theme:watch": "chakra typegen ./src/theme/theme.config.ts --watch",
40
+ "makeLocalPackage": "npm run build && npm pack"
40
41
  },
41
42
  "engines": {
42
43
  "node": ">=20.0.0",
@@ -133,16 +134,16 @@
133
134
  },
134
135
  "devDependencies": {
135
136
  "@chakra-ui/cli": "^3.19.2",
136
- "@chromatic-com/storybook": "^4.1.3",
137
+ "@chromatic-com/storybook": "^5.1.2",
137
138
  "@emotion/react": "^11.14.0",
138
139
  "@eslint/js": "^9.21.0",
139
- "@storybook/addon-a11y": "^10.1.10",
140
- "@storybook/addon-docs": "^10.1.10",
141
- "@storybook/addon-onboarding": "^10.1.10",
142
- "@storybook/addon-themes": "^10.1.10",
143
- "@storybook/addon-vitest": "^10.1.10",
144
- "@storybook/react-vite": "^10.1.10",
145
- "@storybook/test-runner": "^0.24.2",
140
+ "@storybook/addon-a11y": "^10.3.5",
141
+ "@storybook/addon-docs": "^10.3.5",
142
+ "@storybook/addon-onboarding": "^10.3.5",
143
+ "@storybook/addon-themes": "^10.3.5",
144
+ "@storybook/addon-vitest": "^10.3.5",
145
+ "@storybook/react-vite": "^10.3.5",
146
+ "@storybook/test-runner": "^0.24.3",
146
147
  "@types/lodash-es": "^4.17.12",
147
148
  "@types/react": "^19.0.10",
148
149
  "@vitejs/plugin-react": "^4.3.4",
@@ -152,7 +153,7 @@
152
153
  "eslint": "^9.21.0",
153
154
  "eslint-plugin-react-hooks": "^5.1.0",
154
155
  "eslint-plugin-react-refresh": "^0.4.19",
155
- "eslint-plugin-storybook": "^10.1.10",
156
+ "eslint-plugin-storybook": "^10.3.5",
156
157
  "gh-pages": "^6.3.0",
157
158
  "glob": "^13.0.0",
158
159
  "globals": "^15.15.0",
@@ -162,7 +163,7 @@
162
163
  "plop": "^4.0.1",
163
164
  "prettier": "^3.5.3",
164
165
  "rollup-plugin-visualizer": "^5.14.0",
165
- "storybook": "^10.1.10",
166
+ "storybook": "^10.3.5",
166
167
  "typescript": "~5.7.2",
167
168
  "typescript-eslint": "^8.24.1",
168
169
  "vite": "^6.2.0",
@@ -176,7 +177,8 @@
176
177
  "@emotion/react": "^11.14.0",
177
178
  "date-fns": "^4.1.0",
178
179
  "lodash-es": "^4.17.21",
179
- "react": "^19.0.0"
180
+ "react": "^19.0.0",
181
+ "date-fns-tz": "^3.2.0"
180
182
  },
181
183
  "dependencies": {
182
184
  "@televet/kibble-primitives": "*",
@@ -1,2 +0,0 @@
1
- "use strict";const s=require("./jsx-runtime-BjDatQAs.js"),d=require("react"),O=require("./button.component-DjdgBXDC.js"),u=require("./datePicker.provider-i35-VNAb.js"),N=require("./usePortalContentRef-CTrvBQ7I.js"),I=require("./popover.recipe-CtptsJg6.js"),l=require("./format-CK7Imh-5.js"),v=require("./isToday-BgNkHh5t.js"),Y=require("./popover-root-provider-CZDbUJ2K.js"),E=require("./flex-BOU6tYUd.js"),L=require("../cjs/hooks/useBreakpoint/index.cjs"),j=require("./index-BQRnVsAg.js"),B=require("./text.component-BDDz5KQP.js"),H=require("./textInput.component-CwTc0h_F.js"),$=require("./timePicker.component-D5hw80VV.js"),f=require("./grid-item-CH3dbZHL.js"),G=require("./divider.component-BX3zyB7O.js"),z=require("./create-slot-recipe-context-HXE1VazG.js"),A=require("./index-Ts8g8jZd.js"),R=require("./popover-C7aj8Iwj.js");var o=(t=>(t.Today="Today",t.Yesterday="Yesterday",t.ThisWeek="ThisWeek",t.LastWeek="LastWeek",t.ThisMonth="ThisMonth",t.LastMonth="LastMonth",t.Custom="Custom",t))(o||{});const Q=["single","double"],V=[{label:"Today",value:o.Today},{label:"Yesterday",value:o.Yesterday},{label:"This Week",value:o.ThisWeek},{label:"Last Week",value:o.LastWeek},{label:"This Month",value:o.ThisMonth},{label:"Last Month",value:o.LastMonth},{label:"Custom",value:o.Custom,iconName:"calendarPen"}],J={single:1,double:2};function K(t){return l.startOfDay(Date.now(),t)}function U(t){return u.endOfDay(Date.now(),t)}function X(t){const e=v.constructNow(t?.in),n=e.getFullYear(),r=e.getMonth(),a=e.getDate(),i=v.constructNow(t?.in);return i.setFullYear(n,r,a-1),i.setHours(0,0,0,0),i}function Z(t){const e=v.constructNow(t?.in),n=l.constructFrom(t?.in,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()-1),n.setHours(23,59,59,999),n}function M(t,e){const n=l.getDefaultOptions(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=l.toDate(t,e?.in),i=a.getDay(),m=(i<r?-7:0)+6-(i-r);return a.setDate(a.getDate()+m),a.setHours(23,59,59,999),a}function P(t,e){const n=l.toDate(t,e?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function _(t,e){const n=l.toDate(t,e?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function ee(t,e,n){return u.addDays(t,e*7,n)}function te(t,e,n){return ee(t,-1,n)}function ne(t,e,n){return u.addMonths(t,-1,n)}function w(t,e){return+l.toDate(t)==+l.toDate(e)}const W=t=>{const e=new Date;switch(t){case o.Today:return{startDate:K(),endDate:U()};case o.Yesterday:return{startDate:X(),endDate:Z()};case o.ThisWeek:return{startDate:l.startOfWeek(e,{weekStartsOn:1}),endDate:M(e,{weekStartsOn:1})};case o.LastWeek:{const n=te(e);return{startDate:l.startOfWeek(n,{weekStartsOn:1}),endDate:M(n,{weekStartsOn:1})}}case o.ThisMonth:return{startDate:P(e),endDate:_(e)};case o.LastMonth:{const n=ne(e);return{startDate:P(n),endDate:_(n)}}default:return null}},se=(t,e)=>{if(!t||!e)return o.Today;const n=[o.Today,o.Yesterday,o.ThisWeek,o.LastWeek,o.ThisMonth,o.LastMonth];for(const r of n){const a=W(r);if(a&&w(t,a.startDate)&&w(e,a.endDate))return r}return o.Custom},oe=({selectedQuickOption:t,setSelectedQuickOption:e,["data-testid"]:n="kibble-datetime-picker-quick-options"})=>{const{setFocusedInput:r,onQuickOptionSelect:a}=u.useDatePickerContext(),{setOpen:i}=Y.usePopoverContext(),m=c=>{if(e(c),c===o.Custom){r(u.FocusedInput.StartDate);return}const p=W(c);p&&(a(p),i(!1))};return s.jsxRuntimeExports.jsx(E.Flex,{className:"DateTimePicker__QuickFilters",flexDirection:"column",gap:2,w:"100%",maxW:"120px",children:V.map(c=>s.jsxRuntimeExports.jsx(O.Button,{className:"DateTimePicker__Option","data-testid":`${n}-option-${c.value}`,variant:"secondarySubtle",...c.iconName&&{iconName:c.iconName,iconPosition:"right"},...t===c.value&&{active:!0},onClick:()=>m(c.value),children:c.label},c.value))})},S=({label:t,rangeType:e})=>{const{startDate:n,endDate:r,dateFormat:a,focusedInput:i,setFocusedInput:m,onTimeChange:c}=u.useDatePickerContext(),p=d.useMemo(()=>(e===u.FocusedInput.StartDate?n:r)||new Date,[n,r,e]),g=d.useMemo(()=>l.format(p,a),[p,a]),D=x=>{x&&c(x,e)};return s.jsxRuntimeExports.jsxs(f.Grid,{alignItems:"center",templateColumns:"repeat(5, 1fr)",gap:1,bgColor:"background.secondaryAlpha",borderRadius:"md",p:1,flex:"0 0 50%",children:[s.jsxRuntimeExports.jsx(f.GridItem,{colSpan:1,children:s.jsxRuntimeExports.jsx(B.WrappedText,{size:"sm",fontWeight:"semibold",textAlign:"center",children:t})}),s.jsxRuntimeExports.jsx(f.GridItem,{colSpan:2,children:s.jsxRuntimeExports.jsx(H.WrappedTextInput,{readOnly:!0,value:g,onClick:()=>m(e),...i===e&&{"data-focus":!0}})}),s.jsxRuntimeExports.jsx(f.GridItem,{colSpan:2,children:s.jsxRuntimeExports.jsx($.TimePicker,{minuteInterval:1,initialTime:p,onClose:x=>D(x),inputProps:{rightElement:void 0,onClick:()=>m(e)}})})]})},re=({isSingleView:t})=>{const{focusedInput:e,setFocusedInput:n}=u.useDatePickerContext();return d.useEffect(()=>{e||n(u.FocusedInput.StartDate)},[e,n]),s.jsxRuntimeExports.jsxs(j.Box,{className:"DateTimePicker__CustomFilters",mt:-1,children:[s.jsxRuntimeExports.jsxs(E.Flex,{className:"DateTimePicker__CustomFilters__RangeSelectors",flexDirection:t?"column":"row",alignItems:"center",gap:2,justifyContent:"space-between",children:[s.jsxRuntimeExports.jsx(S,{label:"Start",rangeType:u.FocusedInput.StartDate}),s.jsxRuntimeExports.jsx(S,{label:"End",rangeType:u.FocusedInput.EndDate})]}),s.jsxRuntimeExports.jsxs(j.Box,{className:"CalendarView",bgColor:"background.secondaryAlpha",borderRadius:"md",p:1,mt:5,children:[s.jsxRuntimeExports.jsx(j.Box,{className:"CalendarView__Header",bgColor:"background.accent.subtle",borderRadius:"md",children:s.jsxRuntimeExports.jsx(u.DatePickerHeader,{triggerProps:{variant:"ghostNeutral"}})}),s.jsxRuntimeExports.jsx(j.Box,{className:"CalendarView__Body",children:s.jsxRuntimeExports.jsx(u.DatePickerCalendar,{showMonthLabels:!0})})]})]})},ae=({trigger:t,calendarView:e="double",portalled:n=!0,showQuickOptions:r=!0,["data-testid"]:a="kibble-datetime-picker",...i})=>{const m=d.useMemo(()=>{const T=new Date;return{startDate:l.startOfDay(T),endDate:u.endOfDay(T)}},[]),{contentRef:c}=N.usePortalContentRef(),g=z.useSlotRecipe({recipe:I.popoverRecipe})(),D=L.useBreakpoint(),x=d.useMemo(()=>r?se(i.startDate||null,i.endDate||null):o.Custom,[r,i.startDate,i.endDate]),[h,y]=d.useState(x);d.useEffect(()=>{y(x)},[x]);const k=d.useMemo(()=>["base","sm"].includes(D)?"single":e,[e,D]),F=d.useMemo(()=>J[k],[k]),C=d.useMemo(()=>k==="single",[k]),b=d.useMemo(()=>h===o.Custom,[h]),q=d.useMemo(()=>b?"max-content":"160px",[b]);return s.jsxRuntimeExports.jsxs(u.DatePickerProvider,{...i,startDate:i.startDate||m.startDate,endDate:i.endDate||m.endDate,withDateRange:!0,numberOfMonths:F,sameWidth:!0,children:[s.jsxRuntimeExports.jsx(R.PopoverTrigger,{asChild:!0,w:"max-content",children:t||s.jsxRuntimeExports.jsx(O.Button,{variant:"secondarySubtle",iconName:"calendarInfo","data-testid":`${a}-default-trigger`,children:"Date/Time Range"})}),s.jsxRuntimeExports.jsx(A.Portal,{container:c||void 0,disabled:!n,children:s.jsxRuntimeExports.jsx(R.PopoverPositioner,{className:"DateTimePicker","data-testid":a,children:s.jsxRuntimeExports.jsx(R.PopoverContent,{className:"DateTimePicker__Content","data-testid":`${a}-content`,css:{...g.content,"--popover-size":q,maxW:r?C?"550px":"890px":C?"390px":"730px",...b&&{minW:r?"550px":"390px"}},children:s.jsxRuntimeExports.jsx(R.PopoverBody,{css:{"--popover-padding":0},children:s.jsxRuntimeExports.jsxs(E.Flex,{className:"DateTimePicker__Container","data-testid":`${a}-container`,p:5,children:[r&&s.jsxRuntimeExports.jsx(oe,{selectedQuickOption:h,setSelectedQuickOption:y}),h===o.Custom&&s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[r&&s.jsxRuntimeExports.jsx(G.Divider,{orientation:"vertical",my:-5,mx:5}),s.jsxRuntimeExports.jsx(re,{isSingleView:C})]})]})})})})})]})};exports.DateTimePicker=ae;exports.DateTimePickerDefaultOptionValue=o;exports.calendarViews=Q;
2
- //# sourceMappingURL=dateTimePicker.component-BlWhC5aT.js.map