@rocket.chat/fuselage 0.50.1 → 0.51.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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.51.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1319](https://github.com/RocketChat/fuselage/pull/1319) [`b37dd11c9`](https://github.com/RocketChat/fuselage/commit/b37dd11c9bd0fc4dbdda5ab5e623dfc46c8d8647) Thanks [@dougfabris](https://github.com/dougfabris)! - feat(fuselage): Add forwardRef on Contextualbar
8
+
9
+ ### Patch Changes
10
+
11
+ - [#1320](https://github.com/RocketChat/fuselage/pull/1320) [`06b1d5701`](https://github.com/RocketChat/fuselage/commit/06b1d57015c59fbba95c8986fe054c2b3336f73f) Thanks [@dougfabris](https://github.com/dougfabris)! - fix(fuselage): `ToastBar` remove close button from content alert
12
+
3
13
  ## 0.50.1
4
14
 
5
15
  ### Patch Changes
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- declare const _default: React.MemoExoticComponent<({ children, width, position, bg, ...props }: {
2
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<{
3
3
  is?: React.ElementType | undefined;
4
4
  className?: string | (<T extends readonly unknown[]>(...args: T) => string) | (string | false | 0 | (<T extends readonly unknown[]>(...args: T) => string) | null | undefined)[] | undefined;
5
5
  animated?: boolean | undefined;
6
6
  withRichContent?: boolean | "inlineWithoutBreaks" | undefined;
7
7
  htmlSize?: number | undefined;
8
- } & Partial<import("../Box/stylingProps").StylingProps> & Omit<React.AllHTMLAttributes<HTMLElement>, "ref" | "is" | "className" | "size" | "elevation"> & Omit<React.SVGAttributes<SVGElement>, "elevation" | keyof React.AllHTMLAttributes<HTMLElement>> & React.RefAttributes<any>) => JSX.Element>;
8
+ } & Partial<import("../Box/stylingProps").StylingProps> & Omit<React.AllHTMLAttributes<HTMLElement>, "ref" | "is" | "className" | "size" | "elevation"> & Omit<React.SVGAttributes<SVGElement>, "elevation" | keyof React.AllHTMLAttributes<HTMLElement>> & React.RefAttributes<any>, "string" | "filter" | "values" | "fill" | "x1" | "y" | "r" | "default" | "type" | "is" | "className" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "useMap" | "value" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPath" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontSizeAdjust" | "fontStretch" | "fontVariant" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "mask" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "operator" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "path" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | keyof import("../Box/stylingProps").StylingProps | "key" | "animated" | "withRichContent" | "htmlSize"> & React.RefAttributes<HTMLElement>>>;
9
9
  export default _default;
10
10
  //# sourceMappingURL=Contextualbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Contextualbar.d.ts","sourceRoot":"","sources":["../../../src/components/Contextualbar/Contextualbar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAe,MAAM,OAAO,CAAC;;;;;;;;AAmCpC,wBAAmC"}
1
+ {"version":3,"file":"Contextualbar.d.ts","sourceRoot":"","sources":["../../../src/components/Contextualbar/Contextualbar.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2B,MAAM,OAAO,CAAC;;;;;;;;AAqChD,wBAAmC"}
@@ -8,5 +8,5 @@ export type ToastBarProps = {
8
8
  onClose?: (id: string) => void;
9
9
  buttonLabel?: string;
10
10
  } & Omit<AllHTMLAttributes<HTMLElement>, 'is'>;
11
- export declare function ToastBar({ children, className, variant, time, id, onClose, buttonLabel, ...props }: ToastBarProps): JSX.Element;
11
+ export declare function ToastBar({ children, className, variant, time, id, onClose, ...props }: ToastBarProps): JSX.Element;
12
12
  //# sourceMappingURL=ToastBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastBar.d.ts","sourceRoot":"","sources":["../../../src/components/ToastBar/ToastBar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAO1D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC;AAE/C,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,SAAc,EACd,OAAgB,EAChB,IAAQ,EACR,EAAE,EACF,OAAO,EACP,WAAqB,EACrB,GAAG,KAAK,EACT,EAAE,aAAa,eAyEf"}
1
+ {"version":3,"file":"ToastBar.d.ts","sourceRoot":"","sources":["../../../src/components/ToastBar/ToastBar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAO1D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC;AAE/C,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,SAAc,EACd,OAAgB,EAChB,IAAQ,EACR,EAAE,EACF,OAAO,EACP,GAAG,KAAK,EACT,EAAE,aAAa,eA2Ef"}
@@ -3832,10 +3832,10 @@ var __rest = (this && this.__rest) || function (s, e) {
3832
3832
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3833
3833
  var react_1 = __importStar(__webpack_require__(/*! react */ "react"));
3834
3834
  var __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
3835
- var Contextualbar = function (_a) {
3835
+ var Contextualbar = (0, react_1.forwardRef)(function Contextualbar(_a, ref) {
3836
3836
  var children = _a.children, width = _a.width, position = _a.position, _b = _a.bg, bg = _b === void 0 ? 'room' : _b, props = __rest(_a, ["children", "width", "position", "bg"]);
3837
- return (react_1.default.createElement(__1.Box, __assign({ "rcx-vertical-bar": true, bg: bg, color: 'default', display: 'flex', flexDirection: 'column', flexShrink: 0, width: width, borderInlineStartWidth: 'default', borderInlineStartColor: 'extra-light', borderInlineStartStyle: 'solid', height: 'full', position: position, insetInlineEnd: 'none', insetBlockStart: 'none', zIndex: 5 }, props), children));
3838
- };
3837
+ return (react_1.default.createElement(__1.Box, __assign({ ref: ref, "rcx-vertical-bar": true, bg: bg, color: 'default', display: 'flex', flexDirection: 'column', flexShrink: 0, width: width, borderInlineStartWidth: 'default', borderInlineStartColor: 'extra-light', borderInlineStartStyle: 'solid', height: 'full', position: position, insetInlineEnd: 'none', insetBlockStart: 'none', zIndex: 5 }, props), children));
3838
+ });
3839
3839
  exports["default"] = (0, react_1.memo)(Contextualbar);
3840
3840
 
3841
3841
 
@@ -17925,7 +17925,7 @@ var Box_1 = __importDefault(__webpack_require__(/*! ../Box */ "./src/components/
17925
17925
  var Button_1 = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
17926
17926
  var Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
17927
17927
  function ToastBar(_a) {
17928
- var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.variant, variant = _c === void 0 ? 'info' : _c, _d = _a.time, time = _d === void 0 ? 5 : _d, id = _a.id, onClose = _a.onClose, _e = _a.buttonLabel, buttonLabel = _e === void 0 ? 'Close' : _e, props = __rest(_a, ["children", "className", "variant", "time", "id", "onClose", "buttonLabel"]);
17928
+ var children = _a.children, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.variant, variant = _c === void 0 ? 'info' : _c, _d = _a.time, time = _d === void 0 ? 5 : _d, id = _a.id, onClose = _a.onClose, props = __rest(_a, ["children", "className", "variant", "time", "id", "onClose"]);
17929
17929
  var iconName = (variant === 'success' && 'circle-check') ||
17930
17930
  (variant === 'error' && 'ban') ||
17931
17931
  'info';
@@ -17938,12 +17938,12 @@ function ToastBar(_a) {
17938
17938
  return (react_1.default.createElement(Box_1.default, __assign({ className: [
17939
17939
  "rcx-toastbar rcx-toastbar--".concat(variant, " ").concat(className),
17940
17940
  toastBarAnimation,
17941
- ], elevation: '2nb', borderRadius: 'x4', role: 'alert' }, props),
17941
+ ], elevation: '2nb', borderRadius: 'x4', role: 'alert', "aria-labelledby": toastId }, props),
17942
17942
  react_1.default.createElement("div", { className: 'rcx-toastbar_inner' },
17943
17943
  react_1.default.createElement(Icon_1.Icon, { className: "rcx-toastbar_icon--".concat(variant), size: 'x20', name: iconName }),
17944
17944
  react_1.default.createElement("div", { className: 'rcx-toastbar_content', id: toastId }, children),
17945
17945
  onClose && (react_1.default.createElement("div", { className: 'rcx-toastbar-close' },
17946
- react_1.default.createElement(Button_1.IconButton, { tiny: true, onClick: function () { return onClose(toastId); }, icon: 'cross', "aria-label": buttonLabel })))),
17946
+ react_1.default.createElement(Button_1.IconButton, { tiny: true, onClick: function () { return onClose(toastId); }, icon: 'cross', tabIndex: -1, "aria-hidden": true })))),
17947
17947
  react_1.default.createElement(Box_1.default, { className: [progressBarAnimation, 'rcx-toastbar_progressbar'] })));
17948
17948
  }
17949
17949
  exports.ToastBar = ToastBar;