@rocket.chat/fuselage 0.54.1 → 0.54.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.
- package/CHANGELOG.md +6 -0
- package/dist/components/PaletteStyleTag/PaletteStyleTag.d.ts +4 -0
- package/dist/components/PaletteStyleTag/PaletteStyleTag.d.ts.map +1 -1
- package/dist/fuselage.development.js +3 -18
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +1 -1
- package/package.json +1 -1
- package/dist/components/PaletteStyleTag/lib/codeBlockStyles.d.ts +0 -2
- package/dist/components/PaletteStyleTag/lib/codeBlockStyles.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 0.54.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1383](https://github.com/RocketChat/fuselage/pull/1383) [`5870a9395`](https://github.com/RocketChat/fuselage/commit/5870a939500e5b596be8c1ef1c2e28bb1cded4f5) Thanks [@juliajforesti](https://github.com/juliajforesti)! - fix(fuselage): remove `codeBlock` palette and add `palette` prop for a custom palette
|
|
8
|
+
|
|
3
9
|
## 0.54.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -14,6 +14,10 @@ export declare const PaletteStyleTag: React.NamedExoticComponent<{
|
|
|
14
14
|
* Default is `:root`.
|
|
15
15
|
*/
|
|
16
16
|
selector?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* CSS containing custom palette styles to be used.
|
|
19
|
+
*/
|
|
20
|
+
palette?: string | undefined;
|
|
17
21
|
}>;
|
|
18
22
|
export default PaletteStyleTag;
|
|
19
23
|
//# sourceMappingURL=PaletteStyleTag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaletteStyleTag.d.ts","sourceRoot":"","sources":["../../../src/components/PaletteStyleTag/PaletteStyleTag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PaletteStyleTag.d.ts","sourceRoot":"","sources":["../../../src/components/PaletteStyleTag/PaletteStyleTag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAMpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAQ7C,eAAO,MAAM,eAAe;;IAQ1B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;EAMH,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
|
@@ -12913,7 +12913,6 @@ var react_1 = __importStar(__webpack_require__(/*! react */ "react"));
|
|
|
12913
12913
|
var react_dom_1 = __webpack_require__(/*! react-dom */ "react-dom");
|
|
12914
12914
|
var convertToCss_1 = __webpack_require__(/*! ./helpers/convertToCss */ "./src/components/PaletteStyleTag/helpers/convertToCss.ts");
|
|
12915
12915
|
var useCreateStyleContainer_1 = __webpack_require__(/*! ./hooks/useCreateStyleContainer */ "./src/components/PaletteStyleTag/hooks/useCreateStyleContainer.ts");
|
|
12916
|
-
var codeBlockStyles_1 = __webpack_require__(/*! ./lib/codeBlockStyles */ "./src/components/PaletteStyleTag/lib/codeBlockStyles.ts");
|
|
12917
12916
|
var themePalettes_1 = __webpack_require__(/*! ./lib/themePalettes */ "./src/components/PaletteStyleTag/lib/themePalettes.ts");
|
|
12918
12917
|
var themes = {
|
|
12919
12918
|
light: themePalettes_1.light,
|
|
@@ -12921,9 +12920,9 @@ var themes = {
|
|
|
12921
12920
|
'high-contrast': themePalettes_1.highContrast,
|
|
12922
12921
|
};
|
|
12923
12922
|
exports.PaletteStyleTag = (0, react_1.memo)(function PaletteStyleTag(_a) {
|
|
12924
|
-
var _b = _a.theme, theme = _b === void 0 ? 'light' : _b, _c = _a.tagId, tagId = _c === void 0 ? 'main-palette' : _c, _d = _a.prefix, prefix = _d === void 0 ? '--rcx-color' : _d, selector = _a.selector;
|
|
12925
|
-
var
|
|
12926
|
-
return
|
|
12923
|
+
var _b = _a.theme, theme = _b === void 0 ? 'light' : _b, _c = _a.tagId, tagId = _c === void 0 ? 'main-palette' : _c, _d = _a.prefix, prefix = _d === void 0 ? '--rcx-color' : _d, selector = _a.selector, palette = _a.palette;
|
|
12924
|
+
var themePalette = palette || (0, convertToCss_1.convertToCss)(themes[theme], prefix, selector);
|
|
12925
|
+
return react_1.default.createElement(react_1.default.Fragment, null, (0, react_dom_1.createPortal)(themePalette, (0, useCreateStyleContainer_1.useCreateStyleContainer)(tagId)));
|
|
12927
12926
|
});
|
|
12928
12927
|
exports["default"] = exports.PaletteStyleTag;
|
|
12929
12928
|
|
|
@@ -13403,20 +13402,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
13403
13402
|
__exportStar(__webpack_require__(/*! ./PaletteStyleTag */ "./src/components/PaletteStyleTag/PaletteStyleTag.tsx"), exports);
|
|
13404
13403
|
|
|
13405
13404
|
|
|
13406
|
-
/***/ }),
|
|
13407
|
-
|
|
13408
|
-
/***/ "./src/components/PaletteStyleTag/lib/codeBlockStyles.ts":
|
|
13409
|
-
/*!***************************************************************!*\
|
|
13410
|
-
!*** ./src/components/PaletteStyleTag/lib/codeBlockStyles.ts ***!
|
|
13411
|
-
\***************************************************************/
|
|
13412
|
-
/***/ (function(__unused_webpack_module, exports) {
|
|
13413
|
-
|
|
13414
|
-
|
|
13415
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
13416
|
-
exports.codeBlock = void 0;
|
|
13417
|
-
exports.codeBlock = "pre code.hljs {\n\tdisplay: block;\n\toverflow-x: auto;\n\tpadding: 1em;\n}\ncode.hljs {\n\tpadding: 3px 5px;\n}\n.hljs {\n\tbackground: #1d1f21;\n\tcolor: #c5c8c6;\n}\n.hljs span::selection,\n.hljs::selection {\n\tbackground: #373b41;\n}\n.hljs span::-moz-selection,\n.hljs::-moz-selection {\n\tbackground: #373b41;\n}\n.hljs-name,\n.hljs-title {\n\tcolor: #f0c674;\n}\n.hljs-comment,\n.hljs-meta,\n.hljs-meta .hljs-keyword {\n\tcolor: #707880;\n}\n.hljs-deletion,\n.hljs-link,\n.hljs-literal,\n.hljs-number,\n.hljs-symbol {\n\tcolor: #c66;\n}\n.hljs-addition,\n.hljs-doctag,\n.hljs-regexp,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-string {\n\tcolor: #b5bd68;\n}\n.hljs-attribute,\n.hljs-code,\n.hljs-selector-id {\n\tcolor: #b294bb;\n}\n.hljs-bullet,\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-tag {\n\tcolor: #81a2be;\n}\n.hljs-subst,\n.hljs-template-tag,\n.hljs-template-variable,\n.hljs-variable {\n\tcolor: #8abeb7;\n}\n.hljs-built_in,\n.hljs-quote,\n.hljs-section,\n.hljs-selector-class,\n.hljs-type {\n\tcolor: #de935f;\n}\n.hljs-emphasis {\n\tfont-style: italic;\n}\n.hljs-strong {\n\tfont-weight: 700;\n}";
|
|
13418
|
-
|
|
13419
|
-
|
|
13420
13405
|
/***/ }),
|
|
13421
13406
|
|
|
13422
13407
|
/***/ "./src/components/PaletteStyleTag/lib/themePalettes.ts":
|