@zauru-sdk/components 1.0.35 → 1.0.37

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.37](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.36...v1.0.37) (2024-03-25)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/components
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.0.36](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.35...v1.0.36) (2024-03-25)
15
+
16
+ **Note:** Version bump only for package @zauru-sdk/components
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.0.35](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.34...v1.0.35) (2024-03-25)
7
23
 
8
24
  **Note:** Version bump only for package @zauru-sdk/components
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef, useState } from "react";
3
- import { TextField } from "../Form/TextField";
3
+ import { TextField } from "../Form/TextField/index.js";
4
4
  import { Form } from "@remix-run/react";
5
5
  import { LoadingInputSkeleton } from "../Skeletons/LoadingInputSkeleton.js";
6
6
  import { AttachmentIconSVG, SendMessageIcon, SpinnerSvg, } from "@zauru-sdk/icons";
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useEffect, useCallback, useState } from "react";
3
- import { TextFieldWithoutValidation } from "../Form/TextField";
4
- import { SelectFieldWithoutValidation } from "../Form/SelectField";
3
+ import { TextFieldWithoutValidation } from "../Form/TextField/index.js";
4
+ import { SelectFieldWithoutValidation } from "../Form/SelectField/index.js";
5
5
  import { useAppSelector } from "@zauru-sdk/redux";
