@rocket.chat/fuselage 0.6.3-dev.36 → 0.6.3-dev.360

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.
Files changed (166) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +111 -20
  3. package/dist/components/Accordion/index.d.ts +13 -0
  4. package/dist/components/AutoComplete/index.d.ts +18 -0
  5. package/dist/components/Avatar/index.d.ts +28 -0
  6. package/dist/components/Badge/index.d.ts +11 -0
  7. package/dist/components/Banner/Banner.d.ts +15 -0
  8. package/dist/components/Banner/index.d.ts +2 -0
  9. package/dist/components/Banner/index.d.ts.map +1 -0
  10. package/dist/components/Box/AnimatedVisibility/AnimatedVisibility.d.ts +16 -0
  11. package/dist/components/Box/AnimatedVisibility/index.d.ts +2 -0
  12. package/dist/components/Box/AnimatedVisibility/index.d.ts.map +1 -0
  13. package/dist/components/Box/BoxTransforms.d.ts +5 -0
  14. package/dist/components/Box/BoxTransforms.d.ts.map +1 -0
  15. package/dist/components/Box/Flex/index.d.ts +32 -0
  16. package/dist/components/Box/Position/Position.d.ts +14 -0
  17. package/dist/components/Box/Position/PositionAnimated.d.ts +11 -0
  18. package/dist/components/Box/Position/index.d.ts +3 -0
  19. package/dist/components/Box/Position/index.d.ts.map +1 -0
  20. package/dist/components/Box/Scrollable/index.d.ts +9 -0
  21. package/dist/components/Box/index.d.ts +167 -0
  22. package/dist/components/Button/index.d.ts +26 -0
  23. package/dist/components/ButtonGroup/index.d.ts +13 -0
  24. package/dist/components/Callout/index.d.ts +8 -0
  25. package/dist/components/CheckBox/index.d.ts +8 -0
  26. package/dist/components/Chevron/index.d.ts +12 -0
  27. package/dist/components/Chip/index.d.ts +8 -0
  28. package/dist/components/Divider/index.d.ts +6 -0
  29. package/dist/components/Divider/index.d.ts.map +1 -0
  30. package/dist/components/EmailInput/index.d.ts +9 -0
  31. package/dist/components/Field/index.d.ts +18 -0
  32. package/dist/components/FieldGroup/index.d.ts +6 -0
  33. package/dist/components/Grid/index.d.ts +23 -0
  34. package/dist/components/Icon/index.d.ts +8 -0
  35. package/dist/components/InputBox/index.d.ts +40 -0
  36. package/dist/components/Label/index.d.ts +9 -0
  37. package/dist/components/Margins/index.d.ts +20 -0
  38. package/dist/components/Menu/index.d.ts +20 -0
  39. package/dist/components/Message/Message.d.ts +1006 -0
  40. package/dist/components/Message/Message.d.ts.map +1 -0
  41. package/dist/components/Message/MessageDivider/index.d.ts +6 -0
  42. package/dist/components/Message/MessageDivider/index.d.ts.map +1 -0
  43. package/dist/components/Message/MessageMetrics/index.d.ts +26 -0
  44. package/dist/components/Message/MessageMetrics/index.d.ts.map +1 -0
  45. package/dist/components/Message/MessagePreview/MessagePreviewContent.d.ts +7 -0
  46. package/dist/components/Message/MessagePreview/MessagePreviewContent.d.ts.map +1 -0
  47. package/dist/components/Message/MessagePreview/MessagePreviewDescription.d.ts +5 -0
  48. package/dist/components/Message/MessagePreview/MessagePreviewDescription.d.ts.map +1 -0
  49. package/dist/components/Message/MessagePreview/MessagePreviewFooter.d.ts +5 -0
  50. package/dist/components/Message/MessagePreview/MessagePreviewFooter.d.ts.map +1 -0
  51. package/dist/components/Message/MessagePreview/MessagePreviewImage.d.ts +7 -0
  52. package/dist/components/Message/MessagePreview/MessagePreviewImage.d.ts.map +1 -0
  53. package/dist/components/Message/MessagePreview/MessagePreviewLink.d.ts +8 -0
  54. package/dist/components/Message/MessagePreview/MessagePreviewLink.d.ts.map +1 -0
  55. package/dist/components/Message/MessagePreview/MessagePreviewThumb.d.ts +3 -0
  56. package/dist/components/Message/MessagePreview/MessagePreviewThumb.d.ts.map +1 -0
  57. package/dist/components/Message/MessagePreview/MessagePreviewTitle.d.ts +3 -0
  58. package/dist/components/Message/MessagePreview/MessagePreviewTitle.d.ts.map +1 -0
  59. package/dist/components/Message/MessagePreview/MessatePreviewGenericFile.d.ts +5 -0
  60. package/dist/components/Message/MessagePreview/MessatePreviewGenericFile.d.ts.map +1 -0
  61. package/dist/components/Message/MessagePreview/index.d.ts +4 -0
  62. package/dist/components/Message/MessagePreview/index.d.ts.map +1 -0
  63. package/dist/components/Message/MessageReactions/index.d.ts +14 -0
  64. package/dist/components/Message/MessageReactions/index.d.ts.map +1 -0
  65. package/dist/components/Message/MessageToolbox/index.d.ts +11 -0
  66. package/dist/components/Message/MessageToolbox/index.d.ts.map +1 -0
  67. package/dist/components/Message/ThreadMessage/index.d.ts +13 -0
  68. package/dist/components/Message/ThreadMessage/index.d.ts.map +1 -0
  69. package/dist/components/Message/index.d.ts +8 -0
  70. package/dist/components/Message/index.d.ts.map +1 -0
  71. package/dist/components/Modal/index.d.ts +23 -0
  72. package/dist/components/MultiSelect/index.d.ts +15 -0
  73. package/dist/components/NumberInput/index.d.ts +6 -0
  74. package/dist/components/Options/Option/Option.d.ts +18 -0
  75. package/dist/components/Options/Option/Option.d.ts.map +1 -0
  76. package/dist/components/Options/Option/OptionAvatar.d.ts +4 -0
  77. package/dist/components/Options/Option/OptionAvatar.d.ts.map +1 -0
  78. package/dist/components/Options/Option/OptionColumn.d.ts +4 -0
  79. package/dist/components/Options/Option/OptionColumn.d.ts.map +1 -0
  80. package/dist/components/Options/Option/OptionContent.d.ts +4 -0
  81. package/dist/components/Options/Option/OptionContent.d.ts.map +1 -0
  82. package/dist/components/Options/Option/OptionDescription.d.ts +4 -0
  83. package/dist/components/Options/Option/OptionDescription.d.ts.map +1 -0
  84. package/dist/components/Options/Option/OptionIcon.d.ts +7 -0
  85. package/dist/components/Options/Option/OptionIcon.d.ts.map +1 -0
  86. package/dist/components/Options/Option/OptionMenu.d.ts +4 -0
  87. package/dist/components/Options/Option/OptionMenu.d.ts.map +1 -0
  88. package/dist/components/Options/Option/OptionSkeleton.d.ts +3 -0
  89. package/dist/components/Options/Option/OptionSkeleton.d.ts.map +1 -0
  90. package/dist/components/Options/Option/index.d.ts +284 -0
  91. package/dist/components/Options/Option/index.d.ts.map +1 -0
  92. package/dist/components/Options/index.d.ts +18 -0
  93. package/dist/components/Options/useCursor.d.ts +10 -0
  94. package/dist/components/Options/useCursor.d.ts.map +1 -0
  95. package/dist/components/Options/useVisible.d.ts +3 -0
  96. package/dist/components/Options/useVisible.d.ts.map +1 -0
  97. package/dist/components/Pagination/index.d.ts +24 -0
  98. package/dist/components/PasswordInput/PasswordInput.d.ts +6 -0
  99. package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -0
  100. package/dist/components/PasswordInput/index.d.ts +2 -0
  101. package/dist/components/PasswordInput/index.d.ts.map +1 -0
  102. package/dist/components/ProgressBar/index.d.ts +129 -0
  103. package/dist/components/ProgressBar/index.d.ts.map +1 -0
  104. package/dist/components/RadioButton/index.d.ts +6 -0
  105. package/dist/components/SearchInput/index.d.ts +9 -0
  106. package/dist/components/Select/index.d.ts +15 -0
  107. package/dist/components/SelectPaginated/hugeList.d.ts +5 -0
  108. package/dist/components/SelectPaginated/hugeList.d.ts.map +1 -0
  109. package/dist/components/Sidebar/index.d.ts +40 -0
  110. package/dist/components/Skeleton/index.d.ts +8 -0
  111. package/dist/components/States/States.d.ts +18 -0
  112. package/dist/components/States/States.d.ts.map +1 -0
  113. package/dist/components/States/index.d.ts +2 -0
  114. package/dist/components/States/index.d.ts.map +1 -0
  115. package/dist/components/StatusBullet/index.d.ts +7 -0
  116. package/dist/components/Table/index.d.ts +26 -0
  117. package/dist/components/Tabs/index.d.ts +15 -0
  118. package/dist/components/Tag/index.d.ts +9 -0
  119. package/dist/components/TextAreaInput/index.d.ts +9 -0
  120. package/dist/components/TextInput/index.d.ts +9 -0
  121. package/dist/components/Throbber/index.d.ts +11 -0
  122. package/dist/components/Tile/Tile.d.ts +8 -0
  123. package/dist/components/Tile/Tile.d.ts.map +1 -0
  124. package/dist/components/Tile/index.d.ts +2 -0
  125. package/dist/components/Tile/index.d.ts.map +1 -0
  126. package/dist/components/ToggleSwitch/index.d.ts +6 -0
  127. package/dist/components/Tooltip/Tooltip.d.ts +126 -0
  128. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
  129. package/dist/components/Tooltip/index.d.ts +2 -0
  130. package/dist/components/Tooltip/index.d.ts.map +1 -0
  131. package/dist/components/UrlInput/UrlInput.d.ts +6 -0
  132. package/dist/components/UrlInput/UrlInput.d.ts.map +1 -0
  133. package/dist/components/UrlInput/index.d.ts +2 -0
  134. package/dist/components/UrlInput/index.d.ts.map +1 -0
  135. package/dist/components/index.d.ts +52 -0
  136. package/dist/components/index.d.ts.map +1 -0
  137. package/dist/fuselage.development.js +12936 -8635
  138. package/dist/fuselage.development.js.map +1 -1
  139. package/dist/fuselage.production.js +2 -1
  140. package/dist/fuselage.production.js.LICENSE.txt +8 -0
  141. package/dist/helpers/appendClassName.d.ts +2 -0
  142. package/dist/helpers/appendClassName.d.ts.map +1 -0
  143. package/dist/helpers/composeClassNames.d.ts +2 -0
  144. package/dist/helpers/composeClassNames.d.ts.map +1 -0
  145. package/dist/helpers/createPropType.d.ts +3 -0
  146. package/dist/helpers/createPropType.d.ts.map +1 -0
  147. package/dist/helpers/flattenChildren.d.ts +2 -0
  148. package/dist/helpers/flattenChildren.d.ts.map +1 -0
  149. package/dist/helpers/fromCamelToKebab.d.ts +2 -0
  150. package/dist/helpers/fromCamelToKebab.d.ts.map +1 -0
  151. package/dist/helpers/patchChildren.d.ts +3 -0
  152. package/dist/helpers/patchChildren.d.ts.map +1 -0
  153. package/dist/helpers/prependClassName.d.ts +5 -0
  154. package/dist/helpers/prependClassName.d.ts.map +1 -0
  155. package/dist/helpers/shallowEqual.d.ts +2 -0
  156. package/dist/helpers/shallowEqual.d.ts.map +1 -0
  157. package/dist/hooks/useStyle.d.ts +3 -0
  158. package/dist/hooks/useStyle.d.ts.map +1 -0
  159. package/dist/hooks/useStyleSheet.d.ts +5 -0
  160. package/dist/hooks/useStyleSheet.d.ts.map +1 -0
  161. package/dist/index.d.ts +3 -0
  162. package/dist/index.d.ts.map +1 -0
  163. package/dist/styleTokens.d.ts +15 -0
  164. package/dist/styleTokens.d.ts.map +1 -0
  165. package/package.json +106 -82
  166. package/CHANGELOG.md +0 -531
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Rocket.Chat
3
+ Copyright (c) 2021 Rocket.Chat
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,35 +1,126 @@
1
- <h1>@rocket.chat/fuselage</h1>
2
- <p>
3
- <img alt="Version" src="https://img.shields.io/npm/v/@rocket.chat/fuselage.svg">
4
- <a href="https://github.com/RocketChat/Rocket.Chat.Fuselage#readme" target="_blank"><img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" /></a>
5
- <a href="https://github.com/RocketChat/Rocket.Chat.Fuselage/graphs/commit-activity" target="_blank"><img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" /></a>
6
- <a href="https://rocketchat.github.io/Rocket.Chat.Fuselage" target="_blank"><img alt="Storybook" src="https://cdn.jsdelivr.net/gh/storybooks/brand@master/badge/badge-storybook.svg" /></a>
7
- <a href="https://circleci.com/gh/RocketChat/Rocket.Chat.Fuselage" target="_blank"><img alt="Build Status on CircleCI" src="https://circleci.com/gh/RocketChat/Rocket.Chat.Fuselage/tree/master.svg?style=svg&circle-token=4bf3c8af9bf96e1338430d1ba3ce0084a45d1647" /></a>
8
- <a href="https://twitter.com/RocketChat" target="_blank"><img alt="Twitter: RocketChat" src="https://img.shields.io/twitter/follow/RocketChat.svg?style=social" /></a>
1
+ <!--header-->
2
+
3
+ <p align="center">
4
+ <a href="https://rocket.chat" title="Rocket.Chat">
5
+ <img src="https://github.com/RocketChat/Rocket.Chat.Artwork/raw/master/Logos/2020/png/logo-horizontal-red.png" alt="Rocket.Chat" />
6
+ </a>
9
7
  </p>
