@electra-ui/theme 0.0.0-stage → 1.2.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 +53 -2
- package/fesm2022/electra-ui-theme.mjs +1059 -0
- package/fesm2022/electra-ui-theme.mjs.map +1 -0
- package/package.json +29 -4
- package/src/styles/font.less +376 -0
- package/src/styles/fonts/Inter-Black.woff +0 -0
- package/src/styles/fonts/Inter-Black.woff2 +0 -0
- package/src/styles/fonts/Inter-BlackItalic.woff +0 -0
- package/src/styles/fonts/Inter-BlackItalic.woff2 +0 -0
- package/src/styles/fonts/Inter-Bold.woff +0 -0
- package/src/styles/fonts/Inter-Bold.woff2 +0 -0
- package/src/styles/fonts/Inter-BoldItalic.woff +0 -0
- package/src/styles/fonts/Inter-BoldItalic.woff2 +0 -0
- package/src/styles/fonts/Inter-ExtraBold.woff +0 -0
- package/src/styles/fonts/Inter-ExtraBold.woff2 +0 -0
- package/src/styles/fonts/Inter-ExtraBoldItalic.woff +0 -0
- package/src/styles/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
- package/src/styles/fonts/Inter-ExtraLight-BETA.woff +0 -0
- package/src/styles/fonts/Inter-ExtraLight-BETA.woff2 +0 -0
- package/src/styles/fonts/Inter-ExtraLightItalic-BETA.woff +0 -0
- package/src/styles/fonts/Inter-ExtraLightItalic-BETA.woff2 +0 -0
- package/src/styles/fonts/Inter-Italic.woff +0 -0
- package/src/styles/fonts/Inter-Italic.woff2 +0 -0
- package/src/styles/fonts/Inter-Light-BETA.woff +0 -0
- package/src/styles/fonts/Inter-Light-BETA.woff2 +0 -0
- package/src/styles/fonts/Inter-LightItalic-BETA.woff +0 -0
- package/src/styles/fonts/Inter-LightItalic-BETA.woff2 +0 -0
- package/src/styles/fonts/Inter-Medium.woff +0 -0
- package/src/styles/fonts/Inter-Medium.woff2 +0 -0
- package/src/styles/fonts/Inter-MediumItalic.woff +0 -0
- package/src/styles/fonts/Inter-MediumItalic.woff2 +0 -0
- package/src/styles/fonts/Inter-Regular.woff +0 -0
- package/src/styles/fonts/Inter-Regular.woff2 +0 -0
- package/src/styles/fonts/Inter-SemiBold.woff +0 -0
- package/src/styles/fonts/Inter-SemiBold.woff2 +0 -0
- package/src/styles/fonts/Inter-SemiBoldItalic.woff +0 -0
- package/src/styles/fonts/Inter-SemiBoldItalic.woff2 +0 -0
- package/src/styles/fonts/Inter-Thin-BETA.woff +0 -0
- package/src/styles/fonts/Inter-Thin-BETA.woff2 +0 -0
- package/src/styles/fonts/Inter-ThinItalic-BETA.woff +0 -0
- package/src/styles/fonts/Inter-ThinItalic-BETA.woff2 +0 -0
- package/src/styles/fonts/Inter-italic.var.woff2 +0 -0
- package/src/styles/fonts/Inter-upright.var.woff2 +0 -0
- package/src/styles/fonts/Inter.var.woff2 +0 -0
- package/src/styles/fonts/Roboto-Bold.woff2 +0 -0
- package/src/styles/fonts/Roboto-Italic.woff2 +0 -0
- package/src/styles/fonts/Roboto-Medium.woff2 +0 -0
- package/src/styles/fonts/Roboto-Regular.woff2 +0 -0
- package/src/styles/fonts/RobotoMono-Bold.woff2 +0 -0
- package/src/styles/fonts/RobotoMono-Regular.woff2 +0 -0
- package/src/styles/fonts/fonts.css +196 -0
- package/src/styles/fonts/fonts.less +196 -0
- package/src/styles/fonts/location.less +247 -0
- package/src/styles/sizes/index.less +28 -0
- package/src/styles/styles.less +2 -0
- package/src/styles/styles_.less +8 -0
- package/src/styles/theme/component-palettes/me-button-palette.less +164 -0
- package/src/styles/theme/component-palettes/me-components-dark-theme-palette.less +201 -0
- package/src/styles/theme/component-palettes/me-components-light-theme-palette.less +196 -0
- package/src/styles/theme/dark-palette.less +143 -0
- package/src/styles/theme/dark.less +111 -0
- package/src/styles/theme/default-palette.less +142 -0
- package/src/styles/theme/default.less +111 -0
- package/src/styles/theme/index.less +50 -0
- package/src/styles/theme/me-palette.less +539 -0
- package/src/styles/theme/palette.less +284 -0
- package/src/styles/theme/shadows.less +10 -0
- package/src/styles/typography/typography-const.less +77 -0
- package/src/styles/typography/typography-em-const.less +75 -0
- package/src/styles/typography/typography.less +2 -0
- package/types/electra-ui-theme.d.ts +1367 -0
package/README.md
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Electra theme
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
- SourceCraft: [https://sourcecraft.dev/electra/electra](https://sourcecraft.dev/electra/electra)
|
|
4
|
+
|
|
5
|
+
Тема и CSS custom properties библиотеки Electra. Тема кастомизируется без пересборки
|
|
6
|
+
библиотеки; переключение — через `ElectraThemeService`.
|
|
7
|
+
|
|
8
|
+
## Установка
|
|
9
|
+
|
|
10
|
+
### Через Angular CLI (рекомендуется)
|
|
11
|
+
|
|
12
|
+
`ng add @electra-ui/install`
|
|
13
|
+
|
|
14
|
+
Схематика установит базовый набор пакетов Electra и подключит глобальные стили.
|
|
15
|
+
|
|
16
|
+
### Вручную
|
|
17
|
+
|
|
18
|
+
**Обязательно** — ядро и тема:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
npm i @electra-ui/core
|
|
22
|
+
npm i @electra-ui/theme
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Peer-зависимости (`@electra-ui/helpers` и Angular-пакеты) npm (7+) установит автоматически.
|
|
26
|
+
|
|
27
|
+
## Подключение стилей
|
|
28
|
+
|
|
29
|
+
Добавьте стили в конфигурацию `angular.json`:
|
|
30
|
+
|
|
31
|
+
```jsonc
|
|
32
|
+
"styles": [
|
|
33
|
+
// (Обязательно) Тема
|
|
34
|
+
"node_modules/@electra-ui/theme/src/styles/styles.less",
|
|
35
|
+
// (Опционально) Компоненты
|
|
36
|
+
"node_modules/@electra-ui/components/src/styles/styles.less"
|
|
37
|
+
],
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Или добавьте импорт в корневой `styles.less`:
|
|
41
|
+
|
|
42
|
+
```less
|
|
43
|
+
// (Обязательно) Тема
|
|
44
|
+
@import '~@electra-ui/theme/src/styles/styles.less';
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Переключение темы
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { ElectraThemeService } from '@electra-ui/theme';
|
|
51
|
+
|
|
52
|
+
// внедрите сервис и вызовите update с выбранной темой
|
|
53
|
+
this.theme.update('light');
|
|
54
|
+
```
|