prometeo-design-system 7.5.0 → 7.5.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 (36) hide show
  1. package/dist/Chip.es.js +71 -70
  2. package/dist/Collapsible.css +1 -1
  3. package/dist/MessageCard.es.js +43 -42
  4. package/dist/PlainTooltip.es.js +84 -66
  5. package/dist/Table.es.js +98 -92
  6. package/dist/assets/TicketsLogo.png +0 -0
  7. package/dist/components/Cards/Message/MessageCard.d.ts +1 -0
  8. package/dist/components/Chips/chipTypes.d.ts +1 -0
  9. package/dist/components/ModuleItem/ModuleItem.d.ts +14 -0
  10. package/dist/components/NavigationDrawer/drawerActionsContext.d.ts +3 -0
  11. package/dist/components/NavigationDrawer/drawerRegistrationContext.d.ts +3 -0
  12. package/dist/components/NavigationDrawer/drawerTypes.d.ts +39 -0
  13. package/dist/components/NavigationDrawer/useDrawerCollapsed.d.ts +1 -0
  14. package/dist/components/NavigationDrawer/useDrawerStore.d.ts +9 -0
  15. package/dist/components/NavigationRail/NavigationRail.d.ts +16 -0
  16. package/dist/components/Sidebar/Sidebar.d.ts +13 -0
  17. package/dist/components/Sidebar/SidebarAppInfo.d.ts +10 -0
  18. package/dist/components/Sidebar/SidebarCollapseToggle.d.ts +2 -0
  19. package/dist/components/Sidebar/SidebarCollapsedContext.d.ts +2 -0
  20. package/dist/components/SidebarItem/SidebarItem.d.ts +22 -0
  21. package/dist/components/Table/HeadRow.d.ts +1 -1
  22. package/dist/components/Table/TableBody.d.ts +2 -1
  23. package/dist/components/Table/TableFooter.d.ts +1 -1
  24. package/dist/components/Table/TableRow.d.ts +1 -1
  25. package/dist/components/Table/types.d.ts +4 -0
  26. package/dist/components/TertiaryLevelSidebar/TertiaryLevelSidebar.d.ts +9 -0
  27. package/dist/components/Tooltip/Tooltip.d.ts +4 -1
  28. package/dist/exports/MessageCard.d.ts +1 -0
  29. package/dist/exports/ModuleItem.d.ts +3 -0
  30. package/dist/exports/NavigationRail.d.ts +3 -0
  31. package/dist/exports/Sidebar.d.ts +5 -0
  32. package/dist/exports/SidebarItem.d.ts +3 -0
  33. package/dist/exports/TertiaryLevelSidebar.d.ts +3 -0
  34. package/dist/prometeo-design-system.es.js +57 -57
  35. package/dist/styles.css +1 -1
  36. package/package.json +1 -1
package/dist/Chip.es.js CHANGED
@@ -1,37 +1,37 @@
1
1
  import { j as o } from "./jsx-runtime-GkKLlHH4.js";
2
- import { memo as C, forwardRef as F, useMemo as N, useCallback as p } from "react";
3
- import { c as h } from "./index-BOQuZ0gG.js";
4
- import { c as v } from "./cn-B6yFEsav.js";
2
+ import { memo as C, forwardRef as K, useMemo as N, useCallback as v } from "react";
3
+ import { c as m } from "./index-BOQuZ0gG.js";
4
+ import { c as h } from "./cn-B6yFEsav.js";
5
5
  import { i as V } from "./iconUtils-rTOfKDxE.js";
