pmg-ui-kit 0.0.19 → 0.0.21

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.
@@ -7,5 +7,5 @@ type FormProps = {
7
7
  formErrorMessage?: string;
8
8
  ref?: Ref<HTMLFormElement>;
9
9
  };
10
- declare const Form: ({ children, validateAllFieldsWithVisualEffect, onSubmit, className, formErrorMessage, ref }: FormProps) => import("react/jsx-runtime").JSX.Element;
11
- export default Form;
10
+ export declare const Form: ({ children, validateAllFieldsWithVisualEffect, onSubmit, className, formErrorMessage, ref }: FormProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { showToast } from "../../utils/showToast";
3
- const Form = ({ children, validateAllFieldsWithVisualEffect, onSubmit, className, formErrorMessage, ref }) => {
3
+ export const Form = ({ children, validateAllFieldsWithVisualEffect, onSubmit, className, formErrorMessage, ref }) => {
4
4
  const handleSaveTheData = (e) => {
5
5
  e.preventDefault();
6
6
  const form = e.currentTarget;
@@ -17,4 +17,3 @@ const Form = ({ children, validateAllFieldsWithVisualEffect, onSubmit, className
17
17
  };
18
18
  return (_jsx("form", { ref: ref, className: className, noValidate: validateAllFieldsWithVisualEffect, onSubmit: handleSaveTheData, children: children }));
19
19
  };
20
- export default Form;
@@ -10,6 +10,8 @@ type FormElementTypes = {
10
10
  required?: boolean;
11
11
  labelTextSize?: "sm" | "base" | "lg";
12
12
  labelFontWeight?: "bold" | "normal";
13
+ horizontalLabelsWidth?: string;
14
+ horizontalInputsWidth?: string;
13
15
  };
14
- export declare const FormElementContainer: ({ label, labelRightChild, className, children, bottomHint, fakeLabel, labelClassName, type, required, labelTextSize, labelFontWeight }: FormElementTypes) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const FormElementContainer: ({ label, labelRightChild, className, children, bottomHint, fakeLabel, labelClassName, type, required, labelTextSize, labelFontWeight, horizontalLabelsWidth, horizontalInputsWidth }: FormElementTypes) => import("react/jsx-runtime").JSX.Element;
15
17
  export {};
@@ -1,9 +1,9 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import classNames from "classnames";
3
3
  import { Text } from "../atoms/Text";
4
- export const FormElementContainer = ({ label, labelRightChild, className, children, bottomHint, fakeLabel = false, labelClassName, type, required = false, labelTextSize = "lg", labelFontWeight = "bold" }) => {
4
+ export const FormElementContainer = ({ label, labelRightChild, className, children, bottomHint, fakeLabel = false, labelClassName, type, required = false, labelTextSize = "lg", labelFontWeight = "bold", horizontalLabelsWidth = "w-3/12", horizontalInputsWidth = "w-9/12" }) => {
5
5
  if (type !== "horizontal") {
6
6
  return (_jsxs("div", { className: classNames("flex flex-col mb-8", className), children: [_jsxs("div", { className: classNames("flex flex-row justify-between mb-1", labelClassName), children: [_jsxs(Text, { size: labelTextSize, fontWeight: labelFontWeight, children: [label, required && " *"] }), labelRightChild] }), fakeLabel && _jsx("div", { className: "flex flex-row justify-between h-7" }), children, bottomHint && (_jsx(Text, { size: "sm", className: "mt-1 text-gray-600", children: bottomHint }))] }));
7
7
  }
8
- return (_jsx("div", { children: _jsxs("div", { className: "flex flex-row mb-2 items-start", children: [_jsx("div", { className: "w-3/12", children: _jsxs(Text, { size: labelTextSize, fontWeight: labelFontWeight, className: "mt-1", children: [label, required && " *"] }) }), _jsxs("div", { className: "w-9/12", children: [children, bottomHint && (_jsx(Text, { size: "sm", className: "mt-1 text-gray-600", children: bottomHint }))] })] }) }));
8
+ return (_jsx("div", { children: _jsxs("div", { className: "flex flex-row mb-2 items-start", children: [_jsx("div", { className: horizontalLabelsWidth, children: _jsxs(Text, { size: labelTextSize, fontWeight: labelFontWeight, className: "mt-1", children: [label, required && " *"] }) }), _jsxs("div", { className: horizontalInputsWidth, children: [children, bottomHint && (_jsx(Text, { size: "sm", className: "mt-1 text-gray-600", children: bottomHint }))] })] }) }));
9
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmg-ui-kit",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "Components library for PMG projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",