mbt-ui-kit 0.1.14 → 0.1.18

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 (64) hide show
  1. package/.ai/agent-examples/README.md +185 -0
  2. package/.ai/agent-reference/README.md +49 -0
  3. package/.ai/agent-rules/README.md +37 -0
  4. package/.ai/agent-rules/maintenance.md +22 -0
  5. package/AGENTS.md +41 -0
  6. package/README.md +173 -93
  7. package/dist/components/button/button.d.ts +2 -82
  8. package/dist/components/button/button.d.ts.map +1 -1
  9. package/dist/components/button/index.d.ts +2 -2
  10. package/dist/components/button/index.d.ts.map +1 -1
  11. package/dist/components/input/index.d.ts +3 -3
  12. package/dist/components/input/index.d.ts.map +1 -1
  13. package/dist/components/input/input.d.ts +2 -92
  14. package/dist/components/input/input.d.ts.map +1 -1
  15. package/dist/components/input/search-icon.d.ts +7 -0
  16. package/dist/components/input/search-icon.d.ts.map +1 -0
  17. package/dist/components/loader/index.d.ts +2 -2
  18. package/dist/components/loader/index.d.ts.map +1 -1
  19. package/dist/components/loader/loader.d.ts +2 -39
  20. package/dist/components/loader/loader.d.ts.map +1 -1
  21. package/dist/components/menu-button/graduation-cap-icon.d.ts +7 -0
  22. package/dist/components/menu-button/graduation-cap-icon.d.ts.map +1 -0
  23. package/dist/components/menu-button/index.d.ts +3 -3
  24. package/dist/components/menu-button/index.d.ts.map +1 -1
  25. package/dist/components/menu-button/menu-button.d.ts +1 -55
  26. package/dist/components/menu-button/menu-button.d.ts.map +1 -1
  27. package/dist/components/typography/heading.d.ts +7 -0
  28. package/dist/components/typography/heading.d.ts.map +1 -0
  29. package/dist/components/typography/index.d.ts +6 -6
  30. package/dist/components/typography/index.d.ts.map +1 -1
  31. package/dist/components/typography/metric.d.ts +9 -0
  32. package/dist/components/typography/metric.d.ts.map +1 -0
  33. package/dist/components/typography/text.d.ts +12 -0
  34. package/dist/components/typography/text.d.ts.map +1 -0
  35. package/dist/fonts/ibm-plex-mono-v20-latin-500.woff2 +0 -0
  36. package/dist/fonts/ibm-plex-mono-v20-latin-600.woff2 +0 -0
  37. package/dist/fonts/ibm-plex-mono-v20-latin-regular.woff2 +0 -0
  38. package/dist/fonts/ibm-plex-sans-v23-latin-500.woff2 +0 -0
  39. package/dist/fonts/ibm-plex-sans-v23-latin-600.woff2 +0 -0
  40. package/dist/fonts/ibm-plex-sans-v23-latin-regular.woff2 +0 -0
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.d.ts +13 -15
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.mjs +117 -102
  45. package/dist/styles/fonts.css +64 -0
  46. package/dist/styles/mbt-ui-kit.css +1 -1
  47. package/dist/styles/tokens.css +27 -27
  48. package/dist/styles/tokens.d.ts +2 -2
  49. package/dist/{tokens-DRT06tcO.js → tokens-Bxhg1IBs.js} +2 -2
  50. package/dist/tokens-only.d.ts +3 -8
  51. package/dist/tokens-only.d.ts.map +1 -1
  52. package/dist/tokens-only.mjs +1 -1
  53. package/package.json +25 -10
  54. package/src/styles/_tokens.scss +27 -24
  55. package/dist/components/input/SearchIcon.d.ts +0 -26
  56. package/dist/components/input/SearchIcon.d.ts.map +0 -1
  57. package/dist/components/menu-button/GraduationCapIcon.d.ts +0 -6
  58. package/dist/components/menu-button/GraduationCapIcon.d.ts.map +0 -1
  59. package/dist/components/typography/Heading.d.ts +0 -34
  60. package/dist/components/typography/Heading.d.ts.map +0 -1
  61. package/dist/components/typography/Metric.d.ts +0 -50
  62. package/dist/components/typography/Metric.d.ts.map +0 -1
  63. package/dist/components/typography/Text.d.ts +0 -72
  64. package/dist/components/typography/Text.d.ts.map +0 -1
