@codecademy/gamut 68.1.3-alpha.11147c.0 → 68.1.3-alpha.bcf87d.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 (100) hide show
  1. package/dist/Alert/elements.d.ts +4 -4
  2. package/dist/Anchor/index.d.ts +6 -6
  3. package/dist/Box/Box.d.ts +1 -1
  4. package/dist/Box/FlexBox.d.ts +1 -1
  5. package/dist/Box/GridBox.d.ts +1 -1
  6. package/dist/Box/props.d.ts +1 -1
  7. package/dist/Button/CTAButton.d.ts +2 -2
  8. package/dist/Button/FillButton.d.ts +4 -4
  9. package/dist/Button/IconButton.d.ts +4 -4
  10. package/dist/Button/StrokeButton.d.ts +4 -4
  11. package/dist/Button/TextButton.d.ts +4 -4
  12. package/dist/Button/shared/InlineIconButton.d.ts +2 -2
  13. package/dist/Button/shared/styles.d.ts +3 -3
  14. package/dist/Button/shared/types.d.ts +1 -1
  15. package/dist/ButtonBase/ButtonBase.d.ts +2 -2
  16. package/dist/Card/elements.d.ts +139 -187
  17. package/dist/Card/styles.d.ts +8 -8
  18. package/dist/Coachmark/index.d.ts +1 -1
  19. package/dist/ConnectedForm/ConnectedForm.d.ts +1 -1
  20. package/dist/ConnectedForm/utils.d.ts +3 -3
  21. package/dist/ContentContainer/index.d.ts +1 -1
  22. package/dist/DatePicker/Calendar/Calendar.d.ts +11 -0
  23. package/dist/DatePicker/Calendar/Calendar.js +15 -0
  24. package/dist/DatePicker/Calendar/CalendarBody.d.ts +3 -0
  25. package/dist/DatePicker/Calendar/CalendarBody.js +155 -0
  26. package/dist/DatePicker/Calendar/CalendarFooter.d.ts +3 -0
  27. package/dist/DatePicker/Calendar/CalendarFooter.js +60 -0
  28. package/dist/DatePicker/Calendar/CalendarHeader.d.ts +3 -0
  29. package/dist/DatePicker/Calendar/CalendarHeader.js +63 -0
  30. package/dist/DatePicker/Calendar/index.d.ts +6 -0
  31. package/dist/DatePicker/Calendar/index.js +5 -0
  32. package/dist/DatePicker/Calendar/types.d.ts +59 -0
  33. package/dist/DatePicker/Calendar/types.js +1 -0
  34. package/dist/DatePicker/Calendar/utils/dateGrid.d.ts +30 -0
  35. package/dist/DatePicker/Calendar/utils/dateGrid.js +93 -0
  36. package/dist/DatePicker/Calendar/utils/format.d.ts +39 -0
  37. package/dist/DatePicker/Calendar/utils/format.js +130 -0
  38. package/dist/DatePicker/Calendar/utils/index.d.ts +3 -0
  39. package/dist/DatePicker/Calendar/utils/index.js +3 -0
  40. package/dist/DatePicker/Calendar/utils/keyHandler.d.ts +13 -0
  41. package/dist/DatePicker/Calendar/utils/keyHandler.js +116 -0
  42. package/dist/DatePicker/Calendar/utils/validation.d.ts +13 -0
  43. package/dist/DatePicker/Calendar/utils/validation.js +23 -0
  44. package/dist/DatePicker/DatePicker.d.ts +8 -0
  45. package/dist/DatePicker/DatePicker.js +127 -0
  46. package/dist/DatePicker/DatePickerCalendar.d.ts +13 -0
  47. package/dist/DatePicker/DatePickerCalendar.js +127 -0
  48. package/dist/DatePicker/DatePickerContext.d.ts +11 -0
  49. package/dist/DatePicker/DatePickerContext.js +18 -0
  50. package/dist/DatePicker/DatePickerInput.d.ts +16 -0
  51. package/dist/DatePicker/DatePickerInput.js +126 -0
  52. package/dist/DatePicker/index.d.ts +13 -0
  53. package/dist/DatePicker/index.js +10 -0
  54. package/dist/DatePicker/types.d.ts +76 -0
  55. package/dist/DatePicker/types.js +1 -0
  56. package/dist/DatePicker/utils.d.ts +3 -0
  57. package/dist/DatePicker/utils.js +71 -0
  58. package/dist/Disclosure/elements.d.ts +13 -13
  59. package/dist/FeatureShimmer/index.js +1 -1
  60. package/dist/FocusTrap/index.d.ts +2 -2
  61. package/dist/Form/elements/Form.d.ts +15 -15
  62. package/dist/Form/elements/FormGroup.d.ts +2 -2
  63. package/dist/GridForm/GridFormButtons/index.d.ts +4 -4
  64. package/dist/InternalFloatingCard/InternalFloatingCard.d.ts +1 -1
  65. package/dist/Layout/Column.d.ts +1 -1
  66. package/dist/Layout/LayoutGrid.d.ts +1 -1
  67. package/dist/List/ListProvider.d.ts +1 -1
  68. package/dist/List/elements.d.ts +60 -76
  69. package/dist/List/hooks.d.ts +1 -1
  70. package/dist/Menu/Menu.d.ts +1 -1
  71. package/dist/Menu/elements.d.ts +4 -4
  72. package/dist/Modals/elements.d.ts +1 -1
  73. package/dist/Pagination/AnimatedPaginationButtons.d.ts +45 -61
  74. package/dist/Pagination/EllipsisButton.d.ts +4 -4
  75. package/dist/Pagination/PaginationButton.d.ts +6 -6
  76. package/dist/Pagination/utils.d.ts +43 -59
  77. package/dist/Pagination/utils.js +11 -14
  78. package/dist/Popover/elements.d.ts +2 -2
  79. package/dist/Popover/types.d.ts +2 -2
  80. package/dist/PopoverContainer/PopoverContainer.js +3 -1
  81. package/dist/PopoverContainer/hooks.d.ts +2 -2
  82. package/dist/PopoverContainer/types.d.ts +6 -1
  83. package/dist/Tabs/TabButton.d.ts +2 -2
  84. package/dist/Tabs/TabNav.d.ts +1 -1
  85. package/dist/Tabs/TabNavLink.d.ts +2 -2
  86. package/dist/Tag/elements.d.ts +11 -11
  87. package/dist/Tip/InfoTip/InfoTipButton.d.ts +4 -4
  88. package/dist/Tip/InfoTip/styles.d.ts +1 -1
  89. package/dist/Tip/PreviewTip/elements.d.ts +6 -6
  90. package/dist/Tip/ToolTip/elements.d.ts +1 -1
  91. package/dist/Tip/__tests__/helpers.d.ts +3 -3
  92. package/dist/Tip/shared/FloatingTip.js +2 -2
  93. package/dist/Tip/shared/elements.d.ts +3 -3
  94. package/dist/Tip/shared/types.d.ts +2 -2
  95. package/dist/Toggle/elements.d.ts +1 -1
  96. package/dist/Typography/Text.d.ts +3 -3
  97. package/dist/index.d.ts +1 -0
  98. package/dist/index.js +1 -0
  99. package/dist/utils/react.js +1 -2
  100. package/package.json +10 -10
