@producteca/producteca-ui-kit 1.29.0 → 1.31.0

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.
Files changed (98) hide show
  1. package/README.md +19 -19
  2. package/dist/components/alert/alert.d.js +1 -0
  3. package/dist/components/breadcrumb/breadcrumb.d.js +1 -0
  4. package/dist/components/breadcrumb/index.d.js +2 -0
  5. package/dist/components/button/button.d.js +1 -0
  6. package/dist/components/card/card.d.js +1 -0
  7. package/dist/components/card/index.d.js +1 -0
  8. package/dist/components/chip/chip.d.js +1 -0
  9. package/dist/components/chip/index.d.js +1 -0
  10. package/dist/components/dropdown/dropdown.d.js +1 -0
  11. package/dist/components/dropdown/dropdown.sx.d.js +1 -0
  12. package/dist/components/dropdown/dropdown.types.d.js +1 -0
  13. package/dist/components/dropdown/index.d.js +1 -0
  14. package/dist/components/icons/customIcon/customIcon.d.js +1 -0
  15. package/dist/components/icons/fileIcon/fileIcon.d.js +1 -0
  16. package/dist/components/icons/index.d.js +6 -0
  17. package/dist/components/icons/mailIcon/mailIcon.d.js +1 -0
  18. package/dist/components/icons/parameters.d.js +1 -0
  19. package/dist/components/icons/priceCloseIcon/priceCloseIcon.d.js +1 -0
  20. package/dist/components/icons/priceDownIcon/priceDownIcon.d.js +1 -0
  21. package/dist/components/icons/searchPublication/searchPublication.d.js +1 -0
  22. package/dist/components/image/image.d.js +1 -0
  23. package/dist/components/image/index.d.js +1 -0
  24. package/dist/components/index.d.js +15 -0
  25. package/dist/components/index.d.ts +1 -0
  26. package/dist/components/inputs/checkboxInput/checkboxInput.d.js +1 -0
  27. package/dist/components/inputs/checkboxInput/checkboxInputGroup.d.js +1 -0
  28. package/dist/components/inputs/checkboxInput/index.d.js +3 -0
  29. package/dist/components/inputs/datePicker/datePicker.d.js +1 -0
  30. package/dist/components/inputs/datePicker/datePickerCustomStyles.d.js +1 -0
  31. package/dist/components/inputs/datePicker/datePickerTypes.d.js +1 -0
  32. package/dist/components/inputs/datePicker/datePickerUtils.d.js +1 -0
  33. package/dist/components/inputs/datePicker/datePickerUtils.d.ts +1 -0
  34. package/dist/components/inputs/datePicker/index.d.js +2 -0
  35. package/dist/components/inputs/dateRangePicker/dateFormater.d.js +1 -0
  36. package/dist/components/inputs/dateRangePicker/dateRangePicker.d.js +1 -0
  37. package/dist/components/inputs/dateRangePicker/dateRangePickerTypes.d.js +1 -0
  38. package/dist/components/inputs/dateRangePicker/dateRangePickerUtils.d.js +1 -0
  39. package/dist/components/inputs/dateRangePicker/index.d.js +2 -0
  40. package/dist/components/inputs/formField/formField.d.js +1 -0
  41. package/dist/components/inputs/formField/passwordInput.d.js +1 -0
  42. package/dist/components/inputs/formField/textInput.d.js +1 -0
  43. package/dist/components/inputs/index.d.js +8 -0
  44. package/dist/components/inputs/searcher/searcher.d.js +1 -0
  45. package/dist/components/inputs/searcher/searcher.d.ts +2 -15
  46. package/dist/components/inputs/selectField/selectField.d.js +1 -0
  47. package/dist/components/inputs/selectField/selectField.d.ts +7 -34
  48. package/dist/components/inputs/selectField/selectField.types.d.js +1 -0
  49. package/dist/components/inputs/selectField/selectField.types.d.ts +37 -0
  50. package/dist/components/inputs/switchInput/index.d.js +2 -0
  51. package/dist/components/inputs/switchInput/switchInput.d.js +1 -0
  52. package/dist/components/loaders/index.d.js +2 -0
  53. package/dist/components/loaders/progressbar/progressbar.d.js +1 -0
  54. package/dist/components/loaders/spinner/spinner.d.js +1 -0
  55. package/dist/components/menu/menuAction/index.d.js +2 -0
  56. package/dist/components/menu/menuAction/menuAction.d.js +1 -0
  57. package/dist/components/menu/menuAction/menuAction.sx.d.js +1 -0
  58. package/dist/components/menu/menuAction/menuAction.types.d.js +1 -0
  59. package/dist/components/menu/menuItem/menuItem.d.js +1 -0
  60. package/dist/components/menu/menuItem/menuItem.sx.d.js +1 -0
  61. package/dist/components/menu/menuItem/menuItem.types.d.js +1 -0
  62. package/dist/components/modals/index.d.js +1 -0
  63. package/dist/components/modals/warningModal/index.d.js +1 -0
  64. package/dist/components/modals/warningModal/warningModal.d.js +1 -0
  65. package/dist/components/patterns/actionBar/actionBar.d.js +1 -0
  66. package/dist/components/patterns/copyButton/copyButton.d.js +1 -0
  67. package/dist/components/patterns/copyButton/index.d.js +1 -0
  68. package/dist/components/patterns/emptyState/emptyState.d.js +1 -0
  69. package/dist/components/patterns/headerSection/headerSection.d.js +1 -0
  70. package/dist/components/patterns/headerSection/index.d.js +1 -0
  71. package/dist/components/patterns/iconWithIdentifier/iconWithIdentifier.d.js +1 -0
  72. package/dist/components/patterns/iconWithIdentifier/index.d.js +1 -0
  73. package/dist/components/patterns/index.d.js +6 -0
  74. package/dist/components/patterns/linkWithIcon/index.d.js +1 -0
  75. package/dist/components/patterns/linkWithIcon/linkWithIcon.d.js +1 -0
  76. package/dist/components/sidebar/index.d.js +1 -0
  77. package/dist/components/sidebar/sidebar.d.js +1 -0
  78. package/dist/components/tabs/index.d.js +1 -0
  79. package/dist/components/tabs/tabs.d.js +1 -0
  80. package/dist/components/tooltip/index.d.js +2 -0
  81. package/dist/components/tooltip/overflowChecker.d.js +1 -0
  82. package/dist/components/tooltip/tooltip.d.js +1 -0
  83. package/dist/hooks/useReduxFormField.d.js +8 -0
  84. package/dist/index.d.js +3 -0
  85. package/dist/locales/description.d.js +1 -0
  86. package/dist/locales/es.d.js +1 -0
  87. package/dist/locales/es.d.ts +2 -0
  88. package/dist/locales/index.d.js +1 -0
  89. package/dist/locales/translator.d.js +2 -0
  90. package/dist/producteca-ui-kit.es.js +2780 -52692
  91. package/dist/producteca-ui-kit.umd.js +57 -1079
  92. package/dist/style.css +1 -1
  93. package/dist/styles/colors.d.js +1 -0
  94. package/dist/styles/theme.d.js +1 -0
  95. package/dist/validators/errorMessage.d.js +1 -0
  96. package/dist/validators/index.d.js +2 -0
  97. package/dist/validators/validation.d.js +1 -0
  98. package/package.json +27 -3