@@ -0,0 +1,185 @@
1
+ # Agent Examples
2
+
3
+ Use these examples when a consumer app needs package-level usage patterns for `mbt-ui-kit`.
4
+
5
+ ## App Shell Setup
6
+
7
+ ```tsx
8
+ import { Button, Heading, Input, Text } from 'mbt-ui-kit';
9
+ import 'mbt-ui-kit/styles';
10
+
11
+ function SettingsPanel() {
12
+ return (
13
+ <div>
14
+ <Heading level={2}>Settings</Heading>
15
+ <Text muted>Configure your account preferences.</Text>
16
+ <Input label="Email" placeholder="name@example.com" fullWidth />
17
+ <Button type="button">Save changes</Button>
18
+ </div>
19
+ );
20
+ }
21
+ ```
22
+
23
+ ## Font Loading
24
+
25
+ Default consumer setup:
26
+
27
+ ```tsx
28
+ import 'mbt-ui-kit/styles';
29
+ ```
30
+
31
+ Advanced consumer preload setup:
32
+
33
+ ```tsx
34
+ import 'mbt-ui-kit/styles';
35
+ import plexSansRegularUrl from 'mbt-ui-kit/fonts/ibm-plex-sans-v23-latin-regular.woff2';
36
+ import plexSansMediumUrl from 'mbt-ui-kit/fonts/ibm-plex-sans-v23-latin-500.woff2';
37
+ import interVariableUrl from 'mbt-ui-kit/fonts/Inter-VariableFont_opsz,wght.ttf';
38
+
39
+ const preloadFonts = [plexSansRegularUrl, plexSansMediumUrl, interVariableUrl];
40
+ ```
41
+
42
+ - Use `mbt-ui-kit/styles` as the default package entrypoint.
43
+ - Preload `mbt-ui-kit/fonts/*` only when the consumer app wants better first paint for fonts already used above the fold.
44
+ - Do not import both `mbt-ui-kit/styles` and `mbt-ui-kit/fonts.css` unless the app intentionally needs separate early font-face loading.
45
+
46
+ ## Buttons
47
+
48
+ ```tsx
49
+ <Button>Start</Button>
50
+
51
+ <Button disabled>Coming Soon</Button>
52
+
53
+ <Button fullWidth onClick={handleSubmit}>
54
+ Confirm
55
+ </Button>
56
+
57
+ <Button type="button" onClick={handleOpenSettings}>
58
+ <SettingsIcon /> Settings
59
+ </Button>
60
+ ```
61
+
62
+ ## Inputs
63
+
64
+ ```tsx
65
+ <Input label="Search" placeholder="Find champion" showSearchIcon />
66
+
67
+ <Input label="Email" fullWidth value={email} onChange={(e) => setEmail(e.target.value)} />
68
+
69
+ <Input placeholder="Custom icon" icon={<CustomIcon />} />
70
+
71
+ <Input label="Disabled field" muted disabled />
72
+ ```
73
+
74
+ ## Typography
75
+
76
+ ```tsx
77
+ <Heading level={1}>Dashboard</Heading>
78
+ <Heading level={3}>Recent Matches</Heading>
79
+
80
+ <Text>Regular body copy.</Text>
81
+ <Text strong>Highlighted text.</Text>
82
+ <Text small muted>Secondary caption.</Text>
83
+ <Text label>Role</Text>
84
+
85
+ <Metric>1,234</Metric>
86
+ <Metric large>42,500</Metric>
87
+ <Metric as="span" muted>
88
+ 99
89
+ </Metric>
90
+ ```
91
+
92
+ ## Menu Buttons
93
+
94
+ ```tsx
95
+ <MenuButton>Training</MenuButton>
96
+
97
+ <MenuButton selected icon={<SettingsIcon />}>
98
+ Settings
99
+ </MenuButton>
100
+
101
+ <MenuButton small>Inventory</MenuButton>
102
+
103
+ <MenuButton disabled>Coming Soon</MenuButton>
104
+ ```
105
+
106
+ ## Loader
107
+
108
+ ```tsx
109
+ <Loader size="sm" />
110
+ <Loader size="md" />
111
+ <Loader size="lg" />
112
+
113
+ <Button loading>Saving</Button>
114
+ ```
115
+
116
+ ## Icons
117
+
118
+ ```tsx
119
+ <SearchIcon />
120
+
121
+ <MenuButton icon={<GraduationCapIcon />}>Training</MenuButton>
122
+ ```
123
+
124
+ ## Tokens In Styled Components
125
+
126
+ ```tsx
127
+ import styled from 'styled-components';
128
+ import { colors, fontSizes, radius, spacing } from 'mbt-ui-kit/tokens';
129
+
130
+ export const Card = styled.div`
131
+ display: grid;
132
+ gap: ${spacing[3]};
133
+ padding: ${spacing[5]};
134
+ border-radius: ${radius.md};
135
+ background: ${colors.surface};
136
+ color: ${colors.textPrimary};
137
+ font-size: ${fontSizes[3]};
138
+ `;
139
+ ```
140
+
141
+ ## Token-Only Import
142
+
143
+ ```tsx
144
+ import { colors, spacing, transitions } from 'mbt-ui-kit/tokens';
145
+
146
+ const panelStyle = {
147
+ backgroundColor: colors.surfaceRaised,
148
+ padding: spacing[4],
149
+ transition: `opacity ${transitions.fast}`,
150
+ };
151
+ ```
152
+
153
+ ## CSS Custom Properties
154
+
155
+ ```tsx
156
+ import 'mbt-ui-kit/tokens.css';
157
+ ```
158
+
159
+ ```css
160
+ .panel {
161
+ background-color: var(--mbt-color-surface);
162
+ color: var(--mbt-color-text-primary);
163
+ padding: var(--mbt-space-4);
164
+ border-radius: var(--mbt-radius-sm);
165
+ }
166
+ ```
167
+
168
+ ## Sass Tokens
169
+
170
+ ```scss
171
+ @use 'mbt-ui-kit/src/styles/tokens' as *;
172
+
173
+ .panel {
174
+ background-color: $surface;
175
+ color: $text-primary;
176
+ padding: $space-4;
177
+ border-radius: $radius-sm;
178
+ }
179
+ ```
180
+
181
+ ## Guidance
182
+
183
+ - Prefer nearby consumer-app usage before inventing a new composition pattern.
184
+ - Prefer public package entrypoints over deep imports, except for the published Sass token path.
185
+ - Keep app-specific layout decisions in the consumer app; keep package examples focused on reusable component and token usage.
@@ -0,0 +1,49 @@
1
+ # Agent Reference
2
+
3
+ This folder holds factual package reference for `mbt-ui-kit`.
4
+
5
+ ## Public Entry Points
6
+
7
+ - `mbt-ui-kit` - components plus token exports from `src/index.ts`
8
+ - `mbt-ui-kit/styles` - built package stylesheet, including the package font-face declarations
9
+ - `mbt-ui-kit/fonts.css` - standalone font-face stylesheet for advanced consumer setup
10
+ - `mbt-ui-kit/fonts/*` - published font asset files for preload or direct asset access
11
+ - `mbt-ui-kit/tokens` - token-only module surface
12
+ - `mbt-ui-kit/tokens.css` - CSS custom properties surface
13
+ - `mbt-ui-kit/src/styles/tokens` - published Sass token surface for Sass consumers
14
+
15
+ ## Font Contract
16
+
17
+ - `fonts.primary` maps to `IBM Plex Sans`
18
+ - `fonts.secondary` maps to `Inter`
19
+ - `fonts.mono` maps to `IBM Plex Mono`
20
+ - importing `mbt-ui-kit/styles` is the default way to make those package fonts available in a consumer app
21
+ - importing `mbt-ui-kit/fonts.css` is an advanced alternative for apps that want font-face declarations without the full package stylesheet
22
+ - importing `mbt-ui-kit/fonts/*` is for direct asset access, such as preload tags in the consumer app shell
23
+
24
+ ## Primary Components
25
+
26
+ - `Button`
27
+ - `Input`
28
+ - `Loader`
29
+ - `Heading`
30
+ - `Text`
31
+ - `Metric`
32
+ - `MenuButton`
33
+ - `GraduationCapIcon`
34
+ - `SearchIcon`
35
+
36
+ ## Primary Token Families
37
+
38
+ - `tokens`
39
+ - `colors`
40
+ - `fonts`
41
+ - `fontSizes`
42
+ - `fontWeights`
43
+ - `fontFeatures`
44
+ - `spacing`
45
+ - `radius`
46
+ - `zIndex`
47
+ - `transitions`
48
+
49
+ Reference docs should stay factual. Policy and maintenance rules belong in `.ai/agent-rules/`.
@@ -0,0 +1,37 @@
1
+ # Agent Rules
2
+
3
+ These files are the canonical package-owned rules for `mbt-ui-kit`.
4
+
5
+ ## Rule Map
6
+
7
+ - `.ai/agent-rules/README.md` - normative usage rules for imports, components, styling, and tokens.
8
+ - `.ai/agent-rules/maintenance.md` - required rule for keeping package guidance in sync with public changes.
9
+
10
+ ## Usage Rules
11
+
12
+ - Import components and tokens from public package entrypoints only.
13
+ - Prefer an existing `mbt-ui-kit` component before creating a new primitive in a consumer app.
14
+ - Prefer exported design tokens over hardcoded near-duplicate values.
15
+ - Use kebab-case for file names and folder names across this repo.
16
+ - Use `pnpm` as the package manager for this repo and keep a single lockfile.
17
+ - Use `mbt-ui-kit/styles` once at the app shell when the consumer app wants the package styles loaded globally.
18
+ - Treat `mbt-ui-kit/styles` as the default entrypoint for package styles and font-face declarations.
19
+ - Use `mbt-ui-kit/fonts.css` only when the consumer intentionally wants the package font-face declarations without the full styles bundle.
20
+ - Use `mbt-ui-kit/fonts/*` only when the consumer intentionally wants direct font-file access for preload or asset orchestration.
21
+ - Use `mbt-ui-kit/tokens` for token access when the consumer wants the token module surface.
22
+ - Use `mbt-ui-kit/tokens.css` when the consumer explicitly wants only the CSS custom properties stylesheet.
23
+ - Use `mbt-ui-kit/src/styles/tokens` for Sass extension workflows that intentionally depend on the published Sass token surface.
24
+ - Keep examples and rules package-focused; app-specific composition rules belong in the consuming app, not here.
25
+
26
+ ## Component Guidance
27
+
28
+ - Use `Button` for shared button behavior instead of recreating button primitives.
29
+ - Use `Input` for labeled text inputs and search-style input affordances.
30
+ - Use `Heading`, `Text`, and `Metric` for typography when the consumer wants the package typography primitives.
31
+ - Use `MenuButton` for sidebar or navigation-style button treatments, not as a generic replacement for every button.
32
+ - Use `Loader` for package-consistent loading states.
33
+
34
+ ## Token Guidance
35
+
36
+ - Preferred token families are `colors`, `fonts`, `fontSizes`, `fontWeights`, `fontFeatures`, `spacing`, `radius`, `zIndex`, and `transitions`.
37
+ - When a consumer needs a custom value outside the token system, keep the exception local to that consumer instead of expanding package docs with app-only design rules.
@@ -0,0 +1,22 @@
1
+ # Maintenance Rule
2
+
3
+ Agents working in `mbt-ui-kit` must review and update package guidance whenever a change affects public behavior.
4
+
5
+ ## Update The Docs When
6
+
7
+ - component props or defaults change
8
+ - exported components are added, removed, or renamed
9
+ - token names or token values change in a way that affects usage
10
+ - package entrypoints or import paths change
11
+ - style-loading expectations change
12
+ - font asset paths, exported font entrypoints, or font-loading expectations change
13
+ - canonical examples need to change to stay correct
14
+
15
+ ## Required Files To Review
16
+
17
+ - `AGENTS.md`
18
+ - `.ai/agent-rules/README.md`
19
+ - `.ai/agent-reference/README.md`
20
+ - `.ai/agent-examples/README.md`
21
+
22
+ Do not finish public package work without reviewing these files.
package/AGENTS.md ADDED
@@ -0,0 +1,41 @@
1
+ # AGENTS.md
2
+
3
+ ## Purpose
4
+
5
+ - `mbt-ui-kit` is the shared React design-system package for MBT apps.
6
+ - This repo owns the canonical agent guidance for how to use the package.
7
+ - Consumer apps should read the installed package docs from `node_modules/mbt-ui-kit/...`.
8
+
9
+ ## Package Name
10
+
11
+ - npm package: `mbt-ui-kit`
12
+ - public entrypoints: `mbt-ui-kit`, `mbt-ui-kit/styles`, `mbt-ui-kit/fonts.css`, `mbt-ui-kit/fonts/*`, `mbt-ui-kit/tokens`, `mbt-ui-kit/tokens.css`
13
+ - published Sass token path: `mbt-ui-kit/src/styles/tokens`
14
+
15
+ ## Read This First
16
+
17
+ 1. `.ai/agent-rules/README.md`
18
+ 2. `.ai/agent-rules/maintenance.md`
19
+ 3. `.ai/agent-reference/README.md`
20
+ 4. `.ai/agent-examples/README.md`
21
+
22
+ ## Guidance Map
23
+
24
+ - `.ai/agent-rules/README.md` - package-owned usage rules, imports, styling boundaries, and token expectations.
25
+ - `.ai/agent-rules/maintenance.md` - required doc-sync rule when public usage changes.
26
+ - `.ai/agent-reference/README.md` - exported surfaces and lookup map.
27
+ - `.ai/agent-examples/README.md` - short canonical examples for common components and tokens.
28
+
29
+ ## Maintenance Rule
30
+
31
+ - If a change affects public components, props, tokens, styles, font assets, exports, or expected usage, update the guidance docs before considering the work complete.
32
+
33
+ ## Guardrails
34
+
35
+ - Document only public package behavior here.
36
+ - Prefer public entrypoints over deep source imports in examples, except for the published Sass token path.
37
+ - Treat `mbt-ui-kit/styles` as the default consumer entrypoint for loading package styles and font-face declarations.
38
+ - Treat `mbt-ui-kit/fonts.css` and `mbt-ui-kit/fonts/*` as advanced consumer entrypoints for apps that intentionally preload or separately stage package fonts.
39
+ - Use kebab-case for file names and folder names across this repo.
40
+ - Use `pnpm` as the package manager for this repo.
41
+ - Keep Storybook as maintainer reference material, not the canonical consumer contract.
package/README.md CHANGED
@@ -1,160 +1,240 @@
1
1
  # MBT UI Kit
