@cratis/components 3.3.3 → 3.4.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 +204 -129
- package/dist/esm/Common/Button.d.ts.map +1 -1
- package/dist/esm/Common/Button.js +4 -1
- package/dist/esm/Common/Button.js.map +1 -1
- package/dist/esm/Common/CratisComponentsProvider.d.ts.map +1 -1
- package/dist/esm/Common/CratisComponentsProvider.js +5 -2
- package/dist/esm/Common/CratisComponentsProvider.js.map +1 -1
- package/dist/esm/DataTables/DataTableCore.d.ts.map +1 -1
- package/dist/esm/DataTables/DataTableCore.js +1 -1
- package/dist/esm/DataTables/DataTableCore.js.map +1 -1
- package/dist/esm/Display/Message.d.ts +2 -1
- package/dist/esm/Display/Message.d.ts.map +1 -1
- package/dist/esm/Display/Message.js +14 -2
- package/dist/esm/Display/Message.js.map +1 -1
- package/dist/esm/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/esm/Dropdown/Dropdown.js +12 -2
- package/dist/esm/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/Styled/CratisPreset.d.ts +2 -0
- package/dist/esm/Styled/CratisPreset.d.ts.map +1 -0
- package/dist/esm/Styled/CratisPreset.js +80 -0
- package/dist/esm/Styled/CratisPreset.js.map +1 -0
- package/dist/esm/Styled/index.d.ts +4 -0
- package/dist/esm/Styled/index.d.ts.map +1 -0
- package/dist/esm/Styled/index.js +4 -0
- package/dist/esm/Styled/index.js.map +1 -0
- package/dist/esm/Styled/primeReactStyles.d.ts +3 -0
- package/dist/esm/Styled/primeReactStyles.d.ts.map +1 -0
- package/dist/esm/Styled/primeReactStyles.js +202 -0
- package/dist/esm/Styled/primeReactStyles.js.map +1 -0
- package/dist/esm/Styled/styledMode.d.ts +12 -0
- package/dist/esm/Styled/styledMode.d.ts.map +1 -0
- package/dist/esm/Styled/styledMode.js +68 -0
- package/dist/esm/Styled/styledMode.js.map +1 -0
- package/dist/esm/primereact-v10-palette.css +242 -0
- package/dist/esm/styles.css +2 -2
- package/dist/esm/theme.css +30 -4
- package/dist/esm/tokens.css +18 -11
- package/package.json +16 -2
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/* Copyright (c) Cratis. All rights reserved. */
|
|
2
|
+
/* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* The PrimeReact 10 theme palette, carried forward.
|
|
6
|
+
*
|
|
7
|
+
* PrimeReact 10's stylesheet themes published a set of custom properties on `:root` —
|
|
8
|
+
* `--surface-ground`, `--surface-card`, `--surface-border`, `--text-color`, `--primary-color`,
|
|
9
|
+
* the `--surface-0…900` and `--gray/--blue/--red-…` scales, and so on — and applications wrote
|
|
10
|
+
* their own CSS against them for years. PrimeReact 11 ships no stylesheet, so those names
|
|
11
|
+
* resolve to nothing the day it is installed: borders vanish, cards lose their background,
|
|
12
|
+
* text falls back to the browser default.
|
|
13
|
+
*
|
|
14
|
+
* This file restores every one of them, with the values of the `lara-light-blue` and
|
|
15
|
+
* `lara-dark-blue` themes both Cratis applications shipped, so an application can move to
|
|
16
|
+
* PrimeReact 11 without rewriting those call sites. Import it once, next to the token layer:
|
|
17
|
+
*
|
|
18
|
+
* import '@cratis/components/tokens';
|
|
19
|
+
* import '@cratis/components/styles';
|
|
20
|
+
* import '@cratis/components/primereact-v10-palette';
|
|
21
|
+
*
|
|
22
|
+
* Two kinds of name:
|
|
23
|
+
*
|
|
24
|
+
* - The **semantic** names (`--surface-ground`, `--surface-card`, `--text-color`,
|
|
25
|
+
* `--primary-color`, …) resolve from the active `@primeuix/themes` preset's `--p-*` tokens
|
|
26
|
+
* where PrimeReact 11 has an equivalent, so they follow whatever preset is applied — with
|
|
27
|
+
* the Lara values as the fallback when no preset is present.
|
|
28
|
+
* - The **numbered scales** (`--surface-0…900`, `--primary-50…900`, `--gray/--blue/--red-…`)
|
|
29
|
+
* are the Lara values verbatim. PrimeReact 11's `--p-surface-*` scale is not inverted in
|
|
30
|
+
* dark mode the way the v10 one was, so it cannot stand in for it.
|
|
31
|
+
*
|
|
32
|
+
* Light and dark are both carried through `light-dark()`, which reads the element's
|
|
33
|
+
* `color-scheme`. `.cratis-dark` — the class the Cratis baseline theme and `styledMode()`
|
|
34
|
+
* key dark mode off — sets it, so one class on the body switches every name below.
|
|
35
|
+
*
|
|
36
|
+
* Nothing new should be written against these names: use the `--cratis-*` tokens (or the
|
|
37
|
+
* preset's `--p-*` tokens) instead. This exists so what already is written keeps working.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
.cratis-dark {
|
|
41
|
+
color-scheme: dark;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:root {
|
|
45
|
+
/* Semantic surfaces and text — follow the preset, fall back to Lara */
|
|
46
|
+
--surface-ground: light-dark(#f9fafb, #111827);
|
|
47
|
+
--surface-section: light-dark(#ffffff, #111827);
|
|
48
|
+
--surface-card: var(--p-content-background, light-dark(#ffffff, #1f2937));
|
|
49
|
+
--surface-overlay: var(--p-overlay-modal-background, light-dark(#ffffff, #1f2937));
|
|
50
|
+
--surface-border: var(--p-content-border-color, light-dark(#dfe7ef, rgba(255, 255, 255, 0.1)));
|
|
51
|
+
--surface-hover: var(--p-content-hover-background, light-dark(#f6f9fc, rgba(255, 255, 255, 0.03)));
|
|
52
|
+
--text-color: var(--p-text-color, light-dark(#4b5563, rgba(255, 255, 255, 0.87)));
|
|
53
|
+
--text-color-secondary: var(--p-text-muted-color, light-dark(#6b7280, rgba(255, 255, 255, 0.6)));
|
|
54
|
+
--primary-color: var(--p-primary-color, light-dark(#3b82f6, #60a5fa));
|
|
55
|
+
--primary-color-text: var(--p-primary-contrast-color, light-dark(#ffffff, #030712));
|
|
56
|
+
--highlight-bg: var(--p-highlight-background, light-dark(#eff6ff, rgba(96, 165, 250, 0.16)));
|
|
57
|
+
--highlight-text-color: var(--p-highlight-color, light-dark(#1d4ed8, rgba(255, 255, 255, 0.87)));
|
|
58
|
+
--focus-ring: var(--p-focus-ring-shadow, 0 0 0 0.2rem light-dark(#bfdbfe, rgba(96, 165, 250, 0.2)));
|
|
59
|
+
--maskbg: var(--p-mask-background, rgba(0, 0, 0, 0.4));
|
|
60
|
+
--border-radius: var(--p-content-border-radius, 6px);
|
|
61
|
+
|
|
62
|
+
/* Spacing the v10 themes published alongside the palette */
|
|
63
|
+
--content-padding: 1.25rem;
|
|
64
|
+
--inline-spacing: 0.5rem;
|
|
65
|
+
|
|
66
|
+
/* The v9 aliases the v10 themes still carried */
|
|
67
|
+
--surface-a: var(--surface-card);
|
|
68
|
+
--surface-b: var(--surface-ground);
|
|
69
|
+
--surface-c: var(--surface-hover);
|
|
70
|
+
--surface-d: var(--surface-border);
|
|
71
|
+
--surface-e: var(--surface-overlay);
|
|
72
|
+
--surface-f: var(--surface-card);
|
|
73
|
+
|
|
74
|
+
/* Surface scale — inverted in the dark scheme, as the v10 dark themes had it */
|
|
75
|
+
--surface-0: light-dark(#ffffff, #111827);
|
|
76
|
+
--surface-50: light-dark(#f9fafb, #1f2937);
|
|
77
|
+
--surface-100: light-dark(#f3f4f6, #374151);
|
|
78
|
+
--surface-200: light-dark(#e5e7eb, #4b5563);
|
|
79
|
+
--surface-300: light-dark(#d1d5db, #6b7280);
|
|
80
|
+
--surface-400: #9ca3af;
|
|
81
|
+
--surface-500: light-dark(#6b7280, #d1d5db);
|
|
82
|
+
--surface-600: light-dark(#4b5563, #e5e7eb);
|
|
83
|
+
--surface-700: light-dark(#374151, #f3f4f6);
|
|
84
|
+
--surface-800: light-dark(#1f2937, #f9fafb);
|
|
85
|
+
--surface-900: light-dark(#111827, #ffffff);
|
|
86
|
+
|
|
87
|
+
/* Primary scale */
|
|
88
|
+
--primary-50: light-dark(#f5f9ff, #f7fbff);
|
|
89
|
+
--primary-100: light-dark(#d0e1fd, #d9e9fe);
|
|
90
|
+
--primary-200: light-dark(#abc9fb, #bbd8fd);
|
|
91
|
+
--primary-300: light-dark(#85b2f9, #9cc7fc);
|
|
92
|
+
--primary-400: light-dark(#609af8, #7eb6fb);
|
|
93
|
+
--primary-500: light-dark(#3b82f6, #60a5fa);
|
|
94
|
+
--primary-600: light-dark(#326fd1, #528cd5);
|
|
95
|
+
--primary-700: light-dark(#295bac, #4374af);
|
|
96
|
+
--primary-800: light-dark(#204887, #355b8a);
|
|
97
|
+
--primary-900: light-dark(#183462, #264264);
|
|
98
|
+
|
|
99
|
+
/* Gray scale */
|
|
100
|
+
--gray-50: #f9fafb;
|
|
101
|
+
--gray-100: #f3f4f6;
|
|
102
|
+
--gray-200: #e5e7eb;
|
|
103
|
+
--gray-300: #d1d5db;
|
|
104
|
+
--gray-400: #9ca3af;
|
|
105
|
+
--gray-500: #6b7280;
|
|
106
|
+
--gray-600: #4b5563;
|
|
107
|
+
--gray-700: #374151;
|
|
108
|
+
--gray-800: #1f2937;
|
|
109
|
+
--gray-900: #111827;
|
|
110
|
+
|
|
111
|
+
/* Blue scale */
|
|
112
|
+
--blue-50: #f5f9ff;
|
|
113
|
+
--blue-100: #d0e1fd;
|
|
114
|
+
--blue-200: #abc9fb;
|
|
115
|
+
--blue-300: #85b2f9;
|
|
116
|
+
--blue-400: #609af8;
|
|
117
|
+
--blue-500: #3b82f6;
|
|
118
|
+
--blue-600: #326fd1;
|
|
119
|
+
--blue-700: #295bac;
|
|
120
|
+
--blue-800: #204887;
|
|
121
|
+
--blue-900: #183462;
|
|
122
|
+
|
|
123
|
+
/* Green scale */
|
|
124
|
+
--green-50: #f4fcf7;
|
|
125
|
+
--green-100: #caf1d8;
|
|
126
|
+
--green-200: #a0e6ba;
|
|
127
|
+
--green-300: #76db9b;
|
|
128
|
+
--green-400: #4cd07d;
|
|
129
|
+
--green-500: #22c55e;
|
|
130
|
+
--green-600: #1da750;
|
|
131
|
+
--green-700: #188a42;
|
|
132
|
+
--green-800: #136c34;
|
|
133
|
+
--green-900: #0e4f26;
|
|
134
|
+
|
|
135
|
+
/* Yellow scale */
|
|
136
|
+
--yellow-50: #fefbf3;
|
|
137
|
+
--yellow-100: #faedc4;
|
|
138
|
+
--yellow-200: #f6de95;
|
|
139
|
+
--yellow-300: #f2d066;
|
|
140
|
+
--yellow-400: #eec137;
|
|
141
|
+
--yellow-500: #eab308;
|
|
142
|
+
--yellow-600: #c79807;
|
|
143
|
+
--yellow-700: #a47d06;
|
|
144
|
+
--yellow-800: #816204;
|
|
145
|
+
--yellow-900: #5e4803;
|
|
146
|
+
|
|
147
|
+
/* Cyan scale */
|
|
148
|
+
--cyan-50: #f3fbfd;
|
|
149
|
+
--cyan-100: #c3edf5;
|
|
150
|
+
--cyan-200: #94e0ed;
|
|
151
|
+
--cyan-300: #65d2e4;
|
|
152
|
+
--cyan-400: #35c4dc;
|
|
153
|
+
--cyan-500: #06b6d4;
|
|
154
|
+
--cyan-600: #059bb4;
|
|
155
|
+
--cyan-700: #047f94;
|
|
156
|
+
--cyan-800: #036475;
|
|
157
|
+
--cyan-900: #024955;
|
|
158
|
+
|
|
159
|
+
/* Pink scale */
|
|
160
|
+
--pink-50: #fef6fa;
|
|
161
|
+
--pink-100: #fad3e7;
|
|
162
|
+
--pink-200: #f7b0d3;
|
|
163
|
+
--pink-300: #f38ec0;
|
|
164
|
+
--pink-400: #f06bac;
|
|
165
|
+
--pink-500: #ec4899;
|
|
166
|
+
--pink-600: #c93d82;
|
|
167
|
+
--pink-700: #a5326b;
|
|
168
|
+
--pink-800: #822854;
|
|
169
|
+
--pink-900: #5e1d3d;
|
|
170
|
+
|
|
171
|
+
/* Indigo scale */
|
|
172
|
+
--indigo-50: #f7f7fe;
|
|
173
|
+
--indigo-100: #dadafc;
|
|
174
|
+
--indigo-200: #bcbdf9;
|
|
175
|
+
--indigo-300: #9ea0f6;
|
|
176
|
+
--indigo-400: #8183f4;
|
|
177
|
+
--indigo-500: #6366f1;
|
|
178
|
+
--indigo-600: #5457cd;
|
|
179
|
+
--indigo-700: #4547a9;
|
|
180
|
+
--indigo-800: #363885;
|
|
181
|
+
--indigo-900: #282960;
|
|
182
|
+
|
|
183
|
+
/* Teal scale */
|
|
184
|
+
--teal-50: #f3fbfb;
|
|
185
|
+
--teal-100: #c7eeea;
|
|
186
|
+
--teal-200: #9ae0d9;
|
|
187
|
+
--teal-300: #6dd3c8;
|
|
188
|
+
--teal-400: #41c5b7;
|
|
189
|
+
--teal-500: #14b8a6;
|
|
190
|
+
--teal-600: #119c8d;
|
|
191
|
+
--teal-700: #0e8174;
|
|
192
|
+
--teal-800: #0b655b;
|
|
193
|
+
--teal-900: #084a42;
|
|
194
|
+
|
|
195
|
+
/* Orange scale */
|
|
196
|
+
--orange-50: #fff8f3;
|
|
197
|
+
--orange-100: #feddc7;
|
|
198
|
+
--orange-200: #fcc39b;
|
|
199
|
+
--orange-300: #fba86f;
|
|
200
|
+
--orange-400: #fa8e42;
|
|
201
|
+
--orange-500: #f97316;
|
|
202
|
+
--orange-600: #d46213;
|
|
203
|
+
--orange-700: #ae510f;
|
|
204
|
+
--orange-800: #893f0c;
|
|
205
|
+
--orange-900: #642e09;
|
|
206
|
+
|
|
207
|
+
/* Blue-gray scale */
|
|
208
|
+
--bluegray-50: #f7f8f9;
|
|
209
|
+
--bluegray-100: #dadee3;
|
|
210
|
+
--bluegray-200: #bcc3cd;
|
|
211
|
+
--bluegray-300: #9fa9b7;
|
|
212
|
+
--bluegray-400: #818ea1;
|
|
213
|
+
--bluegray-500: #64748b;
|
|
214
|
+
--bluegray-600: #556376;
|
|
215
|
+
--bluegray-700: #465161;
|
|
216
|
+
--bluegray-800: #37404c;
|
|
217
|
+
--bluegray-900: #282e38;
|
|
218
|
+
|
|
219
|
+
/* Purple scale */
|
|
220
|
+
--purple-50: #fbf7ff;
|
|
221
|
+
--purple-100: #ead6fd;
|
|
222
|
+
--purple-200: #dab6fc;
|
|
223
|
+
--purple-300: #c996fa;
|
|
224
|
+
--purple-400: #b975f9;
|
|
225
|
+
--purple-500: #a855f7;
|
|
226
|
+
--purple-600: #8f48d2;
|
|
227
|
+
--purple-700: #763cad;
|
|
228
|
+
--purple-800: #5c2f88;
|
|
229
|
+
--purple-900: #432263;
|
|
230
|
+
|
|
231
|
+
/* Red scale */
|
|
232
|
+
--red-50: #fff5f5;
|
|
233
|
+
--red-100: #ffd0ce;
|
|
234
|
+
--red-200: #ffaca7;
|
|
235
|
+
--red-300: #ff8780;
|
|
236
|
+
--red-400: #ff6259;
|
|
237
|
+
--red-500: #ff3d32;
|
|
238
|
+
--red-600: #d9342b;
|
|
239
|
+
--red-700: #b32b23;
|
|
240
|
+
--red-800: #8c221c;
|
|
241
|
+
--red-900: #661814;
|
|
242
|
+
}
|
package/dist/esm/styles.css
CHANGED
|
@@ -790,8 +790,8 @@
|
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
792
|
:root {
|
|
793
|
-
--cratis-surface-0: var(--p-
|
|
794
|
-
--cratis-surface-100: var(--p-
|
|
793
|
+
--cratis-surface-0: var(--p-form-field-background, var(--surface-0));
|
|
794
|
+
--cratis-surface-100: var(--p-content-hover-background, var(--surface-100));
|
|
795
795
|
--cratis-surface-ground: var(--p-content-background, var(--surface-ground));
|
|
796
796
|
--cratis-surface-section: var(--p-content-hover-background, var(--surface-section));
|
|
797
797
|
--cratis-surface-card: var(--p-content-background, var(--surface-card));
|
package/dist/esm/theme.css
CHANGED
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
--cratis-orange-500: var(--p-orange-500, #f59e0b);
|
|
40
40
|
--cratis-red-500: var(--p-red-500, #ef4444);
|
|
41
41
|
|
|
42
|
-
--cratis-surface-0: var(--p-
|
|
43
|
-
--cratis-surface-100: var(--p-
|
|
42
|
+
--cratis-surface-0: var(--p-form-field-background, #ffffff);
|
|
43
|
+
--cratis-surface-100: var(--p-content-hover-background, #f1f5f9);
|
|
44
44
|
--cratis-surface-section: var(--p-surface-50, #f8fafc);
|
|
45
45
|
--cratis-surface-card: var(--p-surface-0, #ffffff);
|
|
46
46
|
--cratis-surface-overlay: var(--p-surface-0, #ffffff);
|
|
@@ -239,9 +239,35 @@
|
|
|
239
239
|
.cratis-theme [data-scope='slider'][data-part='handle'] { width: 1.1rem; height: 1.1rem; background: var(--cratis-primary-color); border-radius: 50%; }
|
|
240
240
|
|
|
241
241
|
/* ── Dialog ──────────────────────────────────────────────────────────────── */
|
|
242
|
+
/* PrimeReact 11 renders the backdrop and the positioner as siblings under the portal,
|
|
243
|
+
and leaves placing them to CSS: without these two rules the backdrop is a zero-height
|
|
244
|
+
block and the popup flows in after the page content, below the fold. The layout is
|
|
245
|
+
the one PrimeReact's own dialog style applies (`@primereact/styles/dialog`). */
|
|
242
246
|
.cratis-theme [data-scope='dialog'][data-part='backdrop'],
|
|
243
|
-
.cratis-theme [data-scope='dialog'][data-part='mask'] {
|
|
247
|
+
.cratis-theme [data-scope='dialog'][data-part='mask'] {
|
|
248
|
+
position: fixed;
|
|
249
|
+
inset: 0;
|
|
250
|
+
background: var(--cratis-maskbg, rgba(0, 0, 0, 0.5));
|
|
251
|
+
}
|
|
252
|
+
.cratis-theme [data-scope='dialog'][data-part='positioner'] {
|
|
253
|
+
position: fixed;
|
|
254
|
+
inset: 0;
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
padding: 2rem;
|
|
259
|
+
pointer-events: none;
|
|
260
|
+
}
|
|
261
|
+
.cratis-theme [data-scope='dialog'][data-part='positioner'][data-modal] { pointer-events: auto; }
|
|
262
|
+
.cratis-theme [data-scope='dialog'][data-part='positioner'][data-position='top'] { align-items: flex-start; }
|
|
263
|
+
.cratis-theme [data-scope='dialog'][data-part='positioner'][data-position='bottom'] { align-items: flex-end; }
|
|
264
|
+
.cratis-theme [data-scope='dialog'][data-part='positioner'][data-position='left'] { justify-content: flex-start; }
|
|
265
|
+
.cratis-theme [data-scope='dialog'][data-part='positioner'][data-position='right'] { justify-content: flex-end; }
|
|
244
266
|
.cratis-theme [data-scope='dialog'][data-part='popup'] {
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
max-height: 100%;
|
|
270
|
+
pointer-events: auto;
|
|
245
271
|
background: var(--cratis-surface-overlay);
|
|
246
272
|
color: var(--cratis-text-color);
|
|
247
273
|
border-radius: 0.75rem;
|
|
@@ -257,7 +283,7 @@
|
|
|
257
283
|
border-bottom: 1px solid var(--cratis-surface-border);
|
|
258
284
|
font-weight: 600;
|
|
259
285
|
}
|
|
260
|
-
.cratis-theme [data-scope='dialog'][data-part='content'] { padding: 1.25rem; }
|
|
286
|
+
.cratis-theme [data-scope='dialog'][data-part='content'] { padding: 1.25rem; overflow-y: auto; }
|
|
261
287
|
.cratis-theme [data-scope='dialog'][data-part='footer'] { padding: 1rem 1.25rem; border-top: 1px solid var(--cratis-surface-border); }
|
|
262
288
|
.cratis-theme [data-scope='dialog'][data-part='close'] {
|
|
263
289
|
border: none; background: transparent; color: var(--cratis-text-color-secondary);
|
package/dist/esm/tokens.css
CHANGED
|
@@ -24,10 +24,12 @@
|
|
|
24
24
|
* v11 ships ZERO CSS. There is no `primereact/resources/themes/*.css` to import any
|
|
25
25
|
* more. The --p-* custom properties are emitted **at runtime** by @primeuix/styled
|
|
26
26
|
* when a preset (a plain JS token object from @primeuix/themes — Aura, Lara, Nora)
|
|
27
|
-
* is handed to the provider
|
|
27
|
+
* is handed to the provider - which `styledMode()` from `@cratis/components/styled`
|
|
28
|
+
* does, together with PrimeReact's own component styles for every primitive (a
|
|
29
|
+
* preset alone leaves the primitives without their `p-*` classes):
|
|
28
30
|
*
|
|
29
|
-
* import
|
|
30
|
-
* <CratisComponentsProvider value={{
|
|
31
|
+
* import { styledMode } from '@cratis/components/styled';
|
|
32
|
+
* <CratisComponentsProvider value={{ license, ...styledMode() }}>
|
|
31
33
|
*
|
|
32
34
|
* So the chain is: preset (JS) → --p-* (runtime) → --cratis-* (this file) → component CSS.
|
|
33
35
|
*
|
|
@@ -39,12 +41,12 @@
|
|
|
39
41
|
*
|
|
40
42
|
* ## Three ways to get a look
|
|
41
43
|
*
|
|
42
|
-
* 1. **
|
|
43
|
-
*
|
|
44
|
-
* 2. **The Cratis baseline theme** — `import '@cratis/components/theme'`. A
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
44
|
+
* 1. **Styled mode** — `value={{ license, ...styledMode() }}` from
|
|
45
|
+
* `@cratis/components/styled`: a preset plus PrimeReact's component styles.
|
|
46
|
+
* 2. **The Cratis baseline theme** — `import '@cratis/components/theme'`. A stylesheet
|
|
47
|
+
* that assigns the --cratis-* tokens directly (light and dark), so it needs no preset
|
|
48
|
+
* and no @primeuix/themes install. It defers to a preset's --p-* values when one is
|
|
49
|
+
* present.
|
|
48
50
|
* 3. **Your own tokens** — override any --cratis-* on :root (or any ancestor):
|
|
49
51
|
*
|
|
50
52
|
* :root {
|
|
@@ -60,8 +62,13 @@
|
|
|
60
62
|
|
|
61
63
|
:root {
|
|
62
64
|
/* Surfaces */
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
/* v10's surface scale ran from the page tone (0) up through raised surfaces (100, 200, …)
|
|
66
|
+
* and inverted in its dark themes, so surface-0 was the darkest tone there. v11's
|
|
67
|
+
* --p-surface-N is a plain palette that is white at 0 in both schemes, so it cannot stand
|
|
68
|
+
* in. The two are read here as what they were used for: the tone underneath a form field
|
|
69
|
+
* and the tone of a raised or hovered surface, which v11 names semantically. */
|
|
70
|
+
--cratis-surface-0: var(--p-form-field-background, var(--surface-0));
|
|
71
|
+
--cratis-surface-100: var(--p-content-hover-background, var(--surface-100));
|
|
65
72
|
/* v11 has no page-canvas/section token — map to the neutral content surface;
|
|
66
73
|
* separation in v11 comes from borders (content-border-color), not fills. */
|
|
67
74
|
--cratis-surface-ground: var(--p-content-background, var(--surface-ground));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratis/components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Cratis",
|
|
6
6
|
"license": "MIT",
|
|
@@ -106,13 +106,18 @@
|
|
|
106
106
|
"types": "./dist/esm/Toolbar/index.d.ts",
|
|
107
107
|
"import": "./dist/esm/Toolbar/index.js"
|
|
108
108
|
},
|
|
109
|
+
"./styled": {
|
|
110
|
+
"types": "./dist/esm/Styled/index.d.ts",
|
|
111
|
+
"import": "./dist/esm/Styled/index.js"
|
|
112
|
+
},
|
|
109
113
|
"./types": {
|
|
110
114
|
"types": "./dist/esm/types/index.d.ts",
|
|
111
115
|
"import": "./dist/esm/types/index.js"
|
|
112
116
|
},
|
|
113
117
|
"./styles": "./dist/esm/styles.css",
|
|
114
118
|
"./tokens": "./dist/esm/tokens.css",
|
|
115
|
-
"./theme": "./dist/esm/theme.css"
|
|
119
|
+
"./theme": "./dist/esm/theme.css",
|
|
120
|
+
"./primereact-v10-palette": "./dist/esm/primereact-v10-palette.css"
|
|
116
121
|
},
|
|
117
122
|
"scripts": {
|
|
118
123
|
"prepare": "yarn g:build",
|
|
@@ -140,6 +145,7 @@
|
|
|
140
145
|
"@cratis/arc.vite": "21.19.0",
|
|
141
146
|
"@primereact/core": "11.1.0",
|
|
142
147
|
"@primereact/headless": "11.1.0",
|
|
148
|
+
"@primereact/styles": "11.1.0",
|
|
143
149
|
"@primereact/types": "11.1.0",
|
|
144
150
|
"@primeuix/motion": "^1.0.0",
|
|
145
151
|
"@primeuix/styled": "^1.0.0",
|
|
@@ -153,7 +159,9 @@
|
|
|
153
159
|
"@cratis/fundamentals": "^7.10.3",
|
|
154
160
|
"@primereact/core": "^11.0.0",
|
|
155
161
|
"@primereact/headless": "^11.0.0",
|
|
162
|
+
"@primereact/styles": "^11.0.0",
|
|
156
163
|
"@primereact/types": "^11.0.0",
|
|
164
|
+
"@primeuix/themes": "^3.0.0",
|
|
157
165
|
"primeicons": "^8.0.0",
|
|
158
166
|
"primereact": "^11.0.0",
|
|
159
167
|
"react": "^19.0.0",
|
|
@@ -162,8 +170,14 @@
|
|
|
162
170
|
"tsyringe": "4.10.0"
|
|
163
171
|
},
|
|
164
172
|
"peerDependenciesMeta": {
|
|
173
|
+
"@primereact/styles": {
|
|
174
|
+
"optional": true
|
|
175
|
+
},
|
|
165
176
|
"@primereact/types": {
|
|
166
177
|
"optional": true
|
|
178
|
+
},
|
|
179
|
+
"@primeuix/themes": {
|
|
180
|
+
"optional": true
|
|
167
181
|
}
|
|
168
182
|
}
|
|
169
183
|
}
|