@codezee/sixtify-brahma 0.2.128 → 0.2.129

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.128",
3
+ "version": "0.2.129",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
@@ -10,7 +10,8 @@ type FormActionButtonProps = ButtonProps & {
10
10
  withoutModifiers: boolean;
11
11
  loading: boolean;
12
12
  disabled: boolean;
13
+ disableKeyboardShortcut: boolean;
13
14
  }>;
14
- export declare const FormActionButton: ({ actionType, onClick, shortcutKey, label, withoutModifiers, loading, disabled, variant, ...rest }: Readonly<FormActionButtonProps>) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const FormActionButton: ({ actionType, onClick, shortcutKey, label, withoutModifiers, loading, disabled, disableKeyboardShortcut, variant, ...rest }: Readonly<FormActionButtonProps>) => import("react/jsx-runtime").JSX.Element;
15
16
  export {};
16
17
  //# sourceMappingURL=FormActionButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormActionButton.d.ts","sourceRoot":"","sources":["../../src/ActionButtons/FormActionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE,KAAK,qBAAqB,GAAG,WAAW,GAAG;IACzC,OAAO,EAAE,QAAQ,CAAC;CACnB,GAAG,OAAO,CAAC;IACR,UAAU,EAAE,oBAAoB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAEL,eAAO,MAAM,gBAAgB,GAAI,oGAU9B,QAAQ,CAAC,qBAAqB,CAAC,4CAmDjC,CAAC"}
1
+ {"version":3,"file":"FormActionButton.d.ts","sourceRoot":"","sources":["../../src/ActionButtons/FormActionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE,KAAK,qBAAqB,GAAG,WAAW,GAAG;IACzC,OAAO,EAAE,QAAQ,CAAC;CACnB,GAAG,OAAO,CAAC;IACR,UAAU,EAAE,oBAAoB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,EAAE,OAAO,CAAC;CAClC,CAAC,CAAC;AAEL,eAAO,MAAM,gBAAgB,GAAI,6HAW9B,QAAQ,CAAC,qBAAqB,CAAC,4CAmDjC,CAAC"}
@@ -4,7 +4,7 @@ exports.FormActionButton = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const Button_1 = require("../Button");
6
6
  const utils_1 = require("../utils");
7
- const FormActionButton = ({ actionType, onClick, shortcutKey, label, withoutModifiers = false, loading = false, disabled = false, variant = "contained", ...rest }) => {
7
+ const FormActionButton = ({ actionType, onClick, shortcutKey, label, withoutModifiers = false, loading = false, disabled = false, disableKeyboardShortcut = false, variant = "contained", ...rest }) => {
8
8
  const getShortcutKey = () => {
9
9
  if (actionType == "cancel") {
10
10
  return "Escape";
@@ -31,7 +31,7 @@ const FormActionButton = ({ actionType, onClick, shortcutKey, label, withoutModi
31
31
  withoutModifiers: actionType == "cancel" ? true : withoutModifiers,
32
32
  modifierKeys: actionType != "cancel" ? ["ctrl", "alt"] : undefined,
33
33
  onTrigger: () => {
34
- if (!disabled && !loading) {
34
+ if (!disabled && !loading && !disableKeyboardShortcut) {
35
35
  onClick();
36
36
  }
37
37
  },
@@ -1,4 +1,6 @@
1
1
  import { type FieldValues } from "react-hook-form";
2
2
  import type { RatingProps } from "./types";
3
- export declare function Rating<P extends FieldValues>({ control, name, defaultValue, label, rules, disabled, loading, direction, ...ratingProps }: RatingProps<P>): import("react/jsx-runtime").JSX.Element;
3
+ export declare function Rating<P extends FieldValues & {
4
+ required?: boolean;
5
+ }>({ control, name, defaultValue, label, rules, disabled, loading, direction, required, ...ratingProps }: RatingProps<P>): import("react/jsx-runtime").JSX.Element;
4
6
  //# sourceMappingURL=Ratting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Ratting.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Rating/Ratting.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,wBAAgB,MAAM,CAAC,CAAC,SAAS,WAAW,EAAE,EAC5C,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,KAAU,EACV,KAAK,EACL,QAAQ,EACR,OAAe,EACf,SAAoB,EACpB,GAAG,WAAW,EACf,EAAE,WAAW,CAAC,CAAC,CAAC,2CA0ChB"}
1
+ {"version":3,"file":"Ratting.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Rating/Ratting.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,MAAM,CAAC,CAAC,SAAS,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,EACrE,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,KAAU,EACV,KAAK,EACL,QAAQ,EACR,OAAe,EACf,SAAoB,EACpB,QAAgB,EAChB,GAAG,WAAW,EACf,EAAE,WAAW,CAAC,CAAC,CAAC,2CA2ChB"}
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const react_hook_form_1 = require("react-hook-form");
7
7
  const Skeleton_1 = require("./Skeleton");
8
- function Rating({ control, name, defaultValue, label = "", rules, disabled, loading = false, direction = "column", ...ratingProps }) {
8
+ function Rating({ control, name, defaultValue, label = "", rules, disabled, loading = false, direction = "column", required = false, ...ratingProps }) {
9
9
  const { field: { value, onChange, ...restField }, fieldState: { error }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
10
10
  if (loading) {
11
11
  return (0, jsx_runtime_1.jsx)(Skeleton_1.RatingSkeleton, { label: label });
@@ -13,7 +13,7 @@ function Rating({ control, name, defaultValue, label = "", rules, disabled, load
13
13
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "5px", direction: direction, alignItems: direction === "row" ? "center" : "flex-start", children: [label && ((0, jsx_runtime_1.jsx)(material_1.InputLabel, { sx: {
14
14
  minWidth: direction === "row" ? "120px" : "auto",
15
15
  marginBottom: direction === "row" ? 0 : "auto",
16
- }, children: label })), (0, jsx_runtime_1.jsx)(material_1.Rating, { disabled: disabled, value: value ?? null, onChange: (event, newValue) => {
16
+ }, required: required, children: label })), (0, jsx_runtime_1.jsx)(material_1.Rating, { disabled: disabled, value: value ?? null, onChange: (event, newValue) => {
17
17
  onChange(newValue);
18
18
  }, ...restField, ...ratingProps })] }), error && (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { error: true, children: error?.message })] }));
19
19
  }