@koslibs/components 1.0.0 → 1.1.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +30 -0
  3. package/dist/components/Button/index_module.css +2 -1
  4. package/dist/components/Typography/colors.module.js +10 -0
  5. package/dist/components/Typography/colors_module.css +26 -0
  6. package/dist/components/Typography/index.d.ts +34 -0
  7. package/dist/components/Typography/index.js +7 -0
  8. package/dist/components/Typography/index.module.js +18 -0
  9. package/dist/components/Typography/index_module.css +57 -0
  10. package/dist/components/Typography/preset.module.js +30 -0
  11. package/dist/components/Typography/preset_module.css +54 -0
  12. package/dist/components/Typography/shared.d.ts +63 -0
  13. package/dist/components/Typography/shared.js +10 -0
  14. package/dist/components/Typography/text.d.ts +15 -0
  15. package/dist/components/Typography/text.js +18 -0
  16. package/dist/components/Typography/title.d.ts +15 -0
  17. package/dist/components/Typography/title.js +18 -0
  18. package/dist/components/Typography/vars.css +27 -0
  19. package/dist/index.d.ts +2 -0
  20. package/dist/index.js +1 -0
  21. package/dist/static/font/inter-cyrillic-ext-wght-normal.woff2 +0 -0
  22. package/dist/static/font/inter-cyrillic-wght-normal.woff2 +0 -0
  23. package/dist/static/font/inter-greek-ext-wght-normal.woff2 +0 -0
  24. package/dist/static/font/inter-greek-wght-normal.woff2 +0 -0
  25. package/dist/static/font/inter-latin-ext-wght-normal.woff2 +0 -0
  26. package/dist/static/font/inter-latin-wght-normal.woff2 +0 -0
  27. package/dist/static/font/inter-vietnamese-wght-normal.woff2 +0 -0
  28. package/dist/styles/fonts/inter/LICENSE.txt +93 -0
  29. package/dist/styles/fonts.css +63 -0
  30. package/dist/styles/theme.css +8 -0
  31. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @koslibs/components
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2](https://github.com/koslibs/components/pull/2) [`b09aeff`](https://github.com/koslibs/components/commit/b09aeffe06d9267aad1f689deb91a19412ff8448) Thanks [@holypower777](https://github.com/holypower777)! - Добавлен публичный Typography из GullEye: Text и Title, типы, CSS Modules,
8
+ Docs и Playground. Импорт из `@koslibs/components/Typography` подключает
9
+ только Typography и его стили.
10
+
11
+ Исправлены отступы содержимого вкладок Docs и сдвиг страницы при появлении
12
+ или исчезновении полосы прокрутки.
13
+
14
+ Закреплены правила историй компонентов: запись добавляется только для изменённого
15
+ компонента; общие изменения инфраструктуры и Storybook описываются в истории пакета.
16
+
17
+ Добавлена общая тема с `--font-primary: 'Inter', sans-serif` и локальными
18
+ WOFF2-файлами Inter. Typography и подпись Button подключают её автоматически;
19
+ приложение может переопределить семейство шрифта через CSS.
20
+
3
21
  ## 1.0.0
4
22
 
5
23
  ### Major Changes
package/README.md CHANGED
@@ -1,5 +1,35 @@
1
1
  Демо: <https://koslibs.github.io/components/>
2
2
 
3
+ ## Основной шрифт
4
+
5
+ Библиотека задаёт `--font-primary: 'Inter', sans-serif` в общей теме. Компоненты,
6
+ использующие эту переменную, автоматически подключают тему и локальные WOFF2-файлы
7
+ Inter. Поддерживаются веса 100–900, латиница и кириллица; внешние CDN не используются.
8
+ Браузер загружает нужные языковые поднаборы по `unicode-range`, используется
9
+ `font-display: swap`. Лицензия Inter включена в npm-пакет.
10
+
11
+ Для использования темы в собственных элементах можно подключить её отдельно:
12
+
13
+ ```tsx
14
+ import '@koslibs/components/theme.css';
15
+ ```
16
+
17
+ Значение по умолчанию находится в CSS-слое `koslibs`, поэтому обычные стили приложения
18
+ переопределяют его независимо от порядка подключения. Например:
19
+
20
+ ```css
21
+ :root {
22
+ --font-primary: 'My App Font', sans-serif;
23
+ }
24
+
25
+ .alternate-font {
26
+ --font-primary: Georgia, serif;
27
+ }
28
+ ```
29
+
30
+ Файлы своего шрифта подключите в приложении. Тема задаёт только переменную и
31
+ `@font-face`; она не изменяет шрифт `body` или элементов, которые её не используют.
32
+
3
33
  ## Добавление компонента
4
34
 
5
35
  Рекомендуемая структура:
@@ -1,3 +1,4 @@
1
+ @import "../../styles/theme.css";
1
2
  @import "./vars.css";
2
3
 
3
4
  .component-vxc0gC {
@@ -224,7 +225,7 @@
224
225
  font-size: 14px;
225
226
  font-weight: 400;
226
227
  line-height: 18px;
227
- font-family: var(--font-primary, "Inter", sans-serif);
228
+ font-family: var(--font-primary);
228
229
  color: var(--button-hint-color);
229
230
  display: block;
230
231
  }
@@ -0,0 +1,10 @@
1
+ import "./colors_module.css";
2
+ const colors_module = {
3
+ inherit: "inherit-D2kX96",
4
+ primary: "primary-LVKi8J",
5
+ secondary: "secondary-eTdE4v",
6
+ inverse: "inverse-PTiWqH",
7
+ positive: "positive-a1clfd",
8
+ negative: "negative-IhTMOW"
9
+ };
10
+ export default colors_module;
@@ -0,0 +1,26 @@
1
+ @import "./vars.css";
2
+
3
+ .inherit-D2kX96 {
4
+ color: inherit;
5
+ }
6
+
7
+ .primary-LVKi8J {
8
+ color: var(--typography-primary-color);
9
+ }
10
+
11
+ .secondary-eTdE4v {
12
+ color: var(--typography-secondary-color);
13
+ }
14
+
15
+ .inverse-PTiWqH {
16
+ color: var(--typography-inverse-color);
17
+ }
18
+
19
+ .positive-a1clfd {
20
+ color: var(--typography-positive-color);
21
+ }
22
+
23
+ .negative-IhTMOW {
24
+ color: var(--typography-negative-color);
25
+ }
26
+
@@ -0,0 +1,34 @@
1
+ import { TypographyText } from './text.js';
2
+ import { TypographyTitle } from './title.js';
3
+ export { TypographyText, TypographyText as Text, TypographyTitle, TypographyTitle as Title };
4
+ export type { TextProps, TitleProps, TypographyColor, TypographyWeight } from './shared.js';
5
+ export declare const Typography: {
6
+ Text: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement>, "className" | "style" | "color" | "children"> & {
7
+ children?: import("react").ReactNode;
8
+ className?: string;
9
+ style?: import("react").CSSProperties;
10
+ color?: import("./shared.js").TypographyColor;
11
+ weight?: import("./shared.js").TypographyWeight;
12
+ caps?: boolean;
13
+ monospaceNumbers?: boolean;
14
+ rowLimit?: 1 | 2 | 3;
15
+ dataTestId?: string;
16
+ } & {
17
+ size?: 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20;
18
+ tag?: "span" | "p" | "div" | "li";
19
+ } & import("react").RefAttributes<import("./shared.js").TextElement>>;
20
+ Title: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement>, "className" | "style" | "color" | "children"> & {
21
+ children?: import("react").ReactNode;
22
+ className?: string;
23
+ style?: import("react").CSSProperties;
24
+ color?: import("./shared.js").TypographyColor;
25
+ weight?: import("./shared.js").TypographyWeight;
26
+ caps?: boolean;
27
+ monospaceNumbers?: boolean;
28
+ rowLimit?: 1 | 2 | 3;
29
+ dataTestId?: string;
30
+ } & {
31
+ size?: 13 | 14 | 16 | 20 | 24 | 28 | 32;
32
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
33
+ } & import("react").RefAttributes<import("./shared.js").TitleElement>>;
34
+ };
@@ -0,0 +1,7 @@
1
+ import { TypographyText } from "./text.js";
2
+ import { TypographyTitle } from "./title.js";
3
+ const Typography = {
4
+ Text: TypographyText,
5
+ Title: TypographyTitle
6
+ };
7
+ export { Typography, TypographyText as Text, TypographyText, TypographyTitle as Title, TypographyTitle };
@@ -0,0 +1,18 @@
1
+ import "./index_module.css";
2
+ const index_module = {
3
+ component: "component-niqWjh",
4
+ "weight-regular": "weight-regular-cOlAcy",
5
+ weightRegular: "weight-regular-cOlAcy",
6
+ "weight-medium": "weight-medium-kDVEGI",
7
+ weightMedium: "weight-medium-kDVEGI",
8
+ "weight-semibold": "weight-semibold-euRksF",
9
+ weightSemibold: "weight-semibold-euRksF",
10
+ "weight-bold": "weight-bold-ZxTUEF",
11
+ weightBold: "weight-bold-ZxTUEF",
12
+ caps: "caps-AWFyAh",
13
+ monospaceNumbers: "monospaceNumbers-wR2ApQ",
14
+ rowLimit1: "rowLimit1-Es_q51",
15
+ rowLimit2: "rowLimit2-gODO9s",
16
+ rowLimit3: "rowLimit3-LvJseL"
17
+ };
18
+ export default index_module;
@@ -0,0 +1,57 @@
1
+ @import "../../styles/theme.css";
2
+ @import "./vars.css";
3
+
4
+ .component-niqWjh {
5
+ margin: var(--size-0, 0px);
6
+ padding: var(--size-0, 0px);
7
+ font-family: var(--font-primary);
8
+ font-style: normal;
9
+ line-height: var(--typography-line-height);
10
+ letter-spacing: var(--typography-letter-spacing);
11
+ }
12
+
13
+ .weight-regular-cOlAcy {
14
+ font-weight: var(--typography-regular-font-weight);
15
+ }
16
+
17
+ .weight-medium-kDVEGI {
18
+ font-weight: var(--typography-medium-font-weight);
19
+ }
20
+
21
+ .weight-semibold-euRksF {
22
+ font-weight: var(--typography-semibold-font-weight);
23
+ }
24
+
25
+ .weight-bold-ZxTUEF {
26
+ font-weight: var(--typography-bold-font-weight);
27
+ }
28
+
29
+ .caps-AWFyAh {
30
+ text-transform: uppercase;
31
+ }
32
+
33
+ .monospaceNumbers-wR2ApQ {
34
+ font-variant-numeric: tabular-nums lining-nums;
35
+ }
36
+
37
+ .rowLimit1-Es_q51 {
38
+ white-space: nowrap;
39
+ text-overflow: ellipsis;
40
+ display: block;
41
+ overflow: hidden;
42
+ }
43
+
44
+ .rowLimit2-gODO9s, .rowLimit3-LvJseL {
45
+ -webkit-box-orient: vertical;
46
+ display: -webkit-box;
47
+ overflow: hidden;
48
+ }
49
+
50
+ .rowLimit2-gODO9s {
51
+ -webkit-line-clamp: 2;
52
+ }
53
+
54
+ .rowLimit3-LvJseL {
55
+ -webkit-line-clamp: 3;
56
+ }
57
+
@@ -0,0 +1,30 @@
1
+ import "./preset_module.css";
2
+ const preset_module = {
3
+ "size-8": "size-8-NlI2Hs",
4
+ size8: "size-8-NlI2Hs",
5
+ "size-9": "size-9-j9FL3_",
6
+ size9: "size-9-j9FL3_",
7
+ "size-10": "size-10-GUrD5L",
8
+ size10: "size-10-GUrD5L",
9
+ "size-11": "size-11-foLp7Q",
10
+ size11: "size-11-foLp7Q",
11
+ "size-12": "size-12-E_PVmd",
12
+ size12: "size-12-E_PVmd",
13
+ "size-13": "size-13-Eu2_On",
14
+ size13: "size-13-Eu2_On",
15
+ "size-14": "size-14-OpEM1B",
16
+ size14: "size-14-OpEM1B",
17
+ "size-15": "size-15-DxWyW2",
18
+ size15: "size-15-DxWyW2",
19
+ "size-16": "size-16-OgafBi",
20
+ size16: "size-16-OgafBi",
21
+ "size-20": "size-20-eTO0D7",
22
+ size20: "size-20-eTO0D7",
23
+ "size-24": "size-24-lZpjdx",
24
+ size24: "size-24-lZpjdx",
25
+ "size-28": "size-28-CY10Yo",
26
+ size28: "size-28-CY10Yo",
27
+ "size-32": "size-32-QPCTWV",
28
+ size32: "size-32-QPCTWV"
29
+ };
30
+ export default preset_module;
@@ -0,0 +1,54 @@
1
+ @import "./vars.css";
2
+
3
+ .size-8-NlI2Hs {
4
+ font-size: var(--typography-font-size-8);
5
+ }
6
+
7
+ .size-9-j9FL3_ {
8
+ font-size: var(--typography-font-size-9);
9
+ }
10
+
11
+ .size-10-GUrD5L {
12
+ font-size: var(--typography-font-size-10);
13
+ }
14
+
15
+ .size-11-foLp7Q {
16
+ font-size: var(--typography-font-size-11);
17
+ }
18
+
19
+ .size-12-E_PVmd {
20
+ font-size: var(--typography-font-size-12);
21
+ }
22
+
23
+ .size-13-Eu2_On {
24
+ font-size: var(--typography-font-size-13);
25
+ }
26
+
27
+ .size-14-OpEM1B {
28
+ font-size: var(--typography-font-size-14);
29
+ }
30
+
31
+ .size-15-DxWyW2 {
32
+ font-size: var(--typography-font-size-15);
33
+ }
34
+
35
+ .size-16-OgafBi {
36
+ font-size: var(--typography-font-size-16);
37
+ }
38
+
39
+ .size-20-eTO0D7 {
40
+ font-size: var(--typography-font-size-20);
41
+ }
42
+
43
+ .size-24-lZpjdx {
44
+ font-size: var(--typography-font-size-24);
45
+ }
46
+
47
+ .size-28-CY10Yo {
48
+ font-size: var(--typography-font-size-28);
49
+ }
50
+
51
+ .size-32-QPCTWV {
52
+ font-size: var(--typography-font-size-32);
53
+ }
54
+
@@ -0,0 +1,63 @@
1
+ import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';
2
+ export type TypographyWeight = 'regular' | 'medium' | 'semibold' | 'bold';
3
+ export type TypographyColor = 'inherit' | 'primary' | 'secondary' | 'inverse' | 'positive' | 'negative';
4
+ export type BaseProps = Omit<HTMLAttributes<HTMLElement>, 'color' | 'children' | 'className' | 'style'> & {
5
+ /** Содержимое текста или заголовка. */
6
+ children?: ReactNode;
7
+ /** Дополнительный CSS-класс корневого элемента. */
8
+ className?: string;
9
+ /** Инлайн-стили корневого элемента. */
10
+ style?: CSSProperties;
11
+ /**
12
+ * Цвет текста. По умолчанию наследуется от родителя.
13
+ */
14
+ color?: TypographyColor;
15
+ /**
16
+ * Толщина шрифта.
17
+ */
18
+ weight?: TypographyWeight;
19
+ /**
20
+ * Преобразовать текст в верхний регистр.
21
+ */
22
+ caps?: boolean;
23
+ /**
24
+ * Сделать цифры одинаковой ширины для таблиц и показателей.
25
+ */
26
+ monospaceNumbers?: boolean;
27
+ /**
28
+ * Ограничить число видимых строк, сохранив полный текст в DOM.
29
+ */
30
+ rowLimit?: 1 | 2 | 3;
31
+ /**
32
+ * Идентификатор для автоматизированных тестов.
33
+ */
34
+ dataTestId?: string;
35
+ };
36
+ export type TextProps = BaseProps & {
37
+ /**
38
+ * Размер шрифта в пикселях.
39
+ * @default 13
40
+ */
41
+ size?: 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20;
42
+ /**
43
+ * HTML-тег, определяющий семантику текста.
44
+ * @default span
45
+ */
46
+ tag?: 'span' | 'p' | 'div' | 'li';
47
+ };
48
+ export type TitleProps = BaseProps & {
49
+ /**
50
+ * Размер шрифта в пикселях.
51
+ * @default 28
52
+ */
53
+ size?: 13 | 14 | 16 | 20 | 24 | 28 | 32;
54
+ /**
55
+ * Уровень заголовка выбирается независимо от визуального размера.
56
+ */
57
+ tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
58
+ };
59
+ export type TextElement = HTMLSpanElement | HTMLParagraphElement | HTMLDivElement | HTMLLIElement;
60
+ export type TitleElement = HTMLHeadingElement | HTMLDivElement;
61
+ export declare const getClassName: ({ size, weight, color, caps, monospaceNumbers, rowLimit, className, }: BaseProps & {
62
+ size: number;
63
+ }) => string;
@@ -0,0 +1,10 @@
1
+ import classnames from "classnames";
2
+ import colors_module from "./colors.module.js";
3
+ import index_module from "./index.module.js";
4
+ import preset_module from "./preset.module.js";
5
+ const getClassName = ({ size, weight, color, caps, monospaceNumbers, rowLimit, className })=>classnames(index_module.component, preset_module[`size-${size}`], weight && index_module[`weight-${weight}`], color && colors_module[color], {
6
+ [index_module.caps]: caps,
7
+ [index_module.monospaceNumbers]: monospaceNumbers,
8
+ [index_module[`rowLimit${rowLimit}`]]: rowLimit
9
+ }, className);
10
+ export { getClassName };
@@ -0,0 +1,15 @@
1
+ import { type TextElement } from './shared.js';
2
+ export declare const TypographyText: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement>, "className" | "style" | "color" | "children"> & {
3
+ children?: import("react").ReactNode;
4
+ className?: string;
5
+ style?: import("react").CSSProperties;
6
+ color?: import("./shared.js").TypographyColor;
7
+ weight?: import("./shared.js").TypographyWeight;
8
+ caps?: boolean;
9
+ monospaceNumbers?: boolean;
10
+ rowLimit?: 1 | 2 | 3;
11
+ dataTestId?: string;
12
+ } & {
13
+ size?: 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20;
14
+ tag?: "span" | "p" | "div" | "li";
15
+ } & import("react").RefAttributes<TextElement>>;
@@ -0,0 +1,18 @@
1
+ import { createElement, forwardRef } from "react";
2
+ import { getClassName } from "./shared.js";
3
+ const TypographyText = /*#__PURE__*/ forwardRef(({ size = 13, tag = 'span', weight = 'regular', color = 'inherit', caps = false, monospaceNumbers = false, rowLimit, className, dataTestId, children, ...restProps }, ref)=>/*#__PURE__*/ createElement(tag, {
4
+ ...restProps,
5
+ ref,
6
+ className: getClassName({
7
+ size,
8
+ weight,
9
+ color,
10
+ caps,
11
+ monospaceNumbers,
12
+ rowLimit,
13
+ className
14
+ }),
15
+ 'data-test-id': dataTestId
16
+ }, children));
17
+ TypographyText.displayName = 'TypographyText';
18
+ export { TypographyText };
@@ -0,0 +1,15 @@
1
+ import { type TitleElement } from './shared.js';
2
+ export declare const TypographyTitle: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement>, "className" | "style" | "color" | "children"> & {
3
+ children?: import("react").ReactNode;
4
+ className?: string;
5
+ style?: import("react").CSSProperties;
6
+ color?: import("./shared.js").TypographyColor;
7
+ weight?: import("./shared.js").TypographyWeight;
8
+ caps?: boolean;
9
+ monospaceNumbers?: boolean;
10
+ rowLimit?: 1 | 2 | 3;
11
+ dataTestId?: string;
12
+ } & {
13
+ size?: 13 | 14 | 16 | 20 | 24 | 28 | 32;
14
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
15
+ } & import("react").RefAttributes<TitleElement>>;
@@ -0,0 +1,18 @@
1
+ import { createElement, forwardRef } from "react";
2
+ import { getClassName } from "./shared.js";
3
+ const TypographyTitle = /*#__PURE__*/ forwardRef(({ size = 28, tag, weight = 'bold', color = 'inherit', caps = false, monospaceNumbers = false, rowLimit, className, dataTestId, children, ...restProps }, ref)=>/*#__PURE__*/ createElement(tag, {
4
+ ...restProps,
5
+ ref,
6
+ className: getClassName({
7
+ size,
8
+ weight,
9
+ color,
10
+ caps,
11
+ monospaceNumbers,
12
+ rowLimit,
13
+ className
14
+ }),
15
+ 'data-test-id': dataTestId
16
+ }, children));
17
+ TypographyTitle.displayName = 'TypographyTitle';
18
+ export { TypographyTitle };
@@ -0,0 +1,27 @@
1
+ :root {
2
+ --typography-line-height: normal;
3
+ --typography-letter-spacing: 0;
4
+ --typography-regular-font-weight: 400;
5
+ --typography-medium-font-weight: 500;
6
+ --typography-semibold-font-weight: 600;
7
+ --typography-bold-font-weight: 700;
8
+ --typography-primary-color: #1c1a18;
9
+ --typography-secondary-color: #736554;
10
+ --typography-inverse-color: #f5f3ec;
11
+ --typography-positive-color: #4caf50;
12
+ --typography-negative-color: #ef5350;
13
+ --typography-font-size-8: 8px;
14
+ --typography-font-size-9: 9px;
15
+ --typography-font-size-10: 10px;
16
+ --typography-font-size-11: 11px;
17
+ --typography-font-size-12: 12px;
18
+ --typography-font-size-13: 13px;
19
+ --typography-font-size-14: 14px;
20
+ --typography-font-size-15: 15px;
21
+ --typography-font-size-16: 16px;
22
+ --typography-font-size-20: 20px;
23
+ --typography-font-size-24: 24px;
24
+ --typography-font-size-28: 28px;
25
+ --typography-font-size-32: 32px;
26
+ }
27
+
package/dist/index.d.ts CHANGED
@@ -2,3 +2,5 @@ export { Button } from './components/Button/index.js';
2
2
  export type { ButtonProps } from './components/Button/index.js';
3
3
  export { Spinner } from './components/Spinner/index.js';
4
4
  export type { SpinnerProps } from './components/Spinner/index.js';
5
+ export { Typography, TypographyText, TypographyTitle, Text, Title } from './components/Typography/index.js';
6
+ export type { TextProps, TitleProps, TypographyColor, TypographyWeight, } from './components/Typography/index.js';
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export { Button } from "./components/Button/index.js";
2
2
  export { Spinner } from "./components/Spinner/index.js";
3
+ export { Text, Title, Typography, TypographyText, TypographyTitle } from "./components/Typography/index.js";
@@ -0,0 +1,93 @@
1
+ Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,63 @@
1
+ @font-face {
2
+ font-family: Inter;
3
+ font-style: normal;
4
+ font-display: swap;
5
+ font-weight: 100 900;
6
+ src: url(../static/font/inter-cyrillic-ext-wght-normal.woff2) format("woff2");
7
+ unicode-range: U+460-52F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
8
+ }
9
+
10
+ @font-face {
11
+ font-family: Inter;
12
+ font-style: normal;
13
+ font-display: swap;
14
+ font-weight: 100 900;
15
+ src: url(../static/font/inter-cyrillic-wght-normal.woff2) format("woff2");
16
+ unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116;
17
+ }
18
+
19
+ @font-face {
20
+ font-family: Inter;
21
+ font-style: normal;
22
+ font-display: swap;
23
+ font-weight: 100 900;
24
+ src: url(../static/font/inter-greek-ext-wght-normal.woff2) format("woff2");
25
+ unicode-range: U+1F??;
26
+ }
27
+
28
+ @font-face {
29
+ font-family: Inter;
30
+ font-style: normal;
31
+ font-display: swap;
32
+ font-weight: 100 900;
33
+ src: url(../static/font/inter-greek-wght-normal.woff2) format("woff2");
34
+ unicode-range: U+370-377, U+37A-37F, U+384-38A, U+38C, U+38E-3A1, U+3A3-3FF;
35
+ }
36
+
37
+ @font-face {
38
+ font-family: Inter;
39
+ font-style: normal;
40
+ font-display: swap;
41
+ font-weight: 100 900;
42
+ src: url(../static/font/inter-vietnamese-wght-normal.woff2) format("woff2");
43
+ unicode-range: U+102-103, U+110-111, U+128-129, U+168-169, U+1A0-1A1, U+1AF-1B0, U+300-301, U+303-304, U+308-309, U+323, U+329, U+1EA0-1EF9, U+20AB;
44
+ }
45
+
46
+ @font-face {
47
+ font-family: Inter;
48
+ font-style: normal;
49
+ font-display: swap;
50
+ font-weight: 100 900;
51
+ src: url(../static/font/inter-latin-ext-wght-normal.woff2) format("woff2");
52
+ unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
53
+ }
54
+
55
+ @font-face {
56
+ font-family: Inter;
57
+ font-style: normal;
58
+ font-display: swap;
59
+ font-weight: 100 900;
60
+ src: url(../static/font/inter-latin-wght-normal.woff2) format("woff2");
61
+ unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
62
+ }
63
+
@@ -0,0 +1,8 @@
1
+ @import "./fonts.css";
2
+
3
+ @layer koslibs {
4
+ :root {
5
+ --font-primary: "Inter", sans-serif;
6
+ }
7
+ }
8
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koslibs/components",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Shared React components for koslibs projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,6 +10,7 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.js"
12
12
  },
13
+ "./theme.css": "./dist/styles/theme.css",
13
14
  "./*": {
14
15
  "types": "./dist/components/*/index.d.ts",
15
16
  "import": "./dist/components/*/index.js"