@rocket.chat/fuselage 0.90.0 → 0.91.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.
@@ -1591,6 +1591,20 @@ a:where(:active):where(:not(.rcx-button)), .rcx-tag--clickable:where(:active), .
1591
1591
  align-items: center;
1592
1592
  flex-shrink: 0;
1593
1593
  }
1594
+ .rcx-button--with-badge {
1595
+ position: relative;
1596
+ overflow: visible;
1597
+ }
1598
+ .rcx-button__badge {
1599
+ position: absolute;
1600
+ inset-block-start: 0;
1601
+ inset-inline-end: 0;
1602
+ display: flex;
1603
+ transform: translate(30%, -30%);
1604
+ }
1605
+ .rcx-button__badge:dir(rtl) {
1606
+ transform: translate(-30%, -30%);
1607
+ }
1594
1608
  .rcx-button--icon {
1595
1609
  color: var(--rcx-color-button-icon-color, var(--rcx-button-secondary-color, var(--rcx-color-button-font-on-secondary, #1f2329)));
1596
1610
  border-width: var(--rcx-button-border-width, 1px);
@@ -5477,7 +5491,7 @@ a:where(:active):where(:not(.rcx-button)), .rcx-tag--clickable:where(:active), .
5477
5491
  cursor: not-allowed;
5478
5492
  }
5479
5493
  .rcx-sidebar-collapse-group__bar:has(.rcx-sidebar-collapse-group__bar-button[tabindex]):hover, .rcx-sidebar-collapse-group__bar:has(.rcx-sidebar-collapse-group__bar-button[tabindex]).hover, .rcx-sidebar-collapse-group__bar:has(.rcx-sidebar-collapse-group__bar-button[tabindex]).is-hovered {
5480
- background-color: var(--rcx-color-surface-tint, #f7f8fa);
5494
+ background-color: var(--rcx-color-surface-hover, #f2f3f5);
5481
5495
  }
5482
5496
  .rcx-sidebar-collapse-group__bar:has(.rcx-sidebar-collapse-group__bar-button:focus-visible) {
5483
5497
  box-shadow: inset 0 0 0 2px var(--rcx-color-stroke-highlight, #156ff5);
@@ -2348,7 +2348,7 @@ if (process.env.NODE_ENV !== "production") (function() {
2348
2348
  var getPressedClass = (variant) => {
2349
2349
  return [`rcx-button--icon-${[variant].filter(Boolean).join("-")}-pressed`];
2350
2350
  };
2351
- function IconButton({ icon, primary, info, secondary, danger, warning, success, mini, large, tiny, small, medium, pressed, children, ...props }) {
2351
+ function IconButton({ icon, badge, primary, info, secondary, danger, warning, success, mini, large, tiny, small, medium, pressed, children, ...props }) {
2352
2352
  const variant = (0, react.useMemo)(() => secondary && danger && "secondary-danger" || secondary && warning && "secondary-warning" || secondary && success && "secondary-success" || secondary && info && "secondary-info" || info && "info" || success && "success" || warning && "warning" || danger && "danger" || primary && "secondary-info" || secondary && "secondary" || "", [
2353
2353
  danger,
2354
2354
  info,
@@ -2381,11 +2381,20 @@ if (process.env.NODE_ENV !== "production") (function() {
2381
2381
  ...kindAndVariantProps,
2382
2382
  ...getSizeClass(),
2383
2383
  "rcx-button--icon-pressed": pressed,
2384
+ "rcx-button--with-badge": Boolean(badge),
2384
2385
  ...props,
2385
- children: [(0, react.isValidElement)(icon) ? icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
2386
- name: icon,
2387
- size: getIconSize()
2388
- }), children]
2386
+ children: [
2387
+ (0, react.isValidElement)(icon) ? icon : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
2388
+ name: icon,
2389
+ size: getIconSize()
2390
+ }),
2391
+ Boolean(badge) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2392
+ className: "rcx-button__badge",
2393
+ "aria-hidden": "true",
2394
+ children: badge
2395
+ }),
2396
+ children
2397
+ ]
2389
2398
  });
2390
2399
  }
2391
2400
  //#endregion