@producteca/producteca-ui-kit 1.0.0 → 1.1.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.
package/README.md CHANGED
@@ -32,24 +32,37 @@ Follow these steps to integrate and configure the `@producteca/producteca-ui-kit
32
32
 
33
33
  1. **Install the package**
34
34
  Make sure to install the latest version of the package:
35
+
35
36
  ```bash
36
37
  bun install @producteca/producteca-ui-kit
37
38
 
38
39
  ```
40
+
39
41
  2. **Import the styles**
40
42
  Add the following line to your `app/css/setup.js` file:
43
+
41
44
  ```bash
42
45
  import "@producteca/producteca-ui-kit/dist/style.css";
43
46
 
44
47
  ```
48
+
45
49
  3. **Remove old SelectField instances**
46
50
 
47
51
  - Check for any existing version of `selectField`. If found, delete the file:
52
+
48
53
  ```bash
49
54
  app/components/form/selectField
50
55
 
51
56
  ```
57
+
52
58
  - Update any old imports to:
53
59
  ```bash
54
60
  import { SelectField } from "@producteca/producteca-ui-kit";
55
61
  ```
62
+
63
+ ### Auto Publish
64
+
65
+ - Use the following options for the branch name
66
+ ```bash
67
+ (major | minor | patch | premajor | preminor | prepatch | prerelease)/name
68
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@producteca/producteca-ui-kit",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "main": "./dist/producteca-ui-kit.umd.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "repository": {
@@ -20,6 +20,8 @@
20
20
  "dev": "storybook dev -p 6006",
21
21
  "build": "storybook build",
22
22
  "build:lib": "rm -rf dist && tsc && vite build",
23
+ "version": "git add package.json",
24
+ "postversion": "npm publish",
23
25
  "deploy": "make deploy",
24
26
  "lint": "eslint --ext .js,.jsx,.ts,.tsx --fix",
25
27
  "prettier": "prettier --write \"src/**/*.{ts,tsx,js,mdx}\"",
@@ -1,11 +0,0 @@
1
- interface ButtonProps {
2
- label: string;
3
- variant?: 'primary' | 'secondary' | 'success' | 'error';
4
- outline?: boolean;
5
- size?: 'sm' | 'lg';
6
- type?: 'submit' | 'button' | 'reset';
7
- onClick?: () => void;
8
- }
9
- export declare const Button: ({ type, variant, size, label, outline, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
10
- export type { ButtonProps };
11
- export default Button;
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface EmptyStateProps {
4
- onActionClick?: () => void;
5
- actionText?: string;
6
- text?: string;
7
- icon?: React.ReactNode;
8
- }
9
- export declare const EmptyState: ({ onActionClick, icon, actionText, text, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
10
- export type { EmptyStateProps };
11
- export default EmptyState;
@@ -1,5 +0,0 @@
1
- import { IconInterface } from '../parameters';
2
-
3
- export declare const CloseIcon: ({ size, color }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
- export type { IconInterface };
5
- export default CloseIcon;
@@ -1,3 +0,0 @@
1
- export { SearchPublication } from './searchPublication/searchPublication';
2
- export { CloseIcon } from './closeIcon/closeIcon';
3
- export { SearchIcon } from './searchIcon/searchIcon';
@@ -1,35 +0,0 @@
1
- export interface IconInterface {
2
- size?: number;
3
- color?: string;
4
- }
5
- interface ArgTypes {
6
- [key: string]: {
7
- control: {
8
- type: string;
9
- presetColors?: {
10
- title: string;
11
- color: string;
12
- }[];
13
- };
14
- description: string;
15
- };
16
- }
17
- export declare const argTypes: ArgTypes;
18
- export declare const parameters: {
19
- layout: string;
20
- design: {
21
- type: string;
22
- url: string;
23
- };
24
- };
25
- export declare const defaultParameters: {
26
- parameters: {
27
- layout: string;
28
- design: {
29
- type: string;
30
- url: string;
31
- };
32
- };
33
- argTypes: ArgTypes;
34
- };
35
- export default defaultParameters;
@@ -1,5 +0,0 @@
1
- import { IconInterface } from '../parameters';
2
-
3
- export declare const SearchIcon: ({ size, color }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
- export type { IconInterface };
5
- export default SearchIcon;
@@ -1,5 +0,0 @@
1
- import { IconInterface } from '../parameters';
2
-
3
- export declare const SearchPublication: ({ size, color }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
- export type { IconInterface };
5
- export default SearchPublication;
@@ -1,5 +0,0 @@
1
- export * from './button/button';
2
- export * from './emptyState/emptyState';
3
- export * from './selectField/selectField';
4
- export * from './icons';
5
- export * from './spinner/spinner';
@@ -1,28 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface SelectOption {
4
- label: string;
5
- value: string | number;
6
- [key: string]: any;
7
- }
8
- export interface SelectFieldProps {
9
- name: string;
10
- label?: string;
11
- placeholder?: string;
12
- isDisabled?: boolean;
13
- onBlur?: () => void;
14
- noOptionsMessage?: string;
15
- options: SelectOption[];
16
- hideSelectedOptions?: boolean;
17
- defaultValue?: SelectOption[] | SelectOption | null | undefined;
18
- currentValue?: (string | number)[];
19
- isMultiple?: boolean;
20
- isSearchable?: boolean;
21
- isClearable?: boolean;
22
- isRequired?: boolean;
23
- isOptionDisabled?: (option: SelectOption) => boolean;
24
- rightModifier?: React.ReactNode;
25
- setValue: (name: string, value: SelectOption | SelectOption[] | null) => void;
26
- }
27
- export declare const SelectField: React.FC<SelectFieldProps>;
28
- export default SelectField;
@@ -1,6 +0,0 @@
1
- interface SpinnerProps {
2
- size?: number;
3
- }
4
- export declare const Spinner: ({ size }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
5
- export type { SpinnerProps };
6
- export default Spinner;
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components';
@@ -1,12 +0,0 @@
1
- declare const _default: {
2
- noResultsFound: string;
3
- reloadPage: string;
4
- selectPlaceholder: string;
5
- noOptionsMessage: string;
6
- noFoundOptions: string;
7
- selectedPlural: string;
8
- selected: string;
9
- selectRequiredText: string;
10
- hideSelectedOptionsExplainText: string;
11
- };
12
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import('i18next').TFunction<["translation", ...string[]], undefined>;
2
- export default _default;
@@ -1,3 +0,0 @@
1
- import { default as i18next } from 'i18next';
2
-
3
- export default i18next;