2
2
 
3
- React компонентная библиотека со стилями на SCSS для Electron приложений.
3
+ Reusable React UI primitives, typography, and design tokens for MBT applications.
4
4
 
5
- ## Установка
5
+ ## Installation
6
6
 
7
7
  ```bash
8
- npm install mbt-ui-kit
9
- # или
10
- bun install mbt-ui-kit
8
+ pnpm add mbt-ui-kit
11
9
  ```
12
10
 
13
- ## Использование
11
+ ## Package Surfaces
12
+
13
+ - `mbt-ui-kit` - components plus token exports
14
+ - `mbt-ui-kit/styles` - package stylesheet, including package font-face declarations
15
+ - `mbt-ui-kit/fonts.css` - standalone package font-face stylesheet
16
+ - `mbt-ui-kit/fonts/*` - published package font files
17
+ - `mbt-ui-kit/tokens` - token module surface
18
+ - `mbt-ui-kit/tokens.css` - CSS custom properties
19
+ - `mbt-ui-kit/src/styles/tokens` - published Sass token surface
20
+
21
+ ## Agent Guidance
22
+
23
+ - `AGENTS.md` is the package entrypoint for coding agents.
24
+ - Canonical rules live in `.ai/agent-rules/`.
25
+ - Factual reference lives in `.ai/agent-reference/`.
26
+ - Canonical usage examples live in `.ai/agent-examples/`.
27
+
28
+ ## Quick Start
14
29
 
