@rocket.chat/fuselage 0.59.4 → 0.60.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/README.md +1 -1
- package/dist/components/Accordion/Accordion.d.ts +6 -21
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/AccordionItem.d.ts +4 -6
- package/dist/components/Accordion/AccordionItem.d.ts.map +1 -1
- package/dist/components/Accordion/index.d.ts +2 -2
- package/dist/components/Accordion/index.d.ts.map +1 -1
- package/dist/components/Banner/Banner.stories.d.ts.map +1 -1
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/BoxTransforms.d.ts.map +1 -1
- package/dist/components/Box/StylingBox.d.ts +21 -0
- package/dist/components/Box/StylingBox.d.ts.map +1 -0
- package/dist/components/Box/index.d.ts +1 -0
- package/dist/components/Box/index.d.ts.map +1 -1
- package/dist/components/Box/stylingProps.d.ts.map +1 -1
- package/dist/components/Box/useStylingProps.d.ts.map +1 -1
- package/dist/components/Button/ActionButton.d.ts.map +1 -1
- package/dist/components/Chip/index.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarEmptyContent.d.ts.map +1 -1
- package/dist/components/Contextualbar/ContextualbarSkeleton.d.ts.map +1 -1
- package/dist/components/ContextualbarV2/ContextualbarEmptyContent.d.ts.map +1 -1
- package/dist/components/ContextualbarV2/ContextualbarSkeleton.d.ts.map +1 -1
- package/dist/components/Field/FieldDescription.d.ts.map +1 -1
- package/dist/components/Field/FieldError.d.ts.map +1 -1
- package/dist/components/Field/FieldHint.d.ts.map +1 -1
- package/dist/components/Field/FieldLabel.d.ts.map +1 -1
- package/dist/components/Field/FieldLabelInfo.d.ts.map +1 -1
- package/dist/components/Field/FieldLink.d.ts.map +1 -1
- package/dist/components/Field/FieldRow.d.ts.map +1 -1
- package/dist/components/Grid/Grid.d.ts.map +1 -1
- package/dist/components/InputBox/InputBox.d.ts.map +1 -1
- package/dist/components/Menu/V2/Menu.d.ts.map +1 -1
- package/dist/components/Menu/V2/MenuPopover.d.ts.map +1 -1
- package/dist/components/Menu/V2/MenuSection.d.ts.map +1 -1
- package/dist/components/Message/MessageMetrics/MessageMetricsReply.d.ts.map +1 -1
- package/dist/components/Message/MessageToolbar/index.d.ts.map +1 -1
- package/dist/components/Message/ThreadMessage/index.d.ts.map +1 -1
- package/dist/components/Message/helpers.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelectFiltered.d.ts.map +1 -1
- package/dist/components/Option/CheckOption.d.ts.map +1 -1
- package/dist/components/Option/Option.d.ts.map +1 -1
- package/dist/components/Option/OptionIcon.d.ts.map +1 -1
- package/dist/components/Option/OptionSkeleton.d.ts.map +1 -1
- package/dist/components/Options/Options.d.ts.map +1 -1
- package/dist/components/Options/index.d.ts.map +1 -1
- package/dist/components/Options/useCursor.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedMultiSelectFiltered.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedSelect.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedSelectFiltered.d.ts.map +1 -1
- package/dist/components/Select/SelectAria.d.ts.map +1 -1
- package/dist/components/Select/SelectFiltered.d.ts +1 -1
- package/dist/components/Select/SelectFiltered.d.ts.map +1 -1
- package/dist/components/Select/SelectLegacy.d.ts.map +1 -1
- package/dist/components/Sidebar/Item.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarSection.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/TopBarToolBox.d.ts.map +1 -1
- package/dist/components/Sidebar/TopBar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/SidebarV2/SidebarAccordionItem.d.ts.map +1 -1
- package/dist/components/SidebarV2/helpers.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +4 -4
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Table/TableBody.d.ts.map +1 -1
- package/dist/components/Table/TableCell.d.ts.map +1 -1
- package/dist/components/Table/TableFoot.d.ts.map +1 -1
- package/dist/components/Table/TableHead.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/fuselage.css +2 -2
- package/dist/fuselage.css.map +1 -1
- package/dist/fuselage.development.js +322 -154
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +1 -1
- package/dist/helpers/composeClassNames.d.ts +39 -0
- package/dist/helpers/composeClassNames.d.ts.map +1 -1
- package/dist/helpers/exhaustiveCheck.d.ts +29 -0
- package/dist/helpers/exhaustiveCheck.d.ts.map +1 -0
- package/dist/hooks/useArrayLikeClassNameProp.d.ts.map +1 -1
- package/dist/hooks/useBoxOnlyProps.d.ts.map +1 -1
- package/index.js +1 -0
- package/package.json +27 -28
|
@@ -1,2 +1,41 @@
|
|
|
1
|
+
import { Falsy } from '../types/Falsy';
|
|
1
2
|
export declare const composeClassNames: (prefix?: string) => (...args: unknown[]) => string;
|
|
3
|
+
type CxArg = Falsy | string | {
|
|
4
|
+
[className: string]: boolean | string | number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Composes class names into a single string based on flags.
|
|
8
|
+
*
|
|
9
|
+
* Any falsy value passed as an argument will be ignored.
|
|
10
|
+
*
|
|
11
|
+
* If a string is passed, it will be used as a class name.
|
|
12
|
+
*
|
|
13
|
+
* If a dictionary object is passed, its keys will be used as class names and its values will be used as modifiers --
|
|
14
|
+
* unless the value is a boolean, in which case the key will be used as a class name if the value is `true`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* cx('a', false, 'b', null, { c: true, d: false, e: 'f', f: 1 }); // 'a b c e-f f-1'
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param args a sequence of falsy values, strings and dictionary objects containing the class names
|
|
22
|
+
* @returns a space-separated string of class names
|
|
23
|
+
*/
|
|
24
|
+
export declare const cx: (...args: CxArg[]) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Composes class name modifiers under a class name into a single class names' string based on flags.
|
|
27
|
+
*
|
|
28
|
+
* This function returns a function similar to `cx`, with the difference it handles the arguments as class name
|
|
29
|
+
* modifiers (based on BEM CSS conventions). However, it's recommended to use `cxx` as a curried function.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* cxx('z')('a', false, 'b', null, { c: true, d: false, e: 'f', f: 1 }); // 'z z--a z--b z--c z--e-f z--f-1'
|
|
34
|
+
* ```
|
|
35
|
+
* @param className the class name
|
|
36
|
+
* @param args a sequence of falsy values, strings and dictionary objects containing the modifiers
|
|
37
|
+
* @returns a space-separated string of class names
|
|
38
|
+
*/
|
|
39
|
+
export declare const cxx: (className: string) => (...args: CxArg[]) => string;
|
|
40
|
+
export {};
|
|
2
41
|
//# sourceMappingURL=composeClassNames.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composeClassNames.d.ts","sourceRoot":"","sources":["../../src/helpers/composeClassNames.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"composeClassNames.d.ts","sourceRoot":"","sources":["../../src/helpers/composeClassNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAOvC,eAAO,MAAM,iBAAiB,YAClB,MAAM,eACN,OAAO,EAAE,WAyClB,CAAC;AAEJ,KAAK,KAAK,GACN,KAAK,GACL,MAAM,GACN;IAAE,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEvD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,EAAE,YAAa,KAAK,EAAE,KAAG,MAuBxB,CAAC;AAEf;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,GAAG,cACF,MAAM,eACR,KAAK,EAAE,KAAG,MA0BnB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility function to check exhaustiveness of a switch statement or if-else statements.
|
|
3
|
+
*
|
|
4
|
+
* In TypeScript, variables going through a sequence of conditionals, like cases in switch statements or if-else
|
|
5
|
+
* statements, the variable type is incrementally narrowed as the conditionals are evaluated until it reaches the
|
|
6
|
+
* `never` type, meaning all possible cases have been covered. This function is used to check, at compilation time, that
|
|
7
|
+
* all possible cases have been covered (i.e. if the conditional checks were exhaustive) and should only be called in
|
|
8
|
+
* unreachable blocks of code.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* declare const value: 'foo' | 'bar';
|
|
13
|
+
* switch (value) {
|
|
14
|
+
* case 'foo':
|
|
15
|
+
* // ...
|
|
16
|
+
* break;
|
|
17
|
+
* case 'bar':
|
|
18
|
+
* // ...
|
|
19
|
+
* break;
|
|
20
|
+
* default: // should be unreachable
|
|
21
|
+
* exhaustiveCheck(value); // `value` type should be `never`, otherwise the compilation fails
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param _ the value which type should be `never`
|
|
26
|
+
* @throws {Error} will always throw an error if it's reached
|
|
27
|
+
*/
|
|
28
|
+
export declare const exhaustiveCheck: (_: never) => never;
|
|
29
|
+
//# sourceMappingURL=exhaustiveCheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exhaustiveCheck.d.ts","sourceRoot":"","sources":["../../src/helpers/exhaustiveCheck.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,eAAe,MAAO,KAAK,KAAG,KAE1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useArrayLikeClassNameProp.d.ts","sourceRoot":"","sources":["../../src/hooks/useArrayLikeClassNameProp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAIpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useArrayLikeClassNameProp.d.ts","sourceRoot":"","sources":["../../src/hooks/useArrayLikeClassNameProp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAIpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI5C,eAAO,MAAM,yBAAyB,GACpC,CAAC,SAAS;IACR,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,CAAC,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC;CACzD,SAEM,CAAC,KACP,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAyBzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBoxOnlyProps.d.ts","sourceRoot":"","sources":["../../src/hooks/useBoxOnlyProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,eAAO,MAAM,eAAe,GAC1B,CAAC,SAAS;
|
|
1
|
+
{"version":3,"file":"useBoxOnlyProps.d.ts","sourceRoot":"","sources":["../../src/hooks/useBoxOnlyProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,eAAO,MAAM,eAAe,GAC1B,CAAC,SAAS;IACR,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;CAC/C,SAEM,CAAC,GAAG;IACT,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,GAAG,qBAAqB,CAAC;IAClD,SAAS,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC5B,QAAQ,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;IAClD,IAAI,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;CAC/C,KACA,CAkDF,CAAC"}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocket.chat/fuselage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"description": "Rocket.Chat's React Components Library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rocket.Chat",
|
|
@@ -64,33 +64,33 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@babel/core": "~7.21.4",
|
|
67
|
-
"@babel/eslint-parser": "~7.21.3",
|
|
68
67
|
"@babel/plugin-transform-runtime": "~7.21.4",
|
|
69
68
|
"@babel/preset-env": "~7.21.4",
|
|
70
69
|
"@babel/preset-react": "~7.18.6",
|
|
71
|
-
"@rocket.chat/
|
|
72
|
-
"@rocket.chat/fuselage-hooks": "^0.33.1",
|
|
70
|
+
"@rocket.chat/fuselage-hooks": "^0.34.0",
|
|
73
71
|
"@rocket.chat/fuselage-polyfills": "^0.31.25",
|
|
74
72
|
"@rocket.chat/icons": "^0.39.0",
|
|
75
|
-
"@
|
|
76
|
-
"@storybook/addon-
|
|
77
|
-
"@storybook/addon-
|
|
78
|
-
"@storybook/addon-
|
|
79
|
-
"@storybook/addon-
|
|
80
|
-
"@storybook/addon-
|
|
81
|
-
"@storybook/addon-styling-webpack": "~1.0.0",
|
|
73
|
+
"@storybook/addon-a11y": "~8.4.1",
|
|
74
|
+
"@storybook/addon-essentials": "~8.4.1",
|
|
75
|
+
"@storybook/addon-interactions": "~8.4.1",
|
|
76
|
+
"@storybook/addon-links": "~8.4.1",
|
|
77
|
+
"@storybook/addon-mdx-gfm": "~8.4.1",
|
|
78
|
+
"@storybook/addon-styling-webpack": "~1.0.1",
|
|
82
79
|
"@storybook/addon-webpack5-compiler-swc": "~1.0.5",
|
|
83
|
-
"@storybook/blocks": "~8.
|
|
84
|
-
"@storybook/
|
|
85
|
-
"@storybook/react
|
|
86
|
-
"@storybook/
|
|
87
|
-
"@storybook/
|
|
80
|
+
"@storybook/blocks": "~8.4.1",
|
|
81
|
+
"@storybook/preview-api": "~8.4.1",
|
|
82
|
+
"@storybook/react": "~8.4.1",
|
|
83
|
+
"@storybook/react-webpack5": "~8.4.1",
|
|
84
|
+
"@storybook/test": "~8.4.1",
|
|
85
|
+
"@storybook/theming": "~8.4.1",
|
|
88
86
|
"@testing-library/jest-dom": "~6.4.8",
|
|
89
87
|
"@testing-library/react": "~16.0.0",
|
|
90
88
|
"@testing-library/user-event": "~14.5.2",
|
|
91
89
|
"@types/invariant": "^2.2.37",
|
|
92
90
|
"@types/jest": "~29.5.12",
|
|
93
91
|
"@types/jest-axe": "~3.5.9",
|
|
92
|
+
"@types/react": "~17.0.80",
|
|
93
|
+
"@types/react-dom": "~17.0.25",
|
|
94
94
|
"autoprefixer": "~10.4.14",
|
|
95
95
|
"babel-loader": "~9.1.2",
|
|
96
96
|
"caniuse-lite": "~1.0.30001477",
|
|
@@ -98,11 +98,10 @@
|
|
|
98
98
|
"css-loader": "~6.7.3",
|
|
99
99
|
"cssnano": "~5.0.17",
|
|
100
100
|
"es-check": "~7.1.1",
|
|
101
|
-
"eslint": "~
|
|
102
|
-
"eslint-mdx": "~2.0.5",
|
|
103
|
-
"eslint-plugin-mdx": "~2.0.5",
|
|
101
|
+
"eslint": "~9.14.0",
|
|
104
102
|
"jest": "~29.7.0",
|
|
105
103
|
"jest-axe": "~8.0.0",
|
|
104
|
+
"jest-environment-jsdom": "~29.7.0",
|
|
106
105
|
"lint-all": "^0.31.25",
|
|
107
106
|
"mini-css-extract-plugin": "~2.7.6",
|
|
108
107
|
"normalize.css": "^8.0.1",
|
|
@@ -115,7 +114,7 @@
|
|
|
115
114
|
"postcss-logical": "~5.0.4",
|
|
116
115
|
"postcss-scss": "~4.0.6",
|
|
117
116
|
"postcss-svg": "~3.0.0",
|
|
118
|
-
"prettier": "~
|
|
117
|
+
"prettier": "~3.3.3",
|
|
119
118
|
"react": "^17.0.2",
|
|
120
119
|
"react-dom": "^17.0.2",
|
|
121
120
|
"react-virtuoso": "~3.1.5",
|
|
@@ -123,20 +122,20 @@
|
|
|
123
122
|
"rimraf": "^3.0.2",
|
|
124
123
|
"sass": "~1.62.0",
|
|
125
124
|
"sass-loader": "~13.2.2",
|
|
126
|
-
"storybook": "~8.
|
|
125
|
+
"storybook": "~8.4.1",
|
|
127
126
|
"storybook-dark-mode": "~4.0.2",
|
|
128
127
|
"style-loader": "~3.3.2",
|
|
129
|
-
"stylelint": "~
|
|
130
|
-
"stylelint-order": "~6.0.
|
|
131
|
-
"stylelint-prettier": "~
|
|
132
|
-
"stylelint-scss": "~
|
|
128
|
+
"stylelint": "~16.10.0",
|
|
129
|
+
"stylelint-order": "~6.0.4",
|
|
130
|
+
"stylelint-prettier": "~5.0.2",
|
|
131
|
+
"stylelint-scss": "~6.8.1",
|
|
133
132
|
"testing-utils": "^0.31.25",
|
|
134
133
|
"ts-jest": "~29.2.4",
|
|
135
134
|
"ts-loader": "~9.4.2",
|
|
136
135
|
"typescript": "~5.6.3",
|
|
137
|
-
"webpack": "~5.
|
|
138
|
-
"webpack-bundle-analyzer": "~4.
|
|
139
|
-
"webpack-cli": "~5.
|
|
136
|
+
"webpack": "~5.96.1",
|
|
137
|
+
"webpack-bundle-analyzer": "~4.10.2",
|
|
138
|
+
"webpack-cli": "~5.1.4",
|
|
140
139
|
"wrapper-webpack-plugin": "~2.2.2"
|
|
141
140
|
},
|
|
142
141
|
"volta": {
|