@randstad-uca/design-system 1.0.3

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 (55) hide show
  1. package/dist/assets/icons/default/ayuda.svg +12 -0
  2. package/dist/assets/icons/default/calendar.svg +20 -0
  3. package/dist/assets/icons/default/check.svg +10 -0
  4. package/dist/assets/icons/default/email.svg +11 -0
  5. package/dist/assets/icons/default/eye.svg +11 -0
  6. package/dist/assets/icons/default/eye_crossed.svg +10 -0
  7. package/dist/assets/icons/default/info.svg +12 -0
  8. package/dist/assets/icons/default/warning.svg +12 -0
  9. package/dist/components/Button.d.ts +15 -0
  10. package/dist/components/Checkbox.d.ts +14 -0
  11. package/dist/components/Datepicker.d.ts +1 -0
  12. package/dist/components/Form.d.ts +25 -0
  13. package/dist/components/Icon.d.ts +12 -0
  14. package/dist/components/Modal.d.ts +14 -0
  15. package/dist/components/Notice.d.ts +1 -0
  16. package/dist/components/Popup.d.ts +15 -0
  17. package/dist/components/Progress.d.ts +11 -0
  18. package/dist/components/Radio.d.ts +11 -0
  19. package/dist/components/Select.d.ts +25 -0
  20. package/dist/components/Snackbar.d.ts +1 -0
  21. package/dist/components/Stepper.d.ts +7 -0
  22. package/dist/components/Test.d.ts +5 -0
  23. package/dist/components/TestButton.d.ts +6 -0
  24. package/dist/components/iconList.d.ts +1 -0
  25. package/dist/index.css +1 -0
  26. package/dist/index.d.ts +15 -0
  27. package/dist/index.js +5196 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/package.json +49 -0
  30. package/dist/stories/Button.stories.d.ts +26 -0
  31. package/dist/stories/Checkbox.stories.d.ts +6 -0
  32. package/dist/stories/Datepicker.stories.d.ts +6 -0
  33. package/dist/stories/Form.stories.d.ts +40 -0
  34. package/dist/stories/Icon.stories.d.ts +7 -0
  35. package/dist/stories/Modal.stories.d.ts +7 -0
  36. package/dist/stories/Notice.stories.d.ts +39 -0
  37. package/dist/stories/Popup.stories.d.ts +9 -0
  38. package/dist/stories/Progress.stories.d.ts +15 -0
  39. package/dist/stories/Radio.stories.d.ts +11 -0
  40. package/dist/stories/Select.stories.d.ts +87 -0
  41. package/dist/stories/Snackbar.stories.d.ts +39 -0
  42. package/dist/stories/Stepper.stories.d.ts +38 -0
  43. package/dist/styles/buttons.css +209 -0
  44. package/dist/styles/colors.css +36 -0
  45. package/dist/styles/fonts.css +51 -0
  46. package/dist/styles/forms.css +151 -0
  47. package/dist/styles/globalStyles.d.ts +2 -0
  48. package/dist/styles/globalStyles.ts +22 -0
  49. package/dist/styles/icons.css +25 -0
  50. package/dist/styles/index.css +5 -0
  51. package/dist/styles/notice.css +0 -0
  52. package/dist/styles/select.css +12 -0
  53. package/dist/styles/snackbar.css +0 -0
  54. package/package.json +49 -0
  55. package/readme.md +170 -0
