@rocket.chat/fuselage 0.90.1 → 0.92.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);
@@ -5248,10 +5262,7 @@ a:where(:active):where(:not(.rcx-button)), .rcx-tag--clickable:where(:active), .
5248
5262
  gap: 0.25rem;
5249
5263
  }
5250
5264
  .rcx-sidebar-item--level-2 {
5251
- padding: 0.5rem;
5252
- }
5253
- .rcx-sidebar-item--indent {
5254
- margin-inline-start: 0.75rem;
5265
+ padding: 0.25rem;
5255
5266
  }
5256
5267
  .rcx-sidebar-item:active {
5257
5268
  color: var(--rcx-sidebar-color-font-active, var(--rcx-color-font-titles-labels, #1f2329));
@@ -5419,10 +5430,12 @@ a:where(:active):where(:not(.rcx-button)), .rcx-tag--clickable:where(:active), .
5419
5430
  flex-shrink: 0;
5420
5431
  width: 0;
5421
5432
  height: 1.25rem;
5433
+ margin-inline-end: -0.25rem;
5422
5434
  opacity: 0;
5423
5435
  }
5424
5436
  .rcx-sidebar-collapse-group__bar:hover .rcx-sidebar-collapse-group__menu-wrapper, .rcx-sidebar-collapse-group__bar:focus-within .rcx-sidebar-collapse-group__menu-wrapper, .rcx-sidebar-collapse-group__bar:has(.rcx-sidebar-collapse-group__menu-wrapper [aria-expanded=true], .rcx-sidebar-accordion-item__menu-wrapper [aria-expanded=true]) .rcx-sidebar-collapse-group__menu-wrapper, .rcx-sidebar-collapse-group__bar:hover .rcx-sidebar-accordion-item__menu-wrapper, .rcx-sidebar-collapse-group__bar:focus-within .rcx-sidebar-accordion-item__menu-wrapper, .rcx-sidebar-collapse-group__bar:has(.rcx-sidebar-collapse-group__menu-wrapper [aria-expanded=true], .rcx-sidebar-accordion-item__menu-wrapper [aria-expanded=true]) .rcx-sidebar-accordion-item__menu-wrapper, .rcx-sidebar-accordion-item__bar:hover .rcx-sidebar-collapse-group__menu-wrapper, .rcx-sidebar-accordion-item__bar:focus-within .rcx-sidebar-collapse-group__menu-wrapper, .rcx-sidebar-accordion-item__bar:has(.rcx-sidebar-collapse-group__menu-wrapper [aria-expanded=true], .rcx-sidebar-accordion-item__menu-wrapper [aria-expanded=true]) .rcx-sidebar-collapse-group__menu-wrapper, .rcx-sidebar-accordion-item__bar:hover .rcx-sidebar-accordion-item__menu-wrapper, .rcx-sidebar-accordion-item__bar:focus-within .rcx-sidebar-accordion-item__menu-wrapper, .rcx-sidebar-accordion-item__bar:has(.rcx-sidebar-collapse-group__menu-wrapper [aria-expanded=true], .rcx-sidebar-accordion-item__menu-wrapper [aria-expanded=true]) .rcx-sidebar-accordion-item__menu-wrapper {
5425
5437
  width: 1.25rem;
5438
+ margin-inline-end: 0;
5426
5439
  opacity: 1;
5427
5440
  }
5428
5441
  .rcx-sidebar-collapse-group__panel, .rcx-sidebar-accordion-item__panel {
@@ -5476,6 +5489,15 @@ a:where(:active):where(:not(.rcx-button)), .rcx-tag--clickable:where(:active), .
5476
5489
  .rcx-sidebar-collapse-group__bar-button[tabindex].disabled, .rcx-sidebar-collapse-group__bar-button[tabindex]:disabled {
5477
5490
  cursor: not-allowed;
5478
5491
  }
5492
+ .rcx-sidebar-collapse-group__heading {
5493
+ display: flex;
5494
+ align-items: center;
5495
+ flex: 1 1 0;
5496
+ min-width: 0;
5497
+ }
5498
+ .rcx-sidebar-collapse-group__title {
5499
+ flex: 0 1 auto;
5500
+ }
5479
5501
  .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
5502
  background-color: var(--rcx-color-surface-hover, #f2f3f5);
5481
5503
  }
@@ -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
@@ -6198,12 +6207,11 @@ if (process.env.NODE_ENV !== "production") (function() {
6198
6207
  });
6199
6208
  //#endregion
6200
6209
  //#region src/components/Sidebar/SidebarItem/SidebarItem.tsx
6201
- var SidebarItem = ({ selected, level = 1, indent, className, children, is: Tag = "a", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
6210
+ var SidebarItem = ({ selected, level = 1, className, children, is: Tag = "a", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, {
6202
6211
  className: [
6203
6212
  "rcx-box rcx-box--full rcx-sidebar-item",
6204
6213
  selected && "rcx-sidebar-item--selected",
6205
6214
  level && `rcx-sidebar-item--level-${level}`,
6206
- indent && "rcx-sidebar-item--indent",
6207
6215
  className
6208
6216
  ].filter(Boolean).join(" "),
6209
6217
  ...props,
@@ -6436,26 +6444,24 @@ if (process.env.NODE_ENV !== "production") (function() {
6436
6444
  "rcx-box rcx-box--full",
6437
6445
  "rcx-sidebar-collapse-group__bar",
6438
6446
  !expanded && empty && "rcx-sidebar-collapse-group__bar--empty",
6439
- !expanded && badge && "rcx-sidebar-collapse-group__bar--unread",
6440
- "rcx-box--animated"
6447
+ !expanded && badge && "rcx-sidebar-collapse-group__bar--unread"
6441
6448
  ].filter(Boolean).join(" "),
6442
6449
  ...props,
6443
6450
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6444
6451
  className: "rcx-box rcx-sidebar-collapse-group__bar-button",
6445
6452
  role,
6446
6453
  ...barProps,
6447
- children: [
6448
- expanded !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron, {
6449
- size: "x20",
6450
- right: !expanded
6451
- }),
6452
- title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
6454
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6455
+ className: "rcx-box rcx-sidebar-collapse-group__heading",
6456
+ children: [title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
6453
6457
  className: "rcx-box rcx-box--full rcx-sidebar-collapse-group__title",
6454
6458
  id: titleId,
6455
6459
  children: title
6456
- }),
6457
- !expanded && badge && badge
6458
- ]
6460
+ }), expanded !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron, {
6461
+ size: "x20",
6462
+ right: !expanded
6463
+ })]
6464
+ }), !expanded && badge && badge]
6459
6465
  }), menu]
6460
6466
  });
6461
6467
  //#endregion