@cratis/components 3.3.4 → 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.
Files changed (35) hide show
  1. package/README.md +204 -129
  2. package/dist/esm/Common/CratisComponentsProvider.d.ts.map +1 -1
  3. package/dist/esm/Common/CratisComponentsProvider.js +5 -2
  4. package/dist/esm/Common/CratisComponentsProvider.js.map +1 -1
  5. package/dist/esm/DataTables/DataTableCore.d.ts.map +1 -1
  6. package/dist/esm/DataTables/DataTableCore.js +1 -1
  7. package/dist/esm/DataTables/DataTableCore.js.map +1 -1
  8. package/dist/esm/Display/Message.d.ts +2 -1
  9. package/dist/esm/Display/Message.d.ts.map +1 -1
  10. package/dist/esm/Display/Message.js +14 -2
  11. package/dist/esm/Display/Message.js.map +1 -1
  12. package/dist/esm/Dropdown/Dropdown.d.ts.map +1 -1
  13. package/dist/esm/Dropdown/Dropdown.js +12 -2
  14. package/dist/esm/Dropdown/Dropdown.js.map +1 -1
  15. package/dist/esm/Styled/CratisPreset.d.ts +2 -0
  16. package/dist/esm/Styled/CratisPreset.d.ts.map +1 -0
  17. package/dist/esm/Styled/CratisPreset.js +80 -0
  18. package/dist/esm/Styled/CratisPreset.js.map +1 -0
  19. package/dist/esm/Styled/index.d.ts +4 -0
  20. package/dist/esm/Styled/index.d.ts.map +1 -0
  21. package/dist/esm/Styled/index.js +4 -0
  22. package/dist/esm/Styled/index.js.map +1 -0
  23. package/dist/esm/Styled/primeReactStyles.d.ts +3 -0
  24. package/dist/esm/Styled/primeReactStyles.d.ts.map +1 -0
  25. package/dist/esm/Styled/primeReactStyles.js +202 -0
  26. package/dist/esm/Styled/primeReactStyles.js.map +1 -0
  27. package/dist/esm/Styled/styledMode.d.ts +12 -0
  28. package/dist/esm/Styled/styledMode.d.ts.map +1 -0
  29. package/dist/esm/Styled/styledMode.js +68 -0
  30. package/dist/esm/Styled/styledMode.js.map +1 -0
  31. package/dist/esm/primereact-v10-palette.css +242 -0
  32. package/dist/esm/styles.css +2 -2
  33. package/dist/esm/theme.css +30 -4
  34. package/dist/esm/tokens.css +18 -11
  35. package/package.json +16 -2
package/README.md CHANGED
@@ -49,8 +49,8 @@ The other **peer dependencies** you provide are `react` / `react-dom` (**19+**),
49
49
  `@cratis/arc*` packages (`>=20.3.1 <22` — Arc 20 and 21 both work), `reflect-metadata`
50
50
  and `tsyringe`; you typically already have these in a Cratis app. `pixi.js`,
51
51
  `framer-motion`, `allotment` and `react-icons` remain regular dependencies and are