@@ -9,14 +9,14 @@ export declare const patternFadeInOut: {
9
9
  opacity: number;
10
10
  transition: {
11
11
  duration: number;
12
- ease: "easeOut";
12
+ ease: string;
13
13
  };
14
14
  };
15
15
  animate: {
16
16
  opacity: number;
17
17
  transition: {
18
18
  duration: number;
19
- ease: "easeIn";
19
+ ease: string;
20
20
  };
21
21
  };
22
22
  };
@@ -26,7 +26,7 @@ export declare const hoverShadowLeft: (borderRadius?: string) => {
26
26
  borderRadius: string | undefined;
27
27
  transition: {
28
28
  duration: number;
29
- ease: "easeOut";
29
+ ease: string;
30
30
  };
31
31
  };
32
32
  initialOutline: {
@@ -34,7 +34,7 @@ export declare const hoverShadowLeft: (borderRadius?: string) => {
34
34
  borderRadius: string | undefined;
35
35
  transition: {
36
36
  duration: number;
37
- ease: "easeOut";
37
+ ease: string;
38
38
  };
39
39
  };
40
40
  animate: {
@@ -43,7 +43,7 @@ export declare const hoverShadowLeft: (borderRadius?: string) => {
43
43
  borderRadius: string | undefined;
44
44
  transition: {
45
45
  duration: number;
46
- ease: "easeIn";
46
+ ease: string;
47
47
  };
48
48
  };
49
49
  animateOutline: {
@@ -52,7 +52,7 @@ export declare const hoverShadowLeft: (borderRadius?: string) => {
52
52
  borderRadius: string | undefined;
53
53
  transition: {
54
54
  duration: number;
55
- ease: "easeIn";
55
+ ease: string;
56
56
  };
57
57
  };
58
58
  };
@@ -62,7 +62,7 @@ export declare const hoverShadowRight: (borderRadius?: string) => {
62
62
  borderRadius: string | undefined;
63
63
  transition: {
64
64
  duration: number;
65
- ease: "easeOut";
65
+ ease: string;
66
66
  };
67
67
  };
68
68
  animate: {
@@ -71,7 +71,7 @@ export declare const hoverShadowRight: (borderRadius?: string) => {
71
71
  borderRadius: string | undefined;
72
72
  transition: {
73
73
  duration: number;
74
- ease: "easeIn";
74
+ ease: string;
75
75
  };
76
76
  };
77
77
  };
@@ -21,7 +21,7 @@ export type CoachmarkProps = PopoverFocusProps & {
21
21
  /**
22
22
  * Function that returns the contents of the coachmark.
23
23
  */
24
- renderPopover: (onDismiss?: () => void) => React.JSX.Element;
24
+ renderPopover: (onDismiss?: () => void) => JSX.Element;
25
25
  /**
26
26
  * Props to be passed into the popover component.
27
27
  */
@@ -62,4 +62,4 @@ export interface ConnectedFormProps<Values extends {}> extends Omit<FormContextP
62
62
  }
63
63
  export type FormProviderCustomProps = FormProviderProps & FormContextProps;
64
64
  export declare const FormPropsContext: React.Context<Partial<FormContextProps>>;
65
- export declare const ConnectedForm: React.ForwardRefExoticComponent<ConnectedFormProps<FormValues<Record<string, unknown>>> & React.RefAttributes<HTMLFormElement>>;
65
+ export declare const ConnectedForm: <Values extends FormValues<Values>>(props: ConnectedFormProps<Values>, ref: React.ForwardedRef<HTMLFormElement>) => React.ReactElement;
@@ -36,10 +36,10 @@ export declare const useConnectedForm: <Values extends {}, ValidationRules exten
36
36
  FormRequiredText: import("react").FC<(Omit<{
37
37
  theme?: import("@emotion/react").Theme | undefined;
38
38
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
39
- } & import("..").TextTruncateProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof import("react").ClassAttributes<HTMLSpanElement>>, "ref"> | Omit<{
39
+ } & import("..").TextTruncateProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("react").ClassAttributes<HTMLSpanElement>>, "ref"> | Omit<{
40
40
  theme?: import("@emotion/react").Theme | undefined;
41
41
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
42
- } & import("..").TextNoTruncateProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | keyof import("react").ClassAttributes<HTMLSpanElement>>, "ref">) & import("react").RefAttributes<HTMLSpanElement>>;
42
+ } & import("..").TextNoTruncateProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("react").ClassAttributes<HTMLSpanElement>>, "ref">) & import("react").RefAttributes<HTMLSpanElement>>;
43
43
  };
