@scbt-ecom/ui 0.4.1 → 0.4.2
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/.env +3 -0
- package/.github/workflows/publish.yml +61 -0
- package/.github/workflows/setup-node/action.yml +22 -0
- package/.husky/pre-commit +1 -0
- package/.prettierignore +1 -0
- package/.prettierrc +20 -0
- package/.releaserc +18 -0
- package/.storybook/main.ts +44 -0
- package/.storybook/preview.tsx +37 -0
- package/chromatic.config.json +5 -0
- package/eslint.config.mjs +193 -0
- package/index.html +13 -0
- package/lib/client.ts +12 -0
- package/lib/configs/index.ts +2 -0
- package/lib/configs/tailwindConfigBase.ts +110 -0
- package/lib/configs/tailwindPresets/extendsPreset.ts +43 -0
- package/lib/configs/tailwindPresets/index.ts +2 -0
- package/lib/configs/tailwindPresets/resetPreset.ts +71 -0
- package/lib/hybrid.ts +25 -0
- package/lib/shared/constants/api.ts +2 -0
- package/lib/shared/constants/designSystem/colors.ts +121 -0
- package/lib/shared/constants/designSystem/index.ts +3 -0
- package/lib/shared/constants/designSystem/others.ts +30 -0
- package/lib/shared/constants/designSystem/typography.ts +88 -0
- package/lib/shared/constants/index.ts +2 -0
- package/lib/shared/hooks/index.ts +5 -0
- package/lib/shared/hooks/useBoolean.ts +12 -0
- package/lib/shared/hooks/useClickOutside.ts +22 -0
- package/lib/shared/hooks/useCombineRef.ts +23 -0
- package/lib/shared/hooks/useControlledForm.ts +16 -0
- package/lib/shared/hooks/useDebounce.ts +38 -0
- package/lib/shared/hooks/useMediaQuery.tsx +42 -0
- package/lib/shared/style.css +118 -0
- package/lib/shared/ui/Badge.tsx +20 -0
- package/lib/shared/ui/Breadcrumbs.tsx +57 -0
- package/lib/shared/ui/ButtonIcon.tsx +50 -0
- package/lib/shared/ui/CustomLink.tsx +76 -0
- package/lib/shared/ui/Document.tsx +51 -0
- package/lib/shared/ui/Heading.tsx +33 -0
- package/lib/shared/ui/Hint.tsx +72 -0
- package/lib/shared/ui/Loader.tsx +58 -0
- package/lib/shared/ui/PhoneView.tsx +23 -0
- package/lib/shared/ui/ProgressBar.tsx +43 -0
- package/lib/shared/ui/ResponsiveContainer.tsx +15 -0
- package/lib/shared/ui/Section.tsx +15 -0
- package/lib/shared/ui/Skeleton.tsx +9 -0
- package/lib/shared/ui/TabsSwitcher.tsx +87 -0
- package/lib/shared/ui/accordion/Accordion.tsx +36 -0
- package/lib/shared/ui/accordion/index.ts +1 -0
- package/lib/shared/ui/accordion/model/types.ts +20 -0
- package/lib/shared/ui/accordion/ui/AccordionHeader.tsx +35 -0
- package/lib/shared/ui/brandLogos.tsx +14 -0
- package/lib/shared/ui/button/Button.tsx +117 -0
- package/lib/shared/ui/button/index.ts +1 -0
- package/lib/shared/ui/button/model/helpers.ts +16 -0
- package/lib/shared/ui/formControlElements/CheckboxControl.tsx +92 -0
- package/lib/shared/ui/formControlElements/FormControl.tsx +5 -0
- package/lib/shared/ui/formControlElements/InputControlMask.tsx +90 -0
- package/lib/shared/ui/formControlElements/RadioControl.tsx +130 -0
- package/lib/shared/ui/formControlElements/SwitchControl.tsx +79 -0
- package/lib/shared/ui/formControlElements/TextareaControl.tsx +96 -0
- package/lib/shared/ui/formControlElements/calendarControl/CalendarControl.tsx +178 -0
- package/lib/shared/ui/formControlElements/calendarControl/hooks/index.ts +2 -0
- package/lib/shared/ui/formControlElements/calendarControl/hooks/useCalendar.tsx +86 -0
- package/lib/shared/ui/formControlElements/calendarControl/hooks/useCalendarDropdowns.ts +38 -0
- package/lib/shared/ui/formControlElements/calendarControl/index.ts +1 -0
- package/lib/shared/ui/formControlElements/calendarControl/model/helpers.ts +60 -0
- package/lib/shared/ui/formControlElements/calendarControl/model/types.ts +44 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/DaysOfMonth.tsx +53 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/DaysOfWeek.tsx +28 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/Dropdown.tsx +62 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/Header.tsx +51 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/Navigation.tsx +32 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/OptionsList.tsx +44 -0
- package/lib/shared/ui/formControlElements/calendarControl/ui/index.ts +4 -0
- package/lib/shared/ui/formControlElements/comboboxControl/ComboboxControl.tsx +134 -0
- package/lib/shared/ui/formControlElements/comboboxControl/index.ts +1 -0
- package/lib/shared/ui/formControlElements/comboboxControl/model/selectClassnames.ts +51 -0
- package/lib/shared/ui/formControlElements/comboboxControl/model/types.ts +42 -0
- package/lib/shared/ui/formControlElements/comboboxControl/ui/ComboboxOption.tsx +38 -0
- package/lib/shared/ui/formControlElements/comboboxControl/ui/DropdownIndicator.tsx +23 -0
- package/lib/shared/ui/formControlElements/comboboxControl/ui/MultiValueRemove.tsx +16 -0
- package/lib/shared/ui/formControlElements/comboboxControl/ui/index.ts +3 -0
- package/lib/shared/ui/formControlElements/dadata/DadataInputControl.tsx +137 -0
- package/lib/shared/ui/formControlElements/dadata/index.ts +1 -0
- package/lib/shared/ui/formControlElements/dadata/model/api.ts +25 -0
- package/lib/shared/ui/formControlElements/dadata/model/helpers.ts +76 -0
- package/lib/shared/ui/formControlElements/dadata/model/types.ts +52 -0
- package/lib/shared/ui/formControlElements/dadata/model/useDadata.ts +25 -0
- package/lib/shared/ui/formControlElements/editorControl/EditorControl.tsx +82 -0
- package/lib/shared/ui/formControlElements/editorControl/components/conrols.tsx +136 -0
- package/lib/shared/ui/formControlElements/editorControl/components/menu.tsx +107 -0
- package/lib/shared/ui/formControlElements/editorControl/index.ts +60 -0
- package/lib/shared/ui/formControlElements/editorControl/ui/RemoveBlockButton.tsx +23 -0
- package/lib/shared/ui/formControlElements/editorControl/ui/ResetBlockType.tsx +17 -0
- package/lib/shared/ui/formControlElements/index.ts +14 -0
- package/lib/shared/ui/formControlElements/inputControl/InputControl.tsx +87 -0
- package/lib/shared/ui/formControlElements/inputControl/index.ts +1 -0
- package/lib/shared/ui/formControlElements/inputControl/model/hooks.tsx +26 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/InputControlUploader.tsx +47 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/index.ts +1 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/model/helpers.ts +18 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/model/hooks/useUploader.tsx +66 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/model/index.ts +1 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/model/types.ts +22 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/ui/File.tsx +35 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/ui/Filename.tsx +40 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/ui/Files.tsx +30 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/ui/Input.tsx +48 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/ui/Uploader.tsx +58 -0
- package/lib/shared/ui/formControlElements/inputControlUploader/ui/index.ts +3 -0
- package/lib/shared/ui/formControlElements/inputCurrencyControl/InputCurrencyControl.tsx +88 -0
- package/lib/shared/ui/formControlElements/inputCurrencyControl/index.ts +1 -0
- package/lib/shared/ui/formControlElements/inputCurrencyControl/model/helpers.ts +46 -0
- package/lib/shared/ui/formControlElements/inputCurrencyControl/model/useInputCurrency.tsx +33 -0
- package/lib/shared/ui/formControlElements/inputCurrencyControl/ui/MenuTrigger.tsx +20 -0
- package/lib/shared/ui/formControlElements/inputCurrencyControl/ui/OptionList.tsx +29 -0
- package/lib/shared/ui/formControlElements/inputCurrencyControl/ui/index.ts +2 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/InputSliderControl.tsx +144 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/index.ts +1 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/model/helpers/dates/getEndWordMonth.ts +14 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/model/helpers/dates/getYearEnding.ts +13 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/model/helpers/dates/index.ts +2 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/model/helpers/formatNumber.ts +6 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/model/helpers/getInputSliderSuffix.ts +20 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/model/helpers/getStepByVariant.ts +29 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/model/helpers/index.ts +4 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/model/types.ts +1 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/model/useSlider.ts +26 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/ui/SliderControl.tsx +47 -0
- package/lib/shared/ui/formControlElements/inputSliderControl/ui/index.ts +1 -0
- package/lib/shared/ui/formControlElements/model/classes-types.ts +22 -0
- package/lib/shared/ui/formControlElements/model/index.ts +2 -0
- package/lib/shared/ui/formControlElements/model/message-view-animation.ts +6 -0
- package/lib/shared/ui/formControlElements/model/props-types.ts +31 -0
- package/lib/shared/ui/formControlElements/ui/FieldAttachment.tsx +76 -0
- package/lib/shared/ui/formControlElements/ui/FieldContainer.tsx +37 -0
- package/lib/shared/ui/formControlElements/ui/FieldWrapper.tsx +33 -0
- package/lib/shared/ui/formControlElements/ui/Label.tsx +32 -0
- package/lib/shared/ui/formControlElements/ui/MessageView.tsx +41 -0
- package/lib/shared/ui/formControlElements/ui/index.ts +4 -0
- package/lib/shared/ui/icon/Icon.tsx +41 -0
- package/lib/shared/ui/icon/index.ts +2 -0
- package/lib/shared/ui/icon/sprite.gen.ts +177 -0
- package/lib/shared/ui/index.ts +68 -0
- package/lib/shared/ui/modal/Modal.tsx +68 -0
- package/lib/shared/ui/modal/index.ts +1 -0
- package/lib/shared/ui/modal/model/helpers.ts +13 -0
- package/lib/shared/ui/modal/ui/ModalHeader.tsx +33 -0
- package/lib/shared/ui/notification/Notification.tsx +31 -0
- package/lib/shared/ui/notification/index.ts +1 -0
- package/lib/shared/ui/notification/ui/CustomToast.tsx +42 -0
- package/lib/shared/ui/popover/Popover.tsx +74 -0
- package/lib/shared/ui/popover/index.ts +1 -0
- package/lib/shared/ui/providers/NotificationProvider.tsx +29 -0
- package/lib/shared/ui/providers/index.ts +1 -0
- package/lib/shared/ui/table/Table.tsx +144 -0
- package/lib/shared/ui/table/index.ts +1 -0
- package/lib/shared/ui/table/type.ts +30 -0
- package/lib/shared/utils/capitalize.ts +6 -0
- package/lib/shared/utils/cn.ts +6 -0
- package/lib/shared/utils/deepCompare.ts +1 -0
- package/lib/shared/utils/formatToDate.ts +5 -0
- package/lib/shared/utils/index.ts +5 -0
- package/lib/shared/utils/isClient.ts +1 -0
- package/lib/shared/validation/index.ts +3 -0
- package/lib/shared/validation/messages.ts +12 -0
- package/lib/shared/validation/regExp.ts +5 -0
- package/lib/shared/validation/zodValidation/calendar.ts +32 -0
- package/lib/shared/validation/zodValidation/dadataFio.ts +67 -0
- package/lib/shared/validation/zodValidation/index.ts +2 -0
- package/lib/vite-env.d.ts +2 -0
- package/lib/widgets/Advantages.tsx +45 -0
- package/lib/widgets/banner/Banner.tsx +74 -0
- package/lib/widgets/banner/index.ts +1 -0
- package/lib/widgets/banner/model/helpers.ts +159 -0
- package/lib/widgets/banner/money.png +0 -0
- package/lib/widgets/banner/saif.jpg +0 -0
- package/lib/widgets/banner/saifMob.jpg +0 -0
- package/lib/widgets/banner/seif.jpg +0 -0
- package/lib/widgets/banner/shield.jpg +0 -0
- package/lib/widgets/banner/shield.png +0 -0
- package/lib/widgets/banner/ui/BannerButtonsGroup.tsx +44 -0
- package/lib/widgets/banner/ui/banners/BannerImageFull.tsx +82 -0
- package/lib/widgets/banner/ui/banners/BannerWithSeparateImg.tsx +60 -0
- package/lib/widgets/banner/ui/banners/index.ts +1 -0
- package/lib/widgets/footer/Footer.tsx +95 -0
- package/lib/widgets/footer/index.ts +1 -0
- package/lib/widgets/footer/model/defaultValues.tsx +105 -0
- package/lib/widgets/footer/model/types.ts +19 -0
- package/lib/widgets/footer/ui/Copyright.tsx +15 -0
- package/lib/widgets/footer/ui/Ligal.tsx +50 -0
- package/lib/widgets/footer/ui/NavLinks.tsx +41 -0
- package/lib/widgets/footer/ui/PhonesBlock.tsx +34 -0
- package/lib/widgets/footer/ui/SocialLinks.tsx +30 -0
- package/lib/widgets/footer/ui/index.ts +5 -0
- package/lib/widgets/index.ts +5 -0
- package/lib/widgets/pageHeader/PageHeader.tsx +54 -0
- package/lib/widgets/pageHeader/index.ts +1 -0
- package/lib/widgets/stepper/Stepper.tsx +43 -0
- package/lib/widgets/stepper/index.ts +1 -0
- package/lib/widgets/stepper/ui/SingleStep.tsx +42 -0
- package/package.json +1 -4
- package/postcss.config.mjs +8 -0
- package/public/sprites/arrows.svg +1 -0
- package/public/sprites/brandLogos.svg +1 -0
- package/public/sprites/files.svg +1 -0
- package/public/sprites/general.svg +1 -0
- package/public/sprites/info.svg +1 -0
- package/public/sprites/social.svg +1 -0
- package/src/App.tsx +9 -0
- package/src/app/providers/RootProvider.tsx +11 -0
- package/src/app/providers/index.ts +1 -0
- package/src/app/providers/model/types.ts +5 -0
- package/src/configs/setup.ts +9 -0
- package/src/configs/storybook.config.ts +23 -0
- package/src/main.tsx +10 -0
- package/src/stories/primitives/Accordion.stories.tsx +66 -0
- package/src/stories/primitives/Badge.stories.tsx +28 -0
- package/src/stories/primitives/Breadcrumbs.stories.tsx +29 -0
- package/src/stories/primitives/Button/Button.stories.tsx +149 -0
- package/src/stories/primitives/Button/Button.test.tsx +150 -0
- package/src/stories/primitives/ButtonIcon.stories.tsx +75 -0
- package/src/stories/primitives/CustomLink.stories.tsx +64 -0
- package/src/stories/primitives/Document.stories.tsx +36 -0
- package/src/stories/primitives/Heading.stories.tsx +29 -0
- package/src/stories/primitives/Hint.stories.tsx +82 -0
- package/src/stories/primitives/Icon.stories.tsx +36 -0
- package/src/stories/primitives/Loader.stories.tsx +39 -0
- package/src/stories/primitives/Modal.stories.tsx +106 -0
- package/src/stories/primitives/Notification.stories.tsx +102 -0
- package/src/stories/primitives/PhoneView.stories.tsx +22 -0
- package/src/stories/primitives/Popover.stories.tsx +41 -0
- package/src/stories/primitives/ProgressBar.stories.tsx +68 -0
- package/src/stories/primitives/Skeleton.stories.tsx +21 -0
- package/src/stories/primitives/Table.stories.tsx +44 -0
- package/src/stories/primitives/TabsSwitcher.stories.tsx +45 -0
- package/src/stories/primitives/formControl/CalendarControl.stories.tsx +45 -0
- package/src/stories/primitives/formControl/CheckboxControl.stories.tsx +64 -0
- package/src/stories/primitives/formControl/ComboboxControl.stories.tsx +67 -0
- package/src/stories/primitives/formControl/DadataInputControl.stories.tsx +79 -0
- package/src/stories/primitives/formControl/EditorControl.stories.tsx +31 -0
- package/src/stories/primitives/formControl/FormControlAllFields.stories.tsx +25 -0
- package/src/stories/primitives/formControl/InputControl.stories.tsx +84 -0
- package/src/stories/primitives/formControl/InputControlPassword.stories.tsx +38 -0
- package/src/stories/primitives/formControl/InputControlUploader.stories.tsx +44 -0
- package/src/stories/primitives/formControl/InputCurrencyControl.stories.tsx +73 -0
- package/src/stories/primitives/formControl/InputSliderControl.stories.tsx +62 -0
- package/src/stories/primitives/formControl/RadioContol.stories.tsx +61 -0
- package/src/stories/primitives/formControl/SwitchControl.stories.tsx +51 -0
- package/src/stories/primitives/formControl/TextareaControl.stories.tsx +55 -0
- package/src/stories/primitives/formControl/inputControlMask.stories.tsx +67 -0
- package/src/stories/widgets/Advantages.stories.tsx +42 -0
- package/src/stories/widgets/Banner.stories.tsx +94 -0
- package/src/stories/widgets/Footer.stories.tsx +36 -0
- package/src/stories/widgets/PageHeader.stories.tsx +33 -0
- package/src/stories/widgets/Stepper.stories.tsx +24 -0
- package/src/storybookHelpers/actions.tsx +5 -0
- package/src/storybookHelpers/index.ts +2 -0
- package/src/storybookHelpers/reactHookForm/index.ts +3 -0
- package/src/storybookHelpers/reactHookForm/model/mockData.ts +19 -0
- package/src/storybookHelpers/reactHookForm/model/mocks.tsx +105 -0
- package/src/storybookHelpers/reactHookForm/model/renderFields.tsx +58 -0
- package/src/storybookHelpers/reactHookForm/model/types.ts +86 -0
- package/src/storybookHelpers/reactHookForm/ui/StorybookFieldsMapper.tsx +32 -0
- package/src/storybookHelpers/reactHookForm/ui/StorybookFormProvider.tsx +43 -0
- package/src/storybookHelpers/reactHookForm/ui/index.ts +2 -0
- package/src/storybookHelpers/table/utils/defaultValue.ts +51 -0
- package/static/arrows/arrowCircle.svg +18 -0
- package/static/arrows/arrowLink.svg +3 -0
- package/static/arrows/arrowRight.svg +3 -0
- package/static/brandLogos/logoBlack.svg +14 -0
- package/static/brandLogos/logoBusiness.svg +80 -0
- package/static/brandLogos/logoGray.svg +56 -0
- package/static/brandLogos/logoInsurance.svg +124 -0
- package/static/brandLogos/logoMain.svg +14 -0
- package/static/brandLogos/logoWhite.svg +56 -0
- package/static/files/border.svg +6 -0
- package/static/files/borderError.svg +6 -0
- package/static/files/documentFilled.svg +4 -0
- package/static/files/documentOutline.svg +4 -0
- package/static/files/upload.svg +3 -0
- package/static/general/calendar.svg +3 -0
- package/static/general/check.svg +6 -0
- package/static/general/close.svg +12 -0
- package/static/general/edit.svg +4 -0
- package/static/general/hiddenEye.svg +4 -0
- package/static/general/plus.svg +3 -0
- package/static/general/showEye.svg +4 -0
- package/static/info/warningCircle.svg +5 -0
- package/static/social/classmates.svg +3 -0
- package/static/social/telegram.svg +3 -0
- package/static/social/vk.svg +3 -0
- package/tailwind.config.ts +10 -0
- package/tsconfig.json +33 -0
- package/tsconfig.node.json +11 -0
- package/vite.config.ts +68 -0
- package/vitest.config.mjs +12 -0
- package/dist/scbt-ecom-ui-0.4.1.tgz +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type IBannerProps } from '../../Banner'
|
|
2
|
+
import money from '../../money.png'
|
|
3
|
+
import { BannerButtonsGroup } from '../BannerButtonsGroup'
|
|
4
|
+
import { Heading, ResponsiveContainer } from '$/shared/ui'
|
|
5
|
+
import { cn } from '$/shared/utils'
|
|
6
|
+
import { Advantages } from '$/widgets/Advantages'
|
|
7
|
+
|
|
8
|
+
export const BannerWithSeparateImg = ({
|
|
9
|
+
headTitle,
|
|
10
|
+
subtitle,
|
|
11
|
+
buttonsConfig,
|
|
12
|
+
advantagesList,
|
|
13
|
+
classes
|
|
14
|
+
}: Omit<IBannerProps, 'bannerVariant'>) => {
|
|
15
|
+
const countButtons = Object.keys(buttonsConfig).reduce((acc, key) => (key ? acc + 1 : acc), 0)
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<section data-id='banner-section' className={cn('relative bg-banner-skyblue-300 pb-6 desktop:h-[456px]', classes?.section)}>
|
|
19
|
+
<ResponsiveContainer data-id='banner-container' className={cn(classes?.container)}>
|
|
20
|
+
<div
|
|
21
|
+
data-id='banner-grid'
|
|
22
|
+
className={cn('grid-mob-apply desktop:grid-desk-apply grid mobile:justify-center', classes?.wrapper)}
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
data-id='banner-text-block'
|
|
26
|
+
className={cn('grid-text-apply mb-2 flex flex-col gap-4 pt-6 desktop:pb-10 desktop:pt-20', classes?.textBlock)}
|
|
27
|
+
>
|
|
28
|
+
<Heading data-id='banner-title' as='h1' className={cn('text-color-dark', classes?.title)}>
|
|
29
|
+
{headTitle}
|
|
30
|
+
</Heading>
|
|
31
|
+
<p data-id='banner-subtitle' className={cn('desk-body-regular-l text-color-dark', classes?.subtitle)}>
|
|
32
|
+
{subtitle}
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<BannerButtonsGroup buttonsConfig={buttonsConfig} classes={classes} />
|
|
37
|
+
|
|
38
|
+
<div
|
|
39
|
+
data-id='banner-image-wrapper'
|
|
40
|
+
className={cn(
|
|
41
|
+
'grid-image-apply w-full desktop:h-full desktop:w-[550px]',
|
|
42
|
+
{ 'h-[450px]': countButtons === 2 },
|
|
43
|
+
{ 'h-[410px]': countButtons === 1 },
|
|
44
|
+
classes?.imageContainer
|
|
45
|
+
)}
|
|
46
|
+
>
|
|
47
|
+
<img data-id='banner-image' src={money} alt='money' className={cn('h-full w-full object-contain', classes?.image)} />
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div
|
|
52
|
+
data-id='banner-advantages'
|
|
53
|
+
className={cn('absolute bottom-[-400px] right-1/2 translate-x-1/2 desktop:bottom-[-50px]', classes?.advantages)}
|
|
54
|
+
>
|
|
55
|
+
{advantagesList && advantagesList?.length > 0 && <Advantages advantagesList={advantagesList} />}
|
|
56
|
+
</div>
|
|
57
|
+
</ResponsiveContainer>
|
|
58
|
+
</section>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BannerWithSeparateImg } from './BannerWithSeparateImg'
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { defaultCopyright, defaultLigal, defaultNavigationLinks, defaultPhones, defaultSocialsLinks } from './model/defaultValues'
|
|
3
|
+
import type { IFooterNavLinks, IFooterPhones, IFooterSocialLinks } from './model/types'
|
|
4
|
+
import {
|
|
5
|
+
Copyright,
|
|
6
|
+
Ligal,
|
|
7
|
+
NavLinks,
|
|
8
|
+
PhonesBlock,
|
|
9
|
+
SocialLinks,
|
|
10
|
+
type TCopyrightClasses,
|
|
11
|
+
type TLigalClasses,
|
|
12
|
+
type TNavigationLinksClasses,
|
|
13
|
+
type TPhoneBlockClasses,
|
|
14
|
+
type TSocialLinksClasses
|
|
15
|
+
} from './ui'
|
|
16
|
+
import { Icon, ResponsiveContainer, Section } from '$/shared/ui'
|
|
17
|
+
import { cn } from '$/shared/utils'
|
|
18
|
+
|
|
19
|
+
type IFooterClasses = TLigalClasses &
|
|
20
|
+
TNavigationLinksClasses &
|
|
21
|
+
TPhoneBlockClasses &
|
|
22
|
+
TSocialLinksClasses &
|
|
23
|
+
TCopyrightClasses & {
|
|
24
|
+
section: string
|
|
25
|
+
container: string
|
|
26
|
+
footerRoot: string
|
|
27
|
+
footerHead: string
|
|
28
|
+
footerSocialBlock: string
|
|
29
|
+
footerLogo: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface IFooterProps {
|
|
33
|
+
classes?: Partial<IFooterClasses>
|
|
34
|
+
withSocial?: boolean
|
|
35
|
+
withPhones?: boolean
|
|
36
|
+
withNavLinks?: boolean
|
|
37
|
+
withLigal?: boolean
|
|
38
|
+
withCopyright?: boolean
|
|
39
|
+
withSiteMap?: boolean
|
|
40
|
+
|
|
41
|
+
socialsLinks?: IFooterSocialLinks[]
|
|
42
|
+
phones?: IFooterPhones[]
|
|
43
|
+
navigationLinks: IFooterNavLinks[]
|
|
44
|
+
ligal: string | React.ReactElement
|
|
45
|
+
copyright?: string | React.ReactElement
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const Footer = ({
|
|
49
|
+
withSocial = true,
|
|
50
|
+
withPhones = true,
|
|
51
|
+
withNavLinks = true,
|
|
52
|
+
withLigal = true,
|
|
53
|
+
withCopyright = true,
|
|
54
|
+
withSiteMap = true,
|
|
55
|
+
socialsLinks = defaultSocialsLinks,
|
|
56
|
+
phones = defaultPhones,
|
|
57
|
+
navigationLinks = defaultNavigationLinks,
|
|
58
|
+
ligal = defaultLigal,
|
|
59
|
+
copyright = defaultCopyright,
|
|
60
|
+
classes
|
|
61
|
+
}: IFooterProps) => {
|
|
62
|
+
return (
|
|
63
|
+
<Section className={cn('w-full', classes?.section)}>
|
|
64
|
+
<ResponsiveContainer className={cn(classes?.container)}>
|
|
65
|
+
<div className={cn('bg-color-footer px-4 py-8 desktop:px-6 desktop:py-10', classes?.footerRoot)}>
|
|
66
|
+
<div className={cn('mb-8 flex items-center justify-between gap-6', classes?.footerHead)}>
|
|
67
|
+
<div className={cn(classes?.footerSocialBlock)}>
|
|
68
|
+
<a href='/' className={cn(classes?.footerLogo)}>
|
|
69
|
+
<Icon name='brandLogos/logoWhite' className='h-[32px] w-[194px]' />
|
|
70
|
+
</a>
|
|
71
|
+
{withSocial && <SocialLinks socialsLinks={socialsLinks} classes={classes} />}
|
|
72
|
+
</div>
|
|
73
|
+
{withPhones && <PhonesBlock phones={phones} classes={classes} />}
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
{withNavLinks && <NavLinks navigationLinks={navigationLinks} classes={classes} />}
|
|
77
|
+
{withLigal && <Ligal ligal={ligal} classes={classes} />}
|
|
78
|
+
<div className='mt-6 flex items-start justify-between gap-6'>
|
|
79
|
+
{withCopyright && <Copyright text={copyright} classes={classes} />}
|
|
80
|
+
{withSiteMap && (
|
|
81
|
+
<a
|
|
82
|
+
href='https://sovcombank.ru/site-map'
|
|
83
|
+
target='_blank'
|
|
84
|
+
rel='noreferrer'
|
|
85
|
+
className='desk-body-regular-m text-color-white'
|
|
86
|
+
>
|
|
87
|
+
Карта сайта
|
|
88
|
+
</a>
|
|
89
|
+
)}
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</ResponsiveContainer>
|
|
93
|
+
</Section>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Footer, type IFooterProps } from './Footer'
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { IFooterNavLinks, IFooterPhones, IFooterSocialLinks } from './types'
|
|
2
|
+
|
|
3
|
+
export const defaultCopyright = (
|
|
4
|
+
<>
|
|
5
|
+
© 2004-2024, ПАО «Совкомбанк». Все права защищены. <br /> Генеральная лицензия Банка России №963 от 5 декабря 2014 г.
|
|
6
|
+
</>
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
export const defaultLigal = `Кредит на бизнес цели, срок 3, 6, 9, 12, 18, 24, 36, 48, 60 мес. Ставка – от 22,9%*. *Точная процентная ставка
|
|
10
|
+
устанавливается по соглашению сторон и определяется исходя из платёжеспособности и кредитоспособности клиента, а также
|
|
11
|
+
иных индивидуальных особенностей клиента. Сумма 100 000 – 50 000 000 руб. Кредит выдается на карту “Халва”, открытый в
|
|
12
|
+
Банке. Банк вправе отказать в предоставлении кредита без объяснения причины, а также запросить дополнительную информацию о
|
|
13
|
+
клиенте. Предварительное одобрение не влечет обязательств Банка по выдаче кредита. В некоторых случаях срок рассмотрения
|
|
14
|
+
заявки может составлять до 3 рабочих дней. Полный электронный документооборот при наличии открытого р/с в ПАО «Совкомбанк»
|
|
15
|
+
и действующей ЭЦП. Условия рекламы действительны на 20.02.2024г.`
|
|
16
|
+
|
|
17
|
+
export const defaultPhones: IFooterPhones[] = [
|
|
18
|
+
{ phone: '8 800 100-00-06', text: 'Звонок по России (бесплатно)' },
|
|
19
|
+
{ phone: '+7 (495) 988 00 00', text: 'Для звонков из-за рубежа (платно)' }
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
export const defaultSocialsLinks: IFooterSocialLinks[] = [
|
|
23
|
+
{ iconName: 'social/vk', href: '/vk' },
|
|
24
|
+
{ iconName: 'social/telegram', href: '/tg' },
|
|
25
|
+
{ iconName: 'social/classmates', href: '/cl' }
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
export const defaultNavigationLinks: IFooterNavLinks[] = [
|
|
29
|
+
{
|
|
30
|
+
groupLabel: 'Совкомбанк',
|
|
31
|
+
links: [
|
|
32
|
+
{ text: 'О банке', href: '/' },
|
|
33
|
+
{ text: 'Реквизиты и лицензии', href: '/' },
|
|
34
|
+
{ text: 'Пресс-центр', href: '/' },
|
|
35
|
+
{ text: 'Удостоверяющий центр ПАО «Совкомбанк»', href: '/' },
|
|
36
|
+
{ text: 'Работа у нас', href: '/' },
|
|
37
|
+
{ text: 'Контакты', href: '/' },
|
|
38
|
+
{ text: 'Раскрытие информации', href: '/' },
|
|
39
|
+
{ text: 'Страница раскрытия информации в Интерфакс', href: '/' },
|
|
40
|
+
{ text: 'Реализация залогового имущества', href: '/' },
|
|
41
|
+
{ text: 'Клиентам и партнерам', href: '/' },
|
|
42
|
+
{ text: 'Биометрия', href: '/' },
|
|
43
|
+
{ text: 'Стандарты безопасности', href: '/' },
|
|
44
|
+
{ text: 'Информация о процентных ставках по договорам банковского вклада с физическими лицами', href: '/' },
|
|
45
|
+
{ text: 'ООО «Совком Финанс»', href: '/' },
|
|
46
|
+
{ text: 'Безопасность', href: '/' }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
groupLabel: 'Сервисы',
|
|
51
|
+
links: [
|
|
52
|
+
{ text: 'Подарочная карта «Халва»', href: '/' },
|
|
53
|
+
{ text: 'Страховые продукты', href: '/' },
|
|
54
|
+
{ text: 'МультиЮрист', href: '/' },
|
|
55
|
+
{ text: 'Единая социальная карта «Уралочка»', href: '/' },
|
|
56
|
+
{ text: 'Единая Карта Жителя Мурманской области', href: '/' },
|
|
57
|
+
{ text: 'Безопасные расчёты', href: '/' },
|
|
58
|
+
{ text: 'Улучшение кредитной истории', href: '/' },
|
|
59
|
+
{ text: 'Дистанционные сервисы Совкомбанка', href: '/' },
|
|
60
|
+
{ text: 'Программы реструктуризации долга', href: '/' }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
groupLabel: 'Услуги банка',
|
|
65
|
+
links: [
|
|
66
|
+
{ text: 'Карты', href: '/' },
|
|
67
|
+
{ text: 'Кредиты', href: '/' },
|
|
68
|
+
{ text: 'Кредиты наличными', href: '/' },
|
|
69
|
+
{ text: 'Ипотека', href: '/' },
|
|
70
|
+
{ text: 'Автокредиты', href: '/' },
|
|
71
|
+
{ text: 'Кредитный калькулятор', href: '/' },
|
|
72
|
+
{ text: 'Вклады', href: '/' },
|
|
73
|
+
{ text: 'Инвестиции', href: '/' },
|
|
74
|
+
{ text: 'Платежи', href: '/' },
|
|
75
|
+
{ text: 'Сервисы', href: '/' },
|
|
76
|
+
{ text: 'Малому бизнесу и ИП', href: '/' },
|
|
77
|
+
{ text: 'Корпоративным клиентам', href: '/' },
|
|
78
|
+
{ text: 'CIB', href: '/' },
|
|
79
|
+
{ text: 'Драгоценные металлы в слитках', href: '/' },
|
|
80
|
+
{ text: 'Счета в драгоценных металлах', href: '/' }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
groupLabel: 'Клиентам других банков',
|
|
85
|
+
links: [
|
|
86
|
+
{ text: 'Держателям карт рассрочки Банка Хоум Кредит', href: '/' },
|
|
87
|
+
{ text: 'ПАО КБ «Восточный»', href: '/' },
|
|
88
|
+
{ text: 'Держателям карт «Совесть»', href: '/' },
|
|
89
|
+
{ text: 'АО «Нордеа Банк»', href: '/' },
|
|
90
|
+
{ text: 'ЗАО «ДжиИ Мани банк»', href: '/' },
|
|
91
|
+
{ text: 'АО «Меткомбанк»', href: '/' },
|
|
92
|
+
{ text: 'АКБ «РосЕвроБанк» (АО)', href: '/' },
|
|
93
|
+
{ text: 'ПАО «Татфондбанк»', href: '/' },
|
|
94
|
+
{ text: 'АО АКБ «Экспресс-Волга»', href: '/' },
|
|
95
|
+
{ text: 'АО «ВКАБАНК»', href: '/' },
|
|
96
|
+
{ text: 'ООО «ОНЕЙ БАНК»', href: '/' },
|
|
97
|
+
{ text: 'АО «Евразийский»', href: '/' },
|
|
98
|
+
{ text: 'АО «НФК»', href: '/' },
|
|
99
|
+
{ text: 'ООО «РТС-Капитал»', href: '/' },
|
|
100
|
+
{ text: 'ООО «ИК Септем Капитал»', href: '/' },
|
|
101
|
+
{ text: 'Помощь', href: '/' },
|
|
102
|
+
{ text: 'Офисы и банкоматы', href: '/' }
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type SpritesMap } from '$/shared/ui'
|
|
2
|
+
|
|
3
|
+
export interface IFooterSocialLinks {
|
|
4
|
+
iconName: `social/${SpritesMap['social']}`
|
|
5
|
+
href: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IFooterNavLinks {
|
|
9
|
+
groupLabel: string
|
|
10
|
+
links: {
|
|
11
|
+
text: string
|
|
12
|
+
href: string
|
|
13
|
+
}[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IFooterPhones {
|
|
17
|
+
phone: string
|
|
18
|
+
text: string
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cn } from '$/shared/utils'
|
|
3
|
+
|
|
4
|
+
export type TCopyrightClasses = {
|
|
5
|
+
text: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ICopyrightProps {
|
|
9
|
+
text?: string | React.ReactElement
|
|
10
|
+
classes?: Partial<TCopyrightClasses>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Copyright = ({ text, classes }: ICopyrightProps) => {
|
|
14
|
+
return <div className={cn('desk-body-regular-m text-color-footer', classes?.text)}>{text}</div>
|
|
15
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import { cn } from '$/shared//utils'
|
|
5
|
+
|
|
6
|
+
export type TLigalClasses = {
|
|
7
|
+
ligalRoot: string
|
|
8
|
+
ligal: string
|
|
9
|
+
ligalButton: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface ILigalProps {
|
|
13
|
+
ligal: string | React.ReactElement
|
|
14
|
+
classes?: Partial<TLigalClasses>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const Ligal = ({ ligal, classes }: ILigalProps) => {
|
|
18
|
+
const [isExpanded, setIsExpanded] = React.useState(false)
|
|
19
|
+
const [isClamped, setIsClamped] = React.useState(false)
|
|
20
|
+
const ligalRef = React.useRef<HTMLParagraphElement | null>(null)
|
|
21
|
+
|
|
22
|
+
React.useEffect(() => {
|
|
23
|
+
const element = ligalRef.current
|
|
24
|
+
if (element) {
|
|
25
|
+
setIsClamped(element.scrollHeight > element.clientHeight)
|
|
26
|
+
}
|
|
27
|
+
}, [])
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={cn('mt-8 flex flex-col gap-4', classes?.ligalRoot)}>
|
|
31
|
+
<p ref={ligalRef} className={cn('desk-body-regular-m text-color-footer', { 'line-clamp-3': !isExpanded }, classes?.ligal)}>
|
|
32
|
+
{ligal}
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
{isClamped && (
|
|
36
|
+
<div
|
|
37
|
+
tabIndex={0}
|
|
38
|
+
role='button'
|
|
39
|
+
onClick={() => setIsExpanded((prev) => !prev)}
|
|
40
|
+
className={cn(
|
|
41
|
+
'desk-body-regular-l w-max cursor-pointer font-medium text-color-footer transition-colors hover:text-color-white',
|
|
42
|
+
classes?.ligalButton
|
|
43
|
+
)}
|
|
44
|
+
>
|
|
45
|
+
Подробнее
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
</div>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { IFooterNavLinks } from '../model/types'
|
|
2
|
+
import { cn } from '$/shared/utils'
|
|
3
|
+
|
|
4
|
+
export type TNavigationLinksClasses = {
|
|
5
|
+
navRoot: string
|
|
6
|
+
navGroup: string
|
|
7
|
+
navLabel: string
|
|
8
|
+
navWrapper: string
|
|
9
|
+
navLink: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface INavLinksProps {
|
|
13
|
+
navigationLinks: IFooterNavLinks[]
|
|
14
|
+
classes?: Partial<TNavigationLinksClasses>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const NavLinks = ({ navigationLinks, classes }: INavLinksProps) => {
|
|
18
|
+
return (
|
|
19
|
+
<div className={cn('grid grid-cols-4 gap-10 border-y border-blue-grey-500 py-8 pt-8', classes?.navRoot)}>
|
|
20
|
+
{navigationLinks?.map(({ groupLabel, links }) => (
|
|
21
|
+
<div key={groupLabel} className={cn('flex flex-col gap-4', classes?.navGroup)}>
|
|
22
|
+
<div className={cn('desk-body-regular-m font-medium text-color-white', classes?.navLabel)}>{groupLabel}</div>
|
|
23
|
+
<div className={cn('flex flex-col gap-2', classes?.navWrapper)}>
|
|
24
|
+
{links?.map(({ text, href }) => (
|
|
25
|
+
<a
|
|
26
|
+
key={text}
|
|
27
|
+
href={href}
|
|
28
|
+
className={cn(
|
|
29
|
+
'desk-body-regular-m cursor-pointer text-color-white transition-colors hover:text-color-footer',
|
|
30
|
+
classes?.navLink
|
|
31
|
+
)}
|
|
32
|
+
>
|
|
33
|
+
{text}
|
|
34
|
+
</a>
|
|
35
|
+
))}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
))}
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { IFooterPhones } from '../model/types'
|
|
2
|
+
import { PhoneView } from '$/shared/ui'
|
|
3
|
+
import { cn } from '$/shared/utils'
|
|
4
|
+
|
|
5
|
+
export type TPhoneBlockClasses = {
|
|
6
|
+
phonesRoot: string
|
|
7
|
+
phoneWrapper: string
|
|
8
|
+
phoneText: string
|
|
9
|
+
phoneLink: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IPhonesBlockProps {
|
|
13
|
+
phones: IFooterPhones[]
|
|
14
|
+
classes?: Partial<TPhoneBlockClasses>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const PhonesBlock = ({ phones, classes }: IPhonesBlockProps) => {
|
|
18
|
+
return (
|
|
19
|
+
<div className={cn('flex flex-col items-end gap-4', classes?.phonesRoot)}>
|
|
20
|
+
{phones?.map(({ phone, text }) => (
|
|
21
|
+
<PhoneView
|
|
22
|
+
key={phone}
|
|
23
|
+
phone={phone}
|
|
24
|
+
text={text}
|
|
25
|
+
classes={{
|
|
26
|
+
wrapper: cn(classes?.phoneWrapper),
|
|
27
|
+
text: cn('text-color-footer', classes?.phoneText),
|
|
28
|
+
link: cn('text-color-white', classes?.phoneLink)
|
|
29
|
+
}}
|
|
30
|
+
/>
|
|
31
|
+
))}
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IFooterSocialLinks } from '../model/types'
|
|
2
|
+
import { Icon } from '$/shared/ui'
|
|
3
|
+
import { cn } from '$/shared/utils'
|
|
4
|
+
|
|
5
|
+
export type TSocialLinksClasses = {
|
|
6
|
+
socialRoot: string
|
|
7
|
+
socialLink: string
|
|
8
|
+
socialIcon: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface ISocialLinksProps {
|
|
12
|
+
socialsLinks: IFooterSocialLinks[]
|
|
13
|
+
classes?: Partial<TSocialLinksClasses>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const SocialLinks = ({ socialsLinks, classes }: ISocialLinksProps) => {
|
|
17
|
+
return (
|
|
18
|
+
<div className={cn('mt-6 flex items-center gap-2', classes?.socialRoot)}>
|
|
19
|
+
{socialsLinks?.map(({ iconName, href }) => (
|
|
20
|
+
<a
|
|
21
|
+
className={cn('flex size-8 items-center justify-center rounded-full bg-[#52576a] p-2', classes?.socialLink)}
|
|
22
|
+
href={href}
|
|
23
|
+
key={href}
|
|
24
|
+
>
|
|
25
|
+
<Icon name={iconName} className={cn('h-full w-full text-icon-white', classes?.socialIcon)} />
|
|
26
|
+
</a>
|
|
27
|
+
))}
|
|
28
|
+
</div>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SocialLinks, type TSocialLinksClasses } from './SocialLinks'
|
|
2
|
+
export { PhonesBlock, type TPhoneBlockClasses } from './PhonesBlock'
|
|
3
|
+
export { NavLinks, type TNavigationLinksClasses } from './NavLinks'
|
|
4
|
+
export { Ligal, type TLigalClasses } from './Ligal'
|
|
5
|
+
export { Copyright, type TCopyrightClasses } from './Copyright'
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { PageHeader, type TPageHeaderProps } from './pageHeader'
|
|
2
|
+
export { Banner } from './banner'
|
|
3
|
+
export { Advantages, type IAdvantage, type IAdvantagesProps } from './Advantages'
|
|
4
|
+
export { Footer, type IFooterProps } from './footer'
|
|
5
|
+
export { Stepper, type IStepperProps, type ISingleStep } from './stepper'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { brandLogos, Button, PhoneView, ResponsiveContainer, type TBrandLogoVariant } from '$/shared/ui'
|
|
2
|
+
|
|
3
|
+
export interface ICommonHeaderProps {
|
|
4
|
+
logoPath?: string
|
|
5
|
+
logoType?: TBrandLogoVariant
|
|
6
|
+
}
|
|
7
|
+
interface IHeaderWithPhone extends ICommonHeaderProps {
|
|
8
|
+
variant: 'withPhone'
|
|
9
|
+
phone: string
|
|
10
|
+
phoneText: string
|
|
11
|
+
}
|
|
12
|
+
interface IHeaderWithButton extends ICommonHeaderProps {
|
|
13
|
+
variant: 'withButton'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type TPageHeaderProps = IHeaderWithButton | IHeaderWithPhone
|
|
17
|
+
|
|
18
|
+
const renderContentVariant = (props: TPageHeaderProps) => {
|
|
19
|
+
switch (props.variant) {
|
|
20
|
+
case 'withButton':
|
|
21
|
+
return (
|
|
22
|
+
<Button intent='secondary' size='sm'>
|
|
23
|
+
Оформить заявку
|
|
24
|
+
</Button>
|
|
25
|
+
)
|
|
26
|
+
case 'withPhone':
|
|
27
|
+
const { phone, phoneText } = props as IHeaderWithPhone
|
|
28
|
+
return <PhoneView phone={phone} text={phoneText} />
|
|
29
|
+
default:
|
|
30
|
+
return null
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const PageHeader = (props: TPageHeaderProps) => {
|
|
35
|
+
const { logoPath = '/', logoType = 'main' } = props
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<header className='flex h-[72px] items-center justify-center bg-color-blue-grey-200'>
|
|
39
|
+
<ResponsiveContainer>
|
|
40
|
+
<div className='flex items-center justify-between gap-5'>
|
|
41
|
+
<a
|
|
42
|
+
href={logoPath}
|
|
43
|
+
target='_blank'
|
|
44
|
+
rel='noreferrer'
|
|
45
|
+
className='flex items-center justify-center [&_svg]:h-[32px] [&_svg]:w-[192px]'
|
|
46
|
+
>
|
|
47
|
+
{brandLogos[logoType]}
|
|
48
|
+
</a>
|
|
49
|
+
{renderContentVariant(props)}
|
|
50
|
+
</div>
|
|
51
|
+
</ResponsiveContainer>
|
|
52
|
+
</header>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PageHeader, type TPageHeaderProps } from './PageHeader'
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { SingleStep, type TSingleStepClasses } from './ui/SingleStep'
|
|
3
|
+
import { Heading, ResponsiveContainer, Section } from '$/shared/ui'
|
|
4
|
+
import { cn } from '$/shared/utils'
|
|
5
|
+
|
|
6
|
+
type TStepperClasses = TSingleStepClasses & {
|
|
7
|
+
root: string
|
|
8
|
+
headline: string
|
|
9
|
+
stepsWrapper: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ISingleStep {
|
|
13
|
+
title: string
|
|
14
|
+
description: string | React.ReactElement
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IStepperProps {
|
|
18
|
+
heading: string
|
|
19
|
+
stepsList: ISingleStep[]
|
|
20
|
+
classes?: Partial<TStepperClasses>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const Stepper = ({ heading, stepsList, classes }: IStepperProps) => {
|
|
24
|
+
return (
|
|
25
|
+
<Section>
|
|
26
|
+
<ResponsiveContainer>
|
|
27
|
+
<div className={cn('flex flex-col gap-12', classes?.root)}>
|
|
28
|
+
<Heading as='h2' className={cn('text-color-dark', classes?.headline)}>
|
|
29
|
+
{heading}
|
|
30
|
+
</Heading>
|
|
31
|
+
<div
|
|
32
|
+
className={cn(
|
|
33
|
+
'flex flex-col items-start gap-6 desktop:flex-row desktop:items-center desktop:gap-12',
|
|
34
|
+
classes?.stepsWrapper
|
|
35
|
+
)}
|
|
36
|
+
>
|
|
37
|
+
{stepsList?.map((step, index) => <SingleStep key={step.title} index={index + 1} {...step} classes={classes} />)}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</ResponsiveContainer>
|
|
41
|
+
</Section>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stepper, type IStepperProps, type ISingleStep } from './Stepper'
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ISingleStep } from '../Stepper'
|
|
2
|
+
import { Heading } from '$/shared/ui'
|
|
3
|
+
import { cn } from '$/shared/utils'
|
|
4
|
+
|
|
5
|
+
export type TSingleStepClasses = {
|
|
6
|
+
singleStep: string
|
|
7
|
+
numeric: string
|
|
8
|
+
textBlock: string
|
|
9
|
+
title: string
|
|
10
|
+
description: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface ISingleStepProps extends ISingleStep {
|
|
14
|
+
index: number
|
|
15
|
+
classes?: Partial<TSingleStepClasses>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const SingleStep = ({ title, description, index, classes }: ISingleStepProps) => {
|
|
19
|
+
return (
|
|
20
|
+
<div
|
|
21
|
+
className={cn(
|
|
22
|
+
'mobile:border-color-blue-grey-500 flex w-[328px] max-w-[328px] flex-col gap-6 mobile:rounded-md mobile:border mobile:border-solid mobile:p-4 desktop:w-[348px] desktop:max-w-[348px]',
|
|
23
|
+
classes?.singleStep
|
|
24
|
+
)}
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
className={cn(
|
|
28
|
+
'mob-headline-bold-s flex size-10 items-center justify-center rounded-sm bg-color-blue-grey-500 text-color-white desktop:desk-title-bold-l desktop:size-12',
|
|
29
|
+
classes?.numeric
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
{index}
|
|
33
|
+
</div>
|
|
34
|
+
<div className={cn('flex flex-col gap-4', classes?.textBlock)}>
|
|
35
|
+
<Heading as='h4' className={cn('text-color-dark', classes?.title)}>
|
|
36
|
+
{title}
|
|
37
|
+
</Heading>
|
|
38
|
+
<p className={cn('desk-body-regular-l text-color-tetriary', classes?.description)}>{description}</p>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
)
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scbt-ecom/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./style.css": "./dist/style.css",
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
"require": "./dist/hybrid.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
],
|
|
19
16
|
"scripts": {
|
|
20
17
|
"dev": "vite",
|
|
21
18
|
"build": "tsc -b && vite build",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="0" height="0"><symbol xmlns="http://www.w3.org/2000/svg" id="arrowCircle" fill="none" viewBox="0 0 32 32"><rect width="31" height="31" x=".5" y="31.5" stroke="currentColor" rx="15.5" transform="rotate(-90 .5 31.5)"/><path fill="currentColor" stroke="currentColor" d="M22.707 18.707a1 1 0 0 1-1.414 0L16 13.414l-5.293 5.293a1 1 0 0 1-1.414-1.414l6-6a1 1 0 0 1 1.414 0l6 6a1 1 0 0 1 0 1.414Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="arrowLink" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M8 7a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v8a1 1 0 1 1-2 0V9.414l-8.293 8.293a1 1 0 0 1-1.414-1.414L14.586 8H9a1 1 0 0 1-1-1Z"/></symbol><symbol xmlns="http://www.w3.org/2000/svg" id="arrowRight" fill="none" viewBox="0 0 16 17"><path fill="currentColor" d="M6.195 13.157a.667.667 0 0 1 0-.943l3.529-3.528-3.529-3.529a.667.667 0 1 1 .943-.943l4 4c.26.26.26.683 0 .943l-4 4a.667.667 0 0 1-.943 0Z"/></symbol></svg>
|