@tetjana/flowmakers-ds 0.1.6 → 0.1.7
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/dist/components/Button.figma.d.ts +1 -0
- package/dist/components/Checkbox.figma.d.ts +1 -0
- package/dist/components/Input.figma.d.ts +1 -0
- package/dist/components/Tag.figma.d.ts +1 -0
- package/dist/components/Toggle.figma.d.ts +1 -0
- package/guidelines/Guidelines.md +36 -0
- package/guidelines/components/button.md +50 -0
- package/guidelines/components/checkbox.md +51 -0
- package/guidelines/components/footer.md +63 -0
- package/guidelines/components/header.md +57 -0
- package/guidelines/components/input.md +39 -0
- package/guidelines/components/tag.md +27 -0
- package/guidelines/components/toggle.md +41 -0
- package/guidelines/design-tokens/colors.md +42 -0
- package/guidelines/design-tokens/spacing.md +41 -0
- package/guidelines/design-tokens/typography.md +23 -0
- package/guidelines/overview-components.md +19 -0
- package/package.json +21 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# FlowMakers Design System Guidelines
|
|
2
|
+
|
|
3
|
+
This project uses the **FlowMakers Design System** installed via `@tetjana/flowmakers-ds`.
|
|
4
|
+
|
|
5
|
+
## IMPORTANT — Always read first:
|
|
6
|
+
- All files starting with `overview-` in this folder
|
|
7
|
+
- All files in the `design-tokens/` folder:
|
|
8
|
+
- `design-tokens/colors.md`
|
|
9
|
+
- `design-tokens/typography.md`
|
|
10
|
+
- `design-tokens/spacing.md`
|
|
11
|
+
|
|
12
|
+
## Read before using a component:
|
|
13
|
+
Open `guidelines/components/{ComponentName}.md` BEFORE writing any code with that component.
|
|
14
|
+
|
|
15
|
+
## Available components
|
|
16
|
+
- `Button` → `guidelines/components/button.md`
|
|
17
|
+
- `Input` → `guidelines/components/input.md`
|
|
18
|
+
- `Tag` → `guidelines/components/tag.md`
|
|
19
|
+
- `Toggle` → `guidelines/components/toggle.md`
|
|
20
|
+
- `Checkbox` → `guidelines/components/checkbox.md`
|
|
21
|
+
- `Header` → `guidelines/components/header.md`
|
|
22
|
+
- `Footer` → `guidelines/components/footer.md`
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
1. **Always prefer FlowMakers components** over native HTML elements (e.g. use `<Button>` not `<button>`)
|
|
26
|
+
2. **Never override component styles** with inline styles or className unless strictly necessary
|
|
27
|
+
3. **Always use CSS variables** from the design tokens for colors, spacing, and typography
|
|
28
|
+
4. **Fonts**: Manrope (headings) and Nunito Sans (body/UI) — import from Google Fonts
|
|
29
|
+
5. **Always import styles**: `import '@tetjana/flowmakers-ds/styles'` must be in the entry file
|
|
30
|
+
|
|
31
|
+
## Steps before writing code
|
|
32
|
+
1. Read `overview-components.md`
|
|
33
|
+
2. Read all files in `design-tokens/`
|
|
34
|
+
3. Identify which components you need
|
|
35
|
+
4. Read each component's `.md` file in `guidelines/components/`
|
|
36
|
+
5. Write the code using only FlowMakers components and tokens
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
**Import**: `import { Button } from '@tetjana/flowmakers-ds'`
|
|
4
|
+
|
|
5
|
+
## Variants
|
|
6
|
+
| Variant | Appearance | Use for |
|
|
7
|
+
|------------------|-------------------------------------|----------------------------------|
|
|
8
|
+
| `primary` | Black bg, white text | Main CTA actions |
|
|
9
|
+
| `hero` | Black bg, pink border on hover | Landing page main CTA |
|
|
10
|
+
| `secondary` | Transparent, black border | Secondary actions |
|
|
11
|
+
| `secondary-large`| Same but taller (52px) | Prominent secondary actions |
|
|
12
|
+
| `ghost` | No border, no bg | Tertiary, low-emphasis actions |
|
|
13
|
+
| `ghost-icon` | Icon-only ghost button | Toolbar icons, small actions |
|
|
14
|
+
|
|
15
|
+
## Sizes
|
|
16
|
+
| Size | Height | Use for |
|
|
17
|
+
|-------|--------|----------------------|
|
|
18
|
+
| `sm` | 32px | Compact UI, tables |
|
|
19
|
+
| `md` | 42px | Default (most cases) |
|
|
20
|
+
| `lg` | 52px | Landing pages |
|
|
21
|
+
|
|
22
|
+
## Props
|
|
23
|
+
| Prop | Type | Default | Description |
|
|
24
|
+
|-------------|-----------------|-------------|---------------------------|
|
|
25
|
+
| `variant` | ButtonVariant | `'primary'` | Visual style |
|
|
26
|
+
| `size` | ButtonSize | `'md'` | Height/padding |
|
|
27
|
+
| `leftIcon` | ReactNode | — | Icon before text |
|
|
28
|
+
| `rightIcon` | ReactNode | — | Icon after text |
|
|
29
|
+
| `fullWidth` | boolean | `false` | Stretch to container |
|
|
30
|
+
| `disabled` | boolean | `false` | Disabled state |
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
```tsx
|
|
34
|
+
// Primary
|
|
35
|
+
<Button>Почати тренування</Button>
|
|
36
|
+
|
|
37
|
+
// Secondary with icon
|
|
38
|
+
<Button variant="secondary" leftIcon={<PlusIcon />}>Додати</Button>
|
|
39
|
+
|
|
40
|
+
// Disabled
|
|
41
|
+
<Button disabled>Недоступно</Button>
|
|
42
|
+
|
|
43
|
+
// Full width
|
|
44
|
+
<Button fullWidth>Зареєструватись</Button>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Do NOT
|
|
48
|
+
- Do not use native `<button>` — always use `<Button>`
|
|
49
|
+
- Do not add className to change colors
|
|
50
|
+
- Do not use `primary` for destructive actions — use a red-tinted secondary instead
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Checkbox
|
|
2
|
+
|
|
3
|
+
**Import**: `import { Checkbox } from '@tetjana/flowmakers-ds'`
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
Чекбокс для вибору одного або кількох варіантів. Підтримує indeterminate стан.
|
|
7
|
+
|
|
8
|
+
## Props
|
|
9
|
+
| Prop | Type | Required | Default | Description |
|
|
10
|
+
|-----------------|----------------------------|----------|-----------|--------------------------------------|
|
|
11
|
+
| `checked` | boolean | no | `false` | Checked state |
|
|
12
|
+
| `indeterminate` | boolean | no | `false` | Mixed state (overrides checked icon) |
|
|
13
|
+
| `onChange` | (checked: boolean) => void | no | — | Called when user clicks |
|
|
14
|
+
| `label` | string | no | — | Text label next to checkbox |
|
|
15
|
+
| `size` | `'small'` \| `'large'` | no | `'small'` | Box size (16px vs 22px) |
|
|
16
|
+
| `disabled` | boolean | no | `false` | Prevents interaction |
|
|
17
|
+
|
|
18
|
+
## Visual
|
|
19
|
+
- **Unchecked** → white box, grey border
|
|
20
|
+
- **Checked** → blue fill (`#0d6fff`), white checkmark SVG
|
|
21
|
+
- **Indeterminate** → blue fill, white minus bar
|
|
22
|
+
- **Disabled** → 50% opacity, no pointer events
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
```tsx
|
|
26
|
+
// Simple checkbox with label
|
|
27
|
+
const [agreed, setAgreed] = useState(false);
|
|
28
|
+
<Checkbox
|
|
29
|
+
checked={agreed}
|
|
30
|
+
onChange={setAgreed}
|
|
31
|
+
label="Я погоджуюсь з умовами використання"
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
// Large size
|
|
35
|
+
<Checkbox size="large" checked={selected} onChange={setSelected} label="Вибрати всіх" />
|
|
36
|
+
|
|
37
|
+
// Indeterminate (partial selection)
|
|
38
|
+
<Checkbox
|
|
39
|
+
indeterminate={someSelected && !allSelected}
|
|
40
|
+
checked={allSelected}
|
|
41
|
+
onChange={toggleAll}
|
|
42
|
+
label="Вибрати всіх"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
// Disabled
|
|
46
|
+
<Checkbox checked={true} disabled label="Незмінний параметр" />
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Do NOT
|
|
50
|
+
- Do NOT use for on/off single switches — use `Toggle` instead
|
|
51
|
+
- Do NOT rely on CSS classes for checked state — always use `checked` prop
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Footer
|
|
2
|
+
|
|
3
|
+
**Import**: `import { Footer } from '@tetjana/flowmakers-ds'`
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
Footer сторінки з CTA-блоком та секціями посилань. Підтримує light і dark теми.
|
|
7
|
+
|
|
8
|
+
## Props
|
|
9
|
+
| Prop | Type | Required | Default | Description |
|
|
10
|
+
|---------------|-------------------|----------|-------------------------------------------|------------------------------------------|
|
|
11
|
+
| `variant` | `'light'` \| `'dark'` | no | `'light'` | Light (white bg) or dark (black bg) |
|
|
12
|
+
| `headline` | string | no | `'Є ідеї чи пропозиції?'` | CTA heading on the left side |
|
|
13
|
+
| `ctaLabel` | string | no | `'Написати нам'` | CTA button text |
|
|
14
|
+
| `onCtaClick` | () => void | no | — | CTA button click handler |
|
|
15
|
+
| `sections` | FooterSection[] | no | `[]` | Link columns (title + links) |
|
|
16
|
+
| `copyright` | string | no | `'© 2024 Made by FlowMakers...'` | Bottom copyright line |
|
|
17
|
+
|
|
18
|
+
## Types
|
|
19
|
+
```tsx
|
|
20
|
+
interface FooterLink { label: string; href: string; }
|
|
21
|
+
interface FooterSection { title: string; links: FooterLink[]; }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Visual
|
|
25
|
+
- **Light**: white/grey bg, black text, black CTA button
|
|
26
|
+
- **Dark**: `#18181b` bg, white text (75% opacity), outlined CTA with pink border
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
```tsx
|
|
30
|
+
// Minimal light footer
|
|
31
|
+
<Footer />
|
|
32
|
+
|
|
33
|
+
// Dark footer with sections
|
|
34
|
+
<Footer
|
|
35
|
+
variant="dark"
|
|
36
|
+
headline="Долучайся до FlowMakers"
|
|
37
|
+
ctaLabel="Розпочати безкоштовно"
|
|
38
|
+
onCtaClick={() => navigate('/register')}
|
|
39
|
+
sections={[
|
|
40
|
+
{
|
|
41
|
+
title: 'Продукт',
|
|
42
|
+
links: [
|
|
43
|
+
{ label: 'Про нас', href: '/about' },
|
|
44
|
+
{ label: 'Функції', href: '/features' },
|
|
45
|
+
{ label: 'Тарифи', href: '/pricing' },
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: 'Підтримка',
|
|
50
|
+
links: [
|
|
51
|
+
{ label: 'FAQ', href: '/faq' },
|
|
52
|
+
{ label: 'Контакти', href: '/contact' },
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
]}
|
|
56
|
+
copyright="© 2025 FlowMakers. Всі права захищені."
|
|
57
|
+
/>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Do NOT
|
|
61
|
+
- Do NOT add more than 3–4 sections — it breaks the layout
|
|
62
|
+
- Do NOT use Footer inside a card or modal — it is a page-level component
|
|
63
|
+
- Do NOT put interactive forms inside Footer — keep it to links and CTA only
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Header
|
|
2
|
+
|
|
3
|
+
**Import**: `import { Header } from '@tetjana/flowmakers-ds'`
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
Заголовок картки/віджета з title, необов'язковим subtitle і слотами для іконок/дій зліва і справа.
|
|
7
|
+
Використовується як верхня частина інформаційних блоків і дашборд-карток.
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
| Prop | Type | Required | Default | Description |
|
|
11
|
+
|-------------|-------------------------|----------|------------|---------------------------------------|
|
|
12
|
+
| `title` | string | ✅ yes | — | Main heading text |
|
|
13
|
+
| `subtitle` | string | no | — | Secondary text below the title |
|
|
14
|
+
| `color` | `'purple'` \| `'grey'` | no | `'purple'` | Background color |
|
|
15
|
+
| `leftSlot` | ReactNode | no | — | Icon or element on the left |
|
|
16
|
+
| `rightSlot` | ReactNode | no | — | Action button or icon on the right |
|
|
17
|
+
|
|
18
|
+
## Color backgrounds
|
|
19
|
+
| Color | Background token | Hex | Use for |
|
|
20
|
+
|----------|-------------------------|-----------|--------------------------------------|
|
|
21
|
+
| `purple` | `--primary-fill-100` | `#eeecfb` | Default, most widgets and cards |
|
|
22
|
+
| `grey` | `--nature-fill-50` | `#f7f7f8` | Secondary cards, settings sections |
|
|
23
|
+
|
|
24
|
+
## Visual
|
|
25
|
+
- Rounded top corners (`border-radius: 20px 20px 0 0`)
|
|
26
|
+
- Uses **Manrope Bold 18px** for title
|
|
27
|
+
- Uses **Nunito Sans Regular 14px** for subtitle in muted grey
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
```tsx
|
|
31
|
+
// Basic
|
|
32
|
+
<Header title="Мій профіль" />
|
|
33
|
+
|
|
34
|
+
// With subtitle
|
|
35
|
+
<Header title="Аналітика" subtitle="Ваш прогрес за останній місяць" />
|
|
36
|
+
|
|
37
|
+
// Grey background with icons
|
|
38
|
+
<Header
|
|
39
|
+
color="grey"
|
|
40
|
+
title="Налаштування"
|
|
41
|
+
leftSlot={<SettingsIcon />}
|
|
42
|
+
rightSlot={<Button variant="ghost-icon"><EditIcon /></Button>}
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
// Full widget pattern (Header + content inside a card)
|
|
46
|
+
<div style={{ borderRadius: '20px', border: '1px solid var(--bw-fill-100)' }}>
|
|
47
|
+
<Header title="Оцінки" subtitle="Останні результати" />
|
|
48
|
+
<div style={{ padding: '16px' }}>
|
|
49
|
+
{/* widget content */}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Do NOT
|
|
55
|
+
- Do NOT use Header as a page `<h1>` — it is for widget/card headers only
|
|
56
|
+
- Do NOT put long text in subtitle — keep it to one short line
|
|
57
|
+
- Do NOT change background via className — use the `color` prop
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Input
|
|
2
|
+
|
|
3
|
+
**Import**: `import { Input } from '@tetjana/flowmakers-ds'`
|
|
4
|
+
|
|
5
|
+
## States
|
|
6
|
+
`default` → `hover` → `focused` → `filled` → `error` / `success`
|
|
7
|
+
|
|
8
|
+
## Props
|
|
9
|
+
| Prop | Type | Default | Description |
|
|
10
|
+
|------------------|-------------|-------------|-------------------------------|
|
|
11
|
+
| `label` | string | — | Label above the input |
|
|
12
|
+
| `placeholder` | string | — | Placeholder text |
|
|
13
|
+
| `state` | InputState | `'default'` | Visual state |
|
|
14
|
+
| `errorMessage` | string | — | Shown when state=error |
|
|
15
|
+
| `successMessage` | string | — | Shown when state=success |
|
|
16
|
+
| `leftIcon` | ReactNode | — | Icon inside left side |
|
|
17
|
+
| `rightIcon` | ReactNode | — | Icon inside right side |
|
|
18
|
+
| `disabled` | boolean | `false` | Disabled state |
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
```tsx
|
|
22
|
+
// Email input
|
|
23
|
+
<Input label="Електронна пошта" placeholder="Введіть Вашу електронну пошту" type="email" />
|
|
24
|
+
|
|
25
|
+
// With error
|
|
26
|
+
<Input
|
|
27
|
+
label="Пароль"
|
|
28
|
+
type="password"
|
|
29
|
+
state="error"
|
|
30
|
+
errorMessage="Невірний пароль"
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
// With success
|
|
34
|
+
<Input label="Email" state="success" successMessage="Email підтверджено" />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Do NOT
|
|
38
|
+
- Do not use native `<input>` for form fields — always use `<Input>`
|
|
39
|
+
- Do not manually change border color with CSS — use the `state` prop
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Tag
|
|
2
|
+
|
|
3
|
+
**Import**: `import { Tag } from '@tetjana/flowmakers-ds'`
|
|
4
|
+
|
|
5
|
+
## Colors
|
|
6
|
+
| Color | Background | Text | Use for |
|
|
7
|
+
|----------|-------------------|-------------------|-----------------------------|
|
|
8
|
+
| `grey` | `#eeeef0` | `#4c4d58` | Neutral labels, duration |
|
|
9
|
+
| `green` | `#d9f2e7` | `#1b6153` | Success, available, done |
|
|
10
|
+
| `yellow` | `#fff0d4` | `#c54e09` | Warning, in progress |
|
|
11
|
+
| `purple` | `#eeecfb` | `#6d45bc` | Category, feature label |
|
|
12
|
+
| `pink` | `#ffe7fc` | `#b51692` | Special, premium |
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
| Prop | Type | Default | Description |
|
|
16
|
+
|------------|-----------|----------|----------------------|
|
|
17
|
+
| `color` | TagColor | `'grey'` | Color variant |
|
|
18
|
+
| `children` | ReactNode | — | Tag label text |
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
```tsx
|
|
22
|
+
<Tag>5 хв</Tag>
|
|
23
|
+
<Tag color="green">Завершено</Tag>
|
|
24
|
+
<Tag color="yellow">В процесі</Tag>
|
|
25
|
+
<Tag color="purple">AI</Tag>
|
|
26
|
+
<Tag color="pink">Premium</Tag>
|
|
27
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Toggle
|
|
2
|
+
|
|
3
|
+
**Import**: `import { Toggle } from '@tetjana/flowmakers-ds'`
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
Перемикач on/off. Обов'язково потребує контрольованого стану (`checked` + `onChange`).
|
|
7
|
+
|
|
8
|
+
## Props
|
|
9
|
+
| Prop | Type | Required | Default | Description |
|
|
10
|
+
|-------------|----------------------------|----------|---------|-------------------------------|
|
|
11
|
+
| `checked` | boolean | ✅ yes | — | Current on/off state |
|
|
12
|
+
| `onChange` | (checked: boolean) => void | ✅ yes | — | Called when user toggles |
|
|
13
|
+
| `label` | string | no | — | Text label next to the toggle |
|
|
14
|
+
| `disabled` | boolean | no | `false` | Prevents interaction |
|
|
15
|
+
|
|
16
|
+
## Visual
|
|
17
|
+
- **Off** → grey track, white thumb
|
|
18
|
+
- **On** → gradient track (pink→yellow→mint→purple), white thumb, animated
|
|
19
|
+
- **Disabled** → 50% opacity, no pointer events
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
```tsx
|
|
23
|
+
// Controlled toggle with useState
|
|
24
|
+
const [enabled, setEnabled] = useState(false);
|
|
25
|
+
<Toggle
|
|
26
|
+
checked={enabled}
|
|
27
|
+
onChange={setEnabled}
|
|
28
|
+
label="Отримувати сповіщення"
|
|
29
|
+
/>
|
|
30
|
+
|
|
31
|
+
// Disabled
|
|
32
|
+
<Toggle checked={false} onChange={() => {}} disabled label="Недоступно" />
|
|
33
|
+
|
|
34
|
+
// Without label (icon-only row)
|
|
35
|
+
<Toggle checked={active} onChange={setActive} />
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Do NOT
|
|
39
|
+
- Do NOT use without `checked` + `onChange` — the component is always controlled
|
|
40
|
+
- Do NOT use for multi-option selection — use `Checkbox` instead
|
|
41
|
+
- Do NOT change the track color via CSS — the gradient is part of the brand style
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Color Tokens
|
|
2
|
+
|
|
3
|
+
All colors are CSS variables. Import `@tetjana/flowmakers-ds/styles` to use them.
|
|
4
|
+
|
|
5
|
+
## Primary palette (Purple)
|
|
6
|
+
| Token | Value | Use for |
|
|
7
|
+
|-----------------------------|-----------|--------------------------------------|
|
|
8
|
+
| `--primary-fill-100` | `#eeecfb` | Light purple backgrounds, tag bg |
|
|
9
|
+
| `--primary-fill-500` | `#7d65e1` | Focus rings, active checkboxes |
|
|
10
|
+
| `--primary-fill-600` | `#6d45bc` | Hover states on purple elements |
|
|
11
|
+
| `--primary-fill-700` | `#6d45bc` | Purple tag text |
|
|
12
|
+
|
|
13
|
+
## Black & White
|
|
14
|
+
| Token | Value | Use for |
|
|
15
|
+
|-----------------------------|-----------|--------------------------------------|
|
|
16
|
+
| `--bw-fill-black` | `#121212` | Primary buttons, headings, body text |
|
|
17
|
+
| `--bw-fill-white` | `#ffffff` | Backgrounds, button text on dark |
|
|
18
|
+
| `--bw-fill-50` | `#f7f7f8` | Page background, grey header |
|
|
19
|
+
| `--bw-fill-100` | `#eeeef0` | Hover backgrounds |
|
|
20
|
+
| `--bw-fill-200` | `#dcdcdc` | Disabled button background |
|
|
21
|
+
| `--bw-fill-300` | `#b8b9c1` | Input borders (default) |
|
|
22
|
+
| `--bw-fill-400` | `#989898` | Subtitle, secondary text |
|
|
23
|
+
| `--bw-fill-500` | `#7c7c7c` | Muted text |
|
|
24
|
+
|
|
25
|
+
## Accent colors
|
|
26
|
+
| Token | Value | Use for |
|
|
27
|
+
|-----------------------------|-----------|--------------------------------------|
|
|
28
|
+
| `--pink-fill-100` | `#ffe7fc` | Pink tag background |
|
|
29
|
+
| `--pink-fill-300` | `#ffa8f1` | Hero button hover border |
|
|
30
|
+
| `--pink-fill-700` | `#b51692` | Pink tag text |
|
|
31
|
+
| `--green-fill-100` | `#d9f2e7` | Green tag background, success tint |
|
|
32
|
+
| `--green-fill-500` | `#27a872` | Success input border |
|
|
33
|
+
| `--green-fill-700` | `#1b6153` | Green tag text |
|
|
34
|
+
| `--yellow-fill-100` | `#fff0d4` | Yellow tag background, warning tint |
|
|
35
|
+
| `--yellow-fill-700` | `#c54e09` | Yellow tag text |
|
|
36
|
+
|
|
37
|
+
## Decision tree
|
|
38
|
+
- Need a background? → Start with `--bw-fill-50` or `--primary-fill-100`
|
|
39
|
+
- Need text on white? → Use `--bw-fill-black`
|
|
40
|
+
- Need muted/secondary text? → Use `--bw-fill-400`
|
|
41
|
+
- Need a border? → Use `--bw-fill-300` (default) or `--primary-fill-500` (focused)
|
|
42
|
+
- Need a status color? → Use the matching `--green`, `--yellow`, or `--pink` token
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Spacing & Border Radius Tokens
|
|
2
|
+
|
|
3
|
+
All tokens are CSS variables available after `import '@tetjana/flowmakers-ds/styles'`.
|
|
4
|
+
|
|
5
|
+
## Spacing scale
|
|
6
|
+
| Token | Value | Use for |
|
|
7
|
+
|----------------|-------|---------------------------------------------------|
|
|
8
|
+
| `--space-xxs` | 4px | Icon gaps, tiny internal padding |
|
|
9
|
+
| `--space-xs` | 8px | Between icon and text, small card gaps |
|
|
10
|
+
| `--space-s` | 10px | Button padding (sm), tight list items |
|
|
11
|
+
| `--space-sm` | 12px | Between label and input, small section gaps |
|
|
12
|
+
| `--space-m` | 16px | Default padding inside cards, between form fields |
|
|
13
|
+
| `--space-l` | 20px | Card/widget internal padding |
|
|
14
|
+
| `--space-xl` | 24px | Section padding, between major blocks |
|
|
15
|
+
| `--space-2xl` | 32px | Large gaps, between sections |
|
|
16
|
+
| `--space-3xl` | 48px | Between major page sections |
|
|
17
|
+
|
|
18
|
+
## Border radius scale
|
|
19
|
+
| Token | Value | Use for |
|
|
20
|
+
|----------------|--------|----------------------------------------------|
|
|
21
|
+
| `--radius-xs` | 8px | Small chips, badges, compact inputs |
|
|
22
|
+
| `--radius-s` | 10px | Buttons (sm), small cards |
|
|
23
|
+
| `--radius-m` | 12px | Buttons (md/lg), inputs, standard cards |
|
|
24
|
+
| `--radius-l` | 16px | Large cards, modals |
|
|
25
|
+
| `--radius-xl` | 20px | Widget containers, Header component |
|
|
26
|
+
| `--radius-full`| 9999px | Pills, Tags, Toggle track, Avatar circles |
|
|
27
|
+
|
|
28
|
+
## Rules
|
|
29
|
+
- Always use `--space-*` tokens instead of hardcoded pixel values
|
|
30
|
+
- For card padding: use `var(--space-m, 16px)` as the default fallback
|
|
31
|
+
- For inner component spacing: `--space-xs` (8px) or `--space-sm` (12px)
|
|
32
|
+
- For section-level gaps: `--space-xl` (24px) or `--space-2xl` (32px)
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
```css
|
|
36
|
+
.my-card {
|
|
37
|
+
padding: var(--space-m);
|
|
38
|
+
border-radius: var(--radius-l);
|
|
39
|
+
gap: var(--space-sm);
|
|
40
|
+
}
|
|
41
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Typography Tokens
|
|
2
|
+
|
|
3
|
+
## Font families
|
|
4
|
+
- **Headings**: `Manrope` (Bold 700) — page titles, widget titles, display text
|
|
5
|
+
- **Body & UI**: `Nunito Sans` — all other text (labels, body, buttons, captions)
|
|
6
|
+
|
|
7
|
+
## Font size scale
|
|
8
|
+
| Token | Value | Class | Use for |
|
|
9
|
+
|----------------------|--------|----------------|--------------------------------|
|
|
10
|
+
| `--font-size-12` | 12px | `.text-tiny` | Tags, tiny labels, captions |
|
|
11
|
+
| `--font-size-14` | 14px | `.text-body-md`| Default body text, button text |
|
|
12
|
+
| `--font-size-16` | 16px | `.text-body-lg`| Input labels, subtitles |
|
|
13
|
+
| `--font-size-18` | 18px | `.text-h4` | Widget/card headings |
|
|
14
|
+
| `--font-size-24` | 24px | `.text-h3` | Section headings |
|
|
15
|
+
| `--font-size-30` | 30px | `.text-h2` | Page headings, footer headline |
|
|
16
|
+
| `--font-size-36`+ | 36px+ | `.text-h1` | Hero/landing headings |
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
- Always use **Manrope Bold** for headings (h1–h4)
|
|
20
|
+
- Use **Nunito Sans Regular (400)** for body text
|
|
21
|
+
- Use **Nunito Sans Bold (700)** for buttons and tags
|
|
22
|
+
- Use **Nunito Sans SemiBold (600)** for subtitles and section labels
|
|
23
|
+
- **Minimum body text size: 14px** — never use 12px for paragraph text
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# FlowMakers Components Overview
|
|
2
|
+
|
|
3
|
+
All components are imported from `@tetjana/flowmakers-ds`.
|
|
4
|
+
Always import the CSS too: `import '@tetjana/flowmakers-ds/styles'`
|
|
5
|
+
|
|
6
|
+
| Component | Purpose | Guidelines file |
|
|
7
|
+
|-------------|----------------------------------------------|------------------------------------------|
|
|
8
|
+
| `Button` | All clickable actions | [button.md](components/button.md) |
|
|
9
|
+
| `Input` | Text fields, email, password, search | [input.md](components/input.md) |
|
|
10
|
+
| `Tag` | Labels, badges, status indicators | [tag.md](components/tag.md) |
|
|
11
|
+
| `Toggle` | Boolean on/off switches | [toggle.md](components/toggle.md) |
|
|
12
|
+
| `Checkbox` | Multi-select options | [checkbox.md](components/checkbox.md) |
|
|
13
|
+
| `Header` | Widget/card header with title and subtitle | [header.md](components/header.md) |
|
|
14
|
+
| `Footer` | Page footer with links and CTA | [footer.md](components/footer.md) |
|
|
15
|
+
|
|
16
|
+
## General rules
|
|
17
|
+
- Do NOT add `className` to override colors — use CSS variables instead
|
|
18
|
+
- All components accept standard HTML attributes via spread props
|
|
19
|
+
- Disabled state: always pass `disabled` prop, never CSS-only
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tetjana/flowmakers-ds",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "FlowMakers UI Design System — React components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -13,24 +13,33 @@
|
|
|
13
13
|
},
|
|
14
14
|
"./styles": "./dist/styles.css"
|
|
15
15
|
},
|
|
16
|
-
"files": [
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"guidelines"
|
|
19
|
+
],
|
|
17
20
|
"scripts": {
|
|
18
21
|
"build": "vite build && tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
19
|
-
"dev":
|
|
20
|
-
"lint":
|
|
22
|
+
"dev": "vite",
|
|
23
|
+
"lint": "eslint src"
|
|
21
24
|
},
|
|
22
25
|
"peerDependencies": {
|
|
23
|
-
"react":
|
|
26
|
+
"react": ">=18",
|
|
24
27
|
"react-dom": ">=18"
|
|
25
28
|
},
|
|
26
29
|
"devDependencies": {
|
|
27
|
-
"@
|
|
28
|
-
"@types/react
|
|
29
|
-
"@
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"vite
|
|
30
|
+
"@figma/code-connect": "^1.4.1",
|
|
31
|
+
"@types/react": "^18.0.0",
|
|
32
|
+
"@types/react-dom": "^18.0.0",
|
|
33
|
+
"@vitejs/plugin-react": "^4.0.0",
|
|
34
|
+
"typescript": "^5.0.0",
|
|
35
|
+
"vite": "^5.0.0",
|
|
36
|
+
"vite-plugin-dts": "^3.0.0"
|
|
33
37
|
},
|
|
34
|
-
"keywords": [
|
|
38
|
+
"keywords": [
|
|
39
|
+
"flowmakers",
|
|
40
|
+
"design-system",
|
|
41
|
+
"react",
|
|
42
|
+
"ui"
|
|
43
|
+
],
|
|
35
44
|
"license": "MIT"
|
|
36
45
|
}
|