Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .changeset/brown-months-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@alfalab/core-components-select': major
'@alfalab/core-components': major
---

##### Select, Select{Desktop,Mobile}, Option, Optgroup, OptionsList

- Удалены `deprecated` значения пропа `size`. Для перехода используйте следующие соответствия:
- `'s'` -> `48`
- `'m'` -> `56`
- `'l'` -> `64`
- `'xl'` -> `72`
8 changes: 8 additions & 0 deletions .changeset/chubby-ducks-enter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@alfalab/core-components': minor
'@alfalab/core-components-text': minor
---

##### Text

- Добавлены недостающие текстовые стили `'accent-tagline'`, `'action-tagline'` и `'paragraph-tagline'`
8 changes: 8 additions & 0 deletions .changeset/crazy-hoops-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@alfalab/core-components': minor
'@alfalab/core-components-toast-plate': minor
---

##### ToastPlate, ToastPlate{Desktop,Mobile}

- Добавлен проп `boldTitle` для управления жирностью заголовка
8 changes: 8 additions & 0 deletions .changeset/little-cows-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@alfalab/core-components': minor
'@alfalab/core-components-types': minor
---

##### Types

- В тип `TypographyType` добавлены недостающие текстовые стили `'accent-tagline'`, `'action-tagline'` и `'paragraph-tagline'`
12 changes: 12 additions & 0 deletions .changeset/many-coats-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@alfalab/core-components-international-phone-input': major
'@alfalab/core-components': major
---

##### InternationalPhoneInput, InternationalPhoneInput{Desktop,Mobile}

- Удалены `deprecated` значения пропа `size`. Для перехода используйте следующие соответствия:
- `'s'` -> `48`
- `'m'` -> `56`
- `'l'` -> `64`
- `'xl'` -> `72`
102 changes: 102 additions & 0 deletions .changeset/metal-mammals-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
'@alfalab/core-components': major
'@alfalab/core-components-bank-card': major
'@alfalab/core-components-bottom-sheet': major
'@alfalab/core-components-button': major
'@alfalab/core-components-calendar': major
'@alfalab/core-components-circular-progress-bar': major
'@alfalab/core-components-code-input': major
'@alfalab/core-components-confirmation': major
'@alfalab/core-components-confirmation-v1': major
'@alfalab/core-components-form-control': major
'@alfalab/core-components-input': major
'@alfalab/core-components-modal': major
'@alfalab/core-components-side-panel': major
'@alfalab/core-components-slider-input': major
'@alfalab/core-components-system-message': major
'@alfalab/core-components-tabs': major
'@alfalab/core-components-themes': major
'@alfalab/core-components-toast-plate': major
'@alfalab/core-components-universal-modal': major
---

##### CSS переменные

- Удалены следующие css переменные, отвечающие за настройку шрифта:
- `--bottom-sheet-subtitle-font-family`
- `--bottom-sheet-subtitle-font-size`
- `--bottom-sheet-subtitle-font-weight`
- `--bottom-sheet-title-font-family`
- `--bottom-sheet-title-font-size`
- `--bottom-sheet-title-font-weight`
- `--button-font-family`
- `--button-font-weight`
- `--calendar-month-only-header-font-family`
- `--calendar-month-only-header-font-size`
- `--calendar-month-only-header-font-weight`
- `--circular-progress-bar-font-family`
- `--circular-progress-bar-font-weight`
- `--code-input-font-family`
- `--code-input-font-size`
- `--code-input-font-weight`
- `--confirmation-header-desktop-font-family`
- `--confirmation-header-desktop-font-size`
- `--confirmation-header-desktop-font-weight`
- `--confirmation-header-font-feature-settings`
- `--confirmation-header-mobile-font-family`
- `--confirmation-header-mobile-font-size`
- `--confirmation-header-mobile-font-weight`
- `--confirmation-input-font-family`
- `--confirmation-input-font-size`
- `--confirmation-input-font-weight`
- `--confirmation-text-font-family`
- `--confirmation-text-font-size`
- `--confirmation-text-font-weight`
- `--confirmation-title-font-family`
- `--confirmation-title-font-feature-settings`
- `--confirmation-title-font-size`
- `--confirmation-title-font-weight`
- `--form-control-font-family`
- `--modal-header-desktop-font-family`
- `--modal-header-desktop-font-weight`
- `--modal-header-mobile-font-family`
- `--modal-header-mobile-font-size`
- `--modal-header-mobile-font-weight`
- `--modal-l-header-desktop-font-size`
- `--modal-s-header-desktop-font-size`
- `--primary-tablist-font-feature-settings`
- `--primary-tablist-l-font-family`
- `--primary-tablist-l-font-size`
- `--primary-tablist-l-font-weight`
- `--primary-tablist-m-font-family`
- `--primary-tablist-m-font-size`
- `--primary-tablist-m-font-weight`
- `--primary-tablist-mobile-font-family`
- `--primary-tablist-mobile-font-size`
- `--primary-tablist-mobile-font-weight`
- `--primary-tablist-s-font-family`
- `--primary-tablist-s-font-size`
- `--primary-tablist-s-font-weight`
- `--primary-tablist-xl-font-family`
- `--primary-tablist-xl-font-size`
- `--primary-tablist-xl-font-weight`
- `--side-panel-header-desktop-font-family`
- `--side-panel-header-desktop-font-weight`
- `--side-panel-header-mobile-font-family`
- `--side-panel-header-mobile-font-size`
- `--side-panel-header-mobile-font-weight`
- `--side-panel-s-header-desktop-font-size`
- `--slider-input-font-weight`
- `--sys-message-desktop-title-font-size`
- `--sys-message-desktop-title-font-weight`
- `--sys-message-mobile-title-font-size`
- `--sys-message-mobile-title-font-weight`
- `--sys-message-title-font-family`
- `--toast-plate-title-font-weight`
- `--universal-modal-header-desktop-font-family`
- `--universal-modal-header-desktop-font-weight`
- `--universal-modal-header-mobile-font-family`
- `--universal-modal-header-mobile-font-size`
- `--universal-modal-header-mobile-font-weight`