10
8
 
11
- ### 🏠 [Homepage](https://rocket.chat/Rocket.Chat.Fuselage)
9
+ # `@rocket.chat/fuselage`
10
+
11
+ ---
12
+
13
+ [![npm@latest](https://img.shields.io/npm/v/@rocket.chat/fuselage/latest?style=flat-square)](https://www.npmjs.com/package/@rocket.chat/icons/v/latest) [![npm@next](https://img.shields.io/npm/v/@rocket.chat/fuselage/next?style=flat-square)](https://www.npmjs.com/package/@rocket.chat/icons/v/next) ![react version](https://img.shields.io/npm/dependency-version/@rocket.chat/fuselage/peer/react?style=flat-square) [![Storybook](https://cdn.jsdelivr.net/gh/storybookjs/brand@master/badge/badge-storybook.svg)](https://rocketchat.github.io/Rocket.Chat.Fuselage/fuselage) ![npm downloads](https://img.shields.io/npm/dw/@rocket.chat/fuselage?style=flat-square) ![License: MIT](https://img.shields.io/npm/l/@rocket.chat/fuselage?style=flat-square)
14
+
15
+ ![deps](https://img.shields.io/david/RocketChat/Rocket.Chat.Fuselage?path=packages%2Ffuselage&style=flat-square) ![peer deps](https://img.shields.io/david/peer/RocketChat/Rocket.Chat.Fuselage?path=packages%2Ffuselage&style=flat-square) ![dev deps](https://img.shields.io/david/dev/RocketChat/Rocket.Chat.Fuselage?path=packages%2Ffuselage&style=flat-square) ![npm bundle size](https://img.shields.io/bundlephobia/min/@rocket.chat/fuselage?style=flat-square)
16
+
17
+ <!--/header-->
12
18
 
13
19
  ## Install
14
20
 
21
+ <!--install-->
22
+
23
+ Firstly, install the peer dependencies (prerequisites):
24
+
15
25
  ```sh
16
- npm install --save @rocket.chat/fuselage
26
+ npm i @rocket.chat/fuselage-hooks @rocket.chat/fuselage-polyfills @rocket.chat/icons react react-dom react-virtuoso
27
+
28
+ # or, if you are using yarn:
29
+
30
+ yarn add @rocket.chat/fuselage-hooks @rocket.chat/fuselage-polyfills @rocket.chat/icons react react-dom react-virtuoso
17
31
  ```
18
32
 
19
- ## Author
33
+ Add `@rocket.chat/fuselage` as a dependency:
34
+
35
+ ```sh
36
+ npm i @rocket.chat/fuselage
37
+
38
+ # or, if you are using yarn:
39
+
40
+ yarn add @rocket.chat/fuselage
41
+ ```
20
42
 
21
- 👤 **Rocket.Chat**
43
+ <!--/install-->
22
44
 
23
- * Twitter: [@RocketChat](https://twitter.com/RocketChat)
24
- * Github: [@RocketChat](https://github.com/RocketChat)
45
+ ## Contributing
25
46
 
26
- ## 🤝 Contributing
47
+ <!--contributing(msg)-->
27
48
 
28
- Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues).
49
+ Contributions, issues, and feature requests are welcome!<br />
50
+ Feel free to check the [issues](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues).
29
51
 
30
- ## Show your support
52
+ <!--/contributing(msg)-->
53
+
54
+ ### Building
55
+
56
+ As this package dependends on others in this monorepo, before anything run the following at the root directory:
57
+
58
+ <!--yarn(build)-->
59
+
60
+ ```sh
61
+ yarn build
62
+ ```
63
+
64
+ <!--/yarn(build)-->
65
+
66
+ ### Linting
67
+
68
+ To ensure the source is matching our coding style, we perform [linting](<https://en.wikipedia.org/wiki/Lint_(software)>).
69
+ Before commiting, check if your code fits our style by running:
70
+
71
+ <!--yarn(lint)-->
72
+
73
+ ```sh
74
+ yarn lint
75
+ ```
31
76
 
32
- Give a ⭐️ if this project helped you!
77
+ <!--/yarn(lint)-->
78
+
79
+ Some linter warnings and errors can be automatically fixed:
80
+
81
+ <!--yarn(lint-and-fix)-->
82
+
83
+ ```sh
84
+ yarn lint-and-fix
85
+ ```
86
+
87
+ <!--/yarn(lint-and-fix)-->
88
+
89
+ ### Running tests
90
+
91
+ Whenever possible, add tests to describe exactly what your code do. You can run them by yourself:
92
+
93
+ <!--yarn(test)-->
94
+
95
+ ```sh
96
+ yarn test
97
+ ```
98
+
99
+ <!--/yarn(test)-->
100
+
101
+ ### Component stories
102
+
103
+ We develop and describe our visual components in the form of stories, manage by a tool called [Storybook](https://storybook.js.org/).
104
+ To start developing with Storybook, run:
105
+
106
+ <!--yarn(storybook)-->
107
+
108
+ ```sh
109
+ yarn storybook
110
+ ```
111
+
112
+ <!--/yarn(storybook)-->
113
+
114
+ ### Visually testing stories
115
+
116
+ We perform visual regression testing in our component stories using [Loki](https://loki.js.org/).
117
+ Everytime you add, modify, or remove components, you should update the set of reference images used to match
118
+ how the components render in a real browser by running the following:
119
+
120
+ <!--yarn(update-storybook)-->
121
+
122
+ ```sh
123
+ yarn update-storybook
124
+ ```
33
125
 
34
- ***
35
- _This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
126
+ <!--/yarn(update-storybook)-->
@@ -0,0 +1,13 @@
1
+ import { ComponentProps, ForwardRefExoticComponent } from 'react';
2
+
3
+ import { Box } from '../Box';
4
+
5
+ type AccordionProps = ComponentProps<typeof Box>;
6
+ type AccordionItemProps = Omit<ComponentProps<typeof Box>, 'title'> & {
7
+ defaultExpanded?: boolean;
8
+ title?: string;
9
+ };
10
+
11
+ export const Accordion: ForwardRefExoticComponent<AccordionProps> & {
12
+ Item: ForwardRefExoticComponent<AccordionItemProps>;
13
+ };
@@ -0,0 +1,18 @@
1
+ import { ElementType, FC } from 'react';
2
+
3
+ type AutoCompleteProps = {
4
+ value: unknown[];
5
+ filter: string;
6
+ setFilter?: (filter: string) => void;
7
+ options?: { label: string; value: unknown }[];
8
+ renderItem: ElementType;
9
+ renderSelected?: ElementType;
10
+ onChange: (value: unknown, action: 'remove' | undefined) => void;
11
+ getLabel?: (option: { label: string; value: unknown }) => string;
12
+ getValue?: (option: { label: string; value: unknown }) => unknown;
13
+ renderEmpty?: ElementType;
14
+ placeholder?: string;
15
+ error?: boolean;
16
+ disabled?: boolean;
17
+ };
18
+ export const AutoComplete: FC<AutoCompleteProps>;
@@ -0,0 +1,28 @@
1
+ import { ComponentProps, Context, ForwardRefExoticComponent } from 'react';
2
+
3
+ import { Box } from '../Box';
4
+
5
+ type AvatarProps = Omit<ComponentProps<typeof Box>, 'title' | 'size'> & {
6
+ title?: string;
7
+ size?:
8
+ | 'x16'
9
+ | 'x18'
10
+ | 'x20'
11
+ | 'x24'
12
+ | 'x28'
13
+ | 'x32'
14
+ | 'x36'
15
+ | 'x40'
16
+ | 'x48'
17
+ | 'x124'
18
+ | 'x200'
19
+ | 'x332';
20
+ rounded?: boolean;
21
+ objectFit?: boolean;
22
+ url: string;
23
+ };
24
+ export const Avatar: ForwardRefExoticComponent<AvatarProps> & {
25
+ Context: Context<{
26
+ baseUrl: string;
27
+ }>;
28
+ };
@@ -0,0 +1,11 @@
1
+ import { ElementType, ForwardRefExoticComponent } from 'react';
2
+
3
+ type BadgeProps = {
4
+ is?: ElementType;
5
+ variant?: 'primary' | 'danger' | 'warning';
6
+ disabled?: boolean;
7
+ className?: string;
8
+ children?: any;
9
+ title?: any;
10
+ };
11
+ export const Badge: ForwardRefExoticComponent<BadgeProps>;
@@ -0,0 +1,15 @@
1
+ import { AllHTMLAttributes, FC, ReactNode } from 'react';
2
+
3
+ type BannerProps = {
4
+ inline?: boolean;
5
+ actionable?: boolean;
6
+ closeable?: boolean;
7
+ icon?: ReactNode;
8
+ title?: string;
9
+ variant?: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
10
+ onAction?: () => void;
11
+ onClose?: () => void;
12
+ } & AllHTMLAttributes<HTMLElement>;
13
+ const Banner: FC<BannerProps>;
14
+
15
+ export = Banner;
@@ -0,0 +1,2 @@
1
+ export { default } from './Banner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+
3
+ type AnimatedVisibilityProps = {
4
+ children: ReactNode;
5
+ visibility?: 'hidden' | 'visible' | 'hiding' | 'unhiding';
6
+ };
7
+
8
+ const AnimatedVisibility: {
9
+ (props: AnimatedVisibilityProps): ReactElement;
10
+ HIDDEN: 'hidden';
11
+ VISIBLE: 'visible';
12
+ HIDING: 'hiding';
13
+ UNHIDING: 'unhiding';
14
+ };
15
+
16
+ export = AnimatedVisibility;
@@ -0,0 +1,2 @@
1
+ export { default } from './AnimatedVisibility';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Box/AnimatedVisibility/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const BoxTransforms: import("react").Context<((props: any) => any) | null>;
3
+ export declare const useBoxTransform: () => ((props: any) => any) | null;
4
+ export declare const useComposedBoxTransform: (fn: (props: any) => any) => (props: any) => any;
5
+ //# sourceMappingURL=BoxTransforms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoxTransforms.d.ts","sourceRoot":"","sources":["../../../src/components/Box/BoxTransforms.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,aAAa,mCAAiC,GAAG,KAAK,GAAG,SAAQ,CAAC;AAE/E,eAAO,MAAM,eAAe,iBAF+B,GAAG,KAAK,GAAG,QAER,CAAC;AAE/D,eAAO,MAAM,uBAAuB,eAAgB,GAAG,KAAK,GAAG,aAJJ,GAAG,KAAK,GAkBlE,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+
3
+ type FlexContainerProps = {
4
+ children?: ReactNode;
5
+ inline?: boolean;
6
+ direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
7
+ wrap?: 'no-wrap' | 'wrap' | 'wrap-reverse';
8
+ alignItems?: 'stretch' | 'start' | 'center' | 'end' | 'baseline';
9
+ alignContent?: 'start' | 'center' | 'end' | 'space-between' | 'space-around';
10
+ justifyContent?:
11
+ | 'start'
12
+ | 'center'
13
+ | 'end'
14
+ | 'space-between'
15
+ | 'space-around';
16
+ };
17
+
18
+ type FlexItemProps = {
19
+ children?: ReactNode;
20
+ order?: number;
21
+ grow?: number;
22
+ shrink?: number;
23
+ basis?: number | string | 'auto';
24
+ align?: 'auto' | 'start' | 'end' | 'center' | 'stretch';
25
+ };
26
+
27
+ const Flex: {
28
+ Container: (props: FlexContainerProps) => ReactElement;
29
+ Item: (props: FlexItemProps) => ReactElement;
30
+ };
31
+
32
+ export = Flex;
@@ -0,0 +1,14 @@
1
+ import { Placements, PositionOptions } from '@rocket.chat/fuselage-hooks';
2
+ import { ComponentProps, FC, RefObject } from 'react';
3
+
4
+ import { Box } from '..';
5
+
6
+ type PositionProps = {
7
+ anchor?: RefObject<Element>;
8
+ placement?: Placements;
9
+ margin?: PositionOptions['margin'];
10
+ } & ComponentProps<typeof Box>;
11
+
12
+ declare const Position: FC<PositionProps>;
13
+
14
+ export = Position;
@@ -0,0 +1,11 @@
1
+ import { ComponentProps, FC } from 'react';
2
+
3
+ import Position from '.';
4
+
5
+ type PositionAnimatedProps = {
6
+ visible?: 'hidden' | 'visible' | 'hiding' | 'unhiding';
7
+ } & ComponentProps<typeof Position>;
8
+
9
+ declare const PositionAnimated: FC<PositionAnimatedProps>;
10
+
11
+ export = PositionAnimated;
@@ -0,0 +1,3 @@
1
+ export { default } from './Position';
2
+ export { default as PositionAnimated } from './PositionAnimated';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Box/Position/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ForwardRefExoticComponent, PropsWithChildren } from 'react';
2
+
3
+ type ScrollableProps = PropsWithChildren<{
4
+ horizontal?: boolean;
5
+ vertical?: boolean;
6
+ onScrollContent?: (touching: { top: boolean }) => void;
7
+ }>;
8
+ const Scrollable: ForwardRefExoticComponent<ScrollableProps>;
9
+ export default Scrollable;
@@ -0,0 +1,167 @@
1
+ import type { css } from '@rocket.chat/css-in-js';
2
+ import {
3
+ AllHTMLAttributes,
4
+ CSSProperties,
5
+ ElementType,
6
+ ForwardRefExoticComponent,
7
+ PropsWithChildren,
8
+ RefAttributes,
9
+ SVGAttributes,
10
+ } from 'react';
11
+
12
+ type FontScale =
13
+ | 'hero'
14
+ | 'h1'
15
+ | 'h2'
16
+ | 'h3'
17
+ | 'h4'
18
+ | 'h5'
19
+ | 'p1'
20
+ | 'p2'
21
+ | 'p3'
22
+ | 'p4'
23
+ | 'c1'
24
+ | 'c2'
25
+ | 'micro';
26
+
27
+ type BoxProps = PropsWithChildren<{
28
+ is?: ElementType;
29
+ className?:
30
+ | string
31
+ | ReturnType<typeof css>
32
+ | (string | ReturnType<typeof css>)[];
33
+ style?: CSSProperties;
34
+ border?: CSSProperties['border'];
35
+ borderBlock?: CSSProperties['borderBlock'];
36
+ borderBlockStart?: CSSProperties['borderBlockStart'];
37
+ borderBlockEnd?: CSSProperties['borderBlockEnd'];
38
+ borderInline?: CSSProperties['borderInline'];
39
+ borderInlineStart?: CSSProperties['borderInlineStart'];
40
+ borderInlineEnd?: CSSProperties['borderInlineEnd'];
41
+ borderWidth?: CSSProperties['borderWidth'];
42
+ borderBlockWidth?: CSSProperties['borderBlockWidth'];
43
+ borderBlockStartWidth?: CSSProperties['borderBlockStartWidth'];
44
+ borderBlockEndWidth?: CSSProperties['borderBlockEndWidth'];
45
+ borderInlineWidth?: CSSProperties['borderInlineWidth'];
46
+ borderInlineStartWidth?: CSSProperties['borderInlineStartWidth'];
47
+ borderInlineEndWidth?: CSSProperties['borderInlineEndWidth'];
48
+ borderStyle?: CSSProperties['borderStyle'];
49
+ borderBlockStyle?: CSSProperties['borderBlockStyle'];
50
+ borderBlockStartStyle?: CSSProperties['borderBlockStartStyle'];
51
+ borderBlockEndStyle?: CSSProperties['borderBlockEndStyle'];
52
+ borderInlineStyle?: CSSProperties['borderInlineStyle'];
53
+ borderInlineStartStyle?: CSSProperties['borderInlineStartStyle'];
54
+ borderInlineEndStyle?: CSSProperties['borderInlineEndStyle'];
55
+ borderColor?: CSSProperties['borderColor'];
56
+ borderBlockColor?: CSSProperties['borderBlockColor'];
57
+ borderBlockStartColor?: CSSProperties['borderBlockStartColor'];
58
+ borderBlockEndColor?: CSSProperties['borderBlockEndColor'];
59
+ borderInlineColor?: CSSProperties['borderInlineColor'];
60
+ borderInlineStartColor?: CSSProperties['borderInlineStartColor'];
61
+ borderInlineEndColor?: CSSProperties['borderInlineEndColor'];
62
+ borderRadius?: CSSProperties['borderRadius'];
63
+ borderStartStartRadius?: CSSProperties['borderStartStartRadius'];
64
+ borderStartEndRadius?: CSSProperties['borderStartEndRadius'];
65
+ borderEndStartRadius?: CSSProperties['borderEndStartRadius'];
66
+ borderEndEndRadius?: CSSProperties['borderEndEndRadius'];
67
+
68
+ color?: CSSProperties['color'];
69
+ backgroundColor?: CSSProperties['backgroundColor'];
70
+ bg?: CSSProperties['backgroundColor'];
71
+ opacity?: CSSProperties['opacity'];
72
+
73
+ alignItems?: CSSProperties['alignItems'];
74
+ alignContent?: CSSProperties['alignContent'];
75
+ justifyItems?: CSSProperties['justifyItems'];
76
+ justifyContent?: CSSProperties['justifyContent'];
77
+ flexWrap?: CSSProperties['flexWrap'];
78
+ flexDirection?: CSSProperties['flexDirection'];
79
+ flexGrow?: CSSProperties['flexGrow'];
80
+ flexShrink?: CSSProperties['flexShrink'];
81
+ flexBasis?: CSSProperties['flexBasis'];
82
+ justifySelf?: CSSProperties['justifySelf'];
83
+ alignSelf?: CSSProperties['alignSelf'];
84
+ order?: CSSProperties['order'];
85
+
86
+ w?: CSSProperties['width'];
87
+ width?: CSSProperties['width'];
88
+ minWidth?: CSSProperties['minWidth'];
89
+ maxWidth?: CSSProperties['maxWidth'];
90
+ h?: CSSProperties['height'];
91
+ height?: CSSProperties['height'];
92
+ minHeight?: CSSProperties['minHeight'];
93
+ maxHeight?: CSSProperties['maxHeight'];
94
+ display?: CSSProperties['display'];
95
+ verticalAlign?: CSSProperties['verticalAlign'];
96
+ overflow?: CSSProperties['overflow'];
97
+ overflowX?: CSSProperties['overflowX'];
98
+ overflowY?: CSSProperties['overflowY'];
99
+
100
+ position?: CSSProperties['position'];
101
+ zIndex?: CSSProperties['zIndex'];
102
+ inset?: CSSProperties['inset'];
103
+ insetBlock?: CSSProperties['insetBlock'];
104
+ insetBlockStart?: CSSProperties['insetBlockStart'];
105
+ insetBlockEnd?: CSSProperties['insetBlockEnd'];
106
+ insetInline?: CSSProperties['insetInline'];
107
+ insetInlineStart?: CSSProperties['insetInlineStart'];
108
+ insetInlineEnd?: CSSProperties['insetInlineEnd'];
109
+
110
+ m?: CSSProperties['margin'];
111
+ margin?: CSSProperties['margin'];
112
+ mb?: CSSProperties['marginBlock'];
113
+ marginBlock?: CSSProperties['marginBlock'];
114
+ mbs?: CSSProperties['marginBlockStart'];
115
+ marginBlockStart?: CSSProperties['marginBlockStart'];
116
+ mbe?: CSSProperties['marginBlockEnd'];
117
+ marginBlockEnd?: CSSProperties['marginBlockEnd'];
118
+ mi?: CSSProperties['marginInline'];
119
+ marginInline?: CSSProperties['marginInline'];
120
+ mis?: CSSProperties['marginInlineStart'];
121
+ marginInlineStart?: CSSProperties['marginInlineStart'];
122
+ mie?: CSSProperties['marginInlineEnd'];
123
+ marginInlineEnd?: CSSProperties['marginInlineEnd'];
124
+ p?: CSSProperties['padding'];
125
+ padding?: CSSProperties['padding'];
126
+ pb?: CSSProperties['paddingBlock'];
127
+ paddingBlock?: CSSProperties['paddingBlock'];
128
+ pbs?: CSSProperties['paddingBlockStart'];
129
+ paddingBlockStart?: CSSProperties['paddingBlockStart'];
130
+ pbe?: CSSProperties['paddingBlockEnd'];
131
+ paddingBlockEnd?: CSSProperties['paddingBlockEnd'];
132
+ pi?: CSSProperties['paddingInline'];
133
+ paddingInline?: CSSProperties['paddingInline'];
134
+ pis?: CSSProperties['paddingInlineStart'];
135
+ paddingInlineStart?: CSSProperties['paddingInlineStart'];
136
+ pie?: CSSProperties['paddingInlineEnd'];
137
+ paddingInlineEnd?: CSSProperties['paddingInlineEnd'];
138
+
139
+ fontFamily?: CSSProperties['fontFamily'] | FontScale;
140
+ fontSize?: CSSProperties['fontSize'] | FontScale;
141
+ fontStyle?: CSSProperties['fontStyle'];
142
+ fontWeight?: CSSProperties['fontWeight'] | FontScale;
143
+ letterSpacing?: CSSProperties['letterSpacing'] | FontScale;
144
+ lineHeight?: CSSProperties['lineHeight'] | FontScale;
145
+ textAlign?: CSSProperties['textAlign'];
146
+ textTransform?: CSSProperties['textTransform'];
147
+ textDecorationLine?: CSSProperties['textDecorationLine'];
148
+
149
+ elevation?: '0' | '1' | '2';
150
+ invisible?: boolean;
151
+ withRichContent?: boolean | string;
152
+ withTruncatedText?: boolean;
153
+ size?: CSSProperties['blockSize'];
154
+ minSize?: CSSProperties['blockSize'];
155
+ maxSize?: CSSProperties['blockSize'];
156
+ fontScale?: FontScale;
157
+ }> &
158
+ Omit<AllHTMLAttributes<HTMLOrSVGElement>, 'className'> &
159
+ Omit<SVGAttributes<SVGElement>, keyof AllHTMLAttributes<HTMLOrSVGElement>> &
160
+ RefAttributes<unknown>;
161
+
162
+ export const Box: ForwardRefExoticComponent<BoxProps>;
163
+
164
+ export { default as AnimatedVisibility } from './AnimatedVisibility';
165
+ export { default as Flex } from './Flex';
166
+ export { default as Position, PositionAnimated } from './Position';
167
+ export { default as Scrollable } from './Scrollable';
@@ -0,0 +1,26 @@
1
+ import { ComponentProps, ForwardRefExoticComponent } from 'react';
2
+
3
+ import { Box } from '../Box';
4
+
5
+ type ButtonProps = ComponentProps<typeof Box> & {
6
+ info?: boolean;
7
+ success?: boolean;
8
+ warning?: boolean;
9
+ danger?: boolean;
10
+ primary?: boolean;
11
+ ghost?: boolean;
12
+ nude?: boolean;
13
+ ghostish?: boolean;
14
+ small?: boolean;
15
+ square?: boolean;
16
+ };
17
+ export const Button: ForwardRefExoticComponent<ButtonProps>;
18
+
19
+ type ActionButtonProps = ButtonProps & {
20
+ icon: string;
21
+ mini?: boolean;
22
+ tiny?: boolean;
23
+ };
24
+ export const ActionButton: ForwardRefExoticComponent<ActionButtonProps>;
25
+
26
+ export = Button;
@@ -0,0 +1,13 @@
1
+ import { ComponentProps, ForwardRefExoticComponent } from 'react';
2
+
3
+ import { Box } from '../Box';
4
+
5
+ type ButtonGroupProps = ComponentProps<typeof Box> & {
6
+ align?: 'start' | 'center' | 'end';
7
+ stretch?: boolean;
8
+ wrap?: boolean;
9
+ vertical?: boolean;
10
+ small?: boolean;
11
+ medium?: boolean;
12
+ };
13
+ export const ButtonGroup: ForwardRefExoticComponent<ButtonGroupProps>;
@@ -0,0 +1,8 @@
1
+ import { ComponentProps, ForwardRefExoticComponent } from 'react';
2
+
3
+ import { Box } from '../Box';
4
+
5
+ type CalloutProps = Omit<ComponentProps<typeof Box>, 'type'> & {
6
+ type?: 'info' | 'success' | 'warning' | 'danger';
7
+ };
8
+ export const Callout: ForwardRefExoticComponent<CalloutProps>;
@@ -0,0 +1,8 @@
1
+ import { ComponentProps, ForwardRefExoticComponent } from 'react';
2
+
3
+ import { Box } from '../Box';
4
+
5
+ type CheckBoxProps = ComponentProps<typeof Box> & {
6
+ indeterminate?: boolean;
7
+ };
8
+ export const CheckBox: ForwardRefExoticComponent<CheckBoxProps>;
@@ -0,0 +1,12 @@
1
+ import { ComponentProps, ForwardRefExoticComponent } from 'react';
2
+
3
+ import { Box } from '../Box';
4
+
5
+ type ChevronProps = Omit<ComponentProps<typeof Box>, 'size'> & {
6
+ size?: ComponentProps<typeof Box>['width'];
7
+ right?: boolean;
8
+ left?: boolean;
9
+ top?: boolean;
10
+ bottom?: boolean;
11
+ };
12
+ export const Chevron: ForwardRefExoticComponent<ChevronProps>;
@@ -0,0 +1,8 @@
1
+ import { ComponentProps, ForwardRefExoticComponent } from 'react';
2
+
3
+ import { Box } from '../Box';
4
+
5
+ type ChipProps = ComponentProps<typeof Box>;
6
+ const Chip: ForwardRefExoticComponent<ChipProps>;
7
+
8
+ export = Chip;
@@ -0,0 +1,6 @@
1
+ import { ComponentProps, FC } from 'react';
2
+ import { Box } from '../Box';
3
+ declare type DividerProps = ComponentProps<typeof Box>;
4
+ declare const Divider: FC<DividerProps>;
5
+ export { Divider };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Divider/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAE7B,aAAK,YAAY,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC;AAE/C,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAE7B,CAAC;AACF,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ComponentProps, ForwardRefExoticComponent } from 'react';
2
+
3
+ import { Box } from '../Box';
4
+
5
+ type EmailInputProps = ComponentProps<typeof Box> & {
6
+ addon?: ReactNode;
7
+ error?: string;
8
+ };
9
+ export const EmailInput: ForwardRefExoticComponent<EmailInputProps>;