@producteca/producteca-ui-kit 1.12.0 → 1.13.1
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 +98 -42
- package/dist/components/patterns/index.d.ts +1 -0
- package/dist/components/patterns/tooltip/index.d.ts +3 -0
- package/dist/components/patterns/tooltip/overflowChecker.d.ts +5 -0
- package/dist/components/patterns/tooltip/tooltip.d.ts +17 -0
- package/dist/locales/es.d.ts +8 -0
- package/dist/producteca-ui-kit.es.js +11744 -8509
- package/dist/producteca-ui-kit.umd.js +83 -74
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -29,43 +29,6 @@
|
|
|
29
29
|
- `pre-commit`: Installs Husky and sets up Git hooks for pre-commit validation.
|
|
30
30
|
- `build-storybook`: Builds the static Storybook project.
|
|
31
31
|
|
|
32
|
-
### ✅ Commit Linting con Husky
|
|
33
|
-
|
|
34
|
-
Este proyecto utiliza commitlint junto con husky para asegurar que todos los mensajes de commit sigan el [formato convencional](https://www.conventionalcommits.org/en/v1.0.0/).
|
|
35
|
-
|
|
36
|
-
#### ¿Por qué?
|
|
37
|
-
|
|
38
|
-
El formato convencional de commits permite:
|
|
39
|
-
|
|
40
|
-
- Generar changelogs automáticamente.
|
|
41
|
-
- Clasificar los cambios en versiones (patch, minor, major).
|
|
42
|
-
- Tener un historial de commits más claro y estructurado.
|
|
43
|
-
|
|
44
|
-
#### 🛠️ Instalación y configuración
|
|
45
|
-
|
|
46
|
-
Ya está todo configurado en el proyecto. Si estás trabajando localmente, asegurate de ejecutar lo siguiente luego de clonar e instalar dependencias:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
bun install
|
|
50
|
-
npx husky install
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Esto se asegura de que los hooks de Git estén correctamente instalados.
|
|
54
|
-
|
|
55
|
-
#### ⚙️ Archivos relevantes
|
|
56
|
-
|
|
57
|
-
- `.husky/commit-msg`: hook que ejecuta commitlint antes de hacer un commit.
|
|
58
|
-
- `commitlint.config.js`: define las reglas que deben cumplir los mensajes de commit.
|
|
59
|
-
- `.husky/pre-commit`: (opcional) puede correr linters u otros chequeos automáticos.
|
|
60
|
-
|
|
61
|
-
📝 Ejemplo de mensaje de commit válido
|
|
62
|
-
|
|
63
|
-
```sh
|
|
64
|
-
feat: agrega componente de botón primario
|
|
65
|
-
fix(ci): corrige configuración de release en rama test
|
|
66
|
-
chore(deps): actualiza dependencias de desarrollo
|
|
67
|
-
```
|
|
68
|
-
|
|
69
32
|
### Setting up `@producteca/producteca-ui-kit`
|
|
70
33
|
|
|
71
34
|
Follow these steps to integrate and configure the `@producteca/producteca-ui-kit` package in your project:
|
|
@@ -118,9 +81,102 @@ Follow these steps to integrate and configure the `@producteca/producteca-ui-kit
|
|
|
118
81
|
```
|
|
119
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)
|
|
120
83
|
|
|
121
|
-
|
|
84
|
+
## 📦 Publishing a New Version
|
|
85
|
+
|
|
86
|
+
Package publishing is now handled automatically via a GitHub Action triggered on `push` to the `main` or `master` branches.
|
|
87
|
+
|
|
88
|
+
You can also trigger it manually from the **Actions** tab using the `Release` workflow.
|
|
89
|
+
|
|
90
|
+
The workflow supports prerelease versions (e.g., `alpha`, `beta`) through the `prereleaseTag` input.
|
|
91
|
+
|
|
92
|
+
### 🚀 Manual Run (ONLY for prereleases)
|
|
93
|
+
|
|
94
|
+
1. Go to [Actions](https://github.com/Parsimotion/courierteca/actions).
|
|
95
|
+
2. Select the `Release` workflow.
|
|
96
|
+
3. Click `Run workflow`.
|
|
97
|
+
4. Enter the desired tag (e.g., `beta`) or leave as `alpha` (default).
|
|
98
|
+
|
|
99
|
+
> 🔐 The release process uses the contents of the `lib/` directory generated during build.
|
|
100
|
+
|
|
101
|
+
### ✅ Commit Linting with Husky
|
|
102
|
+
|
|
103
|
+
This project uses Commitlint along with Husky to ensure that all commit messages follow the [Conventional Commit format](https://www.conventionalcommits.org/en/v1.0.0/).
|
|
104
|
+
|
|
105
|
+
#### Why?
|
|
106
|
+
|
|
107
|
+
The conventional commit format allows you to:
|
|
108
|
+
|
|
109
|
+
- Automatically generate changelogs.
|
|
110
|
+
- Classify changes into versions (patch, minor, major).
|
|
111
|
+
- Maintain a clearer and more structured commit history.
|
|
112
|
+
|
|
113
|
+
#### 🛠️ Installation and Setup
|
|
114
|
+
|
|
115
|
+
Everything is already configured in the project. If you're working locally, make sure to run the following after cloning and installing dependencies:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm install
|
|
119
|
+
npx husky install
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
This ensures that Git hooks are properly installed.
|
|
123
|
+
|
|
124
|
+
#### ⚙️ Relevant Files
|
|
125
|
+
|
|
126
|
+
- `.husky/commit-msg`: hook that runs commitlint before making a commit.
|
|
127
|
+
- `commitlint.config.js`: defines the rules that commit messages must follow.
|
|
128
|
+
- `.husky/pre-commit`: (optional) can run linters or other automated checks.
|
|
129
|
+
|
|
130
|
+
📝 Example of a valid commit message
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
feat: add primary button component
|
|
134
|
+
fix(ci): fix release configuration on test branch
|
|
135
|
+
chore(deps): update development dependencies
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## 🧹 Branch Name Linter
|
|
139
|
+
|
|
140
|
+
This project uses [`linterteca`](https://www.npmjs.com/package/linterteca) to enforce consistent branch naming conventions across all development work.
|
|
141
|
+
|
|
142
|
+
The linter is automatically run as a `pre-push` Git hook using [Husky](https://typicode.github.io/husky/#/). To ensure the linter works properly:
|
|
143
|
+
|
|
144
|
+
#### ✅ Setup Instructions
|
|
145
|
+
|
|
146
|
+
1. Install all dependencies:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
npm install
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
2. That's it! The linter will now run **automatically before each push** and will block invalid branch names.
|
|
153
|
+
|
|
154
|
+
#### 📛 Branch name rules
|
|
155
|
+
|
|
156
|
+
Allowed prefixes:
|
|
157
|
+
|
|
158
|
+
- `feature/`
|
|
159
|
+
- `fix/`
|
|
160
|
+
- `hotfix/`
|
|
161
|
+
- `release/`
|
|
162
|
+
- `docs/`
|
|
163
|
+
- `fix/`
|
|
164
|
+
- `refactor/`
|
|
165
|
+
- `chore/`
|
|
166
|
+
- `ci/`
|
|
167
|
+
- `test/`
|
|
168
|
+
- `perf`
|
|
169
|
+
- `style`
|
|
170
|
+
- `build/`.
|
|
171
|
+
|
|
172
|
+
If your branch name does not follow the required format, the push will be blocked with a helpful error message.
|
|
173
|
+
|
|
174
|
+
#### 🛠️ Bypass (not recommended)
|
|
175
|
+
|
|
176
|
+
To bypass the linter in exceptional cases:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
git push --no-verify
|
|
180
|
+
```
|
|
122
181
|
|
|
123
|
-
-
|
|
124
|
-
```bash
|
|
125
|
-
(major | minor | patch | premajor | preminor | prepatch | prerelease)/name
|
|
126
|
-
```
|
|
182
|
+
> Only use `--no-verify` if absolutely necessary and with team consensus.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare const OverflowChecker: ({ children, }: {
|
|
4
|
+
children: (ref: React.RefObject<HTMLElement | HTMLDivElement | HTMLSpanElement | HTMLLabelElement>, showTooltip: boolean) => React.ReactNode;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
4
|
+
export interface BaseTooltipProps {
|
|
5
|
+
content?: string;
|
|
6
|
+
placement?: TooltipPlacement;
|
|
7
|
+
arrow?: boolean;
|
|
8
|
+
maxWidth?: number | string;
|
|
9
|
+
}
|
|
10
|
+
export interface WithTooltipProps extends BaseTooltipProps {
|
|
11
|
+
children: React.ReactElement;
|
|
12
|
+
}
|
|
13
|
+
export declare const WithTooltip: ({ children, content, placement, arrow, maxWidth, }: WithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export interface CombinedTooltipProps extends BaseTooltipProps {
|
|
15
|
+
children: React.ReactElement;
|
|
16
|
+
}
|
|
17
|
+
export declare const WithOverflowTooltip: ({ content, children, ...tooltipProps }: CombinedTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/locales/es.d.ts
CHANGED
|
@@ -25,6 +25,14 @@ declare const _default: {
|
|
|
25
25
|
medium: string;
|
|
26
26
|
small: string;
|
|
27
27
|
};
|
|
28
|
+
tooltip: {
|
|
29
|
+
hoverToSee: string;
|
|
30
|
+
basicContent: string;
|
|
31
|
+
basicDescription: string;
|
|
32
|
+
overflowDescription: string;
|
|
33
|
+
componentDescription: string;
|
|
34
|
+
maxWidthDescription: string;
|
|
35
|
+
};
|
|
28
36
|
description: {
|
|
29
37
|
checkboxInputReduxFormExample: string;
|
|
30
38
|
onChangeSelectField: string;
|