![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@salutejs/caldera-online
Advanced tools
Salute Design System / React UI kit for Caldera-online web applications
Реализация компонентов для создания веб-приложений.
Компоненты реализованы на typescript с помощью react и styled-components;
Использование данного пакета предполагает установку зависимостей: react
& react-dom
;
Использование styled-components
на проект необязательно, так же как и использование typescript
.
Но для того чтобы компоненты работали корректно необходимо установить styled-components
.
$ npm install --save react react-dom
$ npm install --save styled-components
$ npm install --save @salutejs/caldera-online @salutejs/caldera-online-themes
Создайте компонент для подключения глобальных стилей:
import { createGlobalStyle } from 'styled-components';
import { caldera_online__light } from '@salutejs/caldera-online-themes';
const ThemeStyle = createGlobalStyle(caldera_online__light);
export const GlobalStyle = () => (
<>
<ThemeStyle />
</>
);
В корне приложения вызовите компонент глобальных стилей GlobalStyle
:
src/index.tsx
.pages/_app.tsx
и подключите стили в нем.Для корректной работы server side rendering приложение нужно обернуть SSRProvider
(доступен в caldera-online);
Все компоненты доступны из папки components
или напрямую из пакета:
// App.tsx
import { Button } from '@salutejs/caldera-online';
import { textAccent } from '@salutejs/caldera-online-themes/tokens';
export const App = () => {
return (
<Button>Hello, Caldera Online!</Button>
<p style={{color: textAccent}}>
Token usage example
</p>
);
};
FAQs
Salute Design System / React UI kit for Caldera-online web applications
We found that @salutejs/caldera-online demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.