@codezee/sixtify-brahma 0.2.196 → 0.2.198

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.198",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
@@ -209,7 +209,7 @@ function Autocomplete({ control, defaultValue, name, required = false, label, mu
209
209
  return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { label: label, styling: styling });
210
210
  }
211
211
  return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "5px", ...containerProps, children: [label && styling === "custom" && ((0, jsx_runtime_1.jsx)(material_1.InputLabel, { required: required, disabled: disabled, children: label })), (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", gap: "10px", alignItems: "start", children: [(0, jsx_runtime_1.jsx)(material_1.Autocomplete, { PopperComponent: material_1.Popper, PaperComponent: CustomPaperComponent, sx: {
212
- "align-self": "center",
212
+ alignSelf: "center",
213
213
  "& .MuiAutocomplete-tag": {
214
214
  backgroundColor: (0, styles_1.alpha)(color.iron[700], 0.6),
215
215
  color: color.black[900],
@@ -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
  }
@@ -36,7 +36,7 @@ const SmartTextFieldComponent = (0, react_1.forwardRef)(({ errorMessage, ...rest
36
36
  border: "none",
37
37
  background: "transparent",
38
38
  padding: "0",
39
- fontSize: "14px",
39
+ fontSize: "13px",
40
40
  outline: "none",
41
41
  }, onClick: (e) => e.stopPropagation(), onFocus: (e) => {
42
42
  e.stopPropagation();
@@ -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,OAAO,EAGL,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG;IACzE,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,SAAS,EAAE;QACT,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,SAAS,CAAC;QACjB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,EAAE,CAAC,EAAE,aAAa,CAAC;QACnB,OAAO,CAAC,EAAE,QAAQ,CAAC;KACpB,EAAE,CAAC;CACL,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,SAAS,GACV,EAAE,oBAAoB,2CA0ItB"}
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,OAAO,EAGL,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG;IACzE,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,SAAS,EAAE;QACT,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,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",
@@ -54,7 +54,7 @@ function appTheme(theme) {
54
54
  },
55
55
  "&:disabled": {
56
56
  background: palette.app.color.iron[50],
57
- "-webkit-text-fill-color": palette.app.color.iron[100],
57
+ WebkitTextFillColor: palette.app.color.iron[100],
58
58
  },
59
59
  },
60
60
  },