@@ -0,0 +1,151 @@
1
+ /* Base form styles */
2
+ .form {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 0.3rem;
6
+ font-family: 'Graphik', sans-serif;
7
+ }
8
+
9
+ /* Form labels */
10
+ .form-label {
11
+ font-size: 16px;
12
+ line-height: 25px;
13
+ font-weight: 400;
14
+ color: var(--secondary-color-80);
15
+ }
16
+
17
+ /* Form inputs */
18
+ .form-input {
19
+ font-size: 16px;
20
+ line-height: 30px;
21
+ padding: 10px;
22
+ border: 1px solid var(--secondary-color-10);
23
+ border-radius: 4px;
24
+ outline: none;
25
+ transition: border-color 0.3s ease, box-shadow 0.3s ease;
26
+ }
27
+
28
+ .form.error:not(.disabled) .form-input:hover {
29
+ box-shadow: 0px 0px 0px 4px #E00F0F1A;
30
+ }
31
+
32
+ .form:not(.disabled) .form-input:hover {
33
+ box-shadow: 0px 0px 0px 4px #0F19411A;
34
+ }
35
+
36
+ .form-input:focus {
37
+ border: 1px solid var(--primary-color);
38
+ }
39
+
40
+ .form.error .form-input {
41
+ background-color: #FDF3F3;
42
+ border-color: #e3342f;
43
+ }
44
+
45
+ .form-input.success {
46
+ border-color: #28a745;
47
+ background-color: #d4edda;
48
+ }
49
+
50
+ input::placeholder {
51
+ color: var(--secondary-color-40);
52
+ font-size: 16px;
53
+ line-height: 30px;
54
+ font-weight: 400;
55
+ }
56
+
57
+ /* Buttons inside forms */
58
+ .form-button {
59
+ font-size: 16px;
60
+ padding: 10px 20px;
61
+ background-color: #007bff;
62
+ color: #ffffff;
63
+ border: none;
64
+ border-radius: 4px;
65
+ cursor: pointer;
66
+ transition: background-color 0.3s ease;
67
+ }
68
+
69
+ .helper-description {
70
+ font-size: 16px;
71
+ font-weight: 400;
72
+ line-height: 25px;
73
+ text-align: left;
74
+ margin: 0px;
75
+ color: var(--secondary-color-40);
76
+ }
77
+
78
+ .error-message {
79
+ font-size: 16px;
80
+ line-height: 25px;
81
+ color: var(--ui-negative);
82
+ margin: 0px;
83
+ }
84
+
85
+ .toggle-password {
86
+ background: none;
87
+ border: none;
88
+ cursor: pointer;
89
+ font-size: 16px;
90
+ padding: 5px;
91
+ }
92
+
93
+ .form-container {
94
+ position: relative;
95
+ display: flex;
96
+ align-items: center;
97
+ }
98
+
99
+ .input-with-button {
100
+ display: flex;
101
+ align-items: center;
102
+ position: relative;
103
+ }
104
+
105
+ .input-with-button input {
106
+ width: 100%;
107
+ padding-right: 40px; /* Espacio para el botón */
108
+ }
109
+
110
+ .input-with-button button {
111
+ position: absolute;
112
+ right: 10px;
113
+ top: 50%;
114
+ transform: translateY(-50%); /* Siempre centrado verticalmente */
115
+ background: transparent;
116
+ border: none;
117
+ cursor: pointer;
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: center;
121
+ width: 40px; /* Ajusta según necesites */
122
+ height: 40px; /* Asegura que el botón tenga un tamaño uniforme */
123
+ }
124
+
125
+ .toggle-password randstad-icon {
126
+ width: 100%;
127
+ height: 100%;
128
+ max-width: 32px;
129
+ max-height: 32px;
130
+ }
131
+
132
+ textarea {
133
+ font-family: Graphik;
134
+ font-weight: 400;
135
+ font-size: 18px;
136
+ line-height: 30px;
137
+ letter-spacing: 0%;
138
+ }
139
+
140
+
141
+ textarea.form-input {
142
+ /* Estilos específicos para textarea */
143
+ min-height: 100px; /* Diferenciarlo del input */
144
+ resize: none;
145
+ }
146
+
147
+ .form.disabled textarea.form-input,
148
+ .form.disabled input.form-input {
149
+ background-color: #f5f5f5;
150
+ cursor: not-allowed;
151
+ }
@@ -0,0 +1,2 @@
1
+ declare const globalStyles: CSSStyleSheet;
2
+ export default globalStyles;
@@ -0,0 +1,22 @@
1
+ const globalStyles = new CSSStyleSheet();
2
+
3
+ globalStyles.replaceSync(`
4
+ @font-face {
5
+ font-family: 'Graphik';
6
+ src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),
7
+ url('/src/assets/font/Graphik-Regular.woff') format('woff'),
8
+ url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');
9
+ font-weight: normal;
10
+ font-style: normal;
11
+ }
12
+
13
+ .body-s {
14
+ font-weight: 400;
15
+ font-size: 14px;
16
+ line-height: 100%;
17
+ letter-spacing: 0%;
18
+ color: green;
19
+ }
20
+ `);
21
+
22
+ export default globalStyles;
@@ -0,0 +1,25 @@
1
+ .icon {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ }
6
+
7
+ .icon svg {
8
+ width: 1em;
9
+ height: 1em;
10
+ }
11
+
12
+ .icon-sm svg {
13
+ width: 16px;
14
+ height: 16px;
15
+ }
16
+
17
+ .icon-md svg {
18
+ width: 24px;
19
+ height: 24px;
20
+ }
21
+
22
+ .icon-lg svg {
23
+ width: 32px;
24
+ height: 32px;
25
+ }
@@ -0,0 +1,5 @@
1
+ @import './fonts.css';
2
+ @import './colors.css';
3
+ @tailwind base;
4
+ @tailwind components;
5
+ @tailwind utilities;
File without changes
@@ -0,0 +1,12 @@
1
+
2
+ .select-container {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 4px;
6
+ width: 100%;
7
+ font-family: "Graphik", sans-serif;
8
+ }
9
+
10
+ .select {
11
+ font-family: "Graphik", sans-serif;
12
+ }
File without changes
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@randstad-uca/design-system",
3
+ "version": "1.0.3",
4
+ "main": "dist/index.js",
5
+ "files": ["dist"],
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "storybook-live": "storybook dev -p 6006",
9
+ "build-test": "storybook build",
10
+ "generate-icons": "node src/utils/generateIconList.js",
11
+ "build": "rollup -c"
12
+ },
13
+ "keywords": [],
14
+ "author": "",
15
+ "license": "ISC",
16
+ "description": "",
17
+ "devDependencies": {
18
+ "@chromatic-com/storybook": "^3.2.3",
19
+ "@rollup/plugin-commonjs": "^28.0.2",
20
+ "@rollup/plugin-node-resolve": "^16.0.0",
21
+ "@rollup/plugin-terser": "^0.4.4",
22
+ "@rollup/plugin-typescript": "^12.1.2",
23
+ "@storybook/addon-essentials": "^8.5.0",
24
+ "@storybook/blocks": "^8.5.0",
25
+ "@storybook/test": "^8.5.0",
26
+ "@storybook/web-components": "^8.5.0",
27
+ "@storybook/web-components-webpack5": "^8.5.0",
28
+ "autoprefixer": "^10.4.20",
29
+ "css-loader": "^7.1.2",
30
+ "lit-css-loader": "^3.0.1",
31
+ "postcss": "^8.5.1",
32
+ "rollup": "^4.30.1",
33
+ "rollup-plugin-copy": "^3.5.0",
34
+ "rollup-plugin-postcss": "^4.0.2",
35
+ "storybook": "^8.5.0",
36
+ "tailwindcss": "^3.4.17",
37
+ "ts-loader": "^9.5.2",
38
+ "typescript": "^5.7.3",
39
+ "webpack": "^5.98.0",
40
+ "webpack-cli": "^6.0.1"
41
+ },
42
+ "dependencies": {
43
+ "@material/web": "^2.2.0",
44
+ "@vaadin/vaadin-date-picker": "^23.5.12"
45
+ },
46
+ "peerDependencies": {
47
+ "lit": "^3.2.1"
48
+ }
49
+ }
package/readme.md ADDED
@@ -0,0 +1,170 @@
1
+ # Publicación del Design System en NPM (ESM)
2
+
3
+ Esta guía explica paso a paso cómo compilar y publicar tu Design System hecho con **Lit + Web Components + TypeScript** en NPM, usando el formato **ESM (ECMAScript Modules)**.
4
+
5
+ ---
6
+
7
+ ## 🔧 Requisitos previos
8
+
9
+ - Node.js y npm instalados
10
+ - Cuenta en [npmjs.com](https://www.npmjs.com/)
11
+ - Proyecto con componentes hechos en Lit
12
+ - Rollup instalado como bundler
13
+
14
+ ---
15
+
16
+ ## 📂 Estructura recomendada
17
+
18
+ ```
19
+ my-design-system/
20
+ ├── src/
21
+ │ ├── components/
22
+ │ │ └── terms-checkbox.ts
23
+ │ └── index.ts # importa y registra todos los componentes
24
+ ├── dist/ # carpeta generada al compilar
25
+ ├── package.json
26
+ ├── tsconfig.json
27
+ └── rollup.config.js
28
+ ```
29
+
30
+ ---
31
+
32
+ ## 🔹 Paso 1: `rollup.config.js` (ESM solamente)
33
+
34
+ ```js
35
+ import resolve from '@rollup/plugin-node-resolve';
36
+ import typescript from '@rollup/plugin-typescript';
37
+ import { terser } from 'rollup-plugin-terser';
38
+
39
+ export default {
40
+ input: 'src/index.ts',
41
+ output: {
42
+ dir: 'dist',
43
+ format: 'esm',
44
+ sourcemap: true,
45
+ preserveModules: true,
46
+ preserveModulesRoot: 'src'
47
+ },
48
+ plugins: [
49
+ resolve(),
50
+ typescript({ tsconfig: './tsconfig.json' }),
51
+ terser()
52
+ ]
53
+ };
54
+ ```
55
+
56
+ > ✅ `preserveModules: true` mantiene la estructura de carpetas para importar componentes individualmente.
57
+
58
+ ---
59
+
60
+ ## 🔹 Paso 2: `src/index.ts`
61
+
62
+ ```ts
63
+ import './components/terms-checkbox.ts';
64
+ // import otros componentes si es necesario
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 📆 Paso 3: `package.json`
70
+
71
+ ```json
72
+ {
73
+ "name": "@pablosalut/design-system",
74
+ "version": "1.0.0",
75
+ "description": "Design system de Pablo con Lit y Web Components",
76
+ "type": "module",
77
+ "main": "dist/index.js",
78
+ "module": "dist/index.js",
79
+ "types": "dist/index.d.ts",
80
+ "files": ["dist"],
81
+ "scripts": {
82
+ "build": "rollup -c"
83
+ },
84
+ "devDependencies": {
85
+ "@rollup/plugin-node-resolve": "^15.0.1",
86
+ "@rollup/plugin-typescript": "^11.0.0",
87
+ "rollup": "^3.0.0",
88
+ "rollup-plugin-terser": "^7.0.2",
89
+ "typescript": "^5.0.0"
90
+ },
91
+ "keywords": ["design-system", "web-components", "lit", "esm"],
92
+ "author": "Pablo Salut",
93
+ "license": "MIT"
94
+ }
95
+ ```
96
+
97
+ ---
98
+
99
+ ## 🚀 Publicación en NPM
100
+
101
+ ### 🔓 Público
102
+
103
+ 1. Iniciar sesión:
104
+
105
+ ```bash
106
+ npm login
107
+ ```
108
+
109
+ 2. Compilar el design system:
110
+
111
+ ```bash
112
+ npm run build
113
+ ```
114
+
115
+ 3. Publicar el paquete:
116
+
117
+ ```bash
118
+ npm publish --access public
119
+ ```
120
+
121
+ ### 🔐 Privado
122
+
123
+ Para publicar un paquete privado:
124
+
125
+ 1. Asegurate de tener un scope (por ejemplo, `@pablosalut/tu-paquete`).
126
+
127
+ 2. Agregá en `package.json`:
128
+
129
+ ```json
130
+ "publishConfig": {
131
+ "access": "restricted"
132
+ }
133
+ ```
134
+
135
+ 3. Publicá con:
136
+
137
+ ```bash
138
+ npm publish
139
+ ```
140
+
141
+ > 🔐 Esto hará que tu paquete solo sea accesible para vos (o tu organización, si estás en un team de NPM).
142
+
143
+ ---
144
+
145
+ ## 📁 Uso en un proyecto Angular
146
+
147
+ Instalar:
148
+
149
+ ```bash
150
+ npm install @pablosalut/design-system
151
+ ```
152
+
153
+ Importar en `main.ts`:
154
+
155
+ ```ts
156
+ import '@pablosalut/design-system';
157
+ ```
158
+
159
+ ---
160
+
161
+ ## ✨ Tips adicionales
162
+
163
+ - Usá `sourcemap: true` para poder depurar componentes en proyectos consumidores
164
+ - Publicá nuevas versiones con `npm version patch/minor/major`
165
+ - Usá `npm link` si querés testear el paquete localmente antes de publicar
166
+
167
+ ---
168
+
169
+ Si querés agregar también UMD para soporte con `<script>`, se puede extender esta config. Pero para Angular, **ESM es suficiente y recomendado**.
170
+