15
30
  ```tsx
16
- import { Button, Input } from "mbt-ui-kit";
17
- import "mbt-ui-kit/styles";
31
+ import { Button, Heading, Input, Text } from 'mbt-ui-kit';
32
+ import 'mbt-ui-kit/styles';
18
33
 
19
- function App() {
34
+ function ProfileForm() {
20
35
  return (
21
36
  <div>
22
- <Input label="Email" placeholder="Введите email" showSearchIcon />
23
- <Button>Отправить</Button>
37
+ <Heading level={2}>Profile</Heading>
38
+ <Text muted>Update your account details.</Text>
39
+ <Input label="Email" placeholder="name@example.com" fullWidth />
40
+ <Button type="button">Save</Button>
24
41
  </div>
25
42
  );
26
43
  }
27
44
  ```
28
45
 
29
- ## Компоненты
46
+ ### Font loading in consumer app
30
47
 
31
- ### Button
32
- Кнопка с тремя состояниями: default, hover, disabled.
48
+ Default setup: import `mbt-ui-kit/styles` once at the app shell. This already loads the package font-face declarations.
33
49
 
34
50
  ```tsx
35
- <Button>Start</Button>
36
- <Button disabled>Start</Button>
37
- <Button fullWidth>Start</Button>
51
+ import 'mbt-ui-kit/styles';
38
52
  ```
