@delightui/components 0.1.159 → 0.1.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import React__default, { ImgHTMLAttributes, SyntheticEvent, HTMLAttributes, Reac
4
4
  import { LinkProps } from 'react-router-dom';
5
5
  import { Plugin } from 'flatpickr/dist/types/options';
6
6
  import FlatPickr, { DateTimePickerProps } from 'react-flatpickr';
7
+ import { Instance } from 'flatpickr/dist/types/instance';
7
8
  import { ModalTransitionComponent } from 'react-overlays/cjs/Modal';
8
9
  import { Offset } from 'react-overlays/usePopper';
9
10
 
@@ -1317,13 +1318,20 @@ type DatePickerBaseProps = ControlledFormComponentProps<DatePickerValue> & {
1317
1318
  * @param dates - Array of selected dates.
1318
1319
  * @param dateStr - String representation of the selected date(s). Will match the date format.
1319
1320
  */
1320
- onOpen?: (dates: Date[], dateStr: string) => void;
1321
+ onOpen?: (dates: Date[], dateStr: string, calendarInstance: Instance) => void;
1321
1322
  /**
1322
1323
  * Callback function when the date picker is closed.
1323
1324
  * @param dates - Array of selected dates.
1324
1325
  * @param dateStr - String representation of the selected date(s). Will match the date format.
1325
1326
  */
1326
- onClose?: (dates: Date[], dateStr: string) => void;
1327
+ onClose?: (dates: Date[], dateStr: string, calendarInstance: Instance) => void;
1328
+ /**
1329
+ * Callback function when the calendar is ready and mounted.
1330
+ * @param dates - Array of selected dates.
1331
+ * @param dateStr - String representation of the selected date(s). Will match the date format.
1332
+ * @param calendarInstance - The Flatpickr instance.
1333
+ */
1334
+ onReady?: (dates: Date[], dateStr: string, calendarInstance: Instance) => void;
1327
1335
  /**
1328
1336
  * render date picker inline
1329
1337
  */
@@ -1536,6 +1544,13 @@ type UseModalReturn<T extends ModalComponentProps> = {
1536
1544
  closeModal: () => void;
1537
1545
  /** The unique identifier for this modal instance */
1538
1546
  modalId: string;
1547
+ /**
1548
+ * Updates the props of the modal instance managed by this hook.
1549
+ *
1550
+ * @param newProps - The new props to merge with the existing props
1551
+ * @returns void
1552
+ */
1553
+ updateModal: (newProps: Partial<T>) => void;
1539
1554
  };
1540
1555
 
1541
1556
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delightui/components",
3
- "version": "0.1.159",
3
+ "version": "0.1.161",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "vite",