@mezzanine-ui/react 0.14.10 → 0.15.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.
Files changed (195) hide show
  1. package/Accordion/Accordion.js +2 -1
  2. package/Accordion/AccordionDetails.js +1 -1
  3. package/Accordion/AccordionSummary.js +4 -2
  4. package/Accordion/index.d.ts +1 -1
  5. package/Alert/index.d.ts +2 -2
  6. package/Anchor/Anchor.d.ts +30 -0
  7. package/Anchor/Anchor.js +21 -0
  8. package/Anchor/index.d.ts +1 -0
  9. package/Anchor/index.js +1 -0
  10. package/AppBar/AppBar.js +1 -3
  11. package/AppBar/index.d.ts +4 -4
  12. package/Badge/index.d.ts +1 -1
  13. package/Button/Button.js +1 -1
  14. package/Button/ButtonGroup.js +1 -1
  15. package/Button/IconButton.js +1 -1
  16. package/Button/index.d.ts +2 -2
  17. package/Calendar/Calendar.js +9 -1
  18. package/Calendar/CalendarContext.js +3 -3
  19. package/Calendar/CalendarDays.js +12 -5
  20. package/Calendar/CalendarMonths.js +13 -3
  21. package/Calendar/CalendarWeeks.js +16 -8
  22. package/Calendar/CalendarYears.js +15 -4
  23. package/Calendar/index.d.ts +7 -7
  24. package/Calendar/useCalendarControlModifiers.js +4 -13
  25. package/Calendar/useCalendarControls.js +1 -1
  26. package/Calendar/useCalendarModeStack.js +1 -1
  27. package/Card/Card.d.ts +1 -1
  28. package/Card/Card.js +5 -5
  29. package/Card/CardActions.js +1 -1
  30. package/Card/index.d.ts +2 -2
  31. package/Checkbox/CheckAll.js +1 -1
  32. package/Checkbox/Checkbox.js +4 -4
  33. package/Checkbox/CheckboxGroup.js +3 -1
  34. package/Checkbox/index.d.ts +3 -3
  35. package/ConfirmActions/ConfirmActions.js +1 -1
  36. package/ConfirmActions/index.d.ts +1 -1
  37. package/DatePicker/DatePicker.js +3 -7
  38. package/DatePicker/DatePickerCalendar.js +6 -2
  39. package/DatePicker/index.d.ts +1 -1
  40. package/DateRangePicker/DateRangePicker.js +7 -10
  41. package/DateRangePicker/DateRangePickerCalendar.js +9 -3
  42. package/DateRangePicker/index.d.ts +2 -2
  43. package/DateRangePicker/useDateRangeCalendarControls.js +6 -18
  44. package/DateRangePicker/useDateRangePickerValue.js +1 -1
  45. package/DateTimePicker/DateTimePicker.js +2 -2
  46. package/DateTimePicker/index.d.ts +1 -1
  47. package/Drawer/index.d.ts +1 -1
  48. package/Dropdown/Dropdown.js +2 -10
  49. package/Dropdown/index.d.ts +1 -1
  50. package/Empty/index.d.ts +1 -1
  51. package/Form/FormMessage.js +1 -1
  52. package/Form/useAutoCompleteValueControl.js +4 -8
  53. package/Form/useCheckboxControlValue.d.ts +1 -1
  54. package/Form/useControlValueState.js +1 -1
  55. package/Form/useCustomControlValue.d.ts +1 -1
  56. package/Form/useInputControlValue.d.ts +1 -1
  57. package/Form/useInputControlValue.js +1 -1
  58. package/Form/useInputWithClearControlValue.d.ts +1 -1
  59. package/Form/useInputWithClearControlValue.js +2 -6
  60. package/Form/useInputWithTagsModeValue.js +5 -8
  61. package/Form/useRadioControlValue.d.ts +1 -1
  62. package/Form/useSelectValueControl.js +1 -4
  63. package/Form/useSwitchControlValue.d.ts +1 -1
  64. package/Icon/index.d.ts +1 -1
  65. package/Input/Input.d.ts +4 -4
  66. package/Input/Input.js +3 -3
  67. package/Input/index.d.ts +1 -1
  68. package/Loading/index.d.ts +1 -1
  69. package/Menu/Menu.js +1 -1
  70. package/Menu/MenuDivider.js +1 -1
  71. package/Menu/index.d.ts +1 -1
  72. package/Message/Message.d.ts +1 -1
  73. package/Message/Message.js +19 -9
  74. package/Message/index.d.ts +2 -2
  75. package/Modal/ModalActions.js +1 -1
  76. package/Modal/index.d.ts +7 -7
  77. package/Navigation/Navigation.js +3 -4
  78. package/Navigation/NavigationItem.js +2 -2
  79. package/Navigation/NavigationSubMenu.js +4 -7
  80. package/Navigation/index.d.ts +1 -1
  81. package/Notification/Notification.js +14 -10
  82. package/Notification/index.d.ts +2 -2
  83. package/Notifier/NotifierManager.js +1 -1
  84. package/Overlay/index.d.ts +1 -1
  85. package/Pagination/Pagination.d.ts +2 -2
  86. package/Pagination/PaginationJumper.js +1 -1
  87. package/Pagination/PaginationPageSize.js +6 -4
  88. package/Pagination/index.d.ts +4 -4
  89. package/Pagination/usePagination.js +20 -7
  90. package/Picker/PickerTrigger.d.ts +3 -3
  91. package/Picker/index.d.ts +3 -3
  92. package/Picker/usePickerValue.js +7 -3
  93. package/Popconfirm/Popconfirm.js +1 -1
  94. package/Popconfirm/index.d.ts +1 -1
  95. package/Popover/Popover.js +1 -6
  96. package/Popover/index.d.ts +1 -1
  97. package/Popper/Popper.js +1 -1
  98. package/Portal/Portal.js +2 -4
  99. package/Portal/index.d.ts +1 -1
  100. package/Progress/Progress.js +7 -5
  101. package/Progress/index.d.ts +1 -1
  102. package/Provider/ConfigProvider.js +1 -1
  103. package/Provider/index.d.ts +4 -4
  104. package/Radio/Radio.js +4 -4
  105. package/Radio/RadioGroup.js +2 -1
  106. package/Radio/index.d.ts +2 -2
  107. package/Select/AutoComplete.js +4 -8
  108. package/Select/Option.js +1 -1
  109. package/Select/Select.js +3 -7
  110. package/Select/SelectTriggerTags.js +1 -1
  111. package/Select/TreeSelect.js +1 -4
  112. package/Select/index.d.ts +5 -5
  113. package/Select/useSelectTriggerTags.js +1 -1
  114. package/Skeleton/Skeleton.js +5 -1
  115. package/Slider/Slider.js +13 -9
  116. package/Slider/useSlider.js +57 -50
  117. package/Stepper/Step.js +4 -2
  118. package/Stepper/index.d.ts +2 -2
  119. package/Switch/Switch.js +1 -1
  120. package/Switch/index.d.ts +1 -1
  121. package/Table/Table.d.ts +25 -25
  122. package/Table/Table.js +52 -49
  123. package/Table/TableBody.js +12 -6
  124. package/Table/TableBodyRow.js +22 -22
  125. package/Table/TableCell.js +3 -2
  126. package/Table/TableExpandedTable.js +9 -7
  127. package/Table/TableHeader.js +11 -9
  128. package/Table/draggable/useTableDraggable.js +2 -1
  129. package/Table/editable/TableEditRenderWrapper.js +2 -2
  130. package/Table/index.d.ts +5 -5
  131. package/Table/pagination/TablePagination.js +2 -2
  132. package/Table/pagination/useTablePagination.d.ts +1 -1
  133. package/Table/pagination/useTablePagination.js +2 -2
  134. package/Table/refresh/TableRefresh.js +2 -5
  135. package/Table/rowSelection/TableRowSelection.js +12 -9
  136. package/Table/rowSelection/useTableRowSelection.d.ts +1 -1
  137. package/Table/rowSelection/useTableRowSelection.js +3 -5
  138. package/Table/sorting/TableSortingIcon.js +2 -2
  139. package/Table/sorting/useTableSorting.d.ts +1 -1
  140. package/Table/sorting/useTableSorting.js +11 -5
  141. package/Table/useTableFetchMore.d.ts +1 -1
  142. package/Table/useTableFetchMore.js +1 -1
  143. package/Table/useTableLoading.d.ts +1 -1
  144. package/Table/useTableLoading.js +1 -1
  145. package/Table/useTableScroll.js +33 -19
  146. package/Tabs/index.d.ts +3 -3
  147. package/Tag/Tag.js +1 -1
  148. package/Tag/index.d.ts +2 -2
  149. package/TextField/TextField.js +8 -7
  150. package/TextField/index.d.ts +1 -1
  151. package/TextField/useTextFieldControl.js +1 -1
  152. package/Textarea/Textarea.js +2 -2
  153. package/TimePanel/index.d.ts +1 -1
  154. package/TimePicker/TimePicker.js +2 -2
  155. package/TimePicker/index.d.ts +1 -1
  156. package/Tooltip/Tooltip.d.ts +1 -1
  157. package/Tooltip/Tooltip.js +6 -5
  158. package/Tooltip/index.d.ts +1 -1
  159. package/Tooltip/useDelayMouseEnterLeave.js +1 -1
  160. package/Transition/Collapse.js +3 -1
  161. package/Transition/Fade.js +9 -8
  162. package/Transition/Grow.js +16 -12
  163. package/Transition/SlideFade.js +9 -8
  164. package/Transition/Zoom.js +9 -8
  165. package/Transition/getTransitionStyleProps.js +1 -1
  166. package/Transition/index.d.ts +4 -4
  167. package/Transition/useSetNodeTransition.d.ts +4 -1
  168. package/Transition/useSetNodeTransition.js +1 -1
  169. package/Tree/Tree.js +12 -4
  170. package/Tree/TreeNode.js +17 -11
  171. package/Tree/TreeNodeList.js +1 -3
  172. package/Tree/getTreeNodeEntities.js +9 -6
  173. package/Tree/index.d.ts +2 -2
  174. package/Tree/traverseTree.js +1 -1
  175. package/Typography/Typography.js +1 -3
  176. package/Typography/index.d.ts +1 -1
  177. package/Upload/UploadInput.js +1 -1
  178. package/Upload/UploadPicture.d.ts +11 -11
  179. package/Upload/UploadPictureBlock.js +2 -2
  180. package/Upload/UploadPictureWall.d.ts +14 -14
  181. package/Upload/UploadPictureWall.js +17 -5
  182. package/Upload/UploadResult.js +2 -2
  183. package/Upload/index.d.ts +3 -3
  184. package/_internal/InputCheck/InputCheck.js +1 -1
  185. package/_internal/InputCheck/index.d.ts +1 -1
  186. package/_internal/InputTriggerPopper/index.d.ts +1 -1
  187. package/_internal/SlideFadeOverlay/SlideFadeOverlay.js +3 -8
  188. package/_internal/SlideFadeOverlay/index.d.ts +1 -1
  189. package/hooks/useIsomorphicLayoutEffect.js +3 -1
  190. package/index.d.ts +22 -18
  191. package/index.js +2 -0
  192. package/package.json +7 -7
  193. package/utils/get-scrollbar-width.d.ts +1 -1
  194. package/utils/get-scrollbar-width.js +6 -1
  195. package/utils/scroll-lock.js +4 -4
