@codezee/sixtify-brahma 0.2.196 → 0.2.197

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codezee/sixtify-brahma",
3
- "version": "0.2.196",
3
+ "version": "0.2.197",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
@@ -10,5 +10,5 @@ export type DateRangePickerProps<P extends FieldValues> = UseControllerProps<P>
10
10
  maxDate?: Date;
11
11
  months?: number;
12
12
  };
13
- export declare function DateRangePicker<P extends FieldValues>({ control, defaultValue, disabled, label, name, error, helperText, loading, required, months, rules, }: DateRangePickerProps<P>): import("react/jsx-runtime").JSX.Element;
13
+ export declare function DateRangePicker<P extends FieldValues>({ control, defaultValue, disabled, label, name, error, helperText, loading, required, months, rules, minDate, maxDate, }: DateRangePickerProps<P>): import("react/jsx-runtime").JSX.Element;
14
14
  //# sourceMappingURL=DateRangePicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/FormFields/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIvE,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,WAAW,IACpD,kBAAkB,CAAC,CAAC,CAAC,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEJ,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,EACrD,OAAO,EACP,YAAY,EACZ,QAAgB,EAChB,KAAK,EACL,IAAI,EACJ,KAAa,EACb,UAAU,EACV,OAAe,EACf,QAAgB,EAChB,MAAU,EACV,KAAK,GACN,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CAkEzB"}
1
+ {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/FormFields/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIvE,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,WAAW,IACpD,kBAAkB,CAAC,CAAC,CAAC,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEJ,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,EACrD,OAAO,EACP,YAAY,EACZ,QAAgB,EAChB,KAAK,EACL,IAAI,EACJ,KAAa,EACb,UAAU,EACV,OAAe,EACf,QAAgB,EAChB,MAAU,EACV,KAAK,EACL,OAAO,EACP,OAAO,GACR,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CAoEzB"}
@@ -8,7 +8,7 @@ const react_1 = require("react");
8
8
  const react_date_range_1 = require("react-date-range");
9
9
  const react_hook_form_1 = require("react-hook-form");
10
10
  const Skeleton_1 = require("./Skeleton");
11
- function DateRangePicker({ control, defaultValue, disabled = false, label, name, error = false, helperText, loading = false, required = false, months = 1, rules, }) {
11
+ function DateRangePicker({ control, defaultValue, disabled = false, label, name, error = false, helperText, loading = false, required = false, months = 1, rules, minDate, maxDate, }) {
12
12
  const { field: { onChange }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
13
13
  const [range, setRange] = (0, react_1.useState)([
14
14
  {
@@ -36,5 +36,5 @@ function DateRangePicker({ control, defaultValue, disabled = false, label, name,
36
36
  const endDate = luxon_1.DateTime.fromJSDate(selectedRange.endDate).toISODate();
37
37
  onChange([startDate, endDate]);
38
38
  }
39
- }, months: months, direction: "horizontal", calendarFocus: "backwards", staticRanges: [], inputRanges: [], moveRangeOnFirstSelection: false, preventSnapRefocus: true }), error && (0, jsx_runtime_1.jsx)(material_1.Typography, { color: "red", children: helperText })] }));
39
+ }, months: months, direction: "horizontal", calendarFocus: "backwards", staticRanges: [], inputRanges: [], moveRangeOnFirstSelection: false, preventSnapRefocus: true, minDate: minDate, maxDate: maxDate }), error && (0, jsx_runtime_1.jsx)(material_1.Typography, { color: "red", children: helperText })] }));
40
40
  }
@@ -15,6 +15,7 @@ export type UserProfileMenuProps = Omit<MenuProps, "open" | "closeMenu"> & {
15
15
  sx?: CSSProperties;
16
16
  onClick?: OnAction;
17
17
  }[];
18
+ shouldCloseOnClick?: boolean;
18
19
  };
19
- export declare function UserProfileMenu({ userDetails, menuItems, }: UserProfileMenuProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function UserProfileMenu({ userDetails, menuItems, shouldCloseOnClick, }: UserProfileMenuProps): import("react/jsx-runtime").JSX.Element;
20
21
  //# sourceMappingURL=UserProfileMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserProfileMenu.d.ts","sourceRoot":"","sources":["../../src/UserProfileMenu/UserProfileMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAa/C,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,EAAE,SAAS,CAAC;QACjB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,EAAE,CAAC,EAAE,aAAa,CAAC;QACnB,OAAO,CAAC,EAAE,QAAQ,CAAC;KACpB,EAAE,CAAC;IACJ,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,SAAS,EACT,kBAAyB,GAC1B,EAAE,oBAAoB,2CA8ItB"}
@@ -11,7 +11,7 @@ const isFunction_1 = __importDefault(require("lodash/isFunction"));
11
11
  const react_1 = require("react");
12
12
  const utils_1 = require("../utils");
13
13
  const UserProfileMenu_styled_1 = require("./UserProfileMenu.styled");
14
- function UserProfileMenu({ userDetails, menuItems, }) {
14
+ function UserProfileMenu({ userDetails, menuItems, shouldCloseOnClick = true, }) {
15
15
  const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
16
16
  const buttonRef = (0, react_1.useRef)(null);
17
17
  const { layout } = (0, utils_1.useGetDeviceType)();
@@ -58,6 +58,9 @@ function UserProfileMenu({ userDetails, menuItems, }) {
58
58
  }, children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { padding: "4px 0" }, children: menuItems.map(({ key, divider, label, icon, sx, onClick }) => ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [divider && (0, jsx_runtime_1.jsx)(material_1.Divider, {}), (0, jsx_runtime_1.jsx)(material_1.ListItemButton, { onClick: () => {
59
59
  if ((0, isFunction_1.default)(onClick)) {
60
60
  onClick();
61
+ if (shouldCloseOnClick) {
62
+ handleClose();
63
+ }
61
64
  }
62
65
  }, children: (icon || label) && ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "16px", alignItems: "center", width: "100%", flexDirection: "row", sx: { ...sx }, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { sx: {
63
66
  minWidth: "20px",