39
53
 
40
- ### Input
41
- Текстовое поле с label и опциональной иконкой.
54
+ Advanced setup: if the consumer app wants better first paint for package fonts used immediately, preload selected files from `mbt-ui-kit/fonts/*` in the app shell.
42
55
 
43
56
  ```tsx
44
- <Input label="Label" placeholder="text_input" showSearchIcon />
45
- <Input label="Label" placeholder="text_input" muted />
46
- <Input placeholder="text_input" fullWidth />
57
+ import 'mbt-ui-kit/styles';
47
58
  ```
48
59
 
49
- ### Typography
50
- Компоненты для заголовков, текста и метрик.
60
+ Example with bundler-resolved asset URLs:
51
61
 
52
62
  ```tsx
53
- <Heading level={1}>Main Title</Heading>
54
- <Text>Regular text</Text>
55
- <Text strong>Strong text</Text>
56
- <Metric large>1,234</Metric>
63
+ import plexSansRegularUrl from 'mbt-ui-kit/fonts/ibm-plex-sans-v23-latin-regular.woff2';
64
+ import plexSansMediumUrl from 'mbt-ui-kit/fonts/ibm-plex-sans-v23-latin-500.woff2';
65
+ import plexSansSemiboldUrl from 'mbt-ui-kit/fonts/ibm-plex-sans-v23-latin-600.woff2';
66
+ import interVariableUrl from 'mbt-ui-kit/fonts/Inter-VariableFont_opsz,wght.ttf';
67
+ import interItalicVariableUrl from 'mbt-ui-kit/fonts/Inter-Italic-VariableFont_opsz,wght.ttf';
68
+ import plexMonoRegularUrl from 'mbt-ui-kit/fonts/ibm-plex-mono-v20-latin-regular.woff2';
69
+ import plexMonoMediumUrl from 'mbt-ui-kit/fonts/ibm-plex-mono-v20-latin-500.woff2';
70
+ import plexMonoSemiboldUrl from 'mbt-ui-kit/fonts/ibm-plex-mono-v20-latin-600.woff2';
71
+
72
+ const preloadFonts = [
73
+ plexSansRegularUrl,
74
+ plexSansMediumUrl,
75
+ plexSansSemiboldUrl,
76
+ interVariableUrl,
77
+ interItalicVariableUrl,
78
+ plexMonoRegularUrl,
79
+ plexMonoMediumUrl,
80
+ plexMonoSemiboldUrl,
81
+ ];
57
82
  ```