6
6
  const errorAnimation = {
7
7
  hidden: { opacity: 0, y: -10 },
@@ -1,8 +1,8 @@
1
1
  import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import React, { useEffect, useState } from "react";
3
- import { TextAreaWithoutValidation } from "../Form/TextArea";
4
- import { TextFieldWithoutValidation } from "../Form/TextField";
5
- import { CheckboxWithoutValidation } from "../Form/Checkbox";
3
+ import { TextAreaWithoutValidation } from "../Form/TextArea/index.js";
4
+ import { TextFieldWithoutValidation } from "../Form/TextField/index.js";
5
+ import { CheckboxWithoutValidation } from "../Form/Checkbox/index.js";
6
6
  export const DynamicTable = ({ forwardedRef, ...props }, ref) => {
7
7
  const [tableData, setTableData] = useState({});
8
8
  const { cellInputs, intersectionTitle, className, onChange, defaultValue, margins, } = props;
@@ -1,13 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
- import { SelectFieldWithoutValidation } from "../Form/SelectField";
4
- import { TextFieldWithoutValidation } from "../Form/TextField";
5
- import { CheckboxWithoutValidation } from "../Form/Checkbox";
6
- import { createModal } from "../Modal";
7
- import { Button } from "../Buttons/Button";
3
+ import { SelectFieldWithoutValidation } from "../Form/SelectField/index.js";
4
+ import { TextFieldWithoutValidation } from "../Form/TextField/index.js";
5
+ import { CheckboxWithoutValidation } from "../Form/Checkbox/index.js";
6
+ import { createModal } from "../Modal/index.js";
7
+ import { Button } from "../Buttons/index.js";
8
8
  import { useAppSelector } from "@zauru-sdk/redux";
9
9
  import { generateClientUUID } from "@zauru-sdk/common";
10
- import { LoadingInputSkeleton, WithTooltip } from "./../index";
10
+ import { LoadingInputSkeleton } from "../Skeletons/index.js";
11
+ import { WithTooltip } from "../WithTooltip/index.js";
11
12
  import { TrashSvg } from "@zauru-sdk/icons";
12
13
  const GenericDynamicTableErrorComponent = ({ name, formName, }) => {
13
14
  const { formValidations } = useAppSelector((state) => state.formValidation);
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
- import { LoadingInputSkeleton } from "./../index";
4
- import { ConnectionState } from "./../ConnectionState";
3
+ import { LoadingInputSkeleton } from "../Skeletons/index.js";
4
+ import { ConnectionState } from "./../ConnectionState/index.js";
5
5
  const COLORS = {
6
6
  purple: "bg-purple-500",
7
7
  pink: "bg-pink-500",
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { CheckboxWithoutValidation } from "../Checkbox";
2
+ import { CheckboxWithoutValidation } from "../Checkbox/index.js";
3
3
  export const Checklist = ({ items, onChange }) => {
4
4
  const handleCheckboxChange = (name, value) => {
5
5
  if (onChange) {
@@ -1,16 +1,18 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { TextField, TextFieldWithoutValidation } from "../TextField";
3
- import { TripleFieldContainer } from "../FieldContainer/TripleFieldContainer";
4
- import { DoubleFieldContainer } from "../FieldContainer/DoubleFieldContainer";
5
- import { YesNo } from "../YesNo";
6
- import { TextArea } from "../TextArea";
7
- import { SelectField } from "../SelectField";
8
- import { FileUploadField } from "../FileUpload";
9
- import { FormDatePicker } from "../DatePicker";
10
- import { FormTimePicker } from "../TimePicker";
11
- import { LineSeparator, StaticAlert, SubContainer } from "./../../index";
12
- import { GenericDynamicTable } from "../../DynamicTable/GenericDynamicTable";
2
+ import { TextField, TextFieldWithoutValidation } from "../TextField/index.js";
3
+ import { TripleFieldContainer } from "../FieldContainer/index.js";
4
+ import { DoubleFieldContainer } from "../FieldContainer/index.js";
5
+ import { YesNo } from "../YesNo/index.js";
6
+ import { TextArea } from "../TextArea/index.js";
7
+ import { SelectField } from "../SelectField/index.js";
8
+ import { FileUploadField } from "../FileUpload/index.js";
9
+ import { FormDatePicker } from "../DatePicker/index.js";
10
+ import { FormTimePicker } from "../TimePicker/index.js";
11
+ import { GenericDynamicTable } from "../../DynamicTable/GenericDynamicTable.js";
13
12
  import { getDepSelectOptions, getMunSelectOptions } from "@zauru-sdk/common";
13
+ import { StaticAlert } from "../../Alerts/index.js";
14
+ import { SubContainer } from "../../Containers/index.js";
15
+ import { LineSeparator } from "../../LineSeparator/index.js";
14
16
  export function DynamicBaculoForm(props) {
15
17
  const { form, options = { showDescription: false, showTitle: false }, formName = "", namesStr = "", defaultValues = [], showingRules = [], readOnly = false, } = props;
16
18
  if (!form) {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Form } from "@remix-run/react";
3
- import { ButtonSectionContainer } from "./../../index";
3
+ import { ButtonSectionContainer } from "../../Containers/index.js";
4
4
  export const FormLayout = (props) => {
5
5
  const { title, children, buttons, method, formId } = props;
6
6
  return (_jsxs(Form, { id: formId, name: formId, method: method ?? "post", children: [title && (_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-3", children: title })), _jsxs("div", { className: "shadow sm:overflow-hidden sm:rounded-md", children: [_jsx("div", { className: "space-y-6 bg-white px-4 py-5 sm:p-6", children: children }), buttons && (_jsx(ButtonSectionContainer, { children: buttons }))] })] }, formId));
@@ -3,7 +3,7 @@ import { IdeaIconSVG } from "@zauru-sdk/icons";
3
3
  import { useAppSelector } from "@zauru-sdk/redux";
4
4
  import { useEffect, useState } from "react";
5
5
  import Select, { components } from "react-select";
6
- import { LoadingInputSkeleton } from "./../../index";
6
+ import { LoadingInputSkeleton } from "../../Skeletons/index.js";
7
7
  const Input = (props) => (_jsx(components.Input, { ...props, readOnly: props.selectProps.isReadOnly }));
8
8
  export const SelectFieldWithoutValidation = (props) => {
9
9
  const { id, name, title, defaultValue, defaultValueMulti = [], helpText, hint, options, onChange, onChangeMulti, isClearable = false, error = false, disabled = false, readOnly = false, isMulti = false, loading = false, className = "", onInputChange, } = props;
@@ -1,2 +1,2 @@
1
- import type { NavBarProps } from "./NavBar.types";
1
+ import type { NavBarProps } from "./NavBar.types.js";
2
2
  export declare const NavBar: ({ title, loggedIn, items, selectedColor, }: NavBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { DropDownArrowSvgIcon, LogoutDropDownSvgIcon, MenuAlt4Svg, OpcionButtonSvgIcon, } from "@zauru-sdk/icons";
4
- import { COLORS } from "./NavBar.utils";
4
+ import { COLORS } from "./NavBar.utils.js";
5
5
  import { Link } from "@remix-run/react";
6
6
  const DropDownLinkButton = ({ text, path, icon, buttonHover, }) => (_jsx(Link, { className: `block px-4 py-3 text-sm text-gray-600 capitalize transition-colors duration-200 transform dark:text-gray-300 ${buttonHover ?? ""} dark:hover:bg-gray-700 dark:hover:text-white`, to: path, prefetch: "none", children: _jsxs("div", { className: "mx-auto pt-2", children: [icon, _jsx("span", { children: text })] }) }));
7
7
  const OptionsDropDownButton = ({ color, options, name }) => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { LoadingInputSkeleton } from "./../index";
3
+ import { LoadingInputSkeleton } from "../Skeletons/index.js";
4
4
  export const StepWizardComponent = ({ steps, showStepName = false, loading = false, }) => {
5
5
  const [currentStep, setCurrentStep] = useState(0);
6
6
  if (loading) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/components",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "Componentes reutilizables en las WebApps de Zauru.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -48,5 +48,5 @@
48
48
  "engines": {
49
49
  "node": ">=18.0.0"
50
50
  },
51
- "gitHead": "c1ebda7692cc270d457c2a736e0ae1448fd6d12b"
51
+ "gitHead": "6ad39dc9a04eb356991e94b7ebe3a7d579615659"
52
52
  }
@@ -1,5 +1,5 @@
1
1
  import React, { useRef, useState } from "react";
2
- import { TextField } from "../Form/TextField";
2
+ import { TextField } from "../Form/TextField/index.js";
3
3
  import { Form } from "@remix-run/react";
4
4
  import { FormDocumentType } from "@zauru-sdk/types";
5
5
  import { LoadingInputSkeleton } from "../Skeletons/LoadingInputSkeleton.js";
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useCallback, useState, type ReactNode } from "react";
2
- import { TextFieldWithoutValidation } from "../Form/TextField";
3
- import { SelectFieldWithoutValidation } from "../Form/SelectField";
2
+ import { TextFieldWithoutValidation } from "../Form/TextField/index.js";
3
+ import { SelectFieldWithoutValidation } from "../Form/SelectField/index.js";
4
4
  import type { SingleValue } from "react-select";
5
5
  import { useAppSelector } from "@zauru-sdk/redux";
6
6
  import { SelectFieldOption } from "@zauru-sdk/types";
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { TextAreaWithoutValidation } from "../Form/TextArea";
3
- import { TextFieldWithoutValidation } from "../Form/TextField";
4
- import { CheckboxWithoutValidation } from "../Form/Checkbox";
2
+ import { TextAreaWithoutValidation } from "../Form/TextArea/index.js";
3
+ import { TextFieldWithoutValidation } from "../Form/TextField/index.js";
4
+ import { CheckboxWithoutValidation } from "../Form/Checkbox/index.js";
5
5
 
6
6
  type Props = {
7
7
  cellInputs?: boolean;
@@ -1,9 +1,9 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { SelectFieldWithoutValidation } from "../Form/SelectField";
3
- import { TextFieldWithoutValidation } from "../Form/TextField";
4
- import { CheckboxWithoutValidation } from "../Form/Checkbox";
5
- import { createModal } from "../Modal";
6
- import { Button } from "../Buttons/Button";
2
+ import { SelectFieldWithoutValidation } from "../Form/SelectField/index.js";
3
+ import { TextFieldWithoutValidation } from "../Form/TextField/index.js";
4
+ import { CheckboxWithoutValidation } from "../Form/Checkbox/index.js";
5
+ import { createModal } from "../Modal/index.js";
6
+ import { Button } from "../Buttons/index.js";
7
7
  import {
8
8
  GenericDynamicTableColumn,
9
9
  RowDataType,
@@ -11,7 +11,8 @@ import {
11
11
  } from "@zauru-sdk/types";
12
12
  import { useAppSelector } from "@zauru-sdk/redux";
13
13
  import { generateClientUUID } from "@zauru-sdk/common";
14
- import { LoadingInputSkeleton, WithTooltip } from "./../index";
14
+ import { LoadingInputSkeleton } from "../Skeletons/index.js";
15
+ import { WithTooltip } from "../WithTooltip/index.js";
15
16
  import { TrashSvg } from "@zauru-sdk/icons";
16
17
 
17
18
  type Props = {
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { LoadingInputSkeleton } from "./../index";
3
- import { ConnectionState } from "./../ConnectionState";
2
+ import { LoadingInputSkeleton } from "../Skeletons/index.js";
3
+ import { ConnectionState } from "./../ConnectionState/index.js";
4
4
 
5
5
  type FooterProps = {
6
6
  href: string;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { CheckboxWithoutValidation } from "../Checkbox";
2
+ import { CheckboxWithoutValidation } from "../Checkbox/index.js";
3
3
 
4
4
  export type ChecklistItem = {
5
5
  id: string;
@@ -1,12 +1,12 @@
1
- import { TextField, TextFieldWithoutValidation } from "../TextField";
2
- import { TripleFieldContainer } from "../FieldContainer/TripleFieldContainer";
3
- import { DoubleFieldContainer } from "../FieldContainer/DoubleFieldContainer";
4
- import { YesNo } from "../YesNo";
5
- import { TextArea } from "../TextArea";
6
- import { SelectField } from "../SelectField";
7
- import { FileUploadField } from "../FileUpload";
8
- import { FormDatePicker } from "../DatePicker";
9
- import { FormTimePicker } from "../TimePicker";
1
+ import { TextField, TextFieldWithoutValidation } from "../TextField/index.js";
2
+ import { TripleFieldContainer } from "../FieldContainer/index.js";
3
+ import { DoubleFieldContainer } from "../FieldContainer/index.js";
4
+ import { YesNo } from "../YesNo/index.js";
5
+ import { TextArea } from "../TextArea/index.js";
6
+ import { SelectField } from "../SelectField/index.js";
7
+ import { FileUploadField } from "../FileUpload/index.js";
8
+ import { FormDatePicker } from "../DatePicker/index.js";
9
+ import { FormTimePicker } from "../TimePicker/index.js";
10
10
  import {
11
11
  FormFieldGraphQL,
12
12
  FormGraphQL,
@@ -14,9 +14,11 @@ import {
14
14
  GenericDynamicTableColumn,
15
15
  SelectFieldOption,
16
16
  } from "@zauru-sdk/types";
17
- import { LineSeparator, StaticAlert, SubContainer } from "./../../index";
18
- import { GenericDynamicTable } from "../../DynamicTable/GenericDynamicTable";
17
+ import { GenericDynamicTable } from "../../DynamicTable/GenericDynamicTable.js";
19
18
  import { getDepSelectOptions, getMunSelectOptions } from "@zauru-sdk/common";
19
+ import { StaticAlert } from "../../Alerts/index.js";
20
+ import { SubContainer } from "../../Containers/index.js";
21
+ import { LineSeparator } from "../../LineSeparator/index.js";
20
22
 
21
23
  type Props = {
22
24
  formName?: string;
@@ -1,6 +1,6 @@
1
1
  import { Form, type FormMethod } from "@remix-run/react";
2
2
  import { type ReactNode } from "react";
3
- import { ButtonSectionContainer } from "./../../index";
3
+ import { ButtonSectionContainer } from "../../Containers/index.js";
4
4
 
5
5
  type Props = {
6
6
  formId: string;
@@ -4,7 +4,7 @@ import { SelectFieldOption } from "@zauru-sdk/types";
4
4
  import { useEffect, useState } from "react";
5
5
  import type { SingleValue, InputActionMeta } from "react-select";
6
6
  import Select, { components } from "react-select";
7
- import { LoadingInputSkeleton } from "./../../index";
7
+ import { LoadingInputSkeleton } from "../../Skeletons/index.js";
8
8
 
9
9
  type Props = {
10
10
  id?: string;
@@ -5,14 +5,14 @@ import {
5
5
  MenuAlt4Svg,
6
6
  OpcionButtonSvgIcon,
7
7
  } from "@zauru-sdk/icons";
8
- import { COLORS } from "./NavBar.utils";
8
+ import { COLORS } from "./NavBar.utils.js";
9
9
  import type {
10
10
  ColorInterface,
11
11
  DropDownLinkButtonType,
12
12
  EntityProps,
13
13
  NavBarProps,
14
14
  NavItemProps,
15
- } from "./NavBar.types";
15
+ } from "./NavBar.types.js";
16
16
  import { Link } from "@remix-run/react";
17
17
 
18
18
  const DropDownLinkButton = ({
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  //H1 Title Component
3
2
  export const TitleH1 = ({ texto }: any) => {
4
3
  return (
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  import React, { useState } from "react";
3
- import { LoadingInputSkeleton } from "./../index";
3
+ import { LoadingInputSkeleton } from "../Skeletons/index.js";
4
4
 
5
5
  export type StepWizard = {
6
6
  index: number;