44
44
  export declare const submitSuccessStatus: (wasSubmitSuccessful: boolean | undefined, isSubmitSuccessful: boolean | undefined) => boolean | undefined;
45
45
  export declare const useFormState: () => {
@@ -122,9 +122,9 @@ export declare function useDebouncedField<T extends InputTypes>({ name, watchUpd
122
122
  value: T extends "checkbox" ? boolean : string;
123
123
  error: string | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
124
124
  ref: import("react-hook-form").UseFormRegisterReturn<string>;
125
- control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any, import("react-hook-form").FieldValues>;
126
125
  isDisabled: boolean;
127
126
  isLoading: boolean | undefined;
127
+ control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any, import("react-hook-form").FieldValues>;
128
128
  isSoloField: boolean | undefined;
129
129
  validation: RegisterOptions | undefined;
130
130
  getValues: import("react-hook-form").UseFormGetValues<import("react-hook-form").FieldValues>;
@@ -2,6 +2,6 @@
2
2
  export declare const ContentContainer: import("@emotion/styled").StyledComponent<{
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
- } & import("../Box").BoxProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof import("react").ClassAttributes<HTMLDivElement> | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture"> & {
5
+ } & import("../Box").BoxProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof import("react").ClassAttributes<HTMLDivElement> | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
6
6
  theme?: import("@emotion/react").Theme | undefined;
7
7
  } & import("@codecademy/variance/dist/types/config").VariantProps<"size", false | "small" | "medium" | "wide">, {}, {}>;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Outer wrapper for the calendar (header + body + footer).
4
+ * Used by DatePickerCalendar to group the calendar content.
5
+ */
6
+ export declare const Calendar: import("@emotion/styled").StyledComponent<{
7
+ theme?: import("@emotion/react").Theme | undefined;
8
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
9
+ } & {
10
+ theme?: import("@emotion/react").Theme | undefined;
11
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,15 @@
1
+ import _styled from "@emotion/styled/base";
2
+ import { css } from '@codecademy/gamut-styles';
3
+ /**
4
+ * Outer wrapper for the calendar (header + body + footer).
5
+ * Used by DatePickerCalendar to group the calendar content.
6
+ */
7
+ export const Calendar = /*#__PURE__*/_styled("div", {
8
+ target: "eq0g1i20",
9
+ label: "Calendar"
10
+ })(css({
11
+ backgroundColor: 'background',
12
+ borderRadius: 'lg',
13
+ boxShadow: '0 4px 16px rgba(0, 0, 0, 0.12)',
14
+ width: 'max-content'
15
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9EYXRlUGlja2VyL0NhbGVuZGFyL0NhbGVuZGFyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPd0IiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL0RhdGVQaWNrZXIvQ2FsZW5kYXIvQ2FsZW5kYXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtc3R5bGVzJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBPdXRlciB3cmFwcGVyIGZvciB0aGUgY2FsZW5kYXIgKGhlYWRlciArIGJvZHkgKyBmb290ZXIpLlxuICogVXNlZCBieSBEYXRlUGlja2VyQ2FsZW5kYXIgdG8gZ3JvdXAgdGhlIGNhbGVuZGFyIGNvbnRlbnQuXG4gKi9cbmV4cG9ydCBjb25zdCBDYWxlbmRhciA9IHN0eWxlZC5kaXYoXG4gIGNzcyh7XG4gICAgYmFja2dyb3VuZENvbG9yOiAnYmFja2dyb3VuZCcsXG4gICAgYm9yZGVyUmFkaXVzOiAnbGcnLFxuICAgIGJveFNoYWRvdzogJzAgNHB4IDE2cHggcmdiYSgwLCAwLCAwLCAwLjEyKScsXG4gICAgd2lkdGg6ICdtYXgtY29udGVudCcsXG4gIH0pXG4pO1xuIl19 */");
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { CalendarBodyProps } from './types';
3
+ export declare const CalendarBody: React.FC<CalendarBodyProps>;
@@ -0,0 +1,155 @@
1
+ import _styled from "@emotion/styled/base";
2
+ import { css, states } from '@codecademy/gamut-styles';
3
+ import { useCallback, useEffect, useMemo, useRef } from 'react';
4
+ import * as React from 'react';
5
+ import { TextButton } from '../../Button';
6
+ import { getMonthGrid, isDateDisabled, isDateInRange, isSameDay } from './utils/dateGrid';
7
+ import { getWeekdayFullNames, getWeekdayLabels } from './utils/format';
8
+ import { getDatesWithRow, keyHandler } from './utils/keyHandler';
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ const TableHeader = /*#__PURE__*/_styled("th", {
11
+ target: "e12sl4cx1",
12
+ label: "TableHeader"
13
+ })(css({
14
+ fontSize: 14,
15
+ fontWeight: 'base',
16
+ color: 'text-disabled',
17
+ textAlign: 'center'
18
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9EYXRlUGlja2VyL0NhbGVuZGFyL0NhbGVuZGFyQm9keS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZ0JvQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvRGF0ZVBpY2tlci9DYWxlbmRhci9DYWxlbmRhckJvZHkudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBzdGF0ZXMgfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1zdHlsZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgdXNlQ2FsbGJhY2ssIHVzZUVmZmVjdCwgdXNlTWVtbywgdXNlUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnO1xuXG5pbXBvcnQgeyBUZXh0QnV0dG9uIH0gZnJvbSAnLi4vLi4vQnV0dG9uJztcbmltcG9ydCB7IENhbGVuZGFyQm9keVByb3BzIH0gZnJvbSAnLi90eXBlcyc7XG5pbXB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3Qvbm8tYXJyYXktaW5kZXgta2V5LCBqc3gtYTExeS9jb250cm9sLWhhcy1hc3NvY2lhdGVkLWxhYmVsXG4gICAgICAgICAgICAgICAgICA8dGQga2V5PXtgZW1wdHktJHtyb3dJbmRleH0tJHtjb2xJbmRleH1gfSByb2xlPVwiZ3JpZGNlbGxcIiAvPlxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgY29uc3Qgc2VsZWN0ZWQgPVxuICAgICAgICAgICAgICAgIGlzU2FtZURheShkYXRlLCBzZWxlY3RlZERhdGUpIHx8IGlzU2FtZURheShkYXRlLCBlbmREYXRlKTtcbiAgICAgICAgICAgICAgY29uc3QgaW5SYW5nZSA9XG4gICAgICAgICAgICAgICAgISFzZWxlY3RlZERhdGUgJiZcbiAgICAgICAgICAgICAgICAhIWVuZERhdGUgJiZcbiAgICAgICAgICAgICAgICBpc0RhdGVJblJhbmdlKGRhdGUsIHNlbGVjdGVkRGF0ZSwgZW5kRGF0ZSk7XG4gICAgICAgICAgICAgIGNvbnN0IGRpc2FibGVkID0gaXNEYXRlRGlzYWJsZWQoZGF0ZSwgZGlzYWJsZWREYXRlcyk7XG4gICAgICAgICAgICAgIGNvbnN0IHRvZGF5ID0gaXNUb2RheShkYXRlKTtcbiAgICAgICAgICAgICAgLy8gdGhpcyBpcyBtYWtpbmcgdGhlIHNlbGVjdGVkIGRhdGUgYSBkaWZmZXJuZXQgY29sb3IgYmMgaXQgaXMgZm9jdXNlZCwgbG9vayBpbnRvIGZ1cnRoZXJcbiAgICAgICAgICAgICAgY29uc3QgaXNGb2N1c2VkID1cbiAgICAgICAgICAgICAgICBmb2N1c1RhcmdldCAhPT0gbnVsbCAmJiBpc1NhbWVEYXkoZGF0ZSwgZm9jdXNUYXJnZXQpO1xuXG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPHRkXG4gICAgICAgICAgICAgICAgICBhcmlhLXNlbGVjdGVkPXtzZWxlY3RlZH1cbiAgICAgICAgICAgICAgICAgIGtleT17ZGF0ZS5nZXRUaW1lKCl9XG4gICAgICAgICAgICAgICAgICByb2xlPVwiZ3JpZGNlbGxcIlxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxEYXRlQnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIGRpc2FibGVkPXtkaXNhYmxlZH1cbiAgICAgICAgICAgICAgICAgICAgaXNJblJhbmdlPXtpblJhbmdlfVxuICAgICAgICAgICAgICAgICAgICBpc1NlbGVjdGVkPXtzZWxlY3RlZH1cbiAgICAgICAgICAgICAgICAgICAgaXNUb2RheT17dG9kYXl9XG4gICAgICAgICAgICAgICAgICAgIHJlZj17KGVsKSA9PiBzZXRCdXR0b25SZWYoZGF0ZSwgZWwgYXMgSFRNTEVsZW1lbnQgfCBudWxsKX1cbiAgICAgICAgICAgICAgICAgICAgdGFiSW5kZXg9e2lzRm9jdXNlZCA/IDAgOiAtMX1cbiAgICAgICAgICAgICAgICAgICAgdmFyaWFudD1cInNlY29uZGFyeVwiXG4gICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IG9uRGF0ZVNlbGVjdChkYXRlKX1cbiAgICAgICAgICAgICAgICAgICAgb25Gb2N1cz17KCkgPT4gb25Gb2N1c2VkRGF0ZUNoYW5nZT8uKGRhdGUpfVxuICAgICAgICAgICAgICAgICAgICBvbktleURvd249eyhlOiBSZWFjdC5LZXlib2FyZEV2ZW50KSA9PlxuICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZUtleURvd24oZSwgZGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICB7ZGF0ZS5nZXREYXRlKCl9XG4gICAgICAgICAgICAgICAgICA8L0RhdGVCdXR0b24+XG4gICAgICAgICAgICAgICAgPC90ZD5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0pfVxuICAgICAgICAgIDwvdHI+XG4gICAgICAgICkpfVxuICAgICAgPC90Ym9keT5cbiAgICA8L3RhYmxlPlxuICApO1xufTtcbiJdfQ== */");
19
+ const DateButton = /*#__PURE__*/_styled(TextButton, {
20
+ target: "e12sl4cx0",
21
+ label: "DateButton"
22
+ })(states({
23
+ isToday: {
24
+ position: 'relative',
25
+ '&::after': {
26
+ content: '""',
27
+ position: 'absolute',
28
+ bottom: 4,
29
+ left: '50%',
30
+ width: 4,
31
+ height: 4,
32
+ borderRadius: 'full',
33
+ bg: 'hyper'
34
+ }
35
+ },
36
+ isSelected: {
37
+ bg: 'text',
38
+ color: 'background',
39
+ '&:hover, &:focus': {
40
+ bg: 'secondary-hover',
41
+ color: 'background'
42
+ },
43
+ '&::after': {
44
+ bg: 'background'
45
+ }
46
+ },
47
+ isInRange: {
48
+ bg: 'text-disabled',
49
+ color: 'background',
50
+ borderRadius: 'none',
51
+ '&:hover, &:focus': {
52
+ bg: 'secondary-hover',
53
+ color: 'background'
54
+ },
55
+ '&::after': {
56
+ bg: 'background'
57
+ }
58
+ },
59
+ disabled: {
60
+ color: 'text-disabled',
61
+ textDecoration: 'line-through'
62
+ }
63
+ }), css({
64
+ fontWeight: 'base',
65
+ width: '32px'
66
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9EYXRlUGlja2VyL0NhbGVuZGFyL0NhbGVuZGFyQm9keS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUJtQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvRGF0ZVBpY2tlci9DYWxlbmRhci9DYWxlbmRhckJvZHkudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzLCBzdGF0ZXMgfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1zdHlsZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9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IChcbiAgICAgICAgICA8dHIga2V5PXt3ZWVrLmpvaW4oJy0nKX0+XG4gICAgICAgICAgICB7d2Vlay5tYXAoKGRhdGUsIGNvbEluZGV4KSA9PiB7XG4gICAgICAgICAgICAgIGlmIChkYXRlID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgIC8vIGZpeCB0aGlzIGVycm9yXG4gICAgICAgICAgICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgcmVhY3Qvbm8tYXJyYXktaW5kZXgta2V5LCBqc3gtYTExeS9jb250cm9sLWhhcy1hc3NvY2lhdGVkLWxhYmVsXG4gICAgICAgICAgICAgICAgICA8dGQga2V5PXtgZW1wdHktJHtyb3dJbmRleH0tJHtjb2xJbmRleH1gfSByb2xlPVwiZ3JpZGNlbGxcIiAvPlxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgY29uc3Qgc2VsZWN0ZWQgPVxuICAgICAgICAgICAgICAgIGlzU2FtZURheShkYXRlLCBzZWxlY3RlZERhdGUpIHx8IGlzU2FtZURheShkYXRlLCBlbmREYXRlKTtcbiAgICAgICAgICAgICAgY29uc3QgaW5SYW5nZSA9XG4gICAgICAgICAgICAgICAgISFzZWxlY3RlZERhdGUgJiZcbiAgICAgICAgICAgICAgICAhIWVuZERhdGUgJiZcbiAgICAgICAgICAgICAgICBpc0RhdGVJblJhbmdlKGRhdGUsIHNlbGVjdGVkRGF0ZSwgZW5kRGF0ZSk7XG4gICAgICAgICAgICAgIGNvbnN0IGRpc2FibGVkID0gaXNEYXRlRGlzYWJsZWQoZGF0ZSwgZGlzYWJsZWREYXRlcyk7XG4gICAgICAgICAgICAgIGNvbnN0IHRvZGF5ID0gaXNUb2RheShkYXRlKTtcbiAgICAgICAgICAgICAgLy8gdGhpcyBpcyBtYWtpbmcgdGhlIHNlbGVjdGVkIGRhdGUgYSBkaWZmZXJuZXQgY29sb3IgYmMgaXQgaXMgZm9jdXNlZCwgbG9vayBpbnRvIGZ1cnRoZXJcbiAgICAgICAgICAgICAgY29uc3QgaXNGb2N1c2VkID1cbiAgICAgICAgICAgICAgICBmb2N1c1RhcmdldCAhPT0gbnVsbCAmJiBpc1NhbWVEYXkoZGF0ZSwgZm9jdXNUYXJnZXQpO1xuXG4gICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPHRkXG4gICAgICAgICAgICAgICAgICBhcmlhLXNlbGVjdGVkPXtzZWxlY3RlZH1cbiAgICAgICAgICAgICAgICAgIGtleT17ZGF0ZS5nZXRUaW1lKCl9XG4gICAgICAgICAgICAgICAgICByb2xlPVwiZ3JpZGNlbGxcIlxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIDxEYXRlQnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIGRpc2FibGVkPXtkaXNhYmxlZH1cbiAgICAgICAgICAgICAgICAgICAgaXNJblJhbmdlPXtpblJhbmdlfVxuICAgICAgICAgICAgICAgICAgICBpc1NlbGVjdGVkPXtzZWxlY3RlZH1cbiAgICAgICAgICAgICAgICAgICAgaXNUb2RheT17dG9kYXl9XG4gICAgICAgICAgICAgICAgICAgIHJlZj17KGVsKSA9PiBzZXRCdXR0b25SZWYoZGF0ZSwgZWwgYXMgSFRNTEVsZW1lbnQgfCBudWxsKX1cbiAgICAgICAgICAgICAgICAgICAgdGFiSW5kZXg9e2lzRm9jdXNlZCA/IDAgOiAtMX1cbiAgICAgICAgICAgICAgICAgICAgdmFyaWFudD1cInNlY29uZGFyeVwiXG4gICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IG9uRGF0ZVNlbGVjdChkYXRlKX1cbiAgICAgICAgICAgICAgICAgICAgb25Gb2N1cz17KCkgPT4gb25Gb2N1c2VkRGF0ZUNoYW5nZT8uKGRhdGUpfVxuICAgICAgICAgICAgICAgICAgICBvbktleURvd249eyhlOiBSZWFjdC5LZXlib2FyZEV2ZW50KSA9PlxuICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZUtleURvd24oZSwgZGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICB7ZGF0ZS5nZXREYXRlKCl9XG4gICAgICAgICAgICAgICAgICA8L0RhdGVCdXR0b24+XG4gICAgICAgICAgICAgICAgPC90ZD5cbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0pfVxuICAgICAgICAgIDwvdHI+XG4gICAgICAgICkpfVxuICAgICAgPC90Ym9keT5cbiAgICA8L3RhYmxlPlxuICApO1xufTtcbiJdfQ== */");
67
+ export const CalendarBody = ({
68
+ visibleDate,
69
+ selectedDate,
70
+ endDate = null,
71
+ disabledDates = [],
72
+ onDateSelect,
73
+ locale,
74
+ weekStartsOn = 0,
75
+ labelledById,
76
+ focusedDate,
77
+ onFocusedDateChange,
78
+ onVisibleDateChange,
79
+ onEscapeKeyPress
80
+ }) => {
81
+ const year = visibleDate.getFullYear();
82
+ const month = visibleDate.getMonth();
83
+ const weeks = getMonthGrid(year, month, weekStartsOn);
84
+ const weekdayLabels = getWeekdayLabels(locale, weekStartsOn);
85
+ const weekdayFullNames = getWeekdayFullNames(locale, weekStartsOn);
86
+ const buttonRefs = useRef(new Map());
87
+ const datesWithRow = useMemo(() => getDatesWithRow(weeks), [weeks]);
88
+ const focusTarget = focusedDate ?? selectedDate;
89
+ const isToday = useCallback(d => d !== null && isSameDay(d, new Date()), []);
90
+ const focusButton = useCallback(date => {
91
+ if (date === null) return;
92
+ const key = new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();
93
+ buttonRefs.current.get(key)?.focus();
94
+ }, []);
95
+ useEffect(() => {
96
+ if (focusTarget !== null) focusButton(focusTarget);
97
+ }, [focusTarget, focusButton]);
98
+ const handleKeyDown = useCallback((e, date) => keyHandler(e, date, onFocusedDateChange, datesWithRow, month, year, disabledDates, onDateSelect, onEscapeKeyPress, onVisibleDateChange), [onFocusedDateChange, datesWithRow, month, year, disabledDates, onDateSelect, onEscapeKeyPress, onVisibleDateChange]);
99
+ const setButtonRef = useCallback((date, el) => {
100
+ const k = new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();
101
+ if (el) buttonRefs.current.set(k, el);else buttonRefs.current.delete(k);
102
+ }, []);
103
+ return /*#__PURE__*/_jsxs("table", {
104
+ "aria-labelledby": labelledById,
105
+ role: "grid",
106
+ width: "100%",
107
+ children: [/*#__PURE__*/_jsx("thead", {
108
+ children: /*#__PURE__*/_jsx("tr", {
109
+ children: weekdayLabels.map((label, i) => /*#__PURE__*/_jsx(TableHeader, {
110
+ abbr: weekdayFullNames[i],
111
+ scope: "col",
112
+ children: label
113
+ }, label))
114
+ })
115
+ }), /*#__PURE__*/_jsx("tbody", {
116
+ children: weeks.map((week, rowIndex) => /*#__PURE__*/_jsx("tr", {
117
+ children: week.map((date, colIndex) => {
118
+ if (date === null) {
119
+ return (
120
+ /*#__PURE__*/
121
+ // fix this error
122
+ // eslint-disable-next-line react/no-array-index-key, jsx-a11y/control-has-associated-label
123
+ _jsx("td", {
124
+ role: "gridcell"
125
+ }, `empty-${rowIndex}-${colIndex}`)
126
+ );
127
+ }
128
+ const selected = isSameDay(date, selectedDate) || isSameDay(date, endDate);
129
+ const inRange = !!selectedDate && !!endDate && isDateInRange(date, selectedDate, endDate);
130
+ const disabled = isDateDisabled(date, disabledDates);
131
+ const today = isToday(date);
132
+ // this is making the selected date a differnet color bc it is focused, look into further
133
+ const isFocused = focusTarget !== null && isSameDay(date, focusTarget);
134
+ return /*#__PURE__*/_jsx("td", {
135
+ "aria-selected": selected,
136
+ role: "gridcell",
137
+ children: /*#__PURE__*/_jsx(DateButton, {
138
+ disabled: disabled,
139
+ isInRange: inRange,
140
+ isSelected: selected,
141
+ isToday: today,
142
+ ref: el => setButtonRef(date, el),
143
+ tabIndex: isFocused ? 0 : -1,
144
+ variant: "secondary",
145
+ onClick: () => onDateSelect(date),
146
+ onFocus: () => onFocusedDateChange?.(date),
147
+ onKeyDown: e => handleKeyDown(e, date),
148
+ children: date.getDate()
149
+ })
150
+ }, date.getTime());
151
+ })
152
+ }, week.join('-')))
153
+ })]
154
+ });
155
+ };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { CalendarFooterProps } from './types';
3
+ export declare const CalendarFooter: React.FC<CalendarFooterProps>;
@@ -0,0 +1,60 @@
1
+ import * as React from 'react';
2
+ import { FlexBox } from '../../Box';
3
+ import { TextButton } from '../../Button';
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ // function formatQuickActionLabel(action: QuickAction): string {
6
+ // const { num, timePeriod } = action;
7
+ // const period =
8
+ // timePeriod === 'day'
9
+ // ? num === 1
10
+ // ? 'day'
11
+ // : 'days'
12
+ // : timePeriod === 'week'
13
+ // ? num === 1
14
+ // ? 'week'
15
+ // : 'weeks'
16
+ // : timePeriod === 'month'
17
+ // ? num === 1
18
+ // ? 'month'
19
+ // : 'months'
20
+ // : num === 1
21
+ // ? 'year'
22
+ // : 'years';
23
+ // return `${num} ${period}`;
24
+ // }
25
+
26
+ export const CalendarFooter = ({
27
+ onClearDate,
28
+ onTodayClick,
29
+ onSelectedDateChange,
30
+ onCurrentMonthYearChange
31
+ }) => {
32
+ const handleClearDate = () => {
33
+ onSelectedDateChange(null);
34
+ onClearDate?.();
35
+ };
36
+ const handleTodayClick = () => {
37
+ const today = new Date();
38
+ onSelectedDateChange(today);
39
+ onCurrentMonthYearChange(new Date(today.getFullYear(), today.getMonth(), 1));
40
+ onTodayClick?.();
41
+ };
42
+ // const actions = quickActions.slice(0, 3);
43
+
44
+ return /*#__PURE__*/_jsxs(FlexBox, {
45
+ alignItems: "center",
46
+ borderTop: 1,
47
+ justifyContent: "space-between",
48
+ p: 12,
49
+ children: [/*#__PURE__*/_jsx(TextButton, {
50
+ onClick: handleClearDate,
51
+ children: "Clear"
52
+ }), /*#__PURE__*/_jsx(FlexBox, {
53
+ gap: 32,
54
+ children: /*#__PURE__*/_jsx(TextButton, {
55
+ onClick: handleTodayClick,
56
+ children: "Today"
57
+ })
58
+ })]
59
+ });
60
+ };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { CalendarHeaderProps } from './types';
3
+ export declare const CalendarHeader: React.FC<CalendarHeaderProps>;
@@ -0,0 +1,63 @@
1
+ import { MiniChevronLeftIcon, MiniChevronRightIcon } from '@codecademy/gamut-icons';
2
+ import * as React from 'react';
3
+ import { FlexBox } from '../../Box';
4
+ import { IconButton } from '../../Button';
5
+ import { Text } from '../../Typography';
6
+ import { formatMonthYear } from './utils/format';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export const CalendarHeader = ({
9
+ currentMonthYear,
10
+ onCurrentMonthYearChange,
11
+ secondMonthYear,
12
+ onPreviousMonthClick,
13
+ onNextMonthClick,
14
+ locale,
15
+ headingId
16
+ }) => {
17
+ const handlePreviousMonth = () => {
18
+ const previousMonth = new Date(currentMonthYear.getFullYear(), currentMonthYear.getMonth() - 1, 1);
19
+ onCurrentMonthYearChange?.(previousMonth);
20
+ onPreviousMonthClick?.();
21
+ };
22
+ const handleNextMonth = () => {
23
+ const nextMonth = new Date(currentMonthYear.getFullYear(), currentMonthYear.getMonth() + 1, 1);
24
+ onCurrentMonthYearChange?.(nextMonth);
25
+ onNextMonthClick?.();
26
+ };
27
+ return /*#__PURE__*/_jsxs(FlexBox, {
28
+ alignItems: "center",
29
+ justifyContent: "space-between",
30
+ pb: 16,
31
+ children: [/*#__PURE__*/_jsx(IconButton, {
32
+ "aria-label": "Previous month",
33
+ icon: MiniChevronLeftIcon,
34
+ size: "small",
35
+ tip: "Previous month",
36
+ onClick: handlePreviousMonth
37
+ }), /*#__PURE__*/_jsx(Text, {
38
+ "aria-live": "polite",
39
+ as: "h2",
40
+ fontSize: 16,
41
+ fontWeight: "title",
42
+ id: headingId,
43
+ children: formatMonthYear(currentMonthYear, locale)
44
+ }), secondMonthYear && /*#__PURE__*/_jsx(Text, {
45
+ "aria-live": "polite",
46
+ as: "h2",
47
+ display: {
48
+ _: 'none',
49
+ xs: 'initial'
50
+ },
51
+ fontSize: 16,
52
+ fontWeight: "title",
53
+ id: headingId,
54
+ children: formatMonthYear(secondMonthYear, locale)
55
+ }), /*#__PURE__*/_jsx(IconButton, {
56
+ "aria-label": "Next month",
57
+ icon: MiniChevronRightIcon,
58
+ size: "small",
59
+ tip: "Next month",
60
+ onClick: handleNextMonth
61
+ })]
62
+ });
63
+ };
@@ -0,0 +1,6 @@
1
+ export { Calendar } from './Calendar';
2
+ export { CalendarHeader } from './CalendarHeader';
3
+ export { CalendarBody } from './CalendarBody';
4
+ export { CalendarFooter } from './CalendarFooter';
5
+ export type { CalendarHeaderProps, CalendarBodyProps, CalendarFooterProps, QuickAction, } from './types';
6
+ export * from './utils';
@@ -0,0 +1,5 @@
1
+ export { Calendar } from './Calendar';
2
+ export { CalendarHeader } from './CalendarHeader';
3
+ export { CalendarBody } from './CalendarBody';
4
+ export { CalendarFooter } from './CalendarFooter';
5
+ export * from './utils';