- Темизации, использовавшие указанные переменные, приведены к дизайну по-умолчанию
8 changes: 8 additions & 0 deletions .changeset/olive-hands-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@alfalab/core-components': minor
'@alfalab/core-components-input': minor
---

###### Input, Input{Desktop,Mobile}

- Добавлен проп `bold` для управления жирностью текста и плейсхолдера
14 changes: 14 additions & 0 deletions .changeset/purple-rings-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@alfalab/core-components-tag': major
'@alfalab/core-components': major
---

###### Tag, Tag{Desktop,Mobile}

- Удалены `deprecated` значения пропа `size`. Для перехода используйте следующие соответствия:
- `'xxs'` -> `32`
- `'xs'` -> `40`
- `'s'` -> `48`
- `'m'` -> `56`
- `'l'` -> `64`
- `'xl'` -> `72`
9 changes: 9 additions & 0 deletions .changeset/rotten-ears-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@alfalab/core-components-vars': minor
'@alfalab/core-components': minor
---

##### Vars

- Добавлены палитры `colors-go.css` и `colors-go-dark.css`
- Обновление `ui-primitives@35.3.0`
22 changes: 22 additions & 0 deletions .changeset/shiny-planes-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@alfalab/core-components-types': major
'@alfalab/core-components': major
---

##### Types

- Тип `GapType` переведен на числовые значения:
- `'3xs'` -> `2`
- `'2xs'` -> `4`
- `'xs'` -> `8`
- `'s'` -> `12`
- `'m'` -> `16`
- `'l'` -> `20`
- `'xl'` -> `24`
- `'2xl'` -> `32`
- `'3xl'` -> `40`
- `'4xl'` -> `48`
- `'5xl'` -> `64`
- `'6xl'` -> `72`
- `'7xl'` -> `96`
- `'8xl'` -> `128`
29 changes: 29 additions & 0 deletions .changeset/sixty-mails-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
'@alfalab/core-components-underlay': major
'@alfalab/core-components': major
---

###### Underlay

- Проп `padding` переведен на числовой тип. Для перехода используйте следующие соответствия:
- `'3xs'` -> `2`
- `'2xs'` -> `4`
- `'xs'` -> `8`
- `'s'` -> `12`
- `'m'` -> `16`
- `'l'` -> `20`
- `'xl'` -> `24`
- `'2xl'` -> `32`
- `'3xl'` -> `40`
- `'4xl'` -> `48`
- `'5xl'` -> `64`
- `'6xl'` -> `72`

- Проп `borderSize` на числовой тип. Для перехода используйте следующие соответствия:
- `'xs'` -> `2`
- `'s'` -> `4`
- `'m'` -> `8`
- `'l'` -> `12`
- `'xl'` -> `16`
- `'xxl'` -> `20`
- `'3xl'` -> `24`
18 changes: 18 additions & 0 deletions .changeset/tiny-onions-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'@alfalab/core-components-sortable-list': major
'@alfalab/core-components': major
---

###### SortableList

