@dropi/ui 0.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/LICENSE +21 -0
- package/dist/cjs/dropi-badge.cjs.entry.js +37 -0
- package/dist/cjs/dropi-button.cjs.entry.js +81 -0
- package/dist/cjs/dropi-checkbox.cjs.entry.js +36 -0
- package/dist/cjs/dropi-icon.cjs.entry.js +50 -0
- package/dist/cjs/dropi-input.cjs.entry.js +210 -0
- package/dist/cjs/dropi-radio-button.cjs.entry.js +47 -0
- package/dist/cjs/dropi-select.cjs.entry.js +335 -0
- package/dist/cjs/dropi-switch.cjs.entry.js +30 -0
- package/dist/cjs/dropi-tag.cjs.entry.js +68 -0
- package/dist/cjs/dropi-text-area.cjs.entry.js +103 -0
- package/dist/cjs/dropi-ui.cjs.js +24 -0
- package/dist/cjs/index-CuGLZVqo.js +1743 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/collection/assets/icons/symbol/svg/sprite.css.svg +1 -0
- package/dist/collection/collection-manifest.json +22 -0
- package/dist/collection/components/dropi-badge/dropi-badge.css +41 -0
- package/dist/collection/components/dropi-badge/dropi-badge.js +72 -0
- package/dist/collection/components/dropi-button/dropi-button.css +169 -0
- package/dist/collection/components/dropi-button/dropi-button.js +277 -0
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.css +47 -0
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.js +103 -0
- package/dist/collection/components/dropi-icon/dropi-icon.css +19 -0
- package/dist/collection/components/dropi-icon/dropi-icon.js +142 -0
- package/dist/collection/components/dropi-input/dropi-input.css +168 -0
- package/dist/collection/components/dropi-input/dropi-input.js +735 -0
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.css +59 -0
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +181 -0
- package/dist/collection/components/dropi-select/dropi-select.css +364 -0
- package/dist/collection/components/dropi-select/dropi-select.js +932 -0
- package/dist/collection/components/dropi-select/select.types.js +1 -0
- package/dist/collection/components/dropi-switch/dropi-switch.css +57 -0
- package/dist/collection/components/dropi-switch/dropi-switch.js +96 -0
- package/dist/collection/components/dropi-tag/dropi-tag.css +40 -0
- package/dist/collection/components/dropi-tag/dropi-tag.js +190 -0
- package/dist/collection/components/dropi-text-area/dropi-text-area.css +97 -0
- package/dist/collection/components/dropi-text-area/dropi-text-area.js +457 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/collection/utils/utils.unit.test.js +16 -0
- package/dist/components/dropi-badge.d.ts +11 -0
- package/dist/components/dropi-badge.js +1 -0
- package/dist/components/dropi-button.d.ts +11 -0
- package/dist/components/dropi-button.js +1 -0
- package/dist/components/dropi-checkbox.d.ts +11 -0
- package/dist/components/dropi-checkbox.js +1 -0
- package/dist/components/dropi-icon.d.ts +11 -0
- package/dist/components/dropi-icon.js +1 -0
- package/dist/components/dropi-input.d.ts +11 -0
- package/dist/components/dropi-input.js +1 -0
- package/dist/components/dropi-radio-button.d.ts +11 -0
- package/dist/components/dropi-radio-button.js +1 -0
- package/dist/components/dropi-select.d.ts +11 -0
- package/dist/components/dropi-select.js +1 -0
- package/dist/components/dropi-switch.d.ts +11 -0
- package/dist/components/dropi-switch.js +1 -0
- package/dist/components/dropi-tag.d.ts +11 -0
- package/dist/components/dropi-tag.js +1 -0
- package/dist/components/dropi-text-area.d.ts +11 -0
- package/dist/components/dropi-text-area.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-MNma8N1x.js +1 -0
- package/dist/dropi-ui/dropi-ui.css +1 -0
- package/dist/dropi-ui/dropi-ui.esm.js +1 -0
- package/dist/dropi-ui/index.esm.js +0 -0
- package/dist/dropi-ui/p-1a28b8f5.entry.js +1 -0
- package/dist/dropi-ui/p-21abf91a.entry.js +1 -0
- package/dist/dropi-ui/p-52291024.entry.js +1 -0
- package/dist/dropi-ui/p-54502c46.entry.js +1 -0
- package/dist/dropi-ui/p-6f0aa619.entry.js +1 -0
- package/dist/dropi-ui/p-9c7076d3.entry.js +1 -0
- package/dist/dropi-ui/p-DFz-gwFP.js +2 -0
- package/dist/dropi-ui/p-a1944f3d.entry.js +1 -0
- package/dist/dropi-ui/p-c7b9cbda.entry.js +1 -0
- package/dist/dropi-ui/p-dd089a60.entry.js +1 -0
- package/dist/dropi-ui/p-f785011f.entry.js +1 -0
- package/dist/esm/dropi-badge.entry.js +35 -0
- package/dist/esm/dropi-button.entry.js +79 -0
- package/dist/esm/dropi-checkbox.entry.js +34 -0
- package/dist/esm/dropi-icon.entry.js +48 -0
- package/dist/esm/dropi-input.entry.js +208 -0
- package/dist/esm/dropi-radio-button.entry.js +45 -0
- package/dist/esm/dropi-select.entry.js +333 -0
- package/dist/esm/dropi-switch.entry.js +28 -0
- package/dist/esm/dropi-tag.entry.js +66 -0
- package/dist/esm/dropi-text-area.entry.js +101 -0
- package/dist/esm/dropi-ui.js +20 -0
- package/dist/esm/index-DFz-gwFP.js +1734 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +10 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/dropi-badge/dropi-badge.d.ts +12 -0
- package/dist/types/components/dropi-button/dropi-button.d.ts +35 -0
- package/dist/types/components/dropi-checkbox/dropi-checkbox.d.ts +16 -0
- package/dist/types/components/dropi-icon/dropi-icon.d.ts +25 -0
- package/dist/types/components/dropi-input/dropi-input.d.ts +92 -0
- package/dist/types/components/dropi-radio-button/dropi-radio-button.d.ts +25 -0
- package/dist/types/components/dropi-select/dropi-select.d.ts +103 -0
- package/dist/types/components/dropi-select/select.types.d.ts +23 -0
- package/dist/types/components/dropi-switch/dropi-switch.d.ts +15 -0
- package/dist/types/components/dropi-tag/dropi-tag.d.ts +25 -0
- package/dist/types/components/dropi-text-area/dropi-text-area.d.ts +53 -0
- package/dist/types/components.d.ts +1549 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/types/utils/utils.unit.test.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +50 -0
- package/readme.md +89 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function format(first?: string, middle?: string, last?: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/loader/cdn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/cjs/loader.cjs.js');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/cjs/loader.cjs.js');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from '../dist/types/components';
|
|
2
|
+
export interface CustomElementsDefineOptions {
|
|
3
|
+
exclude?: string[];
|
|
4
|
+
resourcesUrl?: string;
|
|
5
|
+
syncQueue?: boolean;
|
|
6
|
+
jmp?: (c: Function) => any;
|
|
7
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
8
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
9
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
15
|
+
export declare function applyPolyfills(): Promise<void>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
19
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
20
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
21
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
22
|
+
* will result in the same behavior.
|
|
23
|
+
*/
|
|
24
|
+
export declare function setNonce(nonce: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/esm/loader.js';
|
package/loader/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
|
|
2
|
+
export * from '../dist/esm/loader.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dropi/ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Dropi Design System — Web Components for Angular, React and Vue",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
9
|
+
"collection:main": "dist/collection/index.js",
|
|
10
|
+
"unpkg": "dist/dropi-ui/dropi-ui.esm.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs.js",
|
|
15
|
+
"types": "./dist/types/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./loader": {
|
|
18
|
+
"import": "./loader/index.js",
|
|
19
|
+
"require": "./loader/index.cjs",
|
|
20
|
+
"types": "./loader/index.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./dist/components/*.js": {
|
|
23
|
+
"import": "./dist/components/*.js",
|
|
24
|
+
"require": "./dist/components/*.js"
|
|
25
|
+
},
|
|
26
|
+
"./dist/dropi-ui/dropi-ui.css": "./dist/dropi-ui/dropi-ui.css"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist/",
|
|
30
|
+
"loader/"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "stencil build",
|
|
34
|
+
"start": "stencil build --dev --watch --serve",
|
|
35
|
+
"test": "stencil-test",
|
|
36
|
+
"test:watch": "stencil-test --watch",
|
|
37
|
+
"generate": "stencil generate"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@stencil/angular-output-target": "^1.3.0",
|
|
41
|
+
"@stencil/core": "^4.27.1",
|
|
42
|
+
"@stencil/react-output-target": "^1.4.2",
|
|
43
|
+
"@stencil/vitest": "^1.8.3",
|
|
44
|
+
"@stencil/vue-output-target": "^0.13.1",
|
|
45
|
+
"@types/node": "^22.13.5",
|
|
46
|
+
"@vitest/browser-playwright": "^4.0.0",
|
|
47
|
+
"vitest": "^4.0.0"
|
|
48
|
+
},
|
|
49
|
+
"license": "MIT"
|
|
50
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
[](https://stenciljs.com)
|
|
2
|
+
|
|
3
|
+
# Dropi UI
|
|
4
|
+
|
|
5
|
+
Este es el sistema de diseño y librería de componentes oficial de **Dropi**, construido utilizando *Web Components* (Componentes Web Nativos) a través de StencilJS.
|
|
6
|
+
|
|
7
|
+
La gran ventaja de estar empaquetado como Web Components es que garantiza la máxima encapsulación visual y permite que **un único desarrollo funcione de manera universal** en cualquier navegador moderno o framework dominante de frontend (Angular, React, Vue, HTML puro) sin necesidad de reescribir la lógica ni perder estilos por colisiones de CSS externas.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🤖 Instalación Automatizada mediante IA (¡Nuevo y Recomendado!)
|
|
12
|
+
|
|
13
|
+
Puedes instalar y configurar `dropi-ui` de manera totalmente automatizada en tus proyectos de **React**, **Angular** o **Vue** utilizando nuestro Agente IA de instalación. ¡Cero configuraciones manuales!
|
|
14
|
+
|
|
15
|
+
1. Copia nuestro archivo maestro del agente ubicado en `.agents/workflows/install-dropi-ui.md` desde este repositorio y pégalo en la carpeta `.agents/workflows/` de tu proyecto destino.
|
|
16
|
+
2. Abre tu asistente de programación con IA (Cursor, GitHub Copilot, Cline, etc.) dentro de tu proyecto.
|
|
17
|
+
3. Ejecuta el siguiente "slash command" o comando rápido en el chat del asistente:
|
|
18
|
+
```bash
|
|
19
|
+
/install-dropi-ui
|
|
20
|
+
```
|
|
21
|
+
4. Y listo. El agente de IA interpretará automáticamente qué framework usas, enlazará las dependencias exactas (`yarn` o `npm`), inyectará los estilos globales obligatorios, y comprobará compresión, reportándote cuando tu entorno esté 100% operativo.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 🚀 Desarrollo Local
|
|
26
|
+
|
|
27
|
+
Si necesitas clonar este repositorio para desarrollar la librería o modificar componentes:
|
|
28
|
+
|
|
29
|
+
1. **Instalar dependencias y arrancar en modo desarrollo**:
|
|
30
|
+
```bash
|
|
31
|
+
yarn install
|
|
32
|
+
yarn start
|
|
33
|
+
```
|
|
34
|
+
*(También compatible con npm)*
|
|
35
|
+
|
|
36
|
+
2. **Para compilar los componentes de forma definitiva para producción** (Genera los archivos para web y los wrappers para Angular/React):
|
|
37
|
+
```bash
|
|
38
|
+
yarn run build
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. **Para correr las pruebas unitarias**:
|
|
42
|
+
```bash
|
|
43
|
+
yarn test
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 📦 Uso y Consumo Manual
|
|
49
|
+
|
|
50
|
+
Si prefieres realizar el montaje a mano, existen dos aproximaciones:
|
|
51
|
+
|
|
52
|
+
### 1. En Aplicaciones Node y Empaquetadores (Angular, React, Vite, etc.)
|
|
53
|
+
|
|
54
|
+
Tras instalar localmente este módulo (`yarn add file:../dropi-ui`), puedes cargar toda la familia de componentes importando el loader inicial de Stencil:
|
|
55
|
+
```typescript
|
|
56
|
+
import '@dropi/ui/dist/dropi-ui/dropi-ui.esm.js';
|
|
57
|
+
import '@dropi/ui/dist/dropi-ui/dropi-ui.css'; // Opcional, dependiendo del inyector
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Si estás utilizando React, es mejor usar el instalador de Wrapper oficial (`dropi-ui-react`)** ya que autocompleta los eventos y previene los conflictos en hooks:
|
|
61
|
+
```tsx
|
|
62
|
+
// App.tsx
|
|
63
|
+
import { DropiButton, DropiInput } from '@dropi/ui-react';
|
|
64
|
+
|
|
65
|
+
export default function MiApp() {
|
|
66
|
+
return (
|
|
67
|
+
<DropiButton
|
|
68
|
+
type="default"
|
|
69
|
+
severity="primary"
|
|
70
|
+
size="normal"
|
|
71
|
+
text="Ingresar a la plataforma"
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 2. Etiqueta Script Directa (HTML Puro / CDNs Lazos)
|
|
78
|
+
|
|
79
|
+
Si solo quieres usar la librería en un archivo HTML tradicional sin ningún framework atado, solo debes inyectar nuestra distribución al encabezado o final del cuerpo:
|
|
80
|
+
|
|
81
|
+
```html
|
|
82
|
+
<script type="module" src="https://unpkg.com/@dropi/ui/dist/dropi-ui/dropi-ui.esm.js"></script>
|
|
83
|
+
<!-- Asegúrate de cambiar unpkg.com por un entorno privado o ruta absoluta de ser necesario -->
|
|
84
|
+
|
|
85
|
+
<!-- Úsalo como cualquier otra etiqueta HTML existente -->
|
|
86
|
+
<dropi-button text="Enviar Datos"></dropi-button>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
> **Nota:** Todos los componentes utilizan guiones e inician con el prefijo `dropi-` para asegurar que el explorador entienda que es un Custom Element.
|