
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
@sberdevices/ui
Advanced tools
Π Π΅Π°Π»ΠΈΠ·Π°ΡΠΈΡ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½ΡΠΎΠ² Π΄Π»Ρ ΡΠΎΠ·Π΄Π°Π½ΠΈΡ ΡΠΌΠ°ΡΡΠ°ΠΏΠΏΠΎΠ².
ΠΠΎΠΌΠΏΠΎΠ½Π΅Π½ΡΡ ΡΠ΅Π°Π»ΠΈΠ·ΠΎΠ²Π°Π½Ρ Π½Π° 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 @sberdevices/ui@rc @sberdevices/plasma-tokens@rc @sberdevices/plasma-icons@rc
ΠΠΎΠ΄ΠΊΠ»ΡΡΠΈΡΠ΅ ΡΠ²Π΅ΡΠΎΠ²ΡΡ ΡΡ
Π΅ΠΌΡ Ρ ΠΏΠΎΠΌΠΎΡΡΡ Π³Π»ΠΎΠ±Π°Π»ΡΠ½ΡΡ
ΡΡΠΈΠ»Π΅ΠΉ ΠΈ ΡΠΈΠΏΠΎΠ³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΡΡ ΡΠΈΡΡΠ΅ΠΌΡ Ρ ΠΏΠΎΠΌΠΎΡΡΡ DeviceThemeProvider
:
// GlobalStyle.tsx
import { createGlobalStyle } from 'styled-components';
import { darkSber } from '@sberdevices/plasma-tokens/themes'; // ΠΠ»ΠΈ ΠΎΠ΄ΠΈΠ½ ΠΈΠ· ΡΠΏΠΈΡΠΊΠ°: darkEva, darkJoy, lightEva, lightJoy, lightSber
import {
text, // Π¦Π²Π΅Ρ ΡΠ΅ΠΊΡΡΠ°
background, // Π¦Π²Π΅Ρ ΠΏΠΎΠ΄Π»ΠΎΠΆΠΊΠΈ
gradient, // ΠΡΠ°Π΄ΠΈΠ΅Π½Ρ
} from '@sberdevices/plasma-tokens';
const DocumentStyle = createGlobalStyle`
html:root {
min-height: 100vh;
color: ${text};
background-color: ${background};
background-image: ${gradient};
}
`;
const ThemeStyle = createGlobalStyle(darkSber);
export const GlobalStyle = () => (
<>
<DocumentStyle />
<ThemeStyle />
</>
);
// index.tsx
import { DeviceThemeProvider } from '@sberdevices/ui/components/Device'; // Π’ΠΈΠΏΠΎΠ³ΡΠ°ΡΠΈΠΊΠ°, ΠΈΠΌΠ΅ΡΡΠ°Ρ ΡΠ°Π·ΠΌΠ΅ΡΡ, Π·Π°Π²ΠΈΡΠΈΠΌΡΠ΅ ΠΎΡ ΡΠΈΠΏΠ° ΡΡΡΡΠΎΠΉΡΡΠ²Π°
import { GlobalStyle } from './GlobalStyle'; // Π’Π΅ΠΌΠ° ΠΎΡΠΎΡΠΌΠ»Π΅Π½ΠΈΡ (ΡΠ²Π΅ΡΠΎΠ²Π°Ρ ΡΡ
Π΅ΠΌΠ°)
import { App } from './App';
ReactDOM.render(
<DeviceThemeProvider>
<GlobalStyle />
<App />
</DeviceThemeProvider>,
document.getElementById('root'),
);
ΠΠΎΠ΄ΡΠΎΠ±Π½Π΅Π΅ ΠΎ ΡΡΠΈΠ»ΡΡ ΠΈ ΡΠΈΠΏΠΎΠ³ΡΠ°ΡΠΈΠΊΠ΅.
ΠΡΠ΅ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½ΡΡ Π΄ΠΎΡΡΡΠΏΠ½Ρ ΠΈΠ· ΠΏΠ°ΠΏΠΊΠΈ components
ΠΈΠ»ΠΈ Π½Π°ΠΏΡΡΠΌΡΡ ΠΈΠ· ΠΏΠ°ΠΊΠ΅ΡΠ°:
// App.tsx
import { Container } from '@sberdevices/ui/components/Grid';
import { Button } from '@sberdevices/ui';
export const App = () => {
return (
<Container>
<Button>Hello, Plasma!</Button>
</Container>
);
};
ΠΠΈΠ±Π»ΠΈΠΎΡΠ΅ΠΊΠ° ΠΏΡΠ΅Π΄ΠΎΡΡΠ°Π²Π»ΡΠ΅Ρ Π²ΡΠΏΠΎΠΌΠΎΠ³Π°ΡΠ΅Π»ΡΠ½ΡΡ ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½ΠΎΡΡΡ - utils
, mixins
, hocs
, Π΄ΠΎΡΡΡΠΏΠ½ΡΡ Π² ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΡΡΡΠΈΡ
Π΄ΠΈΡΠ΅ΠΊΡΠΎΡΠΈΡΡ
.
ΠΡΠΈΠΌΠ΅Ρ ΠΈΠΌΠΏΠΎΡΡΠ°:
import { animatedScrollToX } from '@sberdevices/ui/utils';
import { addFocus } from '@sberdevices/ui/mixins';
import { withAutoFocus } from '@sberdevices/ui/hocs';
ΠΠΎΠ΄ΡΠΎΠ±Π½Π΅Π΅ ΠΌΠΎΠΆΠ½ΠΎ ΠΎΠ·Π½Π°ΠΊΠΎΠΌΠΈΡΡΡΡ Π½Π° ΡΡΡΠ°Π½ΠΈΡΠ°Ρ Π΄ΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΠΈ ΠΏΠΎ hocs, mixins ΠΈ utils.
ΠΠΈΡΡΠΈΠ½Π° Ρ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½ΡΠ°ΠΌΠΈ Storybook.
FAQs
SberDevices Design System
The npm package @sberdevices/ui receives a total of 10 weekly downloads. As such, @sberdevices/ui popularity was classified as not popular.
We found that @sberdevices/ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 4 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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.