pmg-ui-kit 0.0.27 → 0.0.29

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import TabsWithUnderline from "../components/TabsWithUnderline";
2
+ import { TabsWithUnderline } from "../components/TabsWithUnderline";
3
3
  import { Text } from "./Text";
4
4
  const Step = ({ children, stepNumber, withoutUnderline = false, }) => {
5
5
  return (_jsxs(_Fragment, { children: [!withoutUnderline && (_jsx(TabsWithUnderline, { className: "mt-4 mb-4 border-gray-400" })), _jsxs("div", { className: "flex flex-row", children: [_jsx(Text, { className: "mt-1 !text-4xl", children: `${stepNumber})` }), _jsx("div", { className: "ml-4 first-line:flex flex-col w-full", children: children })] })] }));
@@ -9,5 +9,5 @@ type TextAreaProps = {
9
9
  required?: boolean;
10
10
  name?: string;
11
11
  };
12
- declare const Textarea: ({ rows, className, placeholder, value, bottomHint, handleOnChange, shouldBeValidateInWebchecker, required, name, }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
13
- export default Textarea;
12
+ export declare const Textarea: ({ rows, className, placeholder, value, bottomHint, handleOnChange, shouldBeValidateInWebchecker, required, name, }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -5,7 +5,7 @@ import { useEffect, useState } from "react";
5
5
  import { useValidatePattern } from "../../hooks/useValidatePattern";
6
6
  import { ValidationPatterns } from "../../consts/validationPatterns";
7
7
  import { Text } from "./Text";
8
- const Textarea = ({ rows = 4, className, placeholder = "", value, bottomHint, handleOnChange, shouldBeValidateInWebchecker = false, required, name, }) => {
8
+ export const Textarea = ({ rows = 4, className, placeholder = "", value, bottomHint, handleOnChange, shouldBeValidateInWebchecker = false, required, name, }) => {
9
9
  const isValid = useValidatePattern(ValidationPatterns.NON_EMPTY_PATTERN, value?.toString(), required ? false : true);
10
10
  useEffect(() => {
11
11
  setVal(value);
@@ -17,4 +17,3 @@ const Textarea = ({ rows = 4, className, placeholder = "", value, bottomHint, ha
17
17
  handleOnChange && handleOnChange(e);
18
18
  }, rows: rows, className: classNames("block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500", className, !isValid && "!border-red-500 !focus:border-red-500"), placeholder: placeholder, required: required }), bottomHint && (_jsx(Text, { size: "sm", className: "mt-1 text-gray-600", children: bottomHint }))] }));
19
19
  };
20
- export default Textarea;
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Input } from "../atoms/Input";
3
3
  import { InputTypeFileWithListing } from "../atoms/InputTypeFileWithListing";
4
4
  import { Select } from "../atoms/Select";
5
- import Textarea from "../atoms/Textarea";
5
+ import { Textarea } from "../atoms/Textarea";
6
6
  export const FormField = ({ fieldSetup, value, handleOnChange, }) => {
7
7
  if (fieldSetup.fieldType === "text") {
8
8
  return (_jsx(Input, { onClick: (e) => e.currentTarget.classList.remove("border-red-500", "!border-red-500"), onBlur: (e) => e.currentTarget.classList.remove("border-red-500", "!border-red-500"), className: fieldSetup.inputClassName, required: fieldSetup.required, name: fieldSetup.name, value: value, handleOnChange: handleOnChange, pattern: fieldSetup.pattern, placeholder: fieldSetup.placeholder, bottomHint: fieldSetup.bottomHint, wrapperClassNames: fieldSetup.wrapperClassNames }));
@@ -10,5 +10,5 @@ type TabsWithUnderlineProps = {
10
10
  className?: string;
11
11
  listClassNames?: string;
12
12
  };
13
- declare const TabsWithUnderline: ({ items, className, listClassNames, }: TabsWithUnderlineProps) => import("react/jsx-runtime").JSX.Element;
14
- export default TabsWithUnderline;
13
+ export declare const TabsWithUnderline: ({ items, className, listClassNames, }: TabsWithUnderlineProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -1,10 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import classNames from "classnames";
3
- const TabsWithUnderline = ({ items, className, listClassNames, }) => {
3
+ export const TabsWithUnderline = ({ items, className, listClassNames, }) => {
4
4
  const hoverStyles = (disabled = true) => !disabled
5
5
  ? "hover:text-blue-700 transition-colors duration-200 ease-in-out hover:cursor-pointer"
6
6
  : "";
7
7
  const activeStyles = (active = false) => active ? "!text-blue-700 !border-blue-700" : "";
8
8
  return (_jsx("div", { className: classNames("text-sm font-medium text-center text-black border-b border-black dark:text-black dark:border-black", className), children: _jsx("ul", { className: classNames("flex flex-wrap -mb-px", listClassNames), children: items?.map((item) => (_jsx("li", { className: "me-2", children: _jsx("div", { className: classNames("inline-block p-4 text-gray-700 border-gray-600 rounded-t-lg dark:text-gray-500 dark:border-gray-500", hoverStyles(item.isDisabled), activeStyles(item.isActive)), onClick: item.onClick, "aria-current": "page", children: item.label }) }, item.label))) }) }));
9
9
  };
10
- export default TabsWithUnderline;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmg-ui-kit",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "Components library for PMG projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",