@robosophy/prime-theme 0.0.2

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 (3) hide show
  1. package/README.md +9 -0
  2. package/dist/prime.css +360 -0
  3. package/package.json +31 -0
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # @robosophy/prime-theme
2
+
3
+ Overrides de Prime para Robosophy.
4
+
5
+ ```ts
6
+ import "@robosophy/prime-theme/prime.css";
7
+ ```
8
+
9
+ El CSS importa `@robosophy/tokens/tokens.css` y no duplica valores de tokens.
package/dist/prime.css ADDED
@@ -0,0 +1,360 @@
1
+ /* AUTO-GENERATED FILE. DO NOT EDIT MANUALLY. */
2
+ @import "@robosophy/tokens/tokens.css";
3
+
4
+ @layer primevue-custom {
5
+ :root {
6
+ /* === PRIMARY === */
7
+ --p-primary-100: var(--rs-color-blue-100);
8
+ --p-primary-500: var(--rs-color-blue-500);
9
+ --p-primary-700: var(--rs-color-blue-700);
10
+ --p-primary-color: var(--rs-color-blue-500);
11
+ --p-primary-hover-color: var(--rs-color-blue-700);
12
+ --p-primary-active-color: var(--rs-color-blue-700);
13
+ --p-primary-contrast-color: var(--rs-color-white-500);
14
+
15
+ --p-font-family: var(--rs-font-family);
16
+ --p-font-weight: 300;
17
+
18
+ --p-form-field-sm-padding-y: 0.5em;
19
+ --p-form-field-sm-padding-x: 0.5em;
20
+ --p-form-field-lg-padding-y: 0.825em;
21
+ --p-form-field-lg-padding-x: 0.825em;
22
+
23
+ /* === SURFACE === */
24
+ --p-surface-ground: var(--rs-color-background);
25
+ --p-surface-section: var(--rs-color-surface-primary);
26
+ --p-surface-card: var(--rs-color-surface-primary);
27
+ --p-surface-overlay: var(--rs-color-surface-primary);
28
+ --p-surface-border: var(--rs-color-stroke-default);
29
+ --p-surface-hover: var(--rs-color-blue-100);
30
+
31
+ /* === TEXT === */
32
+ --p-text-color: var(--rs-color-text-primary);
33
+ --p-text-muted-color: var(--rs-color-text-secondary);
34
+ --p-text-hover-color: var(--rs-color-text-primary);
35
+
36
+ /* === STATUS === */
37
+ --p-success-color: var(--rs-color-green-500);
38
+ --p-success-contrast-color: var(--rs-color-white-500);
39
+ --p-warning-color: var(--rs-color-yellow-500);
40
+ --p-warning-contrast-color: var(--rs-color-white-500);
41
+ --p-danger-color: var(--rs-color-red-500);
42
+ --p-danger-contrast-color: var(--rs-color-white-500);
43
+ --p-info-color: var(--rs-color-blue-500);
44
+ --p-info-contrast-color: var(--rs-color-white-500);
45
+
46
+ /* === FOCUS / OUTLINE === */
47
+ --p-focus-ring-color: var(--rs-color-stroke-focused);
48
+ --p-focus-ring-width: 2px;
49
+ --p-focus-ring-offset: 2px;
50
+
51
+ /* === INPUTS === */
52
+ --p-inputtext-background: var(--rs-color-surface-primary);
53
+ --p-inputtext-color: var(--rs-color-text-primary);
54
+ --p-inputtext-placeholder-color: var(--rs-color-text-placeholder);
55
+ --p-inputtext-border-color: var(--rs-color-stroke-default);
56
+ --p-inputtext-hover-border-color: var(--rs-color-stroke-focused);
57
+ --p-inputtext-focus-border-color: var(--rs-color-stroke-focused);
58
+ --p-inputtext-invalid-border-color: var(--rs-color-stroke-error);
59
+ --p-inputtext-disabled-background: var(--rs-color-background-disabled);
60
+ --p-inputtext-disabled-color: var(--rs-color-text-secondary);
61
+ --p-inputtext-font-weight: var(--p-font-weight);
62
+
63
+ /* === TEXTAREA === */
64
+ --p-textarea-hover-border-color: var(--rs-color-stroke-default);
65
+
66
+ /* === BUTTON === */
67
+ --p-button-padding-y: 10px;
68
+ --p-button-padding-x: 10px;
69
+ --p-button-label-font-weight: var(--p-font-weight);
70
+
71
+ /* === BUTTON PRIMARY === */
72
+ --p-button-primary-background: var(--rs-color-button-primary);
73
+ --p-button-primary-hover-background: var(--rs-color-button-primary-hover);
74
+ --p-button-primary-active-background: var(--rs-color-button-primary-hover);
75
+ --p-button-primary-color: var(--rs-color-text-button-primary);
76
+ --p-button-primary-hover-color: var(--rs-color-text-button-primary);
77
+ --p-button-primary-border-color: var(--rs-color-button-primary);
78
+ --p-button-primary-hover-border-color: var(--rs-color-button-primary-hover);
79
+
80
+ /* === BUTTON SECONDARY === */
81
+ --p-button-secondary-background: var(--rs-color-button-secondary);
82
+ --p-button-secondary-hover-background: var(--rs-color-button-secondary-hover);
83
+ --p-button-secondary-color: var(--rs-color-text-button-secondary);
84
+ --p-button-secondary-hover-color: var(--rs-color-text-button-secondary);
85
+ --p-button-secondary-border-color: var(--rs-color-button-secondary);
86
+ --p-button-secondary-hover-border-color: var(--rs-color-button-secondary-hover);
87
+
88
+ /* === BUTTON OUTLINED (tertiary) === */
89
+ --p-button-outlined-primary-color: var(--rs-color-text-button-tertiary);
90
+ --p-button-outlined-primary-hover-color: var(--rs-color-text-button-tertiary-hover);
91
+ --p-button-outlined-primary-border-color: var(--rs-color-text-button-tertiary);
92
+ --p-button-outlined-primary-hover-border-color: var(--rs-color-text-button-tertiary-hover);
93
+ --p-button-outlined-primary-hover-background: var(--rs-color-button-blue-surface);
94
+ --p-button-outlined-contrast-border-color: var(--rs-color-stroke-default);
95
+
96
+ /* === BUTTON SUCCESS === */
97
+ --p-button-success-background: var(--rs-color-button-green-surface);
98
+ --p-button-success-color: var(--rs-color-text-button-secondary);
99
+ --p-button-success-border-color: var(--rs-color-button-green-surface);
100
+
101
+ /* === CHECKBOX / RADIO === */
102
+ --p-checkbox-checked-background: var(--rs-color-button-primary);
103
+ --p-checkbox-checked-hover-background: var(--rs-color-button-primary-hover);
104
+ --p-checkbox-checked-border-color: var(--rs-color-button-primary);
105
+ --p-radio-button-checked-background: var(--rs-color-button-primary);
106
+ --p-radio-button-checked-border-color: var(--rs-color-button-primary);
107
+ --p-checkbox-lg-width: 24px;
108
+ --p-checkbox-lg-height: 24px;
109
+ --p-checkbox-icon-lg-size: 12px;
110
+ --p-border-radius-xs: 3px;
111
+
112
+ /* === SELECT / DROPDOWN === */
113
+ --p-select-background: var(--rs-color-surface-primary);
114
+ --p-select-color: var(--rs-color-text-primary);
115
+ --p-select-border-color: var(--rs-color-stroke-default);
116
+ --p-select-hover-border-color: var(--rs-color-stroke-focused);
117
+ --p-select-focus-border-color: var(--rs-color-stroke-focused);
118
+ --p-select-placeholder-color: var(--rs-color-text-placeholder);
119
+ --p-select-option-selected-background: var(--rs-color-button-blue-surface);
120
+ --p-select-option-selected-color: var(--rs-color-text-primary);
121
+ --p-select-option-focus-background: var(--rs-color-button-blue-surface);
122
+ --p-select-option-selected-focus-color: var(--rs-color-button-secondary);
123
+ --p-select-font-weight: var(--p-font-weight);
124
+
125
+ /* === MENSAJES / TOAST === */
126
+ --p-message-success-background: var(--rs-color-green-100);
127
+ --p-message-success-color: var(--rs-color-green-500);
128
+ --p-message-success-border-color: var(--rs-color-stroke-success);
129
+ --p-message-warn-background: var(--rs-color-yellow-100);
130
+ --p-message-warn-color: var(--rs-color-yellow-500);
131
+ --p-message-warn-border-color: var(--rs-color-stroke-caution);
132
+ --p-message-error-background: var(--rs-color-red-100);
133
+ --p-message-error-color: var(--rs-color-red-500);
134
+ --p-message-error-border-color: var(--rs-color-stroke-error);
135
+ --p-message-info-background: var(--rs-color-blue-100);
136
+ --p-message-info-color: var(--rs-color-blue-500);
137
+ --p-message-info-border-color: var(--rs-color-blue-500);
138
+
139
+ /* === BADGE / TAG === */
140
+ --p-badge-primary-background: var(--rs-color-button-primary);
141
+ --p-badge-primary-color: var(--rs-color-text-button-primary);
142
+ --p-badge-success-background: var(--rs-color-green-100);
143
+ --p-badge-success-color: var(--rs-color-green-500);
144
+ --p-badge-warning-background: var(--rs-color-yellow-100);
145
+ --p-badge-warning-color: var(--rs-color-yellow-500);
146
+ --p-badge-danger-background: var(--rs-color-red-100);
147
+ --p-badge-danger-color: var(--rs-color-red-500);
148
+
149
+ /* === DIALOG === */
150
+ --p-dialog-title-font-weight: 400;
151
+ --p-dialog-title-font-size: 1em;
152
+ --p-overlay-modal-padding: 1rem;
153
+
154
+ /* === DRAWER === */
155
+ --p-drawer-header-padding: 16px 24px;
156
+ --p-drawer-content-padding: 0 24px 16px;
157
+
158
+ /* === DATATABLE === */
159
+ --p-datatable-column-title-font-weight: 400;
160
+ --p-datatable-header-cell-padding: 10px;
161
+
162
+ /* === CHIP === */
163
+ --p-chip-padding-x: 8px;
164
+ --p-chip-padding-y: 6px;
165
+ --p-chip-border-radius: 8px;
166
+ }
167
+
168
+ /* #region icons */
169
+ .pi {
170
+ align-items: center;
171
+ color: var(--rs-color-text-primary);
172
+ display: inline-flex;
173
+ font-size: 24px;
174
+ font-weight: 400;
175
+ font-style: normal;
176
+ line-height: 1;
177
+ justify-content: center;
178
+ vertical-align: middle;
179
+ }
180
+ .p-input-icon-left > i, .p-input-icon-right>i {
181
+ margin-top: unset;
182
+ transform: translateY(-50%);
183
+ }
184
+ .pi-eye::before {
185
+ font-family: 'Material Symbols Outlined';
186
+ content: 'visibility_off';
187
+ color: var(--rs-color-text-primary);
188
+ cursor: pointer;
189
+ }
190
+ .pi-eye-slash::before {
191
+ font-family: 'Material Symbols Outlined';
192
+ content: 'visibility';
193
+ color: var(--rs-color-text-primary);
194
+ cursor: pointer;
195
+ }
196
+ .pi-chevron-down::before {
197
+ font-family: 'Material Symbols Outlined';
198
+ content: 'keyboard_arrow_down';
199
+ }
200
+ .pi-check::before {
201
+ font-family: 'Material Symbols Outlined';
202
+ content: 'check';
203
+ }
204
+ .p-inputicon {
205
+ margin-top: 0 !important;
206
+ transform: translateY(-50%);
207
+ }
208
+ /* #endregion */
209
+
210
+ /* #region classes */
211
+ /* password */
212
+ .p-password {
213
+ width: 100%;
214
+ }
215
+ .p-password input {
216
+ width: 100%;
217
+ }
218
+ /* input */
219
+ :is(.p-inputtext) {
220
+ font-weight: var(--p-inputtext-font-weight);
221
+ }
222
+ .p-inputtext:enabled:focus {
223
+ outline: none;
224
+ border-color: var(--rs-color-stroke-focused);
225
+ }
226
+ .p-inputtext:enabled:focus {
227
+ box-shadow: none;
228
+ }
229
+ .p-inputtext.p-variant-filled {
230
+ border: 1px solid var(--rs-color-blue-500);
231
+ background-color: var(--rs-color-blue-100);
232
+ border-bottom-left-radius: var(--p-inputtext-border-radius);
233
+ border-bottom-right-radius: var(--p-inputtext-border-radius);
234
+
235
+ }
236
+ /* select */
237
+ .p-select {
238
+ font-weight: var(--p-select-font-weight);
239
+ }
240
+ .p-select:not(.p-disabled).p-focus {
241
+ outline-color: transparent !important;
242
+ border-color: var(--p-select-border-color) !important;
243
+ }
244
+ .p-select-label {
245
+ align-self: center;
246
+ }
247
+ /* datepicker */
248
+ .p-datepicker-panel {
249
+ min-width: 320px !important;
250
+ max-width: 320px !important;
251
+ }
252
+ .p-datepicker-select-month, .p-datepicker-select-year {
253
+ font-family: var(--rs-font-family);
254
+ }
255
+ /* file upload */
256
+ .p-file-upload-dashed {
257
+ width: 100%;
258
+ border: 1px dashed var(--p-primary-500) !important;
259
+ background-color: transparent !important;
260
+ color: var(--p-primary-500) !important;
261
+ }
262
+ /* button group */
263
+ .p-buttongroup {
264
+ width: 100%;
265
+ justify-content: space-between;
266
+ }
267
+ /* button */
268
+ .p-button-inline {
269
+ width: max-content;
270
+ }
271
+ .p-button-text:not(:disabled):hover {
272
+ background: transparent !important;
273
+ }
274
+ .p-button-success .icon {
275
+ color: var(--rs-color-green-500);
276
+ }
277
+ .p-button-success:hover .icon {
278
+ color: var(--rs-color-white-500);
279
+ }
280
+ .p-button > .icon-container {
281
+ line-height: 0;
282
+ }
283
+ /* dialog */
284
+ .p-dialog {
285
+ border-radius: 8px !important;
286
+ }
287
+ .p-dialog-content {
288
+ display: flex;
289
+ flex-direction: column;
290
+ gap: 1em;
291
+ }
292
+ /* tooltip */
293
+ .p-tooltip {
294
+ max-width: 300px;
295
+ }
296
+ .p-tooltip-arrow {
297
+ border-top-color: var(--rs-color-white-500);
298
+ border-bottom-color: var(--rs-color-white-500);
299
+ }
300
+ .p-tooltip-text {
301
+ background-color: var(--rs-color-white-500);
302
+ color: var(--rs-color-black-500);
303
+ }
304
+ .p-tooltip-primary .p-tooltip-arrow {
305
+ border-top-color: var(--rs-color-blue-100);
306
+ border-bottom-color: var(--rs-color-blue-100);
307
+ }
308
+ .p-tooltip-primary .p-tooltip-text {
309
+ background-color: var(--rs-color-blue-100);
310
+ color: var(--rs-color-blue-500);
311
+ }
312
+ /* icon field compatibility */
313
+ .p-iconfield-money > .p-inputtext{
314
+ padding-inline-start: calc((var(--p-form-field-padding-x) * 3) + var(--p-icon-size));
315
+ }
316
+ .p-iconfield .p-inputtext {
317
+ width: 100%;
318
+ }
319
+ .p-iconfield .p-inputicon {
320
+ user-select: none;
321
+ }
322
+ /* message */
323
+ .p-message-text {
324
+ display: flex;
325
+ align-items: anchor-center;
326
+ gap: 8px;
327
+ font-size: 0.9em;
328
+ font-weight: 400;
329
+ }
330
+ /* drawer */
331
+ .p-drawer-header {
332
+ border-bottom: 1px solid var(--rs-color-stroke-disabled);
333
+ }
334
+ .p-drawer-close-button {
335
+ width: auto;
336
+ height: auto;
337
+ padding: 2px;
338
+ }
339
+ .p-checkbox-lg, .p-checkbox-lg .p-checkbox-box:before {
340
+ left: 4px;
341
+ }
342
+ .p-checkbox-box::before {
343
+ display: none;
344
+ }
345
+ /* datatable */
346
+ .p-datatable-table {
347
+ table-layout: auto;
348
+ }
349
+ .p-datatable-thead > tr > th,
350
+ .p-datatable-tbody > tr > td {
351
+ white-space: nowrap;
352
+ }
353
+ .p-datatable-tbody > tr > td {
354
+ border: none;
355
+ }
356
+ .p-datatable-tbody > tr:hover > td {
357
+ background-color: var(--rs-color-gray-100);
358
+ }
359
+ /* #endregion */
360
+ }
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@robosophy/prime-theme",
3
+ "version": "0.0.2",
4
+ "private": false,
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": "./dist/prime.css",
9
+ "./prime.css": "./dist/prime.css"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "README.md",
14
+ "package.json"
15
+ ],
16
+ "sideEffects": [
17
+ "**/*.css"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsup scripts/build.ts --format esm --platform node --out-dir .build --clean && node .build/build.js && rimraf .build"
21
+ },
22
+ "peerDependencies": {
23
+ "@robosophy/tokens": "*"
24
+ },
25
+ "devDependencies": {
26
+ "@robosophy/tokens": "0.0.2",
27
+ "rimraf": "^6.0.1",
28
+ "tsup": "^8.5.0",
29
+ "typescript": "^5.9.3"
30
+ }
31
+ }