58
83
 
59
- ### MenuButton
60
- Кнопка для боковых меню с иконкой и текстом.
61
-
62
- ```tsx
63
- <MenuButton>Training</MenuButton>
64
- <MenuButton selected>Training</MenuButton>
65
- <MenuButton small>Training</MenuButton>
84
+ Example preload tags:
85
+
86
+ ```html
87
+ <link
88
+ rel="preload"
89
+ href="...resolved IBM Plex Sans 400 url..."
90
+ as="font"
91
+ type="font/woff2"
92
+ crossorigin
93
+ />
94
+ <link
95
+ rel="preload"
96
+ href="...resolved IBM Plex Sans 500 url..."
97
+ as="font"
98
+ type="font/woff2"
99
+ crossorigin
100
+ />
101
+ <link
102
+ rel="preload"
103
+ href="...resolved IBM Plex Sans 600 url..."
104
+ as="font"
105
+ type="font/woff2"
106
+ crossorigin
107
+ />
108
+ <link
109
+ rel="preload"
110
+ href="...resolved Inter variable url..."
111
+ as="font"
112
+ type="font/ttf"
113
+ crossorigin
114
+ />
115
+ <link
116
+ rel="preload"
117
+ href="...resolved Inter italic variable url..."
118
+ as="font"
119
+ type="font/ttf"
120
+ crossorigin
121
+ />
122
+ <link
123
+ rel="preload"
124
+ href="...resolved IBM Plex Mono 400 url..."
125
+ as="font"
126
+ type="font/woff2"
127
+ crossorigin
128
+ />
129
+ <link
130
+ rel="preload"
131
+ href="...resolved IBM Plex Mono 500 url..."
132
+ as="font"
133
+ type="font/woff2"
134
+ crossorigin
135
+ />
136
+ <link
137
+ rel="preload"
138
+ href="...resolved IBM Plex Mono 600 url..."
139
+ as="font"
140
+ type="font/woff2"
141
+ crossorigin
142
+ />
66
143
  ```
67
144
 
68
- ## Разработка
145
+ The library publishes the font files in `dist/fonts/`, exposes them under `mbt-ui-kit/fonts/*`, and ships matching declarations in both `mbt-ui-kit/styles` and `mbt-ui-kit/fonts.css`, including both normal and italic Inter variable fonts.
69
146
 
70
- ```bash
71
- # Установка зависимостей
72
- bun install
147
+ Use `mbt-ui-kit/fonts.css` only when the consumer intentionally wants the font-face declarations without the full package stylesheet. Most apps should import `mbt-ui-kit/styles` only.
73
148
 
74
- # Запуск Storybook
75
- bun storybook
149
+ ## Components
76
150
 
77
- # Сборка библиотеки
78
- bun run build
151
+ Primary exports include:
79
152
 
80
- # Линтинг и форматирование
81
- bun run lint
82
- bun run format
83
- ```
153
+ - `Button`
154
+ - `Input`
155
+ - `Loader`
156
+ - `Heading`
157
+ - `Text`
158
+ - `Metric`
159
+ - `MenuButton`
160
+ - `SearchIcon`
161
+ - `GraduationCapIcon`
84
162
 
85
- ## Дизайн-токены
163
+ For richer package examples, use `.ai/agent-examples/README.md`.
86
164
 
87
- Токены дизайн-системы доступны в трёх форматах для максимальной гибкости.
165
+ ## Design Tokens
88
166
 
89
- ### 1. TypeScript/JavaScript
167
+ ### TypeScript or JavaScript
90
168
 
91
- Импорт только токенов (без компонентов и стилей):
92
- ```tsx
93
- import { tokens, colors, spacing, radius } from "mbt-ui-kit/tokens";
94
-
95
- const MyComponent = () => (
96
- <div style={{
97
- backgroundColor: colors.primary,
98
- padding: spacing[4],
99
- borderRadius: radius.sm
100
- }}>
101
- Content
102
- </div>
103
- );
104
- ```
169
+ Use token exports for inline styles, styled-components, or utility layers.
105
170
 
106
- Или из основного пакета:
107
171
  ```tsx
108
- import { colors, spacing, fontSizes } from "mbt-ui-kit";
172
+ import { colors, fontSizes, radius, spacing, tokens } from 'mbt-ui-kit/tokens';
173
+
174
+ const panelStyle = {
175
+ backgroundColor: colors.surface,
176
+ color: colors.textPrimary,
177
+ padding: spacing[5],
178
+ borderRadius: radius.md,
179
+ fontSize: fontSizes[3],
180
+ };
109
181
  ```
110
182
 
111
- Доступные токены:
112
- - `colors` — цветовая палитра
113
- - `fonts` — семейства шрифтов
114
- - `fontSizes` — размеры текста
115
- - `fontWeights` — начертания шрифтов
116
- - `spacing` — отступы и размеры
117
- - `radius` — радиусы скругления
118
- - `zIndex` — z-индексы
119
- - `transitions` — анимации
183
+ Available token groups:
120
184
 
121
- ### 2. CSS Custom Properties
185
+ - `tokens`
186
+ - `colors`
187
+ - `fonts`
188
+ - `fontSizes`
189
+ - `fontWeights`
190
+ - `fontFeatures`
191
+ - `spacing`
192
+ - `radius`
193
+ - `zIndex`
194
+ - `transitions`
195
+
196
+ ### CSS Custom Properties
122
197
 
123
- Импорт CSS переменных:
124
198
  ```tsx
125
- import "mbt-ui-kit/tokens.css";
199
+ import 'mbt-ui-kit/tokens.css';
126
200
  ```
127
201
 
128
- Использование в CSS/SCSS:
129
202
  ```css
130
- .my-class {
131
- background-color: var(--mbt-color-primary);
203
+ .panel {
204
+ background-color: var(--mbt-color-surface);
205
+ color: var(--mbt-color-text-primary);
132
206
  padding: var(--mbt-space-4);
133
207
  border-radius: var(--mbt-radius-sm);
134
- font-family: var(--mbt-font-primary);
135
208
  transition: all var(--mbt-transition-fast);
136
209
  }
137
210
  ```
138
211
 
139
- Все переменные имеют префикс `--mbt-` для избежания конфликтов.
140
-
141
- ### 3. SCSS Variables (для расширения библиотеки)
212
+ ### Sass Tokens
142
213
 
143
214
  ```scss
144
- @use "mbt-ui-kit/src/styles/tokens" as *;
215
+ @use 'mbt-ui-kit/src/styles/tokens' as *;
145
216
 
146
- .my-class {
147
- background-color: $primary;
217
+ .panel {
218
+ background-color: $surface;
219
+ color: $text-primary;
148
220
  padding: $space-4;
149
221
  border-radius: $radius-sm;
150
- font-family: $font-ui-primary;
151
222
  }
152
223
  ```
153
224
 
154
- ## TypeScript
225
+ ## Development
226
+
227
+ ```bash
228
+ pnpm install
229
+ pnpm build
230
+ pnpm lint
231
+ pnpm format
232
+ pnpm storybook
233
+ ```
155
234
 
156
- Библиотека полностью типизирована с подробными JSDoc комментариями.
235
+ This repo standardizes on `pnpm` only.
157
236
 
158
- ## Лицензия
237
+ ## Notes
159
238
 
160
- MIT
239
+ - Storybook is maintainer-facing visual coverage, not the canonical package contract.
240
+ - Package-owned agent guidance is versioned with the library and published with the package.