52
- installed for you. The styled `@primeuix/themes` presets are optional and only needed
53
- if you opt into a preset (see [Styling](#styling)).
52
+ installed for you. `@primereact/styles` and `@primeuix/themes` are **optional** peers,
53
+ needed only for PrimeReact's styled mode (see [Styling](#styling)).
54
54
 
55
55
  ### Stylesheets
56
56
 
@@ -76,12 +76,13 @@ packages it brings with it.
76
76
  |---|---|---|
77
77
  | `primereact` | MIT | PrimeUI commercial |
78
78
  | `primeicons` | MIT (7.x) | PrimeUI commercial (8.x) |
79
- | `@primereact/core`, `@primereact/headless` | — | PrimeUI commercial |
79
+ | `@primereact/core`, `@primereact/headless`, `@primereact/styles` | — | PrimeUI commercial |
80
80
  | `@primeuix/themes`, `@primeuix/styled` | — | PrimeUI commercial |
81
81
 
82
82
  `@cratis/components` itself remains **MIT**. The change is in what it depends on, and it is
83
83
  yours to satisfy: PrimeReact is a peer dependency, so you install it and its license terms
84
- apply to you directly.
84
+ apply to you directly. `@primereact/styles` and `@primeuix/themes` — the two styled mode
85
+ adds — are PrimeUI-licensed too.
85
86
 
86
87
  ### A key is required regardless of how you style
87
88
 
@@ -168,13 +169,15 @@ Components:
168
169
  - `@cratis/components/SchemaEditor`
169
170
  - `@cratis/components/TimeMachine`
170
171
  - `@cratis/components/Toolbar`
172
+ - `@cratis/components/styled` — `styledMode`, `CratisPreset`, `primeReactStyles`, `primeReactCssLayer`, `primeReactCssLayerOrder`, `cratisDarkModeSelector`: PrimeReact's styled mode, wired for the provider (needs `@primereact/styles` + `@primeuix/themes`)
171
173
  - `@cratis/components/types`
172
174
 
173
175
  Stylesheets:
174
176
 
175
- - `@cratis/components/theme` — the **Cratis baseline theme** (light + dark, Cratis-authored MIT CSS, no `@primeuix/themes` dependency); import it and add `class="cratis-theme"` to skin every component from the token layer
177
+ - `@cratis/components/theme` — the **Cratis baseline theme** (light + dark, Cratis-authored MIT CSS, no `@primereact/styles` / `@primeuix/themes` dependency); import it and add `class="cratis-theme"` to skin every component from the token layer
176
178
  - `@cratis/components/styles` — **required**: every component stylesheet, the Tailwind utilities used inside the package, and the `allotment` rules `DataPage` needs, in one file
177
179
  - `@cratis/components/tokens` — **required**: the `--cratis-*` CSS variable tokens every component reads from
180
+ - `@cratis/components/primereact-v10-palette` — the PrimeReact 10 theme variables (`--surface-*`, `--text-color`, `--primary-color`, the color scales, …) restored with the lara-blue values, for CSS already written against them
178
181
 
179
182
  ## Styling
180
183
 
@@ -198,24 +201,31 @@ much control you want, and the other layers stay invisible.
198
201
  | Setup | When | Effort | Extra dependency | What you write |
199
202
  |---|---|---|---|---|
200
203
  | **Cratis baseline theme** | You want a polished default look without adding a theme package. | Lowest | None | `unstyled` + `import '@cratis/components/theme'` + `class="cratis-theme"` |
201
- | **A styled `@primeuix/themes` preset** | You want a prebuilt design system to tweak from. | Low | `@primeuix/themes` | `value={{ theme: { preset } }}` on the provider |
202
- | **A custom palette over a preset** | You want the preset's structure but your own colors. | Low | `@primeuix/themes` | A preset + CSS variable overrides |
204
+ | **PrimeReact's styled mode** | You want PrimeReact's own look — a `@primeuix/themes` preset painting PrimeReact's component styles. | Low | `@primereact/styles` + `@primeuix/themes` | `value={{ license, ...styledMode() }}` with `styledMode` from `@cratis/components/styled` |
205
+ | **A custom palette over a theme** | You want the theme's structure but your own colors. | Low | As above, or none | `--cratis-*` overrides on the baseline theme, or `styledMode({ preset: definePreset(CratisPreset, …) })` |
203
206
  | **Fully unstyled** | You're integrating into a tightly controlled design system. | Highest | None | `unstyled: true` + a `pt` preset in CSS or Tailwind |
204
207
 
205
208
  > **Why you need a theme, a baseline stylesheet, or a `pt` preset**
206
209
  >
207
- > PrimeReact 11 is **unstyled-first**: the primitives render structural markup
208
- > with no built-in visuals. A look comes from one of three sources — a
209
- > `@primeuix/themes` preset (token-based), the Cratis baseline
210
- > theme (`@cratis/components/theme`), or your own `pt`/CSS. Load
211
- > none of them and the components render as their raw HTML primitives.
210
+ > PrimeReact 11 is **unstyled-first**: the `primereact` package is primitives
211
+ > that render structural markup with `data-scope` / `data-part` attributes,
212
+ > no built-in visuals and **no `p-*` class names**. The class names and the
213
+ > CSS behind them live in `@primereact/styles`; PrimeReact's own styled
214
+ > components (`@primereact/ui`) are just the primitives with those styles
215
+ > preset, and this library builds on the primitives. So a look comes from one
216
+ > of three sources — PrimeReact's styled mode (`styledMode()`: a
217
+ > `@primeuix/themes` preset **plus** PrimeReact's component styles), the
218
+ > Cratis baseline theme (`@cratis/components/theme`), or your own `pt`/CSS.
219
+ > Load none of them and the components render as their raw HTML primitives.
220
+ > **A preset alone is not one of the three** — `theme: { preset }` by itself
221
+ > emits `--p-*` tokens but styles nothing rendered here.
212
222
  >
213
223
  > The `--cratis-*` token layer is an **additive Cratis-scoped tint** for
214
224
  > surfaces *our* wrappers own (validation error text, the FormElement addon,
215
225
  > breadcrumb borders, etc.). It is not, by itself, enough to skin the
216
- > PrimeReact widgets — pair it with the baseline theme, a preset, or a `pt`
217
- > preset. Override the PrimeReact variables (or a preset's `--p-*` tokens) when
218
- > you want the whole UI in your palette.
226
+ > PrimeReact widgets — pair it with the baseline theme, styled mode, or a `pt`
227
+ > preset. Derive the preset (styled mode) or override the `--cratis-*` tokens
228
+ > (baseline theme) when you want the whole UI in your palette.
219
229
 
220
230
  All setups share the same one-line provider setup. You can change direction
221
231
  later because the same provider, tokens, and `pt` hooks stay available.
@@ -245,7 +255,7 @@ export const App = () => (
245
255
  required, not optional.
246
256
  - `CratisComponentsProvider` is a thin wrapper over `@primereact/core`'s
247
257
  `PrimeReactProvider` so Cratis has one place to layer in defaults (including
248
- the optional `value={{ theme: { preset } }}` styled layer). Drop in the raw
258
+ the optional `...styledMode()` styled layer). Drop in the raw
249
259
  `PrimeReactProvider` from `@primereact/core` if you'd rather.
250
260
 
251
261
  The setups below differ only in **what else** you load on top of this
@@ -253,61 +263,62 @@ provider setup.
253
263
 
254
264
  ---
255
265
 
256
- ### Use a styled preset
266
+ ### Use PrimeReact's styled mode
257
267
 
258
268
  PrimeReact 11 dropped the v10 `primereact/resources/themes/*/theme.css`
259
- stylesheets in favor of the token-based `@primeuix/themes` layer. Apply a
260
- preset by passing `value={{ theme: { preset } }}` to `CratisComponentsProvider` —
261
- no theme CSS import. PrimeReact's own widgets paint themselves from the preset, and the
262
- `--cratis-*` tokens cascade to the matching variables so Cratis-scoped surfaces
263
- follow along.
269
+ stylesheets. A theme is now handed to the provider at runtime, in two halves: a
270
+ `@primeuix/themes` **preset** (a token object `@primeuix/styled` turns into
271
+ `--p-*` custom properties) and PrimeReact's **component styles**
272
+ (`@primereact/styles` — the `p-*` class names and the CSS the tokens drive).
273
+ `styledMode()` from `@cratis/components/styled` returns both as
274
+ `{ theme, defaults }`; spread it into the provider `value` next to your
275
+ license key. The `defaults` are `primeReactStyles`, PrimeReact's component
276
+ styles keyed by primitive name, which the provider applies to **every**
277
+ primitive rendered under it — the ones this library renders and the ones your
278
+ app renders itself. That is what puts the `p-*` class names on the elements and
279
+ lets the preset paint them; the `--cratis-*` tokens follow the preset's `--p-*`
280
+ so Cratis-scoped surfaces stay in sync.
281
+
282
+ ```bash
283
+ npm install @primereact/styles @primeuix/themes # optional peers, styled mode only
284
+ ```
264
285
 
265
286
  ```tsx
266
- import Aura from '@primeuix/themes/aura'; // or lara / nora / material
267
287
  import 'primeicons/primeicons.css';
288
+ import '@cratis/components/tokens';
268
289
  import '@cratis/components/styles';
269
-
270
290
  import { CratisComponentsProvider } from '@cratis/components';
291
+ import { styledMode } from '@cratis/components/styled';
271
292
 
272
293
  export const App = () => (
273
- <CratisComponentsProvider value={{ theme: { preset: Aura } }}>
294
+ <CratisComponentsProvider value={{ license: 'YOUR-PRIMEUI-KEY', ...styledMode() }}>
274
295
  <YourApp />
275
296
  </CratisComponentsProvider>
276
297
  );
277
298
  ```
278
299
 
279
- Omit `theme` entirely to stay unstyled-first ship only structure plus the
280
- `--cratis-*` tokens and bring your own visuals (see the pass-through / `pt`
281
- options below).
282
-
283
- ### Use the Cratis baseline theme
284
-
285
- Want a polished default look **without adding `@primeuix/themes`**? Ship the
286
- components unstyled and import the Cratis baseline theme Cratis-authored MIT
287
- CSS that styles every component from the `--cratis-*` layer. (You still need a
288
- PrimeUI key to run PrimeReact itself — see [Licensing](#licensing).)
289
-
290
- ```tsx
291
- import 'primeicons/primeicons.css';
292
- import '@cratis/components/theme'; // the baseline theme
293
-
294
- export const App = () => (
295
- <CratisComponentsProvider value={{ unstyled: true }}>
296
- <div className="cratis-theme"> {/* scope: put on <body>, app root, or a subtree */}
297
- <YourApp />
298
- </div>
299
- </CratisComponentsProvider>
300
- );
301
- ```
302
-
303
- Add `cratis-dark` to an ancestor for the dark palette. The theme defers to a
304
- `@primeuix/themes` preset's `--p-*` tokens when one is present, so you can layer
305
- it under a preset too, and every rule is overridable via your own CSS or `pt`.
300
+ The default preset is `CratisPreset` Lara with the blue primary and gray
301
+ surfaces of PrimeReact 10's `lara-light-blue` / `lara-dark-blue`, with the dark
302
+ surface scale one step lighter so content sits above the page as it did there,
303
+ both color schemes.
304
+ Options: `preset` (any `@primeuix/themes` preset — Aura, Lara, Nora, Material —
305
+ or a `definePreset` result), `darkModeSelector` (default `.cratis-dark`, the
306
+ class the baseline theme uses too; `'system'` follows `prefers-color-scheme`),
307
+ `cssLayer` (default the `primereact` layer ordered between Tailwind's `base`
308
+ and `components`; `false` emits the theme unlayered).
309
+
310
+ > **A preset alone styles nothing.** `value={{ theme: { preset } }}` without the
311
+ > `defaults` emits the `--p-*` tokens, but the primitives keep rendering with no
312
+ > `p-*` class, so nothing rendered by this library is painted. Use
313
+ > `styledMode()`.
306
314
 
307
315
  #### Override a single component with CSS
308
316
 
309
- Plain CSS works fine on top of the theme. Target either PrimeReact's class
310
- names or your own `className`:
317
+ Plain CSS works fine on top of the theme. In styled mode PrimeReact's elements
318
+ carry their `p-*` class names, and the theme is emitted into the `primereact`
319
+ cascade layer, so a plain unlayered rule in your own stylesheet wins — exactly
320
+ as it did against PrimeReact 10's `@layer primereact` stylesheets. Or target
321
+ your own `className`:
311
322
 
312
323
  ```css
313
324
  /* yourApp.css */
@@ -322,7 +333,7 @@ names or your own `className`:
322
333
  ```
323
334
 
324
335
  ```tsx
325
- <Button label="Delete" className="dangerous-button" />
336
+ <Button className="dangerous-button">Delete</Button>
326
337
  ```
327
338
 
328
339
  #### Override a single component with Tailwind
@@ -338,72 +349,116 @@ Pass Tailwind utility classes through the wrapper's `className` prop:
338
349
  </Dialog>
339
350
  ```
340
351
 
341
- **Use this setup when:** you're prototyping, building internal tools, or are
342
- happy with one of the prebuilt PrimeReact themes.
352
+ **Use this setup when:** you're prototyping, building internal tools, want the
353
+ look Cratis apps had on PrimeReact 10, or are happy with one of the prebuilt
354
+ PrimeReact design systems.
355
+
356
+ ### Use the Cratis baseline theme
357
+
358
+ Want a polished default look **without adding `@primereact/styles` and
359
+ `@primeuix/themes`**? Ship the components unstyled and import the Cratis baseline
360
+ theme — Cratis-authored MIT CSS that styles every component from the `--cratis-*`
361
+ layer. (You still need a PrimeUI key to run PrimeReact itself — see
362
+ [Licensing](#licensing).)
363
+
364
+ ```tsx
365
+ import 'primeicons/primeicons.css';
366
+ import '@cratis/components/theme'; // the baseline theme
367
+
368
+ export const App = () => (
369
+ <CratisComponentsProvider value={{ unstyled: true }}>
370
+ <div className="cratis-theme"> {/* scope: put on <body>, app root, or a subtree */}
371
+ <YourApp />
372
+ </div>
373
+ </CratisComponentsProvider>
374
+ );
375
+ ```
376
+
377
+ Add `cratis-dark` to an ancestor for the dark palette. The theme defers to a
378
+ `@primeuix/themes` preset's `--p-*` tokens when one is present, so you can layer
379
+ it under styled mode too, and every rule is overridable via your own CSS or `pt`.
380
+ The baseline theme styles the unstyled primitives through their `[data-scope]`
381
+ attributes — there are no `p-*` class names outside styled mode — so target
382
+ those, or your own `className`, or the `--cratis-*` tokens:
383
+
384
+ ```css
385
+ .cratis-theme [data-scope='button'] { border-radius: 999px; } /* pill buttons */
386
+ .dangerous { background: var(--cratis-red-500); color: white; }
387
+ ```
343
388
 
344
389
  ---
345
390
 
346
391
  ### Use a custom palette on top of a PrimeReact theme
347
392
 
348
- Keep a PrimeReact theme as your **structural baseline** (so every widget gets
349
- its padding, dialog frame, button shape, focus ring, etc.) and override the
350
- PrimeReact CSS variables on `:root` to repaint the whole UI in your own
351
- colors. The `--cratis-*` tokens follow along through tokens.css's cascade, so
352
- Cratis-scoped surfaces stay in sync and you can override the Cratis tokens
353
- independently if you want Cratis surfaces to differ from PrimeReact widgets.
393
+ Keep a theme as your **structural baseline** (so every widget gets its
394
+ padding, dialog frame, button shape, focus ring, etc.) and repaint it with your
395
+ own colors. Which knob you turn depends on the theme:
396
+
397
+ - **Cratis baseline theme**override the `--cratis-*` tokens in CSS; the
398
+ theme paints the widgets from them, so one override repaints widgets and
399
+ Cratis-scoped surfaces alike.
400
+ - **PrimeReact's styled mode** — derive your own preset with `definePreset` and
401
+ hand it to `styledMode({ preset })`; the widgets read the preset's `--p-*`
402
+ tokens, and the `--cratis-*` tokens follow.
354
403
 
355
- #### With plain CSS
404
+ #### Baseline theme, plain CSS
356
405
 
357
406
  ```css
358
- /* palette.override.css — imported once, after @cratis/components/styles */
359
- :root {
360
- /* PrimeReact variables — these are what PrimeReact widgets read. */
361
- --surface-0: #1e293b;
362
- --surface-100: #1e293b;
363
- --surface-ground: #020617;
364
- --surface-section: #0f172a;
365
- --surface-card: #1e293b;
366
- --surface-overlay: #1e293b;
367
- --surface-hover: #334155;
368
- --surface-border: #334155;
369
-
370
- --text-color: #f8fafc;
371
- --text-color-secondary: #94a3b8;
372
-
373
- --primary-color: #38bdf8;
374
- --primary-color-text: #0b1220;
375
-
376
- --highlight-bg: #1e40af;
377
- --highlight-text-color: #ffffff;
378
-
379
- --border-radius: 10px;
380
-
381
- /* --cratis-* tokens default to var(--surface-*) etc. via tokens.css, so
382
- the overrides above flow through automatically. Set these explicitly
383
- only if you want Cratis-scoped surfaces tinted differently. */
384
- --cratis-red-500: #ef4444;
385
- --cratis-green-500: #22c55e;
407
+ /* palette.override.css — imported once, after @cratis/components/theme */
408
+ .cratis-theme {
409
+ --cratis-surface-section: #0f172a;
410
+ --cratis-surface-card: #1e293b;
411
+ --cratis-surface-overlay: #1e293b;
412
+ --cratis-surface-hover: #334155;
413
+ --cratis-surface-border: #334155;
414
+
415
+ --cratis-text-color: #f8fafc;
416
+ --cratis-text-color-secondary: #94a3b8;
417
+
418
+ --cratis-primary-color: #38bdf8;
419
+ --cratis-primary-color-text: #0b1220;
420
+
421
+ --cratis-highlight-bg: #1e40af;
422
+ --cratis-highlight-text-color: #ffffff;
423
+
424
+ --cratis-border-radius: 10px;
386
425
  }
387
426
  ```
388
427
 
428
+ #### Styled mode, `definePreset`
429
+
430
+ ```ts
431
+ // brand-preset.ts
432
+ import { definePreset } from '@primeuix/themes';
433
+ import { CratisPreset } from '@cratis/components/styled';
434
+
435
+ export const BrandPreset = definePreset(CratisPreset, {
436
+ semantic: {
437
+ primary: {
438
+ 50: '{sky.50}', 100: '{sky.100}', 200: '{sky.200}',
439
+ 300: '{sky.300}', 400: '{sky.400}', 500: '{sky.500}',
440
+ 600: '{sky.600}', 700: '{sky.700}', 800: '{sky.800}',
441
+ 900: '{sky.900}', 950: '{sky.950}',
442
+ },
443
+ },
444
+ });
445
+ ```
446
+
389
447
  ```tsx
390
- // 1. A styled preset provides the structure (apply it via the provider — see above).
391
- import 'primeicons/primeicons.css';
392
- import '@cratis/components/styles';
393
- // 2. Your palette overrides — must come after the styles so they win.
394
- import './palette.override.css';
448
+ <CratisComponentsProvider value={{ license, ...styledMode({ preset: BrandPreset }) }}>
395
449
  ```
396
450
 
397
451
  #### Scoped (dark-on-light, light-on-dark, etc.)
398
452
 
399
- PrimeReact variables cascade like any other CSS variable, so an ancestor
400
- scope works:
453
+ `--cratis-*` tokens cascade like any other CSS variable, so an ancestor scope
454
+ works under the baseline theme (in styled mode, region-scoped widget colors come
455
+ from the preset; the `--cratis-*` overrides still retint Cratis-scoped surfaces):
401
456
 
402
457
  ```css
403
458
  .dark-zone {
404
- --surface-card: #0b1220;
405
- --text-color: #f8fafc;
406
- --primary-color: #60a5fa;
459
+ --cratis-surface-card: #0b1220;
460
+ --cratis-text-color: #f8fafc;
461
+ --cratis-primary-color: #60a5fa;
407
462
  }
408
463
  ```
409
464
 
@@ -421,37 +476,54 @@ Tailwind handles cascade and dark mode:
421
476
  ```css
422
477
  /* app.css */
423
478
  @import "tailwindcss";
479
+ @import "@cratis/components/tokens";
424
480
  @import "@cratis/components/styles";
425
481
 
426
482
  @layer base {
427
483
  :root {
428
- --surface-card: theme('colors.slate.800');
429
- --surface-border: theme('colors.slate.700');
430
- --text-color: theme('colors.slate.50');
431
- --primary-color: theme('colors.sky.400');
432
- --cratis-red-500: theme('colors.red.500');
484
+ --cratis-surface-card: theme('colors.slate.800');
485
+ --cratis-surface-border: theme('colors.slate.700');
486
+ --cratis-text-color: theme('colors.slate.50');
487
+ --cratis-primary-color: theme('colors.sky.400');
488
+ --cratis-red-500: theme('colors.red.500');
433
489
  }
434
490
 
435
- .dark {
436
- --surface-card: theme('colors.slate.900');
437
- --text-color: theme('colors.slate.100');
491
+ .cratis-dark {
492
+ --cratis-surface-card: theme('colors.slate.900');
493
+ --cratis-text-color: theme('colors.slate.100');
438
494
  }
439
495
  }
440
496
  ```
441
497
 
498
+ #### CSS written against PrimeReact 10's variables
499
+
500
+ If your stylesheets still use the names a v10 theme published on `:root` —
501
+ `--surface-ground`, `--surface-card`, `--surface-border`, `--text-color`,
502
+ `--primary-color`, the `--surface-0…900` and color scales — import
503
+ `@cratis/components/primereact-v10-palette` after `tokens` and `styles`. It
504
+ restores every one of them with the `lara-light-blue` / `lara-dark-blue`
505
+ values: the semantic names follow the active preset's `--p-*` tokens where
506
+ v11 has an equivalent (Lara as the fallback), the numbered scales are the
507
+ lara-blue values verbatim (the v10 dark surface scale was inverted, so
508
+ `--p-surface-*` cannot stand in for it), and light/dark switch through
509
+ `light-dark()` keyed off `.cratis-dark`. It exists so what is already written
510
+ keeps working — write nothing new against those names; use `--cratis-*` (or
511
+ `--p-*`).
512
+
442
513
  #### What `--cratis-*` tokens are for
443
514
 
444
- PrimeReact widgets read PrimeReact's own variables (`--surface-card`,
445
- `--text-color`, `--primary-color`, …) directly. Cratis wrappers add some
446
- surfaces of their own (inline validation error text, the FormElement addon
447
- background, the breadcrumb bottom border, etc.) — those use a parallel set
448
- of `--cratis-*` tokens that default to the PrimeReact value via the cascade
449
- defined in `tokens.css`.
515
+ In styled mode PrimeReact widgets read the preset's `--p-*` design tokens
516
+ directly. Cratis wrappers add some surfaces of their own (inline validation
517
+ error text, the FormElement addon background, the breadcrumb bottom border,
518
+ etc.) — those use a parallel set of `--cratis-*` tokens that resolve the v11
519
+ token first and fall back to the v10 variable, via the cascade defined in
520
+ `tokens.css`. Under the baseline theme the widgets read the `--cratis-*` tokens
521
+ too.
450
522
 
451
523
  The upshot:
452
524
 
453
- - Override **PrimeReact variables** to repaint the whole UI (PrimeReact widgets + Cratis surfaces).
454
- - Override **`--cratis-*` tokens** when you specifically want Cratis surfaces to differ from PrimeReact widgets.
525
+ - Repaint the whole UI by deriving the **preset** (styled mode) or overriding the **`--cratis-*` tokens** (baseline theme).
526
+ - Override **`--cratis-*` tokens** in styled mode when you specifically want Cratis surfaces to differ from PrimeReact widgets.
455
527
 
456
528
  #### `--cratis-*` token reference (Cratis-scoped surfaces)
457
529
 
@@ -465,8 +537,9 @@ The upshot:
465
537
  | Geometry | `--cratis-border-radius` |
466
538
  | Effects | `--cratis-focus-ring`, `--cratis-maskbg` |
467
539
 
468
- Each defaults to the PrimeReact variable with the same name minus the
469
- `--cratis-` prefix (e.g. `--cratis-surface-card` → `var(--surface-card)`).
540
+ Each resolves the v11 design token first and falls back to the v10 variable
541
+ with the same name minus the `--cratis-` prefix (e.g. `--cratis-surface-card`
542
+ → `var(--p-content-background, var(--surface-card))`).
470
543
 
471
544
  **Use this setup when:** you want a custom look without writing a PrimeReact
472
545
  theme from scratch, you're shipping multiple palette variants (light/dark/
@@ -614,20 +687,22 @@ The styling options compose, so you don't have to choose one for the whole app:
614
687
  ```tsx
615
688
  <Dialog title="Custom" unstyled pt={brandDialogPt}>…</Dialog>
616
689
  ```
617
- - **Unstyled with one themed island** — wrap a subtree in a second
618
- `CratisComponentsProvider` that restores defaults:
690
+ - **Unstyled with one themed island** — the baseline theme's rules are scoped
691
+ under `.cratis-theme`, so wrapping one element in the class themes just that
692
+ subtree:
619
693
  ```tsx
620
694
  <CratisComponentsProvider value={{ unstyled: true, pt: globalPt }}>
621
695
  <App />
622
- <CratisComponentsProvider value={{ unstyled: false }}>
623
- <PrimeReactThemedSubtree />
624
- </CratisComponentsProvider>
696
+ <div className="cratis-theme">
697
+ <BaselineThemedSubtree />
698
+ </div>
625
699
  </CratisComponentsProvider>
626
700
  ```
627
- - **Dark mode** — scope the palette overrides to `.dark` (override
628
- `--surface-card`, `--text-color`, `--primary-color`, etc., plus any
629
- `--cratis-*` tokens you want to diverge) and toggle the class on the root
630
- element. PrimeReact widgets and Cratis surfaces both follow the cascade.
701
+ - **Dark mode** — toggle `cratis-dark` on the root element: the baseline
702
+ theme's dark palette, `styledMode()`'s dark scheme (its default
703
+ `darkModeSelector`) and the v10 palette all key off it, so PrimeReact widgets
704
+ and Cratis surfaces follow together. Scope any `--cratis-*` tokens you want
705
+ to diverge to `.cratis-dark` as well.
631
706
 
632
707
  ### Per-component `pt` cheat sheet
633
708
 
@@ -1 +1 @@
1
- {"version":3,"file":"CratisComponentsProvider.d.ts","sourceRoot":"","sources":["../../../Common/CratisComponentsProvider.tsx"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A8B,6BAA6B,sBASnG,CAAC"}
@@ -32,8 +32,11 @@ const mergeCratisComponentsConfig = (value) => merge(cratisDefaults, value ?? {}
32
32
  * - **Unstyled (default posture):** pass nothing, or `value={{ unstyled: true }}`, and
33
33
  * style the structural markup yourself through the `--cratis-*` token layer, your own
34
34
  * CSS, Tailwind, or `pt` definitions.
35
- * - **Styled:** pass `value={{ theme: { preset } }}` with a `@primeuix/themes` preset
36
- * (e.g. `import Aura from '@primeuix/themes/aura'`) to opt into a token-based styled look.
35
+ * - **Styled:** spread `styledMode()` from `@cratis/components/styled` into `value` -
36
+ * PrimeReact's own component styles for every primitive plus a `@primeuix/themes`
37
+ * preset (the Cratis preset by default, `styledMode({ preset: Aura })` for another).
38
+ * A preset on `theme` alone only emits design tokens; the primitives render without
39
+ * `p-*` classes until `defaults` gives them their styles, which is what `styledMode()` does.
37
40
  * - Pass `value={{ pt, ptOptions }}` to apply global per-component pass-through.
38
41
  *
39
42
  * **PrimeUI license.** PrimeReact 11 is no longer MIT — its provider verifies a PrimeUI
@@ -1 +1 @@
1
- {"version":3,"file":"CratisComponentsProvider.js","sources":["../../../Common/CratisComponentsProvider.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAkCA;;;;;;;AAOG;AACI,MAAM,cAAc,GAA2B;AAEtD;;;AAGG;AACI,MAAM,2BAA2B,GAAG,CAAC,KAAyC,KACjF,KAAK,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACI,MAAM,wBAAwB,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAiC,KAAI;AACpG,IAAA,MAAM,MAAM,GAAG,OAAO,CAAyB,MAAM,2BAA2B,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAEjG,IAAA,QACIA,IAAA,CAAC,kBAAkB,EAAA,EAAA,GAAK,MAAM,EAAA,QAAA,EAAA,CACzB,QAAQ,EACR,OAAO,IAAIC,GAAA,CAAC,OAAO,QAAM,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAC,EAAA,CAAI,CAAA,EAAA,CACxD;AAE7B;;;;"}
1
+ {"version":3,"file":"CratisComponentsProvider.js","sources":["../../../Common/CratisComponentsProvider.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAkCA;;;;;;;AAOG;AACI,MAAM,cAAc,GAA2B;AAEtD;;;AAGG;AACI,MAAM,2BAA2B,GAAG,CAAC,KAAyC,KACjF,KAAK,CAAC,cAAc,EAAE,KAAK,IAAI,EAAE;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AACI,MAAM,wBAAwB,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAiC,KAAI;AACpG,IAAA,MAAM,MAAM,GAAG,OAAO,CAAyB,MAAM,2BAA2B,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAEjG,IAAA,QACIA,IAAA,CAAC,kBAAkB,EAAA,EAAA,GAAK,MAAM,EAAA,QAAA,EAAA,CACzB,QAAQ,EACR,OAAO,IAAIC,GAAA,CAAC,OAAO,QAAM,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,CAAC,EAAA,CAAI,CAAA,EAAA,CACxD;AAE7B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableCore.d.ts","sourceRoot":"","sources":["../../../DataTables/DataTableCore.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAqB,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAKhF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,u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E,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAElD,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB,EAAE,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAE9B,SAAS,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAE5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAgCD,eAAO,MAAM,aAAa,GAAI,KAAK,SAAS,MAAM,EAAE,mRAsBjD,kBAAkB,CAAC,KAAK,CAAC,sBAgI3B,CAAC"}
@@ -52,7 +52,7 @@ const DataTableCore = ({ data, children, dataKey, emptyMessage, selectionMode, s
52
52
  const handleRowClick = onRowClick
53
53
  ? (event) => onRowClick({ data: event.data, index: event.index })
54
54
  : undefined;
55
- return (jsxs(DataTable.Root, { data: data, dataKey: dataKey, removableSort: true, selectionMode: selectionMode ?? null, selectionKeys: selectionKeys, onSelectionChange: onSelectionChange ? handleSelectionChange : undefined, onRowClick: handleRowClick, filters: filters, onFilter: handleFilter, globalFilter: globalFilter || null, globalFilterFields: globalFilterFields, scrollable: scrollable, scrollHeight: scrollHeight, className: className, style: style, pt: pt, ptOptions: ptOptions, unstyled: unstyled, children: [showGlobalSearch && (jsx("div", { className: "cratis-datatable-search", children: jsx(InputText, { value: globalFilter, placeholder: globalSearchPlaceholder, className: "w-full", onChange: (event) => setGlobalFilter(event.target.value) }) })), jsx(DataTable.TableContainer, { children: jsxs(DataTable.Table, { children: [jsx(DataTable.THead, { children: jsx(DataTable.THeadRow, { children: columns.map((column, index) => (jsx(DataTable.THeadCell, { style: column.props.headerStyle ?? column.props.style, className: column.props.headerClassName, children: jsxs("div", { className: "cratis-datatable-header-cell", children: [column.props.sortable && column.props.field ? (jsxs(DataTable.Sort, { field: column.props.field, pt: { root: { 'aria-sort': undefined } }, children: [column.props.header, jsx(DataTable.SortIndicator, { match: "asc", children: " \u25B2" }), jsx(DataTable.SortIndicator, { match: "desc", children: " \u25BC" })] })) : (jsx("span", { children: column.props.header })), column.props.filter && (column.props.filterField ?? column.props.field) && (jsx(ColumnFilterMenu, { field: (column.props.filterField ?? column.props.field), dataType: column.props.dataType, placeholder: column.props.filterPlaceholder, showMatchModes: column.props.showFilterMatchModes }))] }) }, index))) }) }), jsx(DataTable.TBody, { children: ({ item, index }) => (jsx(DataTable.Row, { index: index, className: rowClassName?.(item), children: columns.map((column, columnIndex) => (jsx(DataTable.Cell, { style: { ...column.props.style, ...column.props.bodyStyle }, className: column.props.bodyClassName ?? column.props.className, children: column.props.selectionMode ? (jsx("input", { type: "radio", readOnly: true, "aria-label": selectionAriaLabel, checked: !!selection && keyOf(item) === keyOf(selection) })) : (renderCellContent(column.props, item)) }, columnIndex))) })) }), jsx(DataTable.EmptyTBody, { children: jsx(DataTable.Row, { children: jsx(DataTable.Cell, { colSpan: Math.max(columns.length, 1), children: emptyMessage }) }) })] }) })] }));
55
+ return (jsxs(DataTable.Root, { data: data, dataKey: dataKey, removableSort: true, selectionMode: selectionMode ?? null, selectionKeys: selectionKeys, onSelectionChange: onSelectionChange ? handleSelectionChange : undefined, onRowClick: handleRowClick, filters: filters, onFilter: handleFilter, globalFilter: globalFilter || null, globalFilterFields: globalFilterFields, scrollable: scrollable, scrollHeight: scrollHeight, className: className, style: style, pt: pt, ptOptions: ptOptions, unstyled: unstyled, children: [showGlobalSearch && (jsx("div", { className: "cratis-datatable-search", children: jsx(InputText, { value: globalFilter, placeholder: globalSearchPlaceholder, className: "w-full", onChange: (event) => setGlobalFilter(event.target.value) }) })), jsx(DataTable.TableContainer, { children: jsxs(DataTable.Table, { children: [jsx(DataTable.THead, { children: jsx(DataTable.THeadRow, { children: columns.map((column, index) => (jsx(DataTable.THeadCell, { style: column.props.headerStyle ?? column.props.style, className: column.props.headerClassName, children: jsxs("div", { className: "cratis-datatable-header-cell", children: [column.props.sortable && column.props.field ? (jsxs(DataTable.Sort, { field: column.props.field, pt: { root: { 'aria-sort': undefined } }, children: [jsx(DataTable.THeadTitle, { children: column.props.header }), jsx(DataTable.SortIndicator, { match: "asc", children: " \u25B2" }), jsx(DataTable.SortIndicator, { match: "desc", children: " \u25BC" })] })) : (jsx(DataTable.THeadTitle, { children: column.props.header })), column.props.filter && (column.props.filterField ?? column.props.field) && (jsx(ColumnFilterMenu, { field: (column.props.filterField ?? column.props.field), dataType: column.props.dataType, placeholder: column.props.filterPlaceholder, showMatchModes: column.props.showFilterMatchModes }))] }) }, index))) }) }), jsx(DataTable.TBody, { children: ({ item, index }) => (jsx(DataTable.Row, { index: index, className: rowClassName?.(item), children: columns.map((column, columnIndex) => (jsx(DataTable.Cell, { style: { ...column.props.style, ...column.props.bodyStyle }, className: column.props.bodyClassName ?? column.props.className, children: column.props.selectionMode ? (jsx("input", { type: "radio", readOnly: true, "aria-label": selectionAriaLabel, checked: !!selection && keyOf(item) === keyOf(selection) })) : (renderCellContent(column.props, item)) }, columnIndex))) })) }), jsx(DataTable.EmptyTBody, { className: "p-datatable-tbody", children: jsx(DataTable.Row, { children: jsx(DataTable.Cell, { colSpan: Math.max(columns.length, 1), children: emptyMessage }) }) })] }) })] }));
56
56
  };
57
57
 
58
58
  export { DataTableCore };
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableCore.js","sources":["../../../DataTables/DataTableCore.tsx"],"sourcesContent":[null],"names":["_jsxs","PrimeDataTable","_jsx"],"mappings":";;;;;;;AA8EA;AACA,MAAM,UAAU,GAAG,CAAC,QAAmB,KACnC,OAAO,CACH,MAAM,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAA2C,EAC7G,CAAC,QAAQ,CAAC,CACb;AAEL,MAAM,iBAAiB,GAAG,CAAC,MAAwB,EAAE,GAAW,KAAe;IAC3E,IAAI,MAAM,CA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EAC9B,OAAO,EAAE,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC,IAAa,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,EAAA,CACnE,KAEF,iBAAiB,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CACxC,EAAA,EAZI,WAAW,CAaE,CACzB,CAAC,EAAA,CACe,CACxB,EAAA,CACkB,EACvBA,GAAA,CAACD,SAAc,CAAC,UAAU,EAAA,EAAA,QAAA,EACtBC,GAAA,CAACD,SAAc,CAAC,GAAG,EAAA,EAAA,QAAA,EACfC,GAAA,CAACD,SAAc,CAAC,IAAI,EAAA,EAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAA,QAAA,EAAG,YAAY,EAAA,CAAuB,EAAA,CAC9E,EAAA,CACG,CAAA,EAAA,CACT,EAAA,CACK,CAAA,EAAA,CACd;AAE9B;;;;"}
1
+ {"version":3,"file":"DataTableCore.js","sources":["../../../DataTables/DataTableCore.tsx"],"sourcesContent":[null],"names":["_jsxs","PrimeDataTable","_jsx"],"mappings":";;;;;;;AA8EA;AACA,MAAM,UAAU,GAAG,CAAC,QAAmB,KACnC,OAAO,CACH,MAAM,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAA2C,EAC7G,CAAC,QAAQ,CAAC,CACb;AAEL,MAAM,iBAAiB,GAAG,CAAC,MAAwB,EAAE,GAAW,KAAe;IAC3E,IAAI,MAAM,CAAC,IAAI;AAAE,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACxC,IAAA,IAAI,MAAM,CAAC,KAAK,EAAE;QACd,MAAM,KAAK,GAAI,GAA+B,CAAC,MAAM,CAAC,KAAK,CAAC;AAC5D,QAAA,OAAO,KAAK,IAAI,IAAI,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7C;AACA,I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,EAZI,WAAW,CAaE,CACzB,CAAC,EAAA,CACe,CACxB,EAAA,CACkB,EAIvBA,GAAA,CAACD,SAAc,CAAC,UAAU,EAAA,EAAC,SAAS,EAAC,mBAAmB,EAAA,QAAA,EACpDC,GAAA,CAACD,SAAc,CAAC,GAAG,EAAA,EAAA,QAAA,EACfC,GAAA,CAACD,SAAc,CAAC,IAAI,EAAA,EAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAA,QAAA,EAAG,YAAY,EAAA,CAAuB,EAAA,CAC9E,EAAA,CACG,CAAA,EAAA,CACT,EAAA,CACK,CAAA,EAAA,CACd;AAE9B;;;;"}
@@ -5,6 +5,7 @@ export interface MessageProps {
5
5
  text?: React.ReactNode;
6
6
  children?: React.ReactNode;
7
7
  className?: string;
8
+ icon?: React.ReactNode | false;
8
9
  }
9
- export declare const Message: ({ severity, text, children, className }: MessageProps) => React.JSX.Element;
10
+ export declare const Message: ({ severity, text, children, className, icon }: MessageProps) => React.JSX.Element;
10
11
  //# sourceMappingURL=Message.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../Display/Message.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;AAG/F,MAAM,WAAW,YAAY;IAEzB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAE3B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AASD,eAAO,MAAM,OAAO,GAAI,yCAAkD,YAAY,sBAMrF,CAAC"}
1
+ {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../Display/Message.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;AAG/F,MAAM,WAAW,YAAY;IAEzB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAE3B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;CAClC;AAsBD,eAAO,MAAM,OAAO,GAAI,+CAAwD,YAAY,sBAS3F,CAAC"}
@@ -1,6 +1,18 @@
1
- import { jsx } from 'react/jsx-runtime';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Message as Message$1 } from 'primereact/message';
3
3
 
4
+ /**
5
+ * The severity glyphs of PrimeReact 10's `Message`, which composed its own icon; v11's
6
+ * `Message.Icon` part renders whatever it is given and nothing on its own.
7
+ */
8
+ const severityIcons = {
9
+ info: 'pi pi-info-circle',
10
+ success: 'pi pi-check',
11
+ warn: 'pi pi-exclamation-triangle',
12
+ error: 'pi pi-times-circle',
13
+ secondary: 'pi pi-info-circle',
14
+ contrast: 'pi pi-info-circle',
15
+ };
4
16
  /**
5
17
  * A declarative inline message built on PrimeReact 11's compositional `Message` parts.
6
18
  *
@@ -8,7 +20,7 @@ import { Message as Message$1 } from 'primereact/message';
8
20
  * `Message.Text` in 11; this preserves the flat call shape so an inline notice stays a
9
21
  * single element at the call site.
10
22
  */
11
- const Message = ({ severity = 'info', text, children, className }) => (jsx(Message$1.Root, { severity: severity, className: className, children: jsx(Message$1.Content, { children: jsx(Message$1.Text, { children: children ?? text }) }) }));
23
+ const Message = ({ severity = 'info', text, children, className, icon }) => (jsx(Message$1.Root, { severity: severity, className: className, children: jsxs(Message$1.Content, { children: [icon !== false && (jsx(Message$1.Icon, { children: icon ?? jsx("i", { className: severityIcons[severity] }) })), jsx(Message$1.Text, { children: children ?? text })] }) }));
12
24
 
13
25
  export { Message };
14
26
  //# sourceMappingURL=Message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Message.js","sources":["../../../Display/Message.tsx"],"sourcesContent":[null],"names":["_jsx","PrimeMessage"],"mappings":";;;AAqBA;;;;;;AAMG;MACU,OAAO,GAAG,CAAC,EAAE,QAAQ,GAAG,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAgB,MAClFA,GAAA,CAACC,SAAY,CAAC,IAAI,EAAA,EAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAA,QAAA,EACvDD,GAAA,CAACC,SAAY,CAAC,OAAO,EAAA,EAAA,QAAA,EACjBD,IAACC,SAAY,CAAC,IAAI,EAAA,EAAA,QAAA,EAAE,QAAQ,IAAI,IAAI,EAAA,CAAqB,EAAA,CACtC,EAAA,CACP;;;;"}
1
+ {"version":3,"file":"Message.js","sources":["../../../Display/Message.tsx"],"sourcesContent":[null],"names":["_jsx","PrimeMessage","_jsxs"],"mappings":";;;AA0BA;;;AAGG;AACH,MAAM,aAAa,GAAoC;AACnD,IAAA,IAAI,EAAE,mBAAmB;AACzB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,IAAI,EAAE,4BAA4B;AAClC,IAAA,KAAK,EAAE,oBAAoB;AAC3B,IAAA,SAAS,EAAE,mBAAmB;AAC9B,IAAA,QAAQ,EAAE,mBAAmB;CAChC;AAED;;;;;;AAMG;AACI,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,GAAG,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAgB,MACxFA,GAAA,CAACC,SAAY,CAAC,IAAI,EAAA,EAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,YACvDC,IAAA,CAACD,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