@@ -20,7 +20,8 @@ const Accordion = forwardRef(function Accordion(props, ref) {
20
20
  var _a, _b;
21
21
  return ({
22
22
  detailsId: ((_a = summary === null || summary === void 0 ? void 0 : summary.props) === null || _a === void 0 ? void 0 : _a.id)
23
- ? `${summary.props.id}-details` : undefined,
23
+ ? `${summary.props.id}-details`
24
+ : undefined,
24
25
  disabled,
25
26
  expanded: expandedProp || expanded,
26
27
  summaryId: (_b = summary === null || summary === void 0 ? void 0 : summary.props) === null || _b === void 0 ? void 0 : _b.id,
@@ -7,7 +7,7 @@ import cx from 'clsx';
7
7
 
8
8
  const AccordionDetails = forwardRef(function AccordionDetails(props, ref) {
9
9
  const { className, children, expanded: expandedProp, ...rest } = props;
10
- const { detailsId, expanded, summaryId, } = useContext(AccordionControlContext) || {};
10
+ const { detailsId, expanded, summaryId } = useContext(AccordionControlContext) || {};
11
11
  const ariaProps = useMemo(() => {
12
12
  if (summaryId && detailsId) {
13
13
  return {
@@ -8,7 +8,7 @@ import cx from 'clsx';
8
8
 
9
9
  const AccordionSummary = forwardRef(function AccordionSummary(props, ref) {
10
10
  const { className, children, iconClassName: iconClassNameProp, prefixIcon, suffixActions, ...rest } = props;
11
- const { detailsId, disabled, expanded, toggleExpanded, } = useContext(AccordionControlContext) || {};
11
+ const { detailsId, disabled, expanded, toggleExpanded } = useContext(AccordionControlContext) || {};
12
12
  const onToggle = useCallback((e) => {
13
13
  e.stopPropagation();
14
14
  if (typeof toggleExpanded === 'function' && !disabled) {
@@ -43,7 +43,9 @@ const AccordionSummary = forwardRef(function AccordionSummary(props, ref) {
43
43
  }, [disabled, expanded, iconClassNameProp, onToggle]);
44
44
  return (jsxs("div", { ...rest, ...ariaProps, ref: ref, className: cx(accordionClasses.summary, {
45
45
  [accordionClasses.summaryDisabled]: disabled,
46
- }, className), onClick: onToggle, onKeyDown: onKeyDown, role: "button", tabIndex: 0, children: [jsxs("div", { className: accordionClasses.summaryMainPart, children: [suffixActions ? (prefixIcon || (jsx(DefaultIcon, { className: accordionClasses.summaryMainPartPrefix }))) : null, children] }), suffixActions || (jsx(DefaultIcon, {}))] }));
46
+ }, className), onClick: onToggle, onKeyDown: onKeyDown, role: "button", tabIndex: 0, children: [jsxs("div", { className: accordionClasses.summaryMainPart, children: [suffixActions
47
+ ? prefixIcon || (jsx(DefaultIcon, { className: accordionClasses.summaryMainPartPrefix }))
48
+ : null, children] }), suffixActions || jsx(DefaultIcon, {})] }));
47
49
  });
48
50
  var AccordionSummary$1 = AccordionSummary;
49
51
 
@@ -1,3 +1,3 @@
1
- export { AccordionProps, default, } from './Accordion';
1
+ export { AccordionProps, default } from './Accordion';
2
2
  export { AccordionSummaryProps, default as AccordionSummary, } from './AccordionSummary';
3
3
  export { AccordionDetailsProps, default as AccordionDetails, } from './AccordionDetails';
package/Alert/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { AlertSeverity, } from '@mezzanine-ui/core/alert';
2
- export { AlertProps, default, } from './Alert';
1
+ export { AlertSeverity } from '@mezzanine-ui/core/alert';
2
+ export { AlertProps, default } from './Alert';
@@ -0,0 +1,30 @@
1
+ import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
2
+ export interface AnchorProps extends Omit<NativeElementPropsWithoutKeyAndRef<'div'>, 'onClick'> {
3
+ /** The current active anchor ID */
4
+ activeAnchorId?: string;
5
+ /** Whether apply ellipsis or not
6
+ * @default false
7
+ */
8
+ ellipsis?: boolean;
9
+ /**
10
+ * Anchor list.
11
+ */
12
+ list: {
13
+ id: string;
14
+ name: string;
15
+ }[];
16
+ /**
17
+ * The maximum width for anchor container. This might be useful when you need to set `ellipsis: true`.
18
+ */
19
+ maxWidth?: number;
20
+ /**
21
+ * Trigger when user click on any anchor.
22
+ */
23
+ onClick?: (nextAnchorId: string) => void;
24
+ }
25
+ /**
26
+ * The react component for `mezzanine` anchor.
27
+ * This component should always be full width of its parent.
28
+ */
29
+ declare const Anchor: import("react").ForwardRefExoticComponent<AnchorProps & import("react").RefAttributes<HTMLDivElement>>;
30
+ export default Anchor;
@@ -0,0 +1,21 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import { anchorClasses } from '@mezzanine-ui/core/anchor';
4
+ import Typography from '../Typography/Typography.js';
5
+ import cx from 'clsx';
6
+
7
+ /**
8
+ * The react component for `mezzanine` anchor.
9
+ * This component should always be full width of its parent.
10
+ */
11
+ const Anchor = forwardRef(function Anchor(props, ref) {
12
+ const { activeAnchorId, className, children, ellipsis = false, list, maxWidth, onClick, style, ...rest } = props;
13
+ const resolvedStyle = {
14
+ ...(style || {}),
15
+ ...(maxWidth ? { maxWidth: `${maxWidth}px` } : {}),
16
+ };
17
+ return (jsxs("div", { ref: ref, className: cx(anchorClasses.host, className), style: resolvedStyle, ...rest, children: [jsx("div", { className: anchorClasses.bar }), list.map((anchor) => (jsx("button", { type: "button", onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(anchor.id), className: cx(anchorClasses.anchor, activeAnchorId === anchor.id && anchorClasses.anchorActive), children: jsx(Typography, { variant: "input3", color: "inherit", ellipsis: ellipsis, children: anchor.name }) }, anchor.id)))] }));
18
+ });
19
+ var Anchor$1 = Anchor;
20
+
21
+ export { Anchor$1 as default };
@@ -0,0 +1 @@
1
+ export { AnchorProps, default } from './Anchor';
@@ -0,0 +1 @@
1
+ export { default } from './Anchor.js';
package/AppBar/AppBar.js CHANGED
@@ -18,9 +18,7 @@ const componentOrders = (type) => {
18
18
  };
19
19
  const AppBar = forwardRef((props, ref) => {
20
20
  const { orientation = 'horizontal', className, children, ...rest } = props;
21
- const SortedChildren = Children
22
- .toArray(children)
23
- .sort((unknownBefore, unknownAfter) => {
21
+ const SortedChildren = Children.toArray(children).sort((unknownBefore, unknownAfter) => {
24
22
  const { type: beforeType } = unknownBefore;
25
23
  const { type: afterType } = unknownAfter;
26
24
  const beforeOrder = componentOrders(beforeType);
package/AppBar/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { AppBarBrandProps, default as AppBarBrand, } from './AppBarBrand';
2
- export { AppBarMainProps, default as AppBarMain, } from './AppBarMain';
3
- export { AppBarSupportProps, default as AppBarSupport, } from './AppBarSupport';
4
- export { AppBarChild, AppBarChildren, AppBarProps, default, } from './AppBar';
1
+ export { AppBarBrandProps, default as AppBarBrand } from './AppBarBrand';
2
+ export { AppBarMainProps, default as AppBarMain } from './AppBarMain';
3
+ export { AppBarSupportProps, default as AppBarSupport } from './AppBarSupport';
4
+ export { AppBarChild, AppBarChildren, AppBarProps, default } from './AppBar';
package/Badge/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { BadgeProps, default, } from './Badge';
1
+ export { BadgeProps, default } from './Badge';
2
2
  export { BadgeContainerProps, default as BadgeContainer, } from './BadgeContainer';
package/Button/Button.js CHANGED
@@ -10,7 +10,7 @@ import cx from 'clsx';
10
10
  * The react component for `mezzanine` button.
11
11
  */
12
12
  const Button = forwardRef(function Button(props, ref) {
13
- const { size: globalSize, } = useContext(MezzanineConfig);
13
+ const { size: globalSize } = useContext(MezzanineConfig);
14
14
  const { children, className, color = 'primary', component: Component = 'button', danger = false, disabled = false, loading = false, onClick, prefix: prefixProp, size = globalSize, suffix: suffixProp, variant = 'text', ...rest } = props;
15
15
  let prefix = prefixProp;
16
16
  let suffix = suffixProp;
@@ -8,7 +8,7 @@ import cx from 'clsx';
8
8
  * The react component for `mezzanine` button group.
9
9
  */
10
10
  const ButtonGroup = forwardRef(function ButtonGroup(props, ref) {
11
- const { size: globalSize, } = useContext(MezzanineConfig);
11
+ const { size: globalSize } = useContext(MezzanineConfig);
12
12
  const { attached = false, children, className, color = 'primary', danger = false, disabled = false, fullWidth = false, orientation = 'horizontal', role = 'group', size = globalSize, spacing, style: styleProp, variant = 'text', ...rest } = props;
13
13
  const cssVars = toButtonGroupCssVars({ size, spacing });
14
14
  const style = {
@@ -7,7 +7,7 @@ import Button from './Button.js';
7
7
  */
8
8
  const IconButton = forwardRef(function IconButton(props, ref) {
9
9
  const { children, ...rest } = props;
10
- return (jsx(Button, { ...rest, ref: ref, prefix: children }));
10
+ return jsx(Button, { ...rest, ref: ref, prefix: children });
11
11
  });
12
12
 
13
13
  export { IconButton as default };
package/Button/index.d.ts CHANGED
@@ -3,8 +3,8 @@ import { ButtonComponent, ButtonPropsBase } from './typings';
3
3
  import { ButtonProps } from './Button';
4
4
  import { IconButtonProps } from './IconButton';
5
5
  export type { ButtonColor, ButtonGroupOrientation, ButtonGroupSpacing, ButtonSize, ButtonVariant, } from '@mezzanine-ui/core/button';
6
- export { ButtonGroupChild, ButtonGroupProps, default as ButtonGroup } from './ButtonGroup';
7
- export type { ButtonComponent, ButtonProps, ButtonPropsBase, IconButtonProps, };
6
+ export { ButtonGroupChild, ButtonGroupProps, default as ButtonGroup, } from './ButtonGroup';
7
+ export type { ButtonComponent, ButtonProps, ButtonPropsBase, IconButtonProps };
8
8
  /**
9
9
  * @remark
10
10
  * Add type alias here for parsable to react docgen typescript.
@@ -46,7 +46,15 @@ const Calendar = forwardRef(function Calendar(props, ref) {
46
46
  else if (mode === 'year') {
47
47
  controls = (jsx("button", { type: "button", className: cx(calendarClasses.button, calendarClasses.controlsButton, calendarClasses.buttonDisabled), disabled: true, "aria-disabled": true, children: displayYearRange }));
48
48
  }
49
- return (jsxs("div", { ...restCalendarProps, ref: ref, className: cx(calendarClasses.host, className), children: [jsx(CalendarControls, { disableOnNext: disableOnNext, disableOnPrev: disableOnPrev, onNext: onNext ? () => { onNext(mode); } : undefined, onPrev: onPrev ? () => { onPrev(mode); } : undefined, children: controls }), displayCalendar] }));
49
+ return (jsxs("div", { ...restCalendarProps, ref: ref, className: cx(calendarClasses.host, className), children: [jsx(CalendarControls, { disableOnNext: disableOnNext, disableOnPrev: disableOnPrev, onNext: onNext
50
+ ? () => {
51
+ onNext(mode);
52
+ }
53
+ : undefined, onPrev: onPrev
54
+ ? () => {
55
+ onPrev(mode);
56
+ }
57
+ : undefined, children: controls }), displayCalendar] }));
50
58
  });
51
59
  var Calendar$1 = Calendar;
52
60
 
@@ -5,9 +5,9 @@ const CalendarContext = createContext(undefined);
5
5
  function useCalendarContext() {
6
6
  const configs = useContext(CalendarContext);
7
7
  if (!configs) {
8
- throw new Error('Cannot find values in your context. '
9
- + 'Make sure you use `CalendarConfigProvider` in your app '
10
- + 'and pass in one of the following as methods: `CalendarMethodsMoment`.');
8
+ throw new Error('Cannot find values in your context. ' +
9
+ 'Make sure you use `CalendarConfigProvider` in your app ' +
10
+ 'and pass in one of the following as methods: `CalendarMethodsMoment`.');
11
11
  }
12
12
  return configs;
13
13
  }
@@ -26,15 +26,22 @@ function CalendarDays(props) {
26
26
  ? thisMonth + 1
27
27
  : thisMonth;
28
28
  const date = setDate(setMonth(referenceDate, month), dateNum);
29
- const disabled = ((isYearDisabled === null || isYearDisabled === void 0 ? void 0 : isYearDisabled(date)) || (isMonthDisabled === null || isMonthDisabled === void 0 ? void 0 : isMonthDisabled(date)) || (isDateDisabled === null || isDateDisabled === void 0 ? void 0 : isDateDisabled(date))) || false;
29
+ const disabled = (isYearDisabled === null || isYearDisabled === void 0 ? void 0 : isYearDisabled(date)) ||
30
+ (isMonthDisabled === null || isMonthDisabled === void 0 ? void 0 : isMonthDisabled(date)) ||
31
+ (isDateDisabled === null || isDateDisabled === void 0 ? void 0 : isDateDisabled(date)) ||
32
+ false;
30
33
  const inactive = !disabled && (isPrevMonth || isNextMonth);
31
34
  const inRange = !inactive && isDateInRange && isDateInRange(date);
32
35
  const active = !disabled && !inactive && value && isDateIncluded(date, value);
33
- const onMouseEnter = onDateHover ? () => {
34
- onDateHover(date);
35
- } : undefined;
36
+ const onMouseEnter = onDateHover
37
+ ? () => {
38
+ onDateHover(date);
39
+ }
40
+ : undefined;
36
41
  const onClick = onClickProp
37
- ? () => { onClickProp(date); }
42
+ ? () => {
43
+ onClickProp(date);
44
+ }
38
45
  : undefined;
39
46
  return (jsx(CalendarCell, { today: isSameDate(date, getNow()), active: active, disabled: isPrevMonth || isNextMonth, children: jsx("button", { type: "button", "aria-disabled": disabled, disabled: disabled, onMouseEnter: onMouseEnter, className: cx(calendarClasses.button, {
40
47
  [calendarClasses.buttonInRange]: inRange,
@@ -16,10 +16,20 @@ function CalendarMonths(props) {
16
16
  const monthDateType = setMonth(referenceDate, month);
17
17
  const active = value && isMonthIncluded(monthDateType, value);
18
18
  /** @NOTE Current month should be disabled when current year is disabled */
19
- const disabled = ((isYearDisabled === null || isYearDisabled === void 0 ? void 0 : isYearDisabled(monthDateType)) || (isMonthDisabled === null || isMonthDisabled === void 0 ? void 0 : isMonthDisabled(monthDateType))) || false;
19
+ const disabled = (isYearDisabled === null || isYearDisabled === void 0 ? void 0 : isYearDisabled(monthDateType)) ||
20
+ (isMonthDisabled === null || isMonthDisabled === void 0 ? void 0 : isMonthDisabled(monthDateType)) ||
21
+ false;
20
22
  const inRange = isMonthInRange && isMonthInRange(monthDateType);
21
- const onClick = onClickProp ? () => { onClickProp(monthDateType); } : undefined;
22
- const onMouseEnter = onMonthHover ? () => { onMonthHover(monthDateType); } : undefined;
23
+ const onClick = onClickProp
24
+ ? () => {
25
+ onClickProp(monthDateType);
26
+ }
27
+ : undefined;
28
+ const onMouseEnter = onMonthHover
29
+ ? () => {
30
+ onMonthHover(monthDateType);
31
+ }
32
+ : undefined;
23
33
  return (jsx("button", { type: "button", "aria-disabled": disabled, disabled: disabled, className: cx(calendarClasses.button, {
24
34
  [calendarClasses.buttonActive]: active,
25
35
  [calendarClasses.buttonInRange]: inRange,
@@ -32,21 +32,29 @@ function CalendarWeeks(props) {
32
32
  const date = setDate(setMonth(referenceDate, month), dateNum);
33
33
  dates.push(date);
34
34
  });
35
- const disabled = ((isYearDisabled === null || isYearDisabled === void 0 ? void 0 : isYearDisabled(dates[0])) || (isMonthDisabled === null || isMonthDisabled === void 0 ? void 0 : isMonthDisabled(dates[0])) || (isWeekDisabled === null || isWeekDisabled === void 0 ? void 0 : isWeekDisabled(dates[0]))) || false;
35
+ const disabled = (isYearDisabled === null || isYearDisabled === void 0 ? void 0 : isYearDisabled(dates[0])) ||
36
+ (isMonthDisabled === null || isMonthDisabled === void 0 ? void 0 : isMonthDisabled(dates[0])) ||
37
+ (isWeekDisabled === null || isWeekDisabled === void 0 ? void 0 : isWeekDisabled(dates[0])) ||
38
+ false;
36
39
  const inactive = !disabled && (weekStartInPrevMonth || weekStartInNextMonth);
37
40
  const active = !disabled && !inactive && value && isWeekIncluded(dates[0], value);
38
41
  const inRange = !disabled && !inactive && isWeekInRange && isWeekInRange(dates[0]);
39
- const onMouseEnter = onWeekHover ? () => {
40
- onWeekHover(dates[0]);
41
- } : undefined;
42
- const onClick = onClickProp ? () => {
43
- onClickProp(dates[0]);
44
- } : undefined;
42
+ const onMouseEnter = onWeekHover
43
+ ? () => {
44
+ onWeekHover(dates[0]);
45
+ }
46
+ : undefined;
47
+ const onClick = onClickProp
48
+ ? () => {
49
+ onClickProp(dates[0]);
50
+ }
51
+ : undefined;
45
52
  return (jsx("button", { type: "button", className: cx(calendarClasses.button, calendarClasses.row, {
46
53
  [calendarClasses.buttonActive]: active,
47
54
  [calendarClasses.buttonInRange]: inRange,
48
55
  [calendarClasses.buttonDisabled]: disabled,
49
- }), disabled: disabled, "aria-disabled": disabled, onClick: onClick, onMouseEnter: onMouseEnter, children: week.map((dateNum, dateIndex) => (jsx(CalendarCell, { today: isSameDate(dates[dateIndex], getNow()), disabled: disabled || !isInMonth(dates[dateIndex], getMonth(referenceDate)), active: active, children: dateNum }, `${getMonth(dates[dateIndex])}/${getDate(dates[dateIndex])}`))) }, `CALENDAR_WEEKS/WEEK_OF/${index}`));
56
+ }), disabled: disabled, "aria-disabled": disabled, onClick: onClick, onMouseEnter: onMouseEnter, children: week.map((dateNum, dateIndex) => (jsx(CalendarCell, { today: isSameDate(dates[dateIndex], getNow()), disabled: disabled ||
57
+ !isInMonth(dates[dateIndex], getMonth(referenceDate)), active: active, children: dateNum }, `${getMonth(dates[dateIndex])}/${getDate(dates[dateIndex])}`))) }, `CALENDAR_WEEKS/WEEK_OF/${index}`));
50
58
  })] }));
51
59
  }
52
60
 
@@ -10,7 +10,7 @@ import cx from 'clsx';
10
10
  * You may use it to compose your own calendar.
11
11
  */
12
12
  function CalendarYears(props) {
13
- const { getNow, getYear, isYearIncluded, setYear, } = useCalendarContext();
13
+ const { getNow, getYear, isYearIncluded, setYear } = useCalendarContext();
14
14
  const { className, isYearDisabled, isYearInRange, onClick: onClickProp, onYearHover, referenceDate, value, ...rest } = props;
15
15
  const [start] = useMemo(() => getCalendarYearRange(getYear(referenceDate)), [getYear, referenceDate]);
16
16
  return (jsx("div", { className: cx(calendarClasses.board, className), ...rest, children: jsx("div", { className: calendarClasses.twelveGrid, children: calendarYearsBase.map((base) => {
@@ -18,10 +18,21 @@ function CalendarYears(props) {
18
18
  const yearDateType = setYear(getNow(), thisYear);
19
19
  const disabled = isYearDisabled && isYearDisabled(yearDateType);
20
20
  const inactive = !disabled && (base === 0 || base === 11);
21
- const active = !disabled && !inactive && value && isYearIncluded(yearDateType, value);
21
+ const active = !disabled &&
22
+ !inactive &&
23
+ value &&
24
+ isYearIncluded(yearDateType, value);
22
25
  const inRange = isYearInRange && isYearInRange(yearDateType);
23
- const onClick = onClickProp ? () => { onClickProp(yearDateType); } : undefined;
24
- const onMouseEnter = onYearHover ? () => { onYearHover(yearDateType); } : undefined;
26
+ const onClick = onClickProp
27
+ ? () => {
28
+ onClickProp(yearDateType);
29
+ }
30
+ : undefined;
31
+ const onMouseEnter = onYearHover
32
+ ? () => {
33
+ onYearHover(yearDateType);
34
+ }
35
+ : undefined;
25
36
  return (jsx("button", { type: "button", "aria-disabled": disabled, disabled: disabled, className: cx(calendarClasses.button, {
26
37
  [calendarClasses.buttonActive]: active,
27
38
  [calendarClasses.buttonInRange]: inRange,
@@ -1,12 +1,12 @@
1
1
  export { CalendarControlModifier, UseCalendarControlModifiersResult, useCalendarControlModifiers, } from './useCalendarControlModifiers';
2
- export { useCalendarModeStack, } from './useCalendarModeStack';
3
- export { useCalendarControls, } from './useCalendarControls';
2
+ export { useCalendarModeStack } from './useCalendarModeStack';
3
+ export { useCalendarControls } from './useCalendarControls';
4
4
  export { CalendarConfigs, CalendarConfigProviderProps, CalendarContext, useCalendarContext, default as CalendarConfigProvider, } from './CalendarContext';
5
- export { CalendarYearsProps, default as CalendarYears, } from './CalendarYears';
6
- export { CalendarWeeksProps, default as CalendarWeeks, } from './CalendarWeeks';
5
+ export { CalendarYearsProps, default as CalendarYears } from './CalendarYears';
6
+ export { CalendarWeeksProps, default as CalendarWeeks } from './CalendarWeeks';
7
7
  export { CalendarMonthsProps, default as CalendarMonths, } from './CalendarMonths';
8
- export { CalendarDaysProps, default as CalendarDays, } from './CalendarDays';
8
+ export { CalendarDaysProps, default as CalendarDays } from './CalendarDays';
9
9
  export { CalendarDayOfWeekProps, default as CalendarDayOfWeek, } from './CalendarDayOfWeek';
10
10
  export { CalendarControlsProps, default as CalendarControls, } from './CalendarControls';
11
- export { CalendarCellProps, default as CalendarCell, } from './CalendarCell';
12
- export { CalendarProps, default, } from './Calendar';
11
+ export { CalendarCellProps, default as CalendarCell } from './CalendarCell';
12
+ export { CalendarProps, default } from './Calendar';
@@ -3,24 +3,15 @@ import { useMemo } from 'react';
3
3
  import { useCalendarContext } from './CalendarContext.js';
4
4
 
5
5
  function useCalendarControlModifiers() {
6
- const { addYear, addMonth, } = useCalendarContext();
6
+ const { addYear, addMonth } = useCalendarContext();
7
7
  return useMemo(() => ({
8
8
  year: [
9
9
  (date) => addYear(date, -calendarYearModuler),
10
10
  (date) => addYear(date, calendarYearModuler),
11
11
  ],
12
- month: [
13
- (date) => addYear(date, -1),
14
- (date) => addYear(date, 1),
15
- ],
16
- week: [
17
- (date) => addMonth(date, -1),
18
- (date) => addMonth(date, 1),
19
- ],
20
- day: [
21
- (date) => addMonth(date, -1),
22
- (date) => addMonth(date, 1),
23
- ],
12
+ month: [(date) => addYear(date, -1), (date) => addYear(date, 1)],
13
+ week: [(date) => addMonth(date, -1), (date) => addMonth(date, 1)],
14
+ day: [(date) => addMonth(date, -1), (date) => addMonth(date, 1)],
24
15
  }), [addYear, addMonth]);
25
16
  }
26
17
 
@@ -7,7 +7,7 @@ function useCalendarControls(referenceDateProp, mode) {
7
7
  useEffect(() => {
8
8
  setReferenceDate(referenceDateProp);
9
9
  }, [referenceDateProp]);
10
- const { currentMode, pushModeStack, popModeStack, } = useCalendarModeStack(mode || 'day');
10
+ const { currentMode, pushModeStack, popModeStack } = useCalendarModeStack(mode || 'day');
11
11
  const modifierGroup = useCalendarControlModifiers();
12
12
  const onPrev = () => {
13
13
  const [handleMinus] = modifierGroup[currentMode];
@@ -4,7 +4,7 @@ function useCalendarModeStack(mode) {
4
4
  const [modeStack, setModeStack] = useState([mode]);
5
5
  const [currentMode] = modeStack;
6
6
  const pushModeStack = (newMode) => setModeStack((prev) => [newMode, ...prev]);
7
- const popModeStack = () => setModeStack((prev) => (prev.length > 1 ? prev.slice(1, prev.length) : prev));
7
+ const popModeStack = () => setModeStack((prev) => prev.length > 1 ? prev.slice(1, prev.length) : prev);
8
8
  return {
9
9
  currentMode,
10
10
  pushModeStack,
package/Card/Card.d.ts CHANGED
@@ -8,7 +8,7 @@ export interface CardProps extends Omit<NativeElementPropsWithoutKeyAndRef<'div'
8
8
  actions?: ReactNode;
9
9
  /**
10
10
  * Card cover.
11
- */
11
+ */
12
12
  cover?: ReactNode;
13
13
  /**
14
14
  * The container of the text content(title, subtitle and description).
package/Card/Card.js CHANGED
@@ -9,11 +9,11 @@ import cx from 'clsx';
9
9
  */
10
10
  const Card = forwardRef(function Card(props, ref) {
11
11
  const { actions, className, contentProps, cover, description, descriptionProps, metaProps, subtitle, subtitleProps, title, titleProps, ...rest } = props;
12
- const { variant = 'h3', } = titleProps || {};
13
- const titleTypography = (title ? (jsx(Typography, { variant: variant, ...titleProps, children: title })) : null);
14
- const subtitleTypography = (subtitle ? (jsx(Typography, { ...subtitleProps, children: subtitle })) : null);
15
- const contentHeader = (titleTypography || subtitleTypography ? (jsxs("div", { className: cardClasses.metaContentsHeader, children: [titleTypography, subtitleTypography] })) : null);
16
- const descriptionTypography = (description ? (jsx(Typography, { ...descriptionProps, children: description })) : null);
12
+ const { variant = 'h3' } = titleProps || {};
13
+ const titleTypography = title ? (jsx(Typography, { variant: variant, ...titleProps, children: title })) : null;
14
+ const subtitleTypography = subtitle ? (jsx(Typography, { ...subtitleProps, children: subtitle })) : null;
15
+ const contentHeader = titleTypography || subtitleTypography ? (jsxs("div", { className: cardClasses.metaContentsHeader, children: [titleTypography, subtitleTypography] })) : null;
16
+ const descriptionTypography = description ? (jsx(Typography, { ...descriptionProps, children: description })) : null;
17
17
  return (jsxs("div", { ref: ref, className: cx(cardClasses.host, className), ...rest, children: [cover, jsxs("div", { className: cardClasses.meta, ...metaProps, children: [jsxs("div", { className: cardClasses.metaContents, ...contentProps, children: [contentHeader, descriptionTypography] }), actions] })] }));
18
18
  });
19
19
  var Card$1 = Card;
@@ -9,7 +9,7 @@ import cx from 'clsx';
9
9
  */
10
10
  const CardActions = forwardRef(function CardActions(props, ref) {
11
11
  const { cancelText, cancelButtonProps, className, confirmText, confirmButtonProps, hideCancelButton, hideConfirmButton, loading, onCancel, onConfirm, otherActions, ...rest } = props;
12
- return (jsxs("div", { ref: ref, className: cx(cardActionsClasses.host, className), ...rest, children: [otherActions || (jsx("div", {})), jsx(ConfirmActions, { cancelText: cancelText, confirmText: confirmText, cancelButtonProps: cancelButtonProps, confirmButtonProps: confirmButtonProps, hideCancelButton: hideCancelButton || !cancelText, hideConfirmButton: hideConfirmButton || !confirmText, loading: loading })] }));
12
+ return (jsxs("div", { ref: ref, className: cx(cardActionsClasses.host, className), ...rest, children: [otherActions || jsx("div", {}), jsx(ConfirmActions, { cancelText: cancelText, confirmText: confirmText, cancelButtonProps: cancelButtonProps, confirmButtonProps: confirmButtonProps, hideCancelButton: hideCancelButton || !cancelText, hideConfirmButton: hideConfirmButton || !confirmText, loading: loading })] }));
13
13
  });
14
14
  var CardActions$1 = CardActions;
15
15
 
package/Card/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { CardActionsProps, default as CardActions, } from './CardActions';
2
- export { CardProps, default, } from './Card';
1
+ export { CardActionsProps, default as CardActions } from './CardActions';
2
+ export { CardProps, default } from './Card';
@@ -11,7 +11,7 @@ import cx from 'clsx';
11
11
  const CheckAll = forwardRef(function CheckAll(props, ref) {
12
12
  const { children, className, label, ...rest } = props;
13
13
  const checkboxGroup = children && Children.only(children);
14
- const { disabled, name, onChange, options, size, value, } = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.props) || {};
14
+ const { disabled, name, onChange, options, size, value } = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.props) || {};
15
15
  const enabledOptions = useMemo(() => options === null || options === void 0 ? void 0 : options.filter((option) => !option.disabled), [options]);
16
16
  let allChecked = false;
17
17
  let indeterminate = false;
@@ -12,8 +12,8 @@ import cx from 'clsx';
12
12
  * The react component for `mezzanine` checkbox.
13
13
  */
14
14
  const Checkbox = forwardRef(function Checkbox(props, ref) {
15
- const { size: globalSize, } = useContext(MezzanineConfig);
16
- const { disabled: disabledFromFormControl, severity, } = useContext(FormControlContext) || {};
15
+ const { size: globalSize } = useContext(MezzanineConfig);
16
+ const { disabled: disabledFromFormControl, severity } = useContext(FormControlContext) || {};
17
17
  const checkboxGroup = useContext(CheckboxGroupContext);
18
18
  const { disabled: disabledFromGroup, name: nameFromGroup, size: sizeFromGroup, } = checkboxGroup || {};
19
19
  const { checked: checkedProp, children, defaultChecked, disabled = (disabledFromGroup !== null && disabledFromGroup !== void 0 ? disabledFromGroup : disabledFromFormControl) || false, error = severity === 'error' || false, indeterminate: indeterminateProp = false, onChange: onChangeProp, size = sizeFromGroup || globalSize, value, inputProps, ...rest } = props;
@@ -26,10 +26,10 @@ const Checkbox = forwardRef(function Checkbox(props, ref) {
26
26
  value,
27
27
  });
28
28
  const indeterminate = !checked && indeterminateProp;
29
- return (jsx(InputCheck, { ...rest, ref: ref, control: (jsx("span", { className: cx(checkboxClasses.host, {
29
+ return (jsx(InputCheck, { ...rest, ref: ref, control: jsx("span", { className: cx(checkboxClasses.host, {
30
30
  [checkboxClasses.checked]: checked,
31
31
  [checkboxClasses.indeterminate]: indeterminate,
32
- }), children: jsx("input", { ...restInputProps, "aria-checked": indeterminate ? 'mixed' : checked, "aria-disabled": disabled, checked: checked, disabled: disabled, id: inputId, onChange: onChange, name: name, type: "checkbox", value: value }) })), disabled: disabled, error: error, htmlFor: inputId, size: size, children: children }));
32
+ }), children: jsx("input", { ...restInputProps, "aria-checked": indeterminate ? 'mixed' : checked, "aria-disabled": disabled, checked: checked, disabled: disabled, id: inputId, onChange: onChange, name: name, type: "checkbox", value: value }) }), disabled: disabled, error: error, htmlFor: inputId, size: size, children: children }));
33
33
  });
34
34
  var Checkbox$1 = Checkbox;
35
35
 
@@ -20,7 +20,9 @@ const CheckboxGroup = forwardRef(function CheckboxGroup(props, ref) {
20
20
  name,
21
21
  onChange(event) {
22
22
  const { checked, value: targetValue } = event.target;
23
- const newValue = checked ? [...value, targetValue] : value.filter((v) => v !== targetValue);
23
+ const newValue = checked
24
+ ? [...value, targetValue]
25
+ : value.filter((v) => v !== targetValue);
24
26
  setValue(newValue);
25
27
  if (onChange) {
26
28
  onChange(newValue, event);
@@ -1,4 +1,4 @@
1
1
  export type { CheckboxSize, CheckboxGroupOrientation, CheckboxGroupOption, } from '@mezzanine-ui/core/checkbox';
2
- export { CheckboxProps, default, } from './Checkbox';
3
- export { CheckboxGroupProps, default as CheckboxGroup, } from './CheckboxGroup';
4
- export { CheckAllProps, default as CheckAll, } from './CheckAll';
2
+ export { CheckboxProps, default } from './Checkbox';
3
+ export { CheckboxGroupProps, default as CheckboxGroup } from './CheckboxGroup';
4
+ export { CheckAllProps, default as CheckAll } from './CheckAll';
@@ -8,7 +8,7 @@ import ButtonGroup from '../Button/ButtonGroup.js';
8
8
  */
9
9
  const ConfirmActions = forwardRef(function ConfirmActions(props, ref) {
10
10
  const { cancelButtonProps, cancelText, confirmButtonProps, confirmText, hideCancelButton, hideConfirmButton, loading, onCancel, onConfirm, ...rest } = props;
11
- const { disabled: cancelButtonDisabled = loading, } = cancelButtonProps || {};
11
+ const { disabled: cancelButtonDisabled = loading } = cancelButtonProps || {};
12
12
  return (jsxs(ButtonGroup, { ...rest, ref: ref, children: [!hideCancelButton && (jsx(Button, { variant: "outlined", ...cancelButtonProps, disabled: cancelButtonDisabled, onClick: onCancel, children: cancelText })), !hideConfirmButton && (jsx(Button, { variant: "contained", ...confirmButtonProps, loading: loading, onClick: onConfirm, children: confirmText }))] }));
13
13
  });
14
14
  var ConfirmActions$1 = ConfirmActions;
@@ -1 +1 @@
1
- export { ConfirmActionsProps, default, } from './ConfirmActions';
1
+ export { ConfirmActionsProps, default } from './ConfirmActions';
@@ -17,14 +17,10 @@ import { FormControlContext } from '../Form/FormControlContext.js';
17
17
  */
18
18
  const DatePicker = forwardRef(function DatePicker(props, ref) {
19
19
  const { disabled: disabledFromFormControl, fullWidth: fullWidthFromFormControl, required: requiredFromFormControl, severity, } = useContext(FormControlContext) || {};
20
- const { defaultDateFormat, getNow, } = useCalendarContext();
20
+ const { defaultDateFormat, getNow } = useCalendarContext();
21
21
  const { calendarProps, className, clearable = true, defaultValue, disabledMonthSwitch = false, disableOnNext, disableOnPrev, disabledYearSwitch = false, disabled = disabledFromFormControl || false, displayMonthLocale, error = severity === 'error' || false, fadeProps, format = defaultDateFormat, fullWidth = fullWidthFromFormControl || false, inputProps, isDateDisabled, isMonthDisabled, isWeekDisabled, isYearDisabled, mode = 'day', onCalendarToggle: onCalendarToggleProp, onChange: onChangeProp, placeholder, popperProps, prefix, readOnly, referenceDate: referenceDateProp, required = requiredFromFormControl || false, size, value: valueProp, ...restTriggerProps } = props;
22
22
  const { onBlur: onBlurProp, onKeyDown: onKeyDownProp, onFocus: onFocusProp, size: inputSize = format.length + 2, ...restInputProp } = inputProps || {};
23
- const formats = useMemo(() => [
24
- format,
25
- defaultDateFormat,
26
- getDefaultModeFormat(mode),
27
- ], [defaultDateFormat, format, mode]);
23
+ const formats = useMemo(() => [format, defaultDateFormat, getDefaultModeFormat(mode)], [defaultDateFormat, format, mode]);
28
24
  /** Calender display control */
29
25
  const [open, setOpen] = useState(false);
30
26
  const preventOpen = readOnly;
@@ -127,7 +123,7 @@ const DatePicker = forwardRef(function DatePicker(props, ref) {
127
123
  }
128
124
  onCalendarToggle(!open);
129
125
  };
130
- const suffixActionIcon = (jsx(Icon, { icon: CalendarIcon, onClick: onIconClick }));
126
+ const suffixActionIcon = jsx(Icon, { icon: CalendarIcon, onClick: onIconClick });
131
127
  return (jsxs(Fragment, { children: [jsx(PickerTrigger, { ...restTriggerProps, ref: triggerComposedRef, className: className, clearable: clearable, disabled: disabled, error: error, fullWidth: fullWidth, inputProps: resolvedInputProps, inputRef: inputRef, onChange: onInputChange, onClear: onClear, placeholder: placeholder, prefix: prefix, readOnly: readOnly, required: required, size: size, suffixActionIcon: suffixActionIcon, value: inputValue }), jsx(DatePickerCalendar, { ref: calendarRef, anchor: anchorRef, calendarProps: calendarProps, disabledMonthSwitch: disabledMonthSwitch, disableOnNext: disableOnNext, disableOnPrev: disableOnPrev, disabledYearSwitch: disabledYearSwitch, displayMonthLocale: displayMonthLocale, fadeProps: fadeProps, isDateDisabled: isDateDisabled, isMonthDisabled: isMonthDisabled, isWeekDisabled: isWeekDisabled, isYearDisabled: isYearDisabled, mode: mode, onChange: onCalendarChange, open: open, popperProps: popperProps, referenceDate: referenceDate, value: internalValue })] }));
132
128
  });
133
129
  var DatePicker$1 = DatePicker;
@@ -25,7 +25,9 @@ const DatePickerCalendar = forwardRef(function DatePickerCalendar(props, ref) {
25
25
  }
26
26
  if (currentMode === 'month') {
27
27
  return (target) => {
28
- const result = currentMode === mode ? target : setMonth(referenceDate, getMonth(target));
28
+ const result = currentMode === mode
29
+ ? target
30
+ : setMonth(referenceDate, getMonth(target));
29
31
  updateReferenceDate(result);
30
32
  popModeStack();
31
33
  if (currentMode === mode && onChangeProp) {
@@ -35,7 +37,9 @@ const DatePickerCalendar = forwardRef(function DatePickerCalendar(props, ref) {
35
37
  }
36
38
  if (currentMode === 'year') {
37
39
  return (target) => {
38
- const result = currentMode === mode ? target : setYear(referenceDate, getYear(target));
40
+ const result = currentMode === mode
41
+ ? target
42
+ : setYear(referenceDate, getYear(target));
39
43
  updateReferenceDate(result);
40
44
  popModeStack();
41
45
  if (currentMode === mode && onChangeProp) {
@@ -1,2 +1,2 @@
1
1
  export { DatePickerCalendarProps, default as DatePickerCalendar, } from './DatePickerCalendar';
2
- export { DatePickerProps, default, } from './DatePicker';
2
+ export { DatePickerProps, default } from './DatePicker';