6
- import { Close as K } from "./Icons/Close.es.js";
7
- import { A as q } from "./AvatarBase-D6H-sXbg.js";
8
- const Q = {
6
+ import { Close as q } from "./Icons/Close.es.js";
7
+ import { A as Q } from "./AvatarBase-D6H-sXbg.js";
8
+ const Z = {
9
9
  small: "h-5 px-2 text-xs prometeo-fonts-body-small",
10
10
  medium: "h-8 px-3 text-sm prometeo-fonts-body-medium",
11
11
  large: "h-9 px-3 text-sm prometeo-fonts-body-medium"
12
- }, Z = {
12
+ }, $ = {
13
13
  default: "text-neutral-default-default border-neutral-default-default bg-inherit rounded-lg font-semibold",
14
14
  error: "",
15
15
  success: ""
16
- }, $ = "border-neutral-strong-default text-neutral-default-disabled", J = "text-neutral-default-disabled", W = ["leading", "avatar"], X = ["default", "error", "success"];
17
- function ee(e) {
18
- return W.includes(e);
16
+ }, J = "border-neutral-strong-default text-neutral-default-disabled", W = "text-neutral-default-disabled", X = ["leading", "avatar"], ee = ["default", "error", "success"];
17
+ function ae(e) {
18
+ return X.includes(e);
19
19
  }
20
20
  function H(e) {
21
- return X.includes(e);
21
+ return ee.includes(e);
22
22
  }
23
- function ae(e) {
24
- const a = e.layout ?? (ee(e.variant) ? e.variant : void 0), s = e.semanticVariant ?? (H(e.variant) ? e.variant : void 0), i = a ?? (e.avatar ? "avatar" : "leading"), m = !!e.onRemove || !!e.size || !!s || !!e.semanticVariant || H(e.variant);
23
+ function re(e) {
24
+ const a = e.layout ?? (ae(e.variant) ? e.variant : void 0), s = e.semanticVariant ?? (H(e.variant) ? e.variant : void 0), i = a ?? (e.avatar ? "avatar" : "leading"), f = !!e.onRemove || !!e.size || !!s || !!e.semanticVariant || H(e.variant);
25
25
  return {
26
26
  layout: i,
27
27
  legacySemanticVariant: s,
28
- legacySizeClass: e.size ? Q[e.size] : void 0,
29
- legacySemanticContainerClass: s ? Z[s] : void 0,
28
+ legacySizeClass: e.size ? Z[e.size] : void 0,
29
+ legacySemanticContainerClass: s ? $[s] : void 0,
30
30
  useLegacyRemoveHandler: !!e.onRemove,
31
- isLegacyMode: m
31
+ isLegacyMode: f
32
32
  };
33
33
  }
34
- const re = h(
34
+ const te = m(
35
35
  "group/chip flex items-center gap-1 p-2 w-max h-8 radius-medium border transition-all duration-300 ease-in-out",
36
36
  {
37
37
  variants: {
@@ -118,7 +118,7 @@ const re = h(
118
118
  }
119
119
  ]
120
120
  }
121
- ), te = h(
121
+ ), se = m(
122
122
  "pyrion-fonts-label-medium transition-all duration-300 ease-in-out select-none",
123
123
  {
124
124
  variants: {
@@ -211,7 +211,7 @@ const re = h(
211
211
  }
212
212
  ]
213
213
  }
214
- ), se = h("transition-all duration-300 ease-in-out", {
214
+ ), de = m("transition-all duration-300 ease-in-out", {
215
215
  variants: {
216
216
  isSelected: {
217
217
  true: "",
@@ -295,7 +295,7 @@ const re = h(
295
295
  className: "icon-disabled-ondisabled group-hover/chip:icon-disabled-ondisabled group-active/chip:icon-disabled-ondisabled"
296
296
  }
297
297
  ]
298
- }), de = h(
298
+ }), oe = m(
299
299
  "transition-all duration-300 ease-in-out border-neutral-default-default border",
300
300
  {
301
301
  variants: {
@@ -349,24 +349,24 @@ const re = h(
349
349
  }
350
350
  ]
351
351
  }
352
- ), oe = {
352
+ ), ne = {
353
353
  size: "xsmall",
354
354
  name: "A B"
355
355
  };
356
- function ne(e, a, s) {
356
+ function ie(e, a, s) {
357
357
  return {
358
358
  isSelected: !!e,
359
359
  disabled: !!a,
360
360
  forcedStatus: s
361
361
  };
362
362
  }
363
- function ie(e) {
363
+ function le(e) {
364
364
  return N(
365
365
  () => ({
366
- container: re(e),
367
- label: te(e),
368
- icon: se(e),
369
- avatar: de(e)
366
+ container: te(e),
367
+ label: se(e),
368
+ icon: de(e),
369
+ avatar: oe(e)
370
370
  }),
371
371
  [e.isSelected, e.disabled, e.forcedStatus]
372
372
  );
@@ -377,24 +377,25 @@ const D = C(function({
377
377
  size: i = 16
378
378
  }) {
379
379
  return /* @__PURE__ */ o.jsx(a, { size: i, className: s });
380
- }), le = C(function({
380
+ }), ce = C(function({
381
381
  avatar: a,
382
382
  className: s
383
383
  }) {
384
- return /* @__PURE__ */ o.jsx(q, { ...a, className: s });
384
+ return /* @__PURE__ */ o.jsx(Q, { ...a, className: s });
385
385
  });
386
- function ce(e, a) {
386
+ function ue(e, a) {
387
387
  return e.label === a.label && e.isSelected === a.isSelected && e.disabled === a.disabled && e.forcedStatus === a.forcedStatus && e.layout === a.layout && e.variant === a.variant && e.semanticVariant === a.semanticVariant && e.className === a.className && e.onRemove === a.onRemove && e.id === a.id && e.size === a.size && e.tabIndex === a.tabIndex && e.leadingIcon === a.leadingIcon && e.leadingSlot === a.leadingSlot && e.trailingIcon === a.trailingIcon && e.onClick === a.onClick && e.onTrailingIconClick === a.onTrailingIconClick && e.avatar?.imageUrl === a.avatar?.imageUrl && e.avatar?.name === a.avatar?.name;
388
388
  }
389
- const ue = C(
390
- F(function({
389
+ const be = C(
390
+ K(function({
391
391
  isSelected: a = !1,
392
392
  label: s,
393
- leadingIcon: i,
394
- leadingSlot: m,
393
+ labelClassName: i,
394
+ leadingIcon: f,
395
+ leadingSlot: P,
395
396
  trailingIcon: x,
396
- forcedStatus: P,
397
- onTrailingIconClick: f,
397
+ forcedStatus: j,
398
+ onTrailingIconClick: p,
398
399
  onClick: l,
399
400
  disabled: r = !1,
400
401
  avatar: c,
@@ -405,11 +406,11 @@ const ue = C(
405
406
  id: g,
406
407
  size: _,
407
408
  tabIndex: y,
408
- className: j,
409
- ...T
410
- }, z) {
409
+ className: T,
410
+ ...z
411
+ }, M) {
411
412
  const t = N(
412
- () => ae({
413
+ () => re({
413
414
  layout: A,
414
415
  variant: L,
415
416
  semanticVariant: I,
@@ -418,68 +419,68 @@ const ue = C(
418
419
  size: _
419
420
  }),
420
421
  [A, L, I, c, u, _]
421
- ), M = ne(a, r, P), b = ie(M), E = V(i) ? i : null, S = V(x) ? x : t.useLegacyRemoveHandler ? K : null, w = N(
422
- () => ({ ...oe, ...c }),
422
+ ), w = ie(a, r, j), b = le(w), E = V(f) ? f : null, S = V(x) ? x : t.useLegacyRemoveHandler ? q : null, Y = N(
423
+ () => ({ ...ne, ...c }),
423
424
  [c?.imageUrl, c?.name]
424
- ), n = !r && !!l, R = t.layout === "avatar", Y = y !== void 0 ? y : n ? 0 : void 0, k = p(
425
+ ), n = !r && !!l, R = t.layout === "avatar", k = y !== void 0 ? y : n ? 0 : void 0, G = v(
425
426
  (d) => {
426
- r || (d.preventDefault(), d.stopPropagation(), f?.(d));
427
+ r || (d.preventDefault(), d.stopPropagation(), p?.(d));
427
428
  },
428
- [r, f]
429
- ), G = p(
429
+ [r, p]
430
+ ), O = v(
430
431
  (d) => {
431
432
  r || (d.stopPropagation(), d.preventDefault(), g != null && u?.(g));
432
433
  },
433
434
  [r, g, u]
434
- ), O = p(
435
+ ), U = v(
435
436
  (d) => {
436
437
  r || l?.(d);
437
438
  },
438
439
  [r, l]
439
- ), U = p(
440
+ ), B = v(
440
441
  (d) => {
441
442
  !n || r || d.key !== "Enter" && d.key !== " " || (d.preventDefault(), l?.(d));
442
443
  },
443
444
  [r, n, l]
444
- ), B = !!S && (!!f || t.useLegacyRemoveHandler);
445
+ ), F = !!S && (!!p || t.useLegacyRemoveHandler);
445
446
  return /* @__PURE__ */ o.jsxs(
446
447
  "div",
447
448
  {
448
- ...T,
449
- ref: z,
450
- className: v(
449
+ ...z,
450
+ ref: M,
451
+ className: h(
451
452
  b.container,
452
453
  !t.legacySizeClass && "h-8",
453
454
  t.legacySizeClass,
454
455
  t.legacySemanticContainerClass,
455
456
  t.isLegacyMode && "inline-flex font-semibold",
456
457
  n && "cursor-pointer",
457
- r && t.isLegacyMode && $,
458
+ r && t.isLegacyMode && J,
458
459
  r && "pointer-events-none",
459
- j
460
+ T
460
461
  ),
461
- onClick: n ? O : void 0,
462
- onKeyDown: n ? U : void 0,
462
+ onClick: n ? U : void 0,
463
+ onKeyDown: n ? B : void 0,
463
464
  "aria-disabled": r || void 0,
464
465
  role: n ? "button" : void 0,
465
- tabIndex: Y,
466
+ tabIndex: k,
466
467
  children: [
467
468
  /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-1 min-w-0", children: [
468
- !R && (m ?? (E && /* @__PURE__ */ o.jsx(D, { icon: E, className: b.icon }))),
469
- R && /* @__PURE__ */ o.jsx(le, { avatar: w, className: b.avatar }),
470
- /* @__PURE__ */ o.jsx("span", { className: v(b.label, "truncate"), children: s })
469
+ !R && (P ?? (E && /* @__PURE__ */ o.jsx(D, { icon: E, className: b.icon }))),
470
+ R && /* @__PURE__ */ o.jsx(ce, { avatar: Y, className: b.avatar }),
471
+ /* @__PURE__ */ o.jsx("span", { className: h(b.label, "truncate", i), children: s })
471
472
  ] }),
472
- B && S && /* @__PURE__ */ o.jsx(
473
+ F && S && /* @__PURE__ */ o.jsx(
473
474
  "button",
474
475
  {
475
476
  type: "button",
476
477
  disabled: r,
477
478
  tabIndex: y,
478
- onMouseDown: t.useLegacyRemoveHandler ? G : void 0,
479
- onClick: t.useLegacyRemoveHandler ? void 0 : k,
480
- className: v(
479
+ onMouseDown: t.useLegacyRemoveHandler ? O : void 0,
480
+ onClick: t.useLegacyRemoveHandler ? void 0 : G,
481
+ className: h(
481
482
  "shrink-0",
482
- (f || u) && !r && "cursor-pointer",
483
+ (p || u) && !r && "cursor-pointer",
483
484
  t.useLegacyRemoveHandler && "p-0.5 z-10 transition-all duration-200 hover:scale-105",
484
485
  t.useLegacyRemoveHandler && r && "cursor-default hover:scale-100"
485
486
  ),
@@ -488,9 +489,9 @@ const ue = C(
488
489
  D,
489
490
  {
490
491
  icon: S,
491
- className: v(
492
+ className: h(
492
493
  b.icon,
493
- r && t.isLegacyMode && J
494
+ r && t.isLegacyMode && W
494
495
  ),
495
496
  size: t.useLegacyRemoveHandler ? 18 : 16
496
497
  }
@@ -501,9 +502,9 @@ const ue = C(
501
502
  }
502
503
  );
503
504
  }),
504
- ce
505
+ ue
505
506
  );
506
- ue.displayName = "Chip";
507
+ be.displayName = "Chip";
507
508
  export {
508
- ue as default
509
+ be as default
509
510
  };
@@ -1 +1 @@
1
- .pyrion-collapsible-content[data-orientation=vertical]{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease-out,opacity .1s ease-in;opacity:0}.pyrion-collapsible-content[data-orientation=vertical][data-expanded=true]{grid-template-rows:1fr;opacity:1;transition:grid-template-rows .25s ease-out,opacity .15s ease-out 50ms}.pyrion-collapsible-content[data-orientation=horizontal]{display:grid;grid-template-columns:0fr;transition:grid-template-columns .25s ease-out,opacity .1s ease-in;opacity:0}.pyrion-collapsible-content[data-orientation=horizontal][data-expanded=true]{grid-template-columns:1fr;opacity:1;transition:grid-template-columns .25s ease-out,opacity .15s ease-out 50ms}.pyrion-collapsible-inner{overflow:hidden}.pyrion-collapsible-content[data-orientation=vertical] .pyrion-collapsible-inner{min-height:0}.pyrion-collapsible-content[data-orientation=horizontal] .pyrion-collapsible-inner{min-width:0}.pyrion-collapsible-trigger{display:flex;align-items:center;cursor:pointer;background:none;border:none;padding:0;width:100%;text-align:left;color:inherit;font:inherit}.pyrion-collapsible-trigger:disabled{cursor:not-allowed;opacity:.4}.pyrion-collapsible-trigger svg{transition:transform .25s ease;flex-shrink:0}.pyrion-collapsible-trigger[data-expanded=true] svg{transform:rotate(180deg)}.pyrion-collapsible-trigger[data-orientation=horizontal][data-expanded=true] svg{transform:rotate(90deg)}
1
+ .pyrion-collapsible-content[data-orientation=vertical]{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease-out,opacity .1s ease-in;opacity:0}.pyrion-collapsible-content[data-orientation=vertical][data-expanded=true]{grid-template-rows:1fr;opacity:1;transition:grid-template-rows .25s ease-out,opacity .15s ease-out 50ms}.pyrion-collapsible-content[data-orientation=horizontal]{display:grid;grid-template-columns:0fr;transition:grid-template-columns .25s ease-out,opacity .1s ease-in;opacity:0}.pyrion-collapsible-content[data-orientation=horizontal][data-expanded=true]{grid-template-columns:1fr;opacity:1;transition:grid-template-columns .25s ease-out,opacity .15s ease-out 50ms}.pyrion-collapsible-inner{overflow:hidden}.pyrion-collapsible-content[data-orientation=vertical] .pyrion-collapsible-inner{min-height:0}.pyrion-collapsible-content[data-orientation=horizontal] .pyrion-collapsible-inner{min-width:0}.pyrion-collapsible-trigger{display:flex;align-items:center;cursor:pointer;background:none;border:none;padding:0;width:100%;text-align:left;color:inherit;font:inherit}.pyrion-collapsible-trigger:disabled{cursor:not-allowed;opacity:.4}.pyrion-collapsible-trigger svg{transition:transform .25s ease;flex-shrink:0}.pyrion-collapsible-trigger[data-expanded=true] svg{transform:rotate(180deg)}.pyrion-collapsible-trigger[data-orientation=horizontal][data-expanded=true] svg{transform:rotate(90deg)}.pyrion-collapsible-trigger.pyrion-collapsible-trigger--rotate-90[data-expanded=true] svg{transform:rotate(90deg)}