Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@rocket.chat/styled

RocketChat21.8kMIT0.32.0TypeScript support: included

A simple styled API for React components

readme

Rocket.Chat

`@rocket.chat/styled`

A simple styled API for React components


npm@latest npm@next npm downloads License: MIT

deps npm bundle size

Install

Add `@rocket.chat/styled` as a dependency:

npm i @rocket.chat/styled

# or, if you are using yarn:

yarn add @rocket.chat/styled

Contributing

Contributions, issues, and feature requests are welcome!
Feel free to check the issues.

Building

As this package dependends on others in this monorepo, before anything run the following at the root directory:

yarn build

Linting

To ensure the source is matching our coding style, we perform linting. Before commiting, check if your code fits our style by running:

yarn lint

Some linter warnings and errors can be automatically fixed:

yarn lint-and-fix

Running tests

Whenever possible, add tests to describe exactly what your code do. You can run them by yourself:

yarn test

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.31.25 (2023-08-14)

Features

Bug Fixes

  • icons: Build definition for icons package (#1123) (13a2bef)
  • Turn TabNavigationBlock into ExperimentalTabNavigationBlock (#1117) (1b1d627)
  • uikit: initialTime prop time in TimePicker component (#1115) (124cd3c)

0.31.24 (2023-07-21)

Features

Bug Fixes

0.31.23 (2023-05-05)

Features

Bug Fixes

  • enabling emphasis inside link label (b1fece0)
  • fuselage-hooks: Fix usePosition (#967) (6098687)
  • fuselage: SidebarItem menu glitch on hover (#991) (c92cfad)
  • fuselage: Add missing types to PaginatedMultiselect / Filtered (#988) (102d97e)
  • fuselage: Adjusted PaginatedMultiSelect to keep received/returned values consistent (#994) (057b036)
  • fuselage: Avatar element excending container width (#1017) (94fbb72)
  • fuselage: Badge bg token colors (#945) (461ecf6)
  • fuselage: button var prefix (#938) (2181514)
  • fuselage: Chevron vertical position (#910) (f086df2)
  • fuselage: colors (#980) (cf26af6)
  • fuselage: Correct tokens usage (#940) (b1292b5)
  • fuselage: Fix scrolling issues due menu button wrapper (#987) (4e0bcff)
  • fuselage: InputBox addon click (#982) (d00d0ea)
  • fuselage: MessageBody word break (#1018) (59fee60)
  • fuselage: Multiselect won't update if value changes (#983) (77a3b9c)
  • fuselage: Pagination number (#936) (e421970)
  • fuselage: selected-messages color (#1004) (83ef093)
  • fuselage: token refactor (#943) (5bead65)
  • fuselage: word break in rcx-message-body (#1028) (0c70a1d)
  • message-parser: Differ link, autoLink, and autoEmail helpers (#993) (db343e0)
  • message-parser: Inline Code with mention and/or mail pattern (#1021) (00fb041)
  • message-parser: Link parser issues (#962) (3377d6b)

0.31.22 (2022-12-02)

Features

  • fuselage: add message names wrapper and update system message (#889) (97dd401)
  • fuselage: Featured Tag variant (#922) (0bb5c90)
  • fuselage: Update Banner Component style (#905) (15b4f96)

Bug Fixes

  • fuselage-hooks: fix storage not reacting if there are multiple in same page (#911) (e1d0a4a)
  • fuselage: Adding heading tag styles to messages (#904) (ade27ba)
  • fuselage: Avatar border and Tag alignment (#892) (02975fc)
  • fuselage: Elevation token (#920) (47a63d4)
  • fuselage: Message palette colors (#896) (5a22d8b)
  • fuselage: Revert Banner Elevation (#926) (3c0d7f9)
  • fuselage: Update Banner Styles (#912) (4858258)
  • message-parser: Add file path structure to URL reference markdown (#901) (91239b6)
  • message-parser: Escaping only necessary characters (#899) (29dd497)
  • message-parser: Phone pattern (#900) (6062700)
  • message-parser: User mention with @ character (#894) (aa9bc06)

0.31.21 (2022-10-31)

Features

  • fuselage: Empty Badge and small variants (#876) (16bff6d)
  • icons: Add spanner icon (#880) (a16a786)
  • message-parser: Enabling Emphasis elements (bold, strike and italic) inside link label (#864) (7e521bb)

0.31.20 (2022-10-21)

Features

Bug Fixes

0.31.19 (2022-10-07)

Features

Bug Fixes

0.31.18 (2022-09-01)

Bug Fixes

0.31.17 (2022-08-31)

Features

Bug Fixes

  • bump-next (5a52dc6)
  • fuselage: StatusBullet not using the stylesheets (#833) (b927cbe)
  • fuselage: Message roles size (#788) (ce6273b)
  • fuselage: misaligned sidebar image (#798) (d5d552c)
  • fuselage: Modal improves (#776) (7660993)
  • fuselage: Sidebar colors (#810) (112f9e2)
  • fuselage: Tooltip border-radius (37610c1)
  • fuselage: update optionTitle component styles (#790) (3a2cbb3)
  • Layout imports (b52cc67)
  • layout: Layout peerDependencies (b6b5bdc)
  • message-parser: Fix payload generation for custom protocols (#799) (7451b58)
  • message-rewrite: Remove emojis inside links (#800) (670a5f2)
  • onboarding ui imports (3322b10)
  • Privacy policy broken link on New Account Form (#834) (530d056)
  • Remove italic style from system messages (#830) (96df38b)
  • ui-kit: export VideoConferenceBlock (66b247d)

0.31.16 (2022-07-21)

Bug Fixes

0.31.15 (2022-07-20)

Features

  • fuselage-hooks: usePosition listening to components size changes (#782) (79fdb3e)
  • fuselage-ui-kit: add URL option to the overflow component (#737) (a250c04)
  • fuselage: Add message status indicator text component (#757) (9dcd759)
  • icons: Updated contact and globe icons (#767) (57eecb5)

Bug Fixes

0.31.14 (2022-06-27)

Features

Bug Fixes

  • Button disabled color (#752) (dab7d28)
  • colors and button flags (#750) (9c0c0c1)
  • deps,mp3-encoder: Bump lamejs version (#732) (efc9bde)
  • fuselage: IconButton hover color (#754) (ca9b3e1)
  • fuselage: kebab menu click not working properly (#740) (8e5b4af)
  • fuselage: Surface values using css var (#748) (17012f8)
  • IconButton type (#751) (c1b4e1c)
  • message-parser: Expand emoji detection (#753) (005e135)
  • message-parser: Relative URL being displayed as plain text (#736) (3ccd090)
  • usePosition: change style when target dont fit screen (41c5c37)

0.31.13 (2022-05-31)

Bug Fixes

  • deps,mp3-encoder: Yarn resolution of lamejs (#731) (c6c4e21)
  • fuselage: Adjusting sequential messages padding (#730) (f04e65a)
  • fuselage: Message negative margins (#733) (5518b00)

0.31.12 (2022-05-23)

Features

  • add paragraph and message list (2d459bc)
  • fuselage-toastbar: ToastBar Component & Package (#707) (621116f)
  • fuselage: add message list component (#715) (fdda70d)
  • message-parser: LineBreak token and OrderedListItem digit (#720) (51d5d66)

Bug Fixes

  • fuselage-toastbar: ToastBar close function (#722) (7525caa)
  • fuselage, message-parser: Remove list components and update list grammar (#724) (99b2fdd)
  • fuselage: List style affecting other components (#727) (4b5cc58)
  • fuselage: Message tag and message box styles (6df4c36)
  • fuselage: ToastBar style (#725) (245303c)
  • fuselage: Wrong className in ThreadMessage component (#726) (203673c)
  • icons: mobile-exclamation icon (#714) (18a4d7c)
  • Line break fix (7afa65a)
  • message-parser: Adding more test cases and adding safe chars (88bebf2)
  • message-parser: Link is not showing correct and it not opening correctly (#717) (886d2c0)
  • message-parser: Link parser (51ffac0)

0.31.11 (2022-05-02)

Features

  • add is pending status to message (95e1cd2)
  • fuselage: Add isPending status to message component (#695) (4ea4b60)
  • fuselage: MessageEmoji and ThreadMessageEmoji components (#709) (2b224b0)
  • icons: add circles and mobile icons (8b58c4f)
  • onboarding-ui: add function to prefill Workspace URL based on W… (#694) (ab3391d)
  • onboarding-ui: export BackgroundLayer (#708) (ee8819b)
  • onboarding-ui: update props and fix bugs in CreateCloudWorkspac… (#675) (d2c69db)
  • remove 'Company' label in setup wizard form (a20b52b)
  • update CreateFirstMemberPage props (#690) (aea7c9a)

Bug Fixes

  • change username title label on onboarding (1ddd6b1)
  • fuselage: Message role text color (#705) (9a303ae)
  • fuselage: Missing type on system message (#706) (7cdf6b7)
  • fuselage: Vertical alignment on message system (#701) (2e3c550)
  • vertical align on message system (eaf2406)

0.31.10 (2022-04-21)

Features

  • add is pending status to message (95e1cd2)
  • fuselage: Add isPending status to message component (#695) (4ea4b60)
  • icons: add circles and mobile icons (8b58c4f)
  • onboarding-ui: add function to prefill Workspace URL based on W… (#694) (ab3391d)
  • onboarding-ui: update props and fix bugs in CreateCloudWorkspac… (#675) (d2c69db)
  • update CreateFirstMemberPage props (#690) (aea7c9a)

Bug Fixes

  • fuselage: Message role text color (#705) (9a303ae)
  • fuselage: Missing type on system message (#706) (7cdf6b7)
  • fuselage: Vertical alignment on message system (#701) (2e3c550)
  • vertical align on message system (eaf2406)

0.31.9 (2022-04-01)

Bug Fixes

  • fuselage: Button-specific props for Chip (d3d6c0a)

0.31.8 (2022-03-31)

Bug Fixes

  • fuselage: Correct withBoxStyling return type (#677) (6f31ff3)

0.31.7 (2022-03-31)

Features

  • add totp form (#658) (50234f4), closes #659 #661
  • fuselage: Box rewritten in TypeScript (#670) (acc8c85)
  • onboarding-ui: add CreateFirstWorkspacePage (#668) (224ea82)
  • onboarding-ui: add optional description to InformationPage (#674) (9d3c56c)
  • onboarding-ui: add optional subtitle prop to OrganizationInfoPage (#673) (ce87027)
  • onboarding-ui: allow title and subtitle editing (#665) (fc7974e)
  • onboarding-ui: Create Cloud Workspace Simplified Page (#660) (e746cfb)
  • onboarding-ui: create LaunchingWorkspace page (#666) (c53d685)
  • onboarding-ui: create redirect page (#667) (be2c9bd)
  • onboarding-ui: create reusable InformationPage (#663) (5285d76)

Bug Fixes

0.31.6 (2022-03-09)

Bug Fixes

  • fuselage: onChange prop on PaginatedSelectFiltered (#659) (9e170ff)
  • fuselage: PaginatedSelectFiltered filter state (#661) (0975754)

0.31.5 (2022-03-02)

Bug Fixes

  • fuselage, regression: listen for clicks on Select options (#655) (5b41041)
  • fuselage, regression: MultiSelectFiltered (#653) (874604a)
  • fuselage, regression: Select filter and anchor overhaul (#654) (10ad4f1)

0.31.4 (2022-02-22)

Features

  • fuselage: Add custom Icon to Select Component (#639) (66021a8)
  • fuselage: Clear MultiSelect filter after selection (#641) (74c0089)
  • fuselage: Extend menu options props (#650) (5193110)
  • fuselage: Flexibility to render custom option inside Options (#647) (9710be0)
  • fuselage: MultiSelect improvements (#645) (900aae8)
  • memo: Cache timeout (#630) (9e36aec)

Bug Fixes

  • fuselage,regression: MultiSelect errors (#651) (b3b075b)

0.31.3 (2022-02-08)

Features

  • fuselage: Add loading Skeleton to CodeSnippet (#632) (46fe245)
  • fuselage: Code snippet component (#622) (147f8a1)
  • fuselage: Convert mdx to csf (#584) (238768e)
  • fuselage: Field.Link component (#619) (7bce30a)
  • onboarding-ui: Add SomethingWentWrongPage Component (#624) (68e12dc)
  • onboarding-ui: RegisterServer Step Flow (#618) (f8098eb)
  • request-trial: add checkbox to confirm terms and conditions (#628) (f289d01)

Bug Fixes

  • fuselage-hooks: useContentBoxSize and useBorderBoxSize crashing in safari (#616) (d1514f6)
  • fuselage: CodeSnippet word-break (#634) (ed2ca9a)
  • fuselage: InputBox style (#631) (17d4c80)
  • fuselage: Some fuselage types (#637) (9653c77)

0.31.2 (2022-01-28)

Features

  • eslint-config-alt: Include ESLint rule react/self-closing-comp (debaf1d)
  • fuselage-hooks: useOutsideClick (#607) (f0662eb)

Bug Fixes

  • fuselage-hooks: Handle ResizeObserver bug on Firefox ESR 91 (#606) (5577a49)
  • fuselage: Menu toggle (#389) (74a67be)

0.31.0 (2021-12-28)

Bug Fixes

  • fuselage-ui-kit: Initial Value being ignored on text input fields upon modal update (#600) (d9bd704)
  • add mode on change in forms (#592) (62ba8f1)
  • fuselage-hooks: usePosition fallback (#588) (4662cf0)
  • docker image version (8f181cf)
  • fuselage: Chip missing styles (#568) (e1b8963)
  • fuselage: States Component Font Style (#579) (4322376)
  • onboarding-ui: Remove manage workspace fallback (#573) (7f0b870)
  • replace useAutoFocus (34e406e)
  • ui-kit: Fix SurfaceRendererPayload (#556) (8d76a0d)

Features

0.30.1 (2021-10-20)

Bug Fixes

0.30.0 (2021-10-06)

Bug Fixes

Features

  • icons: Update/Add icons (phone-in&out, dialpad, phone-disabled) (#533) (2f3ae02)
  • logo: Rocket.Chat logo package (#535) (94522e6)

0.29.0 (2021-08-31)

Bug Fixes

Features

0.28.0 (2021-07-30)

Bug Fixes

Features

  • onboarding-ui: AdminInfoPage for Cloud Registration wizard (#497) (7557dce)
  • onboarding-ui: Administrator information form and Organization information form (#489) (b289f68)
  • onboarding-ui: Common components (#478) (d7511ab)
  • onboarding-ui: Invalid Link page (#496) (6c74576)
  • onboarding-ui: Self-hosted registration (#501) (e47d579)
  • onboarding-ui: Server registration form (#494) (be3185f)
  • styled API; monorepo grooming (#482) (1b6b70c)
  • Visibility toggle for PasswordInput (#377) (d430773)

0.27.0 (2021-06-28)

Bug Fixes

  • endReached prop in _Options of PaginatedSelectFiltered Component (#475) (81ec00f)
  • Export MultiSelect component in .d.ts file (#473) (dbdbf58)
  • Menu component and options.label prop type (#476) (dea7a16)
  • eslint: Add missing ESLint rule for TypeScript (#470) (cc0d498)
  • fuselage: Fuselage production build (#477) (228878c)
  • string-helpers: typesVersions (#469) (e393d98)
  • Default-export typings for Position and PositionAnimated (88fb952)
  • Export correctly props and types from PositionAnimated and Tile components (#467) (67a86ec)
  • PositionAnimated exported type (#466) (472fb1e)
  • Typings for Position and PositionAnimated properly exported (#465) (f05c126)
  • Typings for RadioButton (#464) (3e36605)

Features

0.26.0 (2021-05-28)

Bug Fixes

  • Peggy loader options (#459) (fc91054)
  • fuselage: fix duplicated values on paginated multi select (#456) (5fbde6d)

Features

0.25.0 (2021-05-19)

Bug Fixes

Features

0.24.0 (2021-04-28)

Bug Fixes

Features

0.23.0 (2021-04-01)

Bug Fixes

Features

0.22.0 (2021-02-26)

Bug Fixes

  • Remove development mode warnings (#398) (80e77dc)
  • Sidebar menu cropped in extended mode (#400) (8e06c60)
  • withRichContent prop split to fit in different contexts (#401) (22ca229)

Features

0.21.0 (2021-01-31)

Bug Fixes

Features

0.20.3 (2021-01-29)

Bug Fixes

  • sidebar-item__menu-wraper opacity on IE (#381) (e818b5c)

0.20.2 (2021-01-27)

Bug Fixes

0.20.1 (2020-12-22)

Bug Fixes

0.20.0 (2020-12-21)

Bug Fixes

Features

Performance Improvements

0.19.0 (2020-11-28)

Bug Fixes

Features

0.18.0 (2020-11-16)

Bug Fixes

Features

0.17.3 (2020-11-16)

Bug Fixes

  • Set a conservative output.environment on Webpack bundles (#330) (85d4a3a)

0.17.2 (2020-10-28)

Bug Fixes

0.17.1 (2020-10-26)

Bug Fixes

0.17.0 (2020-10-25)

Bug Fixes

Features

0.16.0 (2020-09-30)

Bug Fixes

Features

0.15.1 (2020-09-22)

Note: Version bump only for package Rocket.Chat.Fuselage

0.15.0 (2020-09-17)

Bug Fixes

Features

0.14.1 (2020-08-22)

Note: Version bump only for package Rocket.Chat.Fuselage

0.14.0 (2020-08-18)

Features

0.13.2 (2020-07-24)

Bug Fixes

0.13.1 (2020-07-17)

Bug Fixes

0.13.0 (2020-07-14)

Features

0.12.0 (2020-07-14)

Bug Fixes

Features

0.11.0 (2020-07-11)

Bug Fixes

Features

  • Hooks useLocalStorage and useSessionStorage (#248) (7c9a920)
  • useStableArray, useBreakpoints, useMediaQueries (#253) (09f95ed)

0.10.0 (2020-06-20)

Bug Fixes

Features

Performance Improvements

0.9.0 (2020-05-21)

Bug Fixes

Features

Performance Improvements

  • Replace mem with a simpler memoization decorator (#229) (2de0703)

Reverts

0.8.0 (2020-04-22)

Bug Fixes

Features

0.7.1 (2020-04-01)

Bug Fixes

0.7.0 (2020-04-01)

Bug Fixes

Features

  • Custom prop types and more props to Box (#181) (119e815)

0.6.2 (2020-03-31)

Bug Fixes

0.6.1 (2020-03-24)

Bug Fixes

Reverts

  • Revert "chore: Refactor button, add missing variants. (#120)" (#178) (e3d7d7d), closes #120 #178

0.6.0 (2020-03-20)

Bug Fixes

Features

0.5.0 (2020-03-20)

Bug Fixes

  • Empty space before SelectFiltered placeholder (#171) (26ab2b5)

Features

0.4.1 (2020-03-16)

Bug Fixes

0.4.0 (2020-03-10)

Bug Fixes

  • Changed accordion item title proptype (#151) (b80647c)
  • Display name and prop types of Throbber component (#148) (cd0122b)

Features

Performance Improvements

  • Avoid re-renders due to PropsContext (#154) (da88341)

0.3.0 (2020-02-17)

Bug Fixes

Features

0.2.0 (2020-02-13)

Note: Version bump only for package Rocket.Chat.Fuselage

0.2.0-alpha.30 (2020-02-12)

Bug Fixes

  • Safari not triggering buttons anchors (#146) (2cb5aaa)

0.2.0-alpha.29 (2020-02-10)

Note: Version bump only for package Rocket.Chat.Fuselage

0.2.0-alpha.28 (2020-02-10)

Bug Fixes

0.2.0-alpha.27 (2020-02-10)

Bug Fixes

0.2.0-alpha.26 (2020-02-10)

Bug Fixes

0.2.0-alpha.25 (2020-02-10)

Note: Version bump only for package Rocket.Chat.Fuselage

0.2.0-alpha.24 (2020-02-09)

Note: Version bump only for package Rocket.Chat.Fuselage

0.2.0-alpha.23 (2020-02-07)

Bug Fixes

0.2.0-alpha.22 (2020-02-07)

Bug Fixes

0.2.0-alpha.21 (2020-02-05)

Note: Version bump only for package Rocket.Chat.Fuselage

0.2.0-alpha.20 (2020-02-01)

Bug Fixes

Features

0.2.0-alpha.19 (2020-01-13)

Bug Fixes

Features

0.2.0-alpha.18 (2019-12-31)

Bug Fixes

Features

0.2.0-alpha.17 (2019-12-04)

Bug Fixes

Features

0.2.0-alpha.16 (2019-11-12)

Bug Fixes

0.2.0-alpha.15 (2019-11-05)

Bug Fixes

  • Performance issues in development environment (#89) (a95931d)

0.2.0-alpha.14 (2019-10-28)

Features

0.2.0-alpha.13 (2019-10-25)

Note: Version bump only for package Rocket.Chat.Fuselage

0.2.0-alpha.12 (2019-10-24)

Bug Fixes

  • Accordion.Item accessibility issues (#78) (2a283c1)

0.2.0-alpha.11 (2019-10-22)

Features

  • Accordion.Item pointer interactions and new variants (#77) (884d10a)

0.2.0-alpha.10 (2019-10-18)

Bug Fixes

0.2.0-alpha.9 (2019-10-17)

Bug Fixes

Features

0.2.0-alpha.8 (2019-10-16)

Note: Version bump only for package Rocket.Chat.Fuselage

0.2.0-alpha.7 (2019-10-14)

Features

0.2.0-alpha.6 (2019-10-09)

Note: Version bump only for package Rocket.Chat.Fuselage

0.2.0-alpha.5 (2019-10-02)

Bug Fixes

Features

0.2.0-alpha.4 (2019-09-27)

Bug Fixes

0.2.0-alpha.3 (2019-09-25)

Bug Fixes

Features

0.2.0-alpha.2 (2019-08-19)

Bug Fixes

Features

0.2.0-alpha.1 (2019-08-16)

Bug Fixes

Features

0.2.0-alpha.0 (2019-08-16)

Features

0.1.1-alpha.1 (2019-08-15)

Bug Fixes