package/README.md CHANGED
@@ -6,8 +6,9 @@
6
6
 
7
7
  - 🔹 [Node 22](https://nodejs.org/)
8
8
  - ⚛️ [React 18](https://reactjs.org/)
9
- - 📚 [Storybook 8](https://storybook.js.org/) - Components preview
9
+ - 📚 [Storybook 9](https://storybook.js.org/) - Components preview
10
10
  - ⏩ [Vite](https://vitejs.dev/) - Run and build the project blazingly fast!
11
+ - 🔧 [Babel](https://babeljs.io/) - JavaScript transpilation for maximum browser compatibility
11
12
  - ⚡ [Vitest](https://vitest.dev/) - Components Unit Testing
12
13
  - 📐 [ESLint](https://eslint.org/) & [Prettier](https://prettier.io/) - Formatting and Linting
13
14
  - 🌟 [Typescript](https://www.typescriptlang.org/)
@@ -18,8 +19,8 @@
18
19
  ## Main Scripts
19
20
 
20
21
  - `dev`: Starts Storybook in development mode on port 6006.
21
- - `build`: Builds the static Storybook project.
22
- - `build:lib`: Removes the `dist` folder, compiles TypeScript, and builds the library using Vite.
22
+ - `build`: Removes the `dist` folder, compiles TypeScript, builds the library using Vite, and transpiles with Babel for maximum browser compatibility.
23
+ - `build:storybook`: Builds the static Storybook project.
23
24
  - `deploy`: Deploys the project using the specified Makefile configuration.
24
25
  - `lint`: Runs ESLint to lint and fix issues in files with `.js`, `.jsx`, `.ts`, and `.tsx` extensions.
25
26
  - `prettier`: Formats files in the `src` folder with extensions `.ts`, `.tsx`, `.js`, and `.mdx` using Prettier.
@@ -29,6 +30,21 @@
29
30
  - `pre-commit`: Installs Husky and sets up Git hooks for pre-commit validation.
30
31
  - `build-storybook`: Builds the static Storybook project.
31
32
 
33
+ ## 🌐 Browser Compatibility
34
+
35
+ Este proyecto utiliza **Babel** para transpilar el código JavaScript/TypeScript, garantizando compatibilidad con:
36
+
37
+ - **Navegadores modernos**: Chrome, Firefox, Safari, Edge (últimas 2 versiones)
38
+ - **Navegadores legacy**: Internet Explorer 11+
39
+ - **Dispositivos móviles**: iOS Safari, Chrome Mobile, Samsung Internet
40
+ - **Cobertura global**: >0.25% de usuarios, excluyendo navegadores obsoletos
41
+
42
+ La configuración de Babel incluye:
43
+ - `@babel/preset-env` para transpilación automática según el target
44
+ - `@babel/preset-react` para sintaxis JSX
45
+ - `@babel/preset-typescript` para TypeScript
46
+ - Plugins adicionales para características modernas de JavaScript
47
+
32
48
  ### Setting up `@producteca/producteca-ui-kit`
33
49
 
34
50
  Follow these steps to integrate and configure the `@producteca/producteca-ui-kit` package in your project:
@@ -65,22 +81,6 @@ Follow these steps to integrate and configure the `@producteca/producteca-ui-kit
65
81
  import { SelectField, CheckboxInput /* other components */ } from '@producteca/producteca-ui-kit'
66
82
  ```
67
83
 
68
- 4. **Node 12 Compatibility**
69
- If you're using Node 12 in your project, you'll need to update your Babel configuration to ensure compatibility. Follow these steps:
70
-
71
- - Update your Babel dependencies to the following versions:
72
- ```json
73
- {
74
- "devDependencies": {
75
- "@babel/core": "^7.23.9",
76
- "@babel/preset-env": "^7.23.9",
77
- "@babel/preset-react": "^7.23.3",
78
- "@babel/preset-typescript": "^7.23.3"
79
- }
80
- }
81
- ```
82
- - For a complete example of how to implement these changes, refer to this pull request: [Shopify Babel Update Example](https://github.com/Parsimotion/shopify/pull/290)
83
-
84
84
  ## 📦 Publishing a New Version
85
85
 
86
86
  Package publishing is now handled automatically via a GitHub Action triggered on `push` to the `main` or `master` branches.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Breadcrumb } from './breadcrumb';
2
+ export { Breadcrumb as default } from './breadcrumb';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { Card } from './card';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { Chip } from './chip';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { Dropdown } from './dropdown';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from './searchPublication/searchPublication';
2
+ export * from './mailIcon/mailIcon';
3
+ export * from './fileIcon/fileIcon';
4
+ export * from './priceDownIcon/priceDownIcon';
5
+ export * from './priceCloseIcon/priceCloseIcon';
6
+ export * from './customIcon/customIcon';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { Image } from './image';
@@ -0,0 +1,15 @@
1
+ export * from './button/button';
2
+ export * from './chip';
3
+ export * from './icons';
4
+ export * from './inputs';
5
+ export * from './patterns';
6
+ export * from './loaders';
7
+ export * from './alert/alert';
8
+ export * from './tooltip';
9
+ export * from './image';
10
+ export * from './breadcrumb';
11
+ export * from './menu/menuAction';
12
+ export * from './modals';
13
+ export * from './tabs';
14
+ export * from './card';
15
+ export * from './sidebar';
@@ -11,4 +11,5 @@ export * from './breadcrumb';
11
11
  export * from './menu/menuAction';
12
12
  export * from './modals';
13
13
  export * from './tabs';
14
+ export * from './card';
14
15
  export * from './sidebar';
@@ -0,0 +1,3 @@
1
+ import { CheckboxInput } from './checkboxInput';
2
+ import { CheckboxInputGroup } from './checkboxInputGroup';
3
+ export { CheckboxInput, CheckboxInput as Checkbox, CheckboxInputGroup, CheckboxInputGroup as CheckboxGroup };
@@ -0,0 +1 @@
1
+ export {};
@@ -36,6 +36,7 @@ export declare const getPickerProps: ({ currentValue, finalFormat, onChange, dis
36
36
  minDate: dayjs.Dayjs | undefined;
37
37
  maxDate: dayjs.Dayjs | undefined;
38
38
  format: string;
39
+ reduceAnimations: boolean;
39
40
  slots: {
40
41
  textField: typeof TextField;
41
42
  };
@@ -0,0 +1,2 @@
1
+ export * from './datePicker';
2
+ export * from './datePickerCustomStyles';
@@ -0,0 +1,2 @@
1
+ export { DateRangePicker, DateRangePickerInput } from './dateRangePicker';
2
+ export { formatDate } from './dateFormater';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export * from './selectField/selectField';
2
+ export * from './formField/formField';
3
+ export * from './formField/textInput';
4
+ export * from './checkboxInput';
5
+ export * from './searcher/searcher';
6
+ export * from './switchInput';
7
+ export * from './datePicker';
8
+ export * from './dateRangePicker';
@@ -0,0 +1 @@
1
+ export {};
@@ -1,21 +1,8 @@
1
1
  import { default as React } from 'react';
2
- import { SelectOption } from '../selectField/selectField';
2
+ import { BaseSelectProps } from '../selectField/selectField.types';
3
3
 
4
- export interface SearcherProps {
5
- name: string;
6
- label?: string;
7
- size?: 'md' | 'lg';
8
- placeholder?: string;
9
- disabled?: boolean;
10
- required?: boolean;
11
- isClearable?: boolean;
12
- isSearchable?: boolean;
4
+ export interface SearcherProps extends BaseSelectProps {
13
5
  clearOnSelect?: boolean;
14
- options: SelectOption[];
15
- noOptionsMessage?: string | React.ReactNode;
16
- rightModifier?: React.ReactNode;
17
- isOptionDisabled?: (option: SelectOption) => boolean;
18
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
19
6
  onInputChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
20
7
  isLoading?: boolean;
21
8
  input?: {
@@ -1,40 +1,12 @@
1
1
  import { default as React } from 'react';
2
2
  import { OptionProps, SingleValueProps } from 'react-select';
3
- import { ReduxFormInput } from '../../../hooks/useReduxFormField';
4
- import { InputValue, Meta } from '../../../validators';
3
+ import { SelectOption, SelectOptionType, BaseSelectProps, SelectFieldProps } from './selectField.types';
5
4
 
6
- export interface SelectOption {
7
- label: string;
8
- value: string | number;
9
- tooltipMessage?: string;
10
- [key: string]: any;
11
- }
12
- export type SelectOptionType = SelectOption[] | SelectOption | null;
13
- export interface SelectFieldProps {
14
- name: string;
15
- label?: string;
16
- size?: 'md' | 'lg';
17
- onBlur?: () => void;
18
- placeholder?: string;
19
- disabled?: boolean;
20
- isMultiple?: boolean;
21
- required?: boolean;
22
- isClearable?: boolean;
23
- isSearchable?: boolean;
24
- options: SelectOption[];
25
- noOptionsMessage?: string;
26
- hideSelectedOptions?: boolean;
27
- rightModifier?: React.ReactNode;
28
- isOptionDisabled?: (option: SelectOption) => boolean;
29
- value?: (string | number)[] | null | undefined;
30
- defaultValue?: (string | number) | (string | number)[] | null | undefined;
31
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
32
- input?: ReduxFormInput;
33
- meta?: Meta;
34
- isValid?: (value: InputValue) => boolean;
35
- noErrors?: boolean;
36
- }
37
- export declare const Option: (props: OptionProps<SelectOption>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const BaseOption: (props: OptionProps<SelectOption>) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const Option: (props: OptionProps<SelectOption> & {
7
+ formatOption?: (option: SelectOption) => React.ReactNode;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const BaseSingleValue: (props: SingleValueProps<SelectOption>) => import("react/jsx-runtime").JSX.Element;
38
10
  export declare const SingleValue: (props: SingleValueProps<SelectOption>) => import("react/jsx-runtime").JSX.Element;
39
11
  export declare const SearchComponent: () => import("react/jsx-runtime").JSX.Element;
40
12
  export declare const ClearComponent: ({ optionSelected, isClearable, handleChange, }: {
@@ -44,3 +16,4 @@ export declare const ClearComponent: ({ optionSelected, isClearable, handleChang
44
16
  }) => import("react/jsx-runtime").JSX.Element | null;
45
17
  export declare const SelectField: React.FC<SelectFieldProps>;
46
18
  export default SelectField;
19
+ export type { BaseSelectProps, SelectOption, SelectOptionType, SelectFieldProps };
@@ -0,0 +1,37 @@
1
+ import { ReduxFormInput } from '../../../hooks/useReduxFormField';
2
+ import { InputValue, Meta } from '../../../validators';
3
+
4
+ export interface SelectOption {
5
+ label: string;
6
+ value: string | number;
7
+ tooltipMessage?: string;
8
+ [key: string]: any;
9
+ }
10
+ export type SelectOptionType = SelectOption[] | SelectOption | null;
11
+ export interface BaseSelectProps {
12
+ name: string;
13
+ label?: string;
14
+ size?: 'md' | 'lg' | 'fullwidth';
15
+ placeholder?: string;
16
+ disabled?: boolean;
17
+ required?: boolean;
18
+ isClearable?: boolean;
19
+ isSearchable?: boolean;
20
+ options: SelectOption[];
21
+ noOptionsMessage?: string;
22
+ rightModifier?: React.ReactNode;
23
+ isOptionDisabled?: (option: SelectOption) => boolean;
24
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
25
+ formatOption?: (option: SelectOption) => React.ReactNode;
26
+ }
27
+ export interface SelectFieldProps extends BaseSelectProps {
28
+ onBlur?: () => void;
29
+ isMultiple?: boolean;
30
+ hideSelectedOptions?: boolean;
31
+ value?: (string | number)[] | null | undefined;
32
+ defaultValue?: (string | number) | (string | number)[] | null | undefined;
33
+ input?: ReduxFormInput;
34
+ meta?: Meta;
35
+ isValid?: (value: InputValue) => boolean;
36
+ noErrors?: boolean;
37
+ }
@@ -0,0 +1,2 @@
1
+ import { SwitchInput, SwitchInputGroup } from './switchInput';
2
+ export { SwitchInput, SwitchInput as Switch, SwitchInputGroup, SwitchInputGroup as SwitchGroup };
@@ -0,0 +1,2 @@
1
+ export * from './spinner/spinner';
2
+ export * from './progressbar/progressbar';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { MenuAction } from './menuAction';
2
+ export { MenuItemComponent } from '../menuItem/menuItem';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './warningModal/warningModal';
@@ -0,0 +1 @@
1
+ export { WarningModal } from './warningModal';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { CopyButton } from './copyButton';
@@ -0,0 +1 @@
1
+ export { HeaderSection } from './headerSection';
@@ -0,0 +1 @@
1
+ export { IconWithIdentifier } from './iconWithIdentifier';
@@ -0,0 +1,6 @@
1
+ export * from './emptyState/emptyState';
2
+ export * from './actionBar/actionBar';
3
+ export * from './copyButton/copyButton';
4
+ export * from './headerSection';
5
+ export * from './linkWithIcon';
6
+ export * from './iconWithIdentifier';
@@ -0,0 +1 @@
1
+ export { LinkWithIcon } from './linkWithIcon';
@@ -0,0 +1 @@
1
+ export { AppSidebar as Sidebar } from './sidebar';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { Tabs } from './tabs';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { OverflowChecker } from './overflowChecker';
2
+ export { WithTooltip, WithOverflowTooltip } from './tooltip';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Hook to unify Redux Form and regular form field handling
3
+ *
4
+ * @param params Configuration object containing input, onChange, and transformValue
5
+ * @returns Object with handleChange and handleBlur functions
6
+ */
7
+
8
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export * from './styles/colors';
3
+ export * from './hooks/useReduxFormField';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -62,6 +62,8 @@ declare const _default: {
62
62
  disabledOptions: string;
63
63
  noOptions: string;
64
64
  withIcon: string;
65
+ fullWidth: string;
66
+ labelFullWidth: string;
65
67
  };
66
68
  actionBar: {
67
69
  example: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { default as i18next } from 'i18next';
2
+ export default i18next;