- Проп `padding` переведен на числовые значения
- `'3xs'` -> `2`
- `'2xs'` -> `4`
- `'xs'` -> `8`
- `'s'` -> `12`
- `'m'` -> `16`
- `'l'` -> `20`
- Проп `borderRadius` переведен на числовые значения
- `'m'` -> `8`
- `'l'` -> `12`
- `'xl'` -> `16`
8 changes: 8 additions & 0 deletions .changeset/twenty-poems-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@alfalab/core-components': patch
'@alfalab/core-components-tabs': patch
---

##### Tabs

- Уточнена типизация пропа `textStyle`
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ jobs:

screenshot-test:
name: screenshot test
needs: [variant, build-demo]
needs: [build-demo]
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.variant.outputs.result) }}
variant:
- default
env:
CORE_COMPONENTS_VARIANT: ${{ matrix.variant }}
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/update-screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
default: default
options:
- default
- alfasans

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.variant }}
Expand Down
26 changes: 26 additions & 0 deletions .storybook/components/adapters/icon-button/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React, { forwardRef } from 'react';
import {
IconButton as CoreIconButton,
IconButtonProps as CoreIconButtonProps,
} from '@alfalab/core-components-icon-button';

export interface IconButtonProps extends Omit<CoreIconButtonProps, 'size'> {
size?: 'xxs' | 'xs' | 's' | 24 | 32 | 40 | 48 | 56;
}

const sizeMap = {
xxs: 24,
xs: 32,
s: 48,
} as const;

export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
({ size: sizeFromProps = 48, children, ...restProps }, ref) => {
const size = typeof sizeFromProps === 'string' ? sizeMap[sizeFromProps] : sizeFromProps;
return (
<CoreIconButton {...restProps} ref={ref} size={size}>
{children}
</CoreIconButton>
);
},
);
22 changes: 22 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const { isSamePath } = require('../tools/path.cjs');
const { resolveInternal } = require('../tools/resolve-internal.cjs');
const { readPackagesFileSync } = require('../tools/read-packages-file.cjs');
const { globSync } = require('tinyglobby');
const { existsSync } = require('node:fs');

const INTERNAL_PACKAGES = readPackagesFileSync(
path.resolve(__dirname, '../tools/.internal-packages'),
Expand All @@ -25,6 +26,8 @@ const varsEntryPoints = globSync('src/*index.css', {
absolute: true,
});

const storybookAddonLiveExamples = resolveInternal('storybook-addon-live-examples');

const addDirsForTranspile = (config) => {
config.module.rules.forEach((rule) => {
if (rule.oneOf) {
Expand Down Expand Up @@ -223,6 +226,25 @@ module.exports = {
new NormalModuleReplacementPlugin(/^@alfalab\/core-components[-\/]/, function (
resource,
) {
// monkey patching `storybook-addon-live-examples`
if (resource.contextInfo.issuer.startsWith(storybookAddonLiveExamples)) {
const entryPoint = resource.request.replace(
/^@alfalab\/core-components[-/]/,
'',
);
const adapterPath = path.resolve(__dirname, 'components/adapters', entryPoint);

if (existsSync(adapterPath)) {
resource.request = adapterPath;

if (resource.createData) {
resource.createData.request = resource.request;
}

return;
}
}

if (
resource.request === '@alfalab/core-components/package.json' ||
resource.request === '@alfalab/core-components-vars/src/index.css'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { createComponentUrl } from 'storybook/utils/createComponentUrl';

import styles from './index.module.css';

const CORE_COMPONENTS_VARIANT = process.env.CORE_COMPONENTS_VARIANT || 'default';

type CardProps = {
componentName: string;
mode: string;
Expand Down Expand Up @@ -78,11 +76,7 @@ export const Card: React.FC<CardProps> = ({ componentName, mode }) => {
};

function createImageUrl(componentName: string, mode: string) {
return `./images/${[
kebab(componentName),
mode === 'light' ? '' : 'dark',
`preview${CORE_COMPONENTS_VARIANT === 'default' ? '' : `-${CORE_COMPONENTS_VARIANT}`}-snap.png`,
]
return `./images/${[kebab(componentName), mode === 'light' ? '' : 'dark', `preview-snap.png`]
.filter(Boolean)
.join('-')}`;
}
2 changes: 1 addition & 1 deletion .storybook/pages/intro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const Intro = () => {
<Button
className={styles.ghButton}
view='primary'
size='xs'
size={40}
href='https://github.com/core-ds/core-components'
target='_blank'
rel='noopener noreferrer'
Expand Down
Loading
Loading