@foxford/navigation-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.mdx +115 -0
- package/_virtual/preload-helper.js +57 -0
- package/footer/atoms/accordeon/assets/arrow-down.svg +1 -0
- package/footer/atoms/accordeon/index.d.ts +7 -0
- package/footer/atoms/accordeon/index.d.ts.map +1 -0
- package/footer/atoms/accordeon/index.js +23 -0
- package/footer/atoms/accordeon/styled.d.ts +20 -0
- package/footer/atoms/accordeon/styled.d.ts.map +1 -0
- package/footer/atoms/accordeon/styled.js +73 -0
- package/footer/atoms/license-link/index.d.ts +6 -0
- package/footer/atoms/license-link/index.d.ts.map +1 -0
- package/footer/atoms/license-link/index.js +17 -0
- package/footer/atoms/license-link/styled.d.ts +14 -0
- package/footer/atoms/license-link/styled.d.ts.map +1 -0
- package/footer/atoms/license-link/styled.js +19 -0
- package/footer/atoms/logo-sk/assets/sk_logo.svg +1 -0
- package/footer/atoms/logo-sk/index.d.ts +5 -0
- package/footer/atoms/logo-sk/index.d.ts.map +1 -0
- package/footer/atoms/logo-sk/index.js +16 -0
- package/footer/atoms/logo-sk/styled.d.ts +11 -0
- package/footer/atoms/logo-sk/styled.d.ts.map +1 -0
- package/footer/atoms/logo-sk/styled.js +15 -0
- package/footer/atoms/social-link/index.d.ts +8 -0
- package/footer/atoms/social-link/index.d.ts.map +1 -0
- package/footer/atoms/social-link/index.js +35 -0
- package/footer/contacts-column.d.ts +5 -0
- package/footer/contacts-column.d.ts.map +1 -0
- package/footer/contacts-column.js +105 -0
- package/footer/footer.d.ts +3 -0
- package/footer/footer.d.ts.map +1 -0
- package/footer/footer.js +77 -0
- package/footer/molecules/app-info/assets/fox-logo.svg +1 -0
- package/footer/molecules/app-info/index.d.ts +9 -0
- package/footer/molecules/app-info/index.d.ts.map +1 -0
- package/footer/molecules/app-info/index.js +59 -0
- package/footer/molecules/app-info/styled.d.ts +31 -0
- package/footer/molecules/app-info/styled.d.ts.map +1 -0
- package/footer/molecules/app-info/styled.js +101 -0
- package/footer/molecules/footer-logo/assets/logo-cobranding.svg +1 -0
- package/footer/molecules/footer-logo/assets/logo.svg +1 -0
- package/footer/molecules/footer-logo/index.d.ts +6 -0
- package/footer/molecules/footer-logo/index.d.ts.map +1 -0
- package/footer/molecules/footer-logo/index.js +27 -0
- package/footer/molecules/footer-menu/index.d.ts +12 -0
- package/footer/molecules/footer-menu/index.d.ts.map +1 -0
- package/footer/molecules/footer-menu/index.js +29 -0
- package/footer/molecules/geoposition/city-dialog-styled.d.ts +7 -0
- package/footer/molecules/geoposition/city-dialog-styled.d.ts.map +1 -0
- package/footer/molecules/geoposition/city-dialog-styled.js +30 -0
- package/footer/molecules/geoposition/city-dialog.d.ts +10 -0
- package/footer/molecules/geoposition/city-dialog.d.ts.map +1 -0
- package/footer/molecules/geoposition/city-dialog.js +85 -0
- package/footer/molecules/geoposition/index.d.ts +9 -0
- package/footer/molecules/geoposition/index.d.ts.map +1 -0
- package/footer/molecules/geoposition/index.js +41 -0
- package/footer/molecules/geoposition/styled.d.ts +8 -0
- package/footer/molecules/geoposition/styled.d.ts.map +1 -0
- package/footer/molecules/geoposition/styled.js +21 -0
- package/footer/molecules/geoposition/types.d.ts +5 -0
- package/footer/molecules/geoposition/types.d.ts.map +1 -0
- package/footer/molecules/onboarding-banner/assets/fox-table.svg +1 -0
- package/footer/molecules/onboarding-banner/index.d.ts +5 -0
- package/footer/molecules/onboarding-banner/index.d.ts.map +1 -0
- package/footer/molecules/onboarding-banner/index.js +45 -0
- package/footer/molecules/onboarding-banner/styled.d.ts +11 -0
- package/footer/molecules/onboarding-banner/styled.d.ts.map +1 -0
- package/footer/molecules/onboarding-banner/styled.js +40 -0
- package/footer/styled.d.ts +47 -0
- package/footer/styled.d.ts.map +1 -0
- package/footer/styled.js +121 -0
- package/footer/sub-footer-areas.d.ts +26 -0
- package/footer/sub-footer-areas.d.ts.map +1 -0
- package/footer/sub-footer-areas.js +96 -0
- package/footer/sub-footer-styled.d.ts +6 -0
- package/footer/sub-footer-styled.d.ts.map +1 -0
- package/footer/sub-footer-styled.js +70 -0
- package/footer/sub-footer.d.ts +5 -0
- package/footer/sub-footer.d.ts.map +1 -0
- package/footer/sub-footer.js +57 -0
- package/footer/types.d.ts +45 -0
- package/footer/types.d.ts.map +1 -0
- package/header/atoms/action-button/index.d.ts +16 -0
- package/header/atoms/action-button/index.d.ts.map +1 -0
- package/header/atoms/action-button/index.js +57 -0
- package/header/atoms/action-button/styled.d.ts +16 -0
- package/header/atoms/action-button/styled.d.ts.map +1 -0
- package/header/atoms/action-button/styled.js +75 -0
- package/header/atoms/avatar/index.d.ts +7 -0
- package/header/atoms/avatar/index.d.ts.map +1 -0
- package/header/atoms/avatar/index.js +16 -0
- package/header/atoms/avatar/styled.d.ts +7 -0
- package/header/atoms/avatar/styled.d.ts.map +1 -0
- package/header/atoms/avatar/styled.js +24 -0
- package/header/atoms/back-button/index.d.ts +5 -0
- package/header/atoms/back-button/index.d.ts.map +1 -0
- package/header/atoms/back-button/index.js +19 -0
- package/header/atoms/back-button/styled.d.ts +4 -0
- package/header/atoms/back-button/styled.d.ts.map +1 -0
- package/header/atoms/back-button/styled.js +12 -0
- package/header/atoms/bonus-button/index.d.ts +2 -0
- package/header/atoms/bonus-button/index.d.ts.map +1 -0
- package/header/atoms/bonus-button/index.js +13 -0
- package/header/atoms/close-button/index.d.ts +5 -0
- package/header/atoms/close-button/index.d.ts.map +1 -0
- package/header/atoms/close-button/index.js +13 -0
- package/header/atoms/close-button/styled.d.ts +4 -0
- package/header/atoms/close-button/styled.d.ts.map +1 -0
- package/header/atoms/close-button/styled.js +13 -0
- package/header/atoms/list-item/index.d.ts +12 -0
- package/header/atoms/list-item/index.d.ts.map +1 -0
- package/header/atoms/list-item/index.js +36 -0
- package/header/atoms/list-item/styled.d.ts +25 -0
- package/header/atoms/list-item/styled.d.ts.map +1 -0
- package/header/atoms/list-item/styled.js +51 -0
- package/header/atoms/list-spacer/index.d.ts +5 -0
- package/header/atoms/list-spacer/index.d.ts.map +1 -0
- package/header/atoms/list-spacer/index.js +18 -0
- package/header/atoms/list-title/index.d.ts +7 -0
- package/header/atoms/list-title/index.d.ts.map +1 -0
- package/header/atoms/list-title/index.js +24 -0
- package/header/atoms/list-title/styled.d.ts +11 -0
- package/header/atoms/list-title/styled.d.ts.map +1 -0
- package/header/atoms/list-title/styled.js +31 -0
- package/header/atoms/login-button/index.d.ts +2 -0
- package/header/atoms/login-button/index.d.ts.map +1 -0
- package/header/atoms/login-button/index.js +15 -0
- package/header/atoms/logout-button/index.d.ts +5 -0
- package/header/atoms/logout-button/index.d.ts.map +1 -0
- package/header/atoms/logout-button/index.js +16 -0
- package/header/atoms/onboarding-segment-item/assets/fox.svg +1 -0
- package/header/atoms/onboarding-segment-item/index.d.ts +5 -0
- package/header/atoms/onboarding-segment-item/index.d.ts.map +1 -0
- package/header/atoms/onboarding-segment-item/index.js +22 -0
- package/header/atoms/onboarding-segment-item/styled.d.ts +16 -0
- package/header/atoms/onboarding-segment-item/styled.d.ts.map +1 -0
- package/header/atoms/onboarding-segment-item/styled.js +34 -0
- package/header/atoms/profile-balance/index.d.ts +12 -0
- package/header/atoms/profile-balance/index.d.ts.map +1 -0
- package/header/atoms/profile-balance/index.js +37 -0
- package/header/atoms/profile-balance/styled.d.ts +10 -0
- package/header/atoms/profile-balance/styled.d.ts.map +1 -0
- package/header/atoms/profile-balance/styled.js +19 -0
- package/header/atoms/profile-info/index.d.ts +9 -0
- package/header/atoms/profile-info/index.d.ts.map +1 -0
- package/header/atoms/profile-info/index.js +32 -0
- package/header/atoms/profile-info/styled.d.ts +4 -0
- package/header/atoms/profile-info/styled.d.ts.map +1 -0
- package/header/atoms/profile-info/styled.js +8 -0
- package/header/atoms/profile-menu-item/index.d.ts +13 -0
- package/header/atoms/profile-menu-item/index.d.ts.map +1 -0
- package/header/atoms/profile-menu-item/index.js +52 -0
- package/header/atoms/profile-menu-item/styled.d.ts +15 -0
- package/header/atoms/profile-menu-item/styled.d.ts.map +1 -0
- package/header/atoms/profile-menu-item/styled.js +47 -0
- package/header/atoms/scrollbar/index.d.ts +6 -0
- package/header/atoms/scrollbar/index.d.ts.map +1 -0
- package/header/atoms/scrollbar/index.js +33 -0
- package/header/atoms/scrollbar/styled.d.ts +4 -0
- package/header/atoms/scrollbar/styled.d.ts.map +1 -0
- package/header/atoms/scrollbar/styled.js +15 -0
- package/header/atoms/segment-list-item/index.d.ts +8 -0
- package/header/atoms/segment-list-item/index.d.ts.map +1 -0
- package/header/atoms/segment-list-item/index.js +21 -0
- package/header/atoms/segment-list-item/styled.d.ts +6 -0
- package/header/atoms/segment-list-item/styled.d.ts.map +1 -0
- package/header/atoms/segment-list-item/styled.js +22 -0
- package/header/atoms/segment-title/index.d.ts +8 -0
- package/header/atoms/segment-title/index.d.ts.map +1 -0
- package/header/atoms/segment-title/index.js +18 -0
- package/header/atoms/segment-title/styled.d.ts +8 -0
- package/header/atoms/segment-title/styled.d.ts.map +1 -0
- package/header/atoms/segment-title/styled.js +32 -0
- package/header/atoms/user-profile/index.d.ts +9 -0
- package/header/atoms/user-profile/index.d.ts.map +1 -0
- package/header/atoms/user-profile/index.js +46 -0
- package/header/atoms/user-profile/styled.d.ts +14 -0
- package/header/atoms/user-profile/styled.d.ts.map +1 -0
- package/header/atoms/user-profile/styled.js +41 -0
- package/header/header-desktop.d.ts +5 -0
- package/header/header-desktop.d.ts.map +1 -0
- package/header/header-desktop.js +79 -0
- package/header/header-mobile.d.ts +5 -0
- package/header/header-mobile.d.ts.map +1 -0
- package/header/header-mobile.js +66 -0
- package/header/molecules/adaptive-button/index.d.ts +6 -0
- package/header/molecules/adaptive-button/index.d.ts.map +1 -0
- package/header/molecules/adaptive-button/index.js +16 -0
- package/header/molecules/bonuses/index.d.ts +7 -0
- package/header/molecules/bonuses/index.d.ts.map +1 -0
- package/header/molecules/bonuses/index.js +40 -0
- package/header/molecules/bonuses/styled.d.ts +16 -0
- package/header/molecules/bonuses/styled.d.ts.map +1 -0
- package/header/molecules/bonuses/styled.js +38 -0
- package/header/molecules/cart-button/index.d.ts +9 -0
- package/header/molecules/cart-button/index.d.ts.map +1 -0
- package/header/molecules/cart-button/styled.d.ts +6 -0
- package/header/molecules/cart-button/styled.d.ts.map +1 -0
- package/header/molecules/container/index.d.ts +11 -0
- package/header/molecules/container/index.d.ts.map +1 -0
- package/header/molecules/container/index.js +38 -0
- package/header/molecules/container/styled.d.ts +11 -0
- package/header/molecules/container/styled.d.ts.map +1 -0
- package/header/molecules/container/styled.js +43 -0
- package/header/molecules/entry-panel/index.d.ts +8 -0
- package/header/molecules/entry-panel/index.d.ts.map +1 -0
- package/header/molecules/entry-panel/index.js +27 -0
- package/header/molecules/entry-panel/styled.d.ts +10 -0
- package/header/molecules/entry-panel/styled.d.ts.map +1 -0
- package/header/molecules/entry-panel/styled.js +21 -0
- package/header/molecules/externat-buttons/index.d.ts +8 -0
- package/header/molecules/externat-buttons/index.d.ts.map +1 -0
- package/header/molecules/externat-buttons/index.js +36 -0
- package/header/molecules/externat-buttons/styled.d.ts +30 -0
- package/header/molecules/externat-buttons/styled.d.ts.map +1 -0
- package/header/molecules/externat-buttons/styled.js +94 -0
- package/header/molecules/header-logo/assets/foxford.svg +1 -0
- package/header/molecules/header-logo/assets/foxford_mobile.svg +1 -0
- package/header/molecules/header-logo/assets/logo-cobranding.svg +1 -0
- package/header/molecules/header-logo/base-logo.d.ts +2 -0
- package/header/molecules/header-logo/base-logo.d.ts.map +1 -0
- package/header/molecules/header-logo/base-logo.js +24 -0
- package/header/molecules/header-logo/cobranding-logo.d.ts +2 -0
- package/header/molecules/header-logo/cobranding-logo.d.ts.map +1 -0
- package/header/molecules/header-logo/cobranding-logo.js +29 -0
- package/header/molecules/header-logo/index.d.ts +7 -0
- package/header/molecules/header-logo/index.d.ts.map +1 -0
- package/header/molecules/header-logo/index.js +20 -0
- package/header/molecules/header-logo/styled.d.ts +23 -0
- package/header/molecules/header-logo/styled.d.ts.map +1 -0
- package/header/molecules/header-logo/styled.js +46 -0
- package/header/molecules/list/index.d.ts +7 -0
- package/header/molecules/list/index.d.ts.map +1 -0
- package/header/molecules/list/index.js +45 -0
- package/header/molecules/list/styled.d.ts +4 -0
- package/header/molecules/list/styled.d.ts.map +1 -0
- package/header/molecules/list/styled.js +8 -0
- package/header/molecules/menu/index.d.ts +17 -0
- package/header/molecules/menu/index.d.ts.map +1 -0
- package/header/molecules/menu/index.js +163 -0
- package/header/molecules/menu/panel-styled.d.ts +24 -0
- package/header/molecules/menu/panel-styled.d.ts.map +1 -0
- package/header/molecules/menu/panel-styled.js +105 -0
- package/header/molecules/menu/segment-content-styled.d.ts +13 -0
- package/header/molecules/menu/segment-content-styled.d.ts.map +1 -0
- package/header/molecules/menu/segment-content-styled.js +39 -0
- package/header/molecules/menu/segment-content.d.ts +7 -0
- package/header/molecules/menu/segment-content.d.ts.map +1 -0
- package/header/molecules/menu/segment-content.js +42 -0
- package/header/molecules/menu/styled.d.ts +23 -0
- package/header/molecules/menu/styled.d.ts.map +1 -0
- package/header/molecules/menu/styled.js +81 -0
- package/header/molecules/menu/types.d.ts +32 -0
- package/header/molecules/menu/types.d.ts.map +1 -0
- package/header/molecules/menu-button/index.d.ts +6 -0
- package/header/molecules/menu-button/index.d.ts.map +1 -0
- package/header/molecules/menu-button/index.js +29 -0
- package/header/molecules/menu-button/styled.d.ts +22 -0
- package/header/molecules/menu-button/styled.d.ts.map +1 -0
- package/header/molecules/menu-button/styled.js +74 -0
- package/header/molecules/onboarding-button/index.d.ts +6 -0
- package/header/molecules/onboarding-button/index.d.ts.map +1 -0
- package/header/molecules/onboarding-button/index.js +23 -0
- package/header/molecules/onboarding-button/styled.d.ts +15 -0
- package/header/molecules/onboarding-button/styled.d.ts.map +1 -0
- package/header/molecules/onboarding-button/styled.js +74 -0
- package/header/molecules/oneclick-menu/index.d.ts +14 -0
- package/header/molecules/oneclick-menu/index.d.ts.map +1 -0
- package/header/molecules/oneclick-menu/index.js +28 -0
- package/header/molecules/oneclick-menu/styled.d.ts +19 -0
- package/header/molecules/oneclick-menu/styled.d.ts.map +1 -0
- package/header/molecules/oneclick-menu/styled.js +49 -0
- package/header/molecules/phone-button/index.d.ts +5 -0
- package/header/molecules/phone-button/index.d.ts.map +1 -0
- package/header/molecules/phone-button/index.js +15 -0
- package/header/molecules/profile-menu/index.d.ts +19 -0
- package/header/molecules/profile-menu/index.d.ts.map +1 -0
- package/header/molecules/profile-menu/index.js +74 -0
- package/header/molecules/profile-menu/styled.d.ts +9 -0
- package/header/molecules/profile-menu/styled.d.ts.map +1 -0
- package/header/molecules/profile-menu/styled.js +23 -0
- package/header/molecules/profile-menu-button-tooltip/assets/arrow.svg +1 -0
- package/header/molecules/profile-menu-button-tooltip/index.d.ts +5 -0
- package/header/molecules/profile-menu-button-tooltip/index.d.ts.map +1 -0
- package/header/molecules/profile-menu-button-tooltip/index.js +13 -0
- package/header/molecules/profile-menu-button-tooltip/styled.d.ts +6 -0
- package/header/molecules/profile-menu-button-tooltip/styled.d.ts.map +1 -0
- package/header/molecules/profile-menu-button-tooltip/styled.js +56 -0
- package/header/molecules/pupil-select-button/index.d.ts +8 -0
- package/header/molecules/pupil-select-button/index.d.ts.map +1 -0
- package/header/molecules/pupil-select-button/index.js +54 -0
- package/header/molecules/pupil-select-menu/index.d.ts +15 -0
- package/header/molecules/pupil-select-menu/index.d.ts.map +1 -0
- package/header/molecules/pupil-select-menu/index.js +59 -0
- package/header/molecules/pupil-select-menu/styled.d.ts +7 -0
- package/header/molecules/pupil-select-menu/styled.d.ts.map +1 -0
- package/header/molecules/pupil-select-menu/styled.js +26 -0
- package/header/molecules/segment-list/index.d.ts +8 -0
- package/header/molecules/segment-list/index.d.ts.map +1 -0
- package/header/molecules/segment-list/index.js +32 -0
- package/header/molecules/segment-list/styled.d.ts +14 -0
- package/header/molecules/segment-list/styled.d.ts.map +1 -0
- package/header/molecules/segment-list/styled.js +20 -0
- package/header/molecules/user-panel/index.d.ts +32 -0
- package/header/molecules/user-panel/index.d.ts.map +1 -0
- package/header/molecules/user-panel/index.js +114 -0
- package/header/molecules/user-panel/styled.d.ts +16 -0
- package/header/molecules/user-panel/styled.d.ts.map +1 -0
- package/header/molecules/user-panel/styled.js +41 -0
- package/header/molecules/user-panel-mobile/index.d.ts +3 -0
- package/header/molecules/user-panel-mobile/index.d.ts.map +1 -0
- package/header/molecules/user-panel-mobile/index.js +56 -0
- package/header/molecules/user-panel-mobile/styled.d.ts +6 -0
- package/header/molecules/user-panel-mobile/styled.d.ts.map +1 -0
- package/header/molecules/user-panel-mobile/styled.js +16 -0
- package/header/navigation.d.ts +3 -0
- package/header/navigation.d.ts.map +1 -0
- package/header/navigation.js +64 -0
- package/header/styled.d.ts +31 -0
- package/header/styled.d.ts.map +1 -0
- package/header/styled.js +87 -0
- package/header/types.d.ts +40 -0
- package/header/types.d.ts.map +1 -0
- package/index.d.ts +25 -0
- package/index.d.ts.map +1 -0
- package/index.js +23 -0
- package/package.json +55 -0
- package/shared/constants.d.ts +86 -0
- package/shared/constants.d.ts.map +1 -0
- package/shared/constants.js +69 -0
- package/shared/link.d.ts +9 -0
- package/shared/link.d.ts.map +1 -0
- package/shared/link.js +56 -0
- package/shared/phone.d.ts +3 -0
- package/shared/phone.d.ts.map +1 -0
- package/shared/phone.js +10 -0
- package/shared/theme-provider.d.ts +6 -0
- package/shared/theme-provider.d.ts.map +1 -0
- package/shared/theme-provider.js +27 -0
- package/shared/theme.d.ts +77 -0
- package/shared/theme.d.ts.map +1 -0
- package/shared/theme.js +29 -0
- package/shared/use-outside-click.d.ts +3 -0
- package/shared/use-outside-click.d.ts.map +1 -0
- package/shared/use-outside-click.js +22 -0
- package/shared/use-scroll-direction.d.ts +4 -0
- package/shared/use-scroll-direction.d.ts.map +1 -0
- package/shared/use-scroll-direction.js +22 -0
- package/shared/z-index.d.ts +5 -0
- package/shared/z-index.d.ts.map +1 -0
- package/shared/z-index.js +7 -0
package/README.mdx
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# @foxford/navigation-ui
|
|
2
|
+
|
|
3
|
+
Презентационная вёрстка шапки и подвала портала: компоненты `Navigation`/`Footer` и
|
|
4
|
+
немногое общее для них (`Link`, токены темы, провайдеры дизайн-системы). Пакет **не знает
|
|
5
|
+
о состоянии** — ни VM, ни эффектора, ни DI-контейнера в нём нет: компоненты принимают
|
|
6
|
+
готовые данные и коллбэки пропсами и ничего не резолвят сами.
|
|
7
|
+
|
|
8
|
+
Состояние, поход за данными и запуск в конкретной среде (in-process приложением хоста портала
|
|
9
|
+
либо самостоятельным виджетом на чужом сайте) — в
|
|
10
|
+
[@foxford/navigation-runtime](../navigation-runtime).
|
|
11
|
+
|
|
12
|
+
Вёрстка перенесена из legacy-пакета навигации портала (вариант `BaseNavigation` и подвал
|
|
13
|
+
целиком). Тема берётся у `@foxford/ui` как есть — переопределены только шрифтовые семейства
|
|
14
|
+
портала, поэтому цвета и брейкпоинты совпадают с легаси по источнику, а не по переписанной
|
|
15
|
+
копии значений.
|
|
16
|
+
|
|
17
|
+
## Раскладка
|
|
18
|
+
|
|
19
|
+
| Что | Где |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| шапка целиком | `src/header/navigation.tsx` + `header-mobile.tsx`/`header-desktop.tsx` |
|
|
22
|
+
| меню-«простыня», сегменты и списки | `src/header/molecules/menu/`, `segment-list/`, `list/` |
|
|
23
|
+
| панель пользователя, профиль-меню, выбор ученика | `src/header/molecules/user-panel*/`, `profile-menu/`, `pupil-select-*/` |
|
|
24
|
+
| подвал целиком | `src/footer/footer.tsx` + `contacts-column.tsx`, `sub-footer.tsx` |
|
|
25
|
+
| общее (`Link`, тема, провайдеры, константы) | `src/shared/` |
|
|
26
|
+
|
|
27
|
+
**Простыня рисует содержимое ВСЕХ сегментов сразу**, а невыбранные прячет стилями
|
|
28
|
+
(`SegmentPane`, `display: none`). Ссылок в меню несколько сотен, и условный рендер оставлял бы
|
|
29
|
+
в серверной разметке только выбранный сегмент — остальные существовали бы лишь состоянием, то
|
|
30
|
+
есть для обхода их бы не было. Скрывать сегменты можно только стилями.
|
|
31
|
+
|
|
32
|
+
## Слоты
|
|
33
|
+
|
|
34
|
+
`Navigation`/`Footer` принимают именованные слоты (`NavigationSlots`, `FooterSlots`) —
|
|
35
|
+
точки расширения разметки: компонент рендерит переданное содержимое на своё место, не
|
|
36
|
+
зная, откуда оно взялось. Природа заполнения — забота потребителя:
|
|
37
|
+
|
|
38
|
+
- у хоста портала слот может быть настоящим вложенным местом федерации
|
|
39
|
+
(`header:actionsButton`, заполняется `@foxford/den-preact`'s `Slot`);
|
|
40
|
+
- в виджете — то, что передали в `mount({ slots })` напрямую.
|
|
41
|
+
|
|
42
|
+
Контракт компонента при этом один и тот же в обоих случаях.
|
|
43
|
+
|
|
44
|
+
Кроме слотов пакет отдаёт наружу части профиль-меню (`ProfileInfo`, `ProfileMenuItem`,
|
|
45
|
+
`Bonuses`, `PupilSelectButton`): их наполнение зависит от данных пользователя, поэтому
|
|
46
|
+
собирает их адаптер и передаёт готовыми узлами. Сам набор пунктов меню — тоже данные
|
|
47
|
+
адаптера (`@foxford/navigation-runtime`, `src/menu-items.ts`): пакет вёрстки не знает ни
|
|
48
|
+
адресов Фоксфорда, ни того, кому какой пункт положен.
|
|
49
|
+
|
|
50
|
+
## Требования к среде
|
|
51
|
+
|
|
52
|
+
- **`<Media>` из `@foxford/ui` матчит только после эффектов.** Там, где от размера экрана
|
|
53
|
+
зависит сама СТРУКТУРА (мобильная и десктопная раскладки шапки, размер логотипа), вместо
|
|
54
|
+
него используется CSS-переключение (`MobileOnly`/`DesktopOnly` в `header/styled.ts`):
|
|
55
|
+
иначе на серверном проходе и до гидрации не рисуется ни одна ветка.
|
|
56
|
+
- **`Anchor` из `@foxford/ui` в рендере трогает `window`** (через свой `relBuilder`) и
|
|
57
|
+
роняет серверный проход. Ссылки подвала — собственный `Link` пакета, как и в легаси, где
|
|
58
|
+
использовался `atoms/anchor` приложения, а не компонент дизайн-системы.
|
|
59
|
+
- **`MediaMediator` создаётся лениво и только в браузере** (`shared/theme-provider.tsx`):
|
|
60
|
+
внутри он зовёт `window.matchMedia`, которого нет ни на сервере, ни в jsdom.
|
|
61
|
+
- **`Scrollable` из `@foxford/ui` (`rc-scrollbars`) требует `universal`.** Нативную полосу он
|
|
62
|
+
прячет, сдвигая внутренний слой за край контейнера на её ширину, а ширину меряет по DOM — на
|
|
63
|
+
сервере она нулевая. Гидрация preact инлайновые стили существующих узлов не переписывает,
|
|
64
|
+
поэтому без `universal` серверный сдвиг остаётся нулевым навсегда; в этом режиме первый проход
|
|
65
|
+
обеих сторон одинаков, а сдвиг ставится вторым рендером, после монтирования.
|
|
66
|
+
- **Стилевые пропсы объявляются транзиентными (`$`).** styled-components 6 неизвестные пропсы
|
|
67
|
+
не фильтрует и отправляет их в DOM; префикс — единственное, что их там останавливает. Правило
|
|
68
|
+
общее на пакет: проп, который читает только шаблон стилей, называется с `$`.
|
|
69
|
+
- Потребителю нужно объявить `*.svg` (см. `src/shared/assets.d.ts`): шаблонные имена
|
|
70
|
+
модулей живут только в глобальном `.d.ts`, а он не переезжает вместе с исходниками пакета.
|
|
71
|
+
|
|
72
|
+
## Что не перенесено
|
|
73
|
+
|
|
74
|
+
Отличия от легаси — каждое помечено комментарием в коде:
|
|
75
|
+
|
|
76
|
+
- варианты `NewNavigation`/`ElementaryNavigation`/`InspectorNavigation` — только
|
|
77
|
+
`BaseNavigation`; молекулы, которые нужны лишь этим раскладкам (`CartButton`), перенесены,
|
|
78
|
+
но пока никем не рисуются;
|
|
79
|
+
- аналитика (`sendAnalytics`) и i18n-инфраструктура (`FormattedMessage`) — вызовы сняты,
|
|
80
|
+
строки русские прямо в коде;
|
|
81
|
+
- обучающий тур выбора ученика (`PupilSelectExplainer`, Joyride) и Enrichment-портал
|
|
82
|
+
(`react-reverse-portal`) — не перенесены вовсе;
|
|
83
|
+
- промо-плашка «За скидками — сюда» (`PromoSegmentItem`) — вторая ветка `AdaptiveButton`
|
|
84
|
+
в меню; у неё нет источника данных, поэтому в простыне остался только онбординг;
|
|
85
|
+
- панель поиска (`placeholder.top`/`placeholder.searchPanel`) — под неё есть слот
|
|
86
|
+
`actionsButton`, самой панели нет.
|
|
87
|
+
|
|
88
|
+
## Сборка
|
|
89
|
+
|
|
90
|
+
`pnpm run build` даёт пакетный выход в `build/`: код собирает vite
|
|
91
|
+
(`vite.package.config.ts`), типы — `tsc --emitDeclarationOnly` (`tsconfig.build.json`).
|
|
92
|
+
Раскладка исходников сохраняется, поэтому `.d.ts` встают рядом со своими модулями.
|
|
93
|
+
|
|
94
|
+
**Снаружи остаётся всё, что обязано быть в одном экземпляре**: `styled-components`, `preact`,
|
|
95
|
+
`react`/`react-dom` и `@foxford/ui` объявлены `peerDependencies`. Причина — лист стилей:
|
|
96
|
+
`ServerStyleSheet` собирает стили только своей копии `styled-components`, и вторая копия
|
|
97
|
+
означает обрамление страницы без стилей. Сторож — `tests/artifacts.check.tsx`: он рендерит
|
|
98
|
+
СОБРАННЫЕ `Navigation` и `Footer` через лист и требует непустой `getStyleTags()`.
|
|
99
|
+
|
|
100
|
+
Собирает vite, а не tsup: стабильные `componentId` проставляет
|
|
101
|
+
`babel-plugin-styled-components`, а он babel-плагин. Опции те же, что у хоста и у раннера
|
|
102
|
+
тестов, — трансформация обязана быть одна на всех.
|
|
103
|
+
|
|
104
|
+
Картинки в выходе лежат файлами и остаются относительными импортами: эмитит их сборщик
|
|
105
|
+
потребителя, своими ассетами и со своего адреса.
|
|
106
|
+
|
|
107
|
+
## Команды
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pnpm test # vitest run — юнит-тесты, сборка не нужна
|
|
111
|
+
pnpm run build # пакетный выход → build/
|
|
112
|
+
pnpm run test:build # проверка артефактов; nx поднимает сборку сам
|
|
113
|
+
pnpm run lint:eslint
|
|
114
|
+
pnpm run lint:type-check
|
|
115
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const scriptRel = "modulepreload";
|
|
2
|
+
const assetsURL = function(dep) {
|
|
3
|
+
return "/" + dep;
|
|
4
|
+
};
|
|
5
|
+
const seen = {};
|
|
6
|
+
const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
7
|
+
let promise = Promise.resolve();
|
|
8
|
+
if (deps && deps.length > 0) {
|
|
9
|
+
let allSettled = function(promises$2) {
|
|
10
|
+
return Promise.all(promises$2.map((p) => Promise.resolve(p).then((value$1) => ({
|
|
11
|
+
status: "fulfilled",
|
|
12
|
+
value: value$1
|
|
13
|
+
}), (reason) => ({
|
|
14
|
+
status: "rejected",
|
|
15
|
+
reason
|
|
16
|
+
}))));
|
|
17
|
+
};
|
|
18
|
+
document.getElementsByTagName("link");
|
|
19
|
+
const cspNonceMeta = document.querySelector("meta[property=csp-nonce]");
|
|
20
|
+
const cspNonce = (cspNonceMeta == null ? void 0 : cspNonceMeta.nonce) || (cspNonceMeta == null ? void 0 : cspNonceMeta.getAttribute("nonce"));
|
|
21
|
+
promise = allSettled(deps.map((dep) => {
|
|
22
|
+
dep = assetsURL(dep);
|
|
23
|
+
if (dep in seen) return;
|
|
24
|
+
seen[dep] = true;
|
|
25
|
+
const isCss = dep.endsWith(".css");
|
|
26
|
+
const cssSelector = isCss ? '[rel="stylesheet"]' : "";
|
|
27
|
+
if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) return;
|
|
28
|
+
const link = document.createElement("link");
|
|
29
|
+
link.rel = isCss ? "stylesheet" : scriptRel;
|
|
30
|
+
if (!isCss) link.as = "script";
|
|
31
|
+
link.crossOrigin = "";
|
|
32
|
+
link.href = dep;
|
|
33
|
+
if (cspNonce) link.setAttribute("nonce", cspNonce);
|
|
34
|
+
document.head.appendChild(link);
|
|
35
|
+
if (isCss) return new Promise((res, rej) => {
|
|
36
|
+
link.addEventListener("load", res);
|
|
37
|
+
link.addEventListener("error", () => rej(/* @__PURE__ */ new Error(`Unable to preload CSS for ${dep}`)));
|
|
38
|
+
});
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
function handlePreloadError(err$2) {
|
|
42
|
+
const e$1 = new Event("vite:preloadError", { cancelable: true });
|
|
43
|
+
e$1.payload = err$2;
|
|
44
|
+
window.dispatchEvent(e$1);
|
|
45
|
+
if (!e$1.defaultPrevented) throw err$2;
|
|
46
|
+
}
|
|
47
|
+
return promise.then((res) => {
|
|
48
|
+
for (const item of res || []) {
|
|
49
|
+
if (item.status !== "rejected") continue;
|
|
50
|
+
handlePreloadError(item.reason);
|
|
51
|
+
}
|
|
52
|
+
return baseModule().catch(handlePreloadError);
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
__vitePreload
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg"><rect y="32" width="32" height="32" rx="16" transform="rotate(-90 0 32)" fill="#3B3A3D"/><path d="m10 14 5.7879 5.7879c.1171.1171.3071.1171.4242 0L22 14" stroke="#fff" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface AccordeonProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
heading?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function Accordeon({ children, heading }: AccordeonProps): import("preact").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/footer/atoms/accordeon/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAY,EAAE,EAAE,cAAc,gCAYnE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Root, Trigger, TriggerText, Arrow, Content } from "./styled.js";
|
|
3
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
4
|
+
function Accordeon({
|
|
5
|
+
children,
|
|
6
|
+
heading = ""
|
|
7
|
+
}) {
|
|
8
|
+
const [isActive, setIsActive] = useState(false);
|
|
9
|
+
return jsxs(Root, {
|
|
10
|
+
$isActive: isActive,
|
|
11
|
+
children: [jsxs(Trigger, {
|
|
12
|
+
onClick: () => setIsActive(!isActive),
|
|
13
|
+
children: [jsx(TriggerText, {
|
|
14
|
+
children: heading
|
|
15
|
+
}), jsx(Arrow, {})]
|
|
16
|
+
}), jsx(Content, {
|
|
17
|
+
children
|
|
18
|
+
})]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
Accordeon
|
|
23
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const Trigger: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("preact").JSX.HTMLAttributes<HTMLDivElement>, "style"> & {
|
|
2
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
3
|
+
}> & string;
|
|
4
|
+
export declare const TriggerText: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("preact").JSX.HTMLAttributes<HTMLDivElement>, "style"> & {
|
|
5
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
6
|
+
}> & string;
|
|
7
|
+
export declare const Content: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("preact").JSX.HTMLAttributes<HTMLDivElement>, "style"> & {
|
|
8
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
9
|
+
}> & string;
|
|
10
|
+
export declare const Arrow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Merged<Omit<import("preact").JSX.ImgHTMLAttributes<HTMLImageElement>, "style"> & {
|
|
11
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
12
|
+
}, import("preact").JSX.ImgHTMLAttributes<HTMLImageElement>>, "alt" | "src"> & Partial<Pick<import("styled-components/dist/types").Merged<Omit<import("preact").JSX.ImgHTMLAttributes<HTMLImageElement>, "style"> & {
|
|
13
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
14
|
+
}, import("preact").JSX.ImgHTMLAttributes<HTMLImageElement>>, "alt" | "src">>> & string;
|
|
15
|
+
export declare const Root: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("preact").JSX.HTMLAttributes<HTMLDivElement>, "style"> & {
|
|
16
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
$isActive: boolean;
|
|
19
|
+
}>> & string;
|
|
20
|
+
//# sourceMappingURL=styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../src/footer/atoms/accordeon/styled.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO;;WAmBnB,CAAA;AAED,eAAO,MAAM,WAAW;;WAKvB,CAAA;AAYD,eAAO,MAAM,OAAO;;WAWnB,CAAA;AAID,eAAO,MAAM,KAAK;;;;uFAMjB,CAAA;AAED,eAAO,MAAM,IAAI;;;eAA2B,OAAO;YAuBlD,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { styled, keyframes, css } from "styled-components";
|
|
2
|
+
import { screenMinS, screenMaxS } from "@foxford/ui";
|
|
3
|
+
import arrowDown from "./assets/arrow-down.svg";
|
|
4
|
+
const Trigger = styled.div.withConfig({
|
|
5
|
+
displayName: "styled__Trigger",
|
|
6
|
+
componentId: "sc-iiu3zo-0"
|
|
7
|
+
})(["display:flex;align-items:center;justify-content:space-between;position:relative;width:100%;padding:18px 0 20px 0;font-size:16px;line-height:1.1;color:#909090;cursor:pointer;border-bottom:2px solid #454448;transition:color 0.4s ease;", ""], screenMinS()`
|
|
8
|
+
border-bottom: none;
|
|
9
|
+
padding: 0;
|
|
10
|
+
cursor: default;
|
|
11
|
+
`);
|
|
12
|
+
const TriggerText = styled.div.withConfig({
|
|
13
|
+
displayName: "styled__TriggerText",
|
|
14
|
+
componentId: "sc-iiu3zo-1"
|
|
15
|
+
})(["font-size:20px;line-height:24px;color:#ffffff;font-weight:700;"]);
|
|
16
|
+
const expand = keyframes`
|
|
17
|
+
0% {
|
|
18
|
+
transform: scaleY(0) translateY(-50%)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
100% {
|
|
22
|
+
transform: none
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
const Content = styled.div.withConfig({
|
|
26
|
+
displayName: "styled__Content",
|
|
27
|
+
componentId: "sc-iiu3zo-2"
|
|
28
|
+
})(["display:none;overflow:hidden;padding-top:24px;animation:", " 0.4s cubic-bezier(0.4,0,0.21,1) both;", ""], expand, screenMinS()`
|
|
29
|
+
display: block;
|
|
30
|
+
padding-top: 12px;
|
|
31
|
+
animation: none;
|
|
32
|
+
`);
|
|
33
|
+
const Arrow = styled.img.attrs({
|
|
34
|
+
alt: "",
|
|
35
|
+
src: arrowDown
|
|
36
|
+
}).withConfig({
|
|
37
|
+
displayName: "styled__Arrow",
|
|
38
|
+
componentId: "sc-iiu3zo-3"
|
|
39
|
+
})(["transition:transform 0.25s ease-out;", ""], screenMinS()`
|
|
40
|
+
display: none;
|
|
41
|
+
`);
|
|
42
|
+
const Root = styled.div.withConfig({
|
|
43
|
+
displayName: "styled__Root",
|
|
44
|
+
componentId: "sc-iiu3zo-4"
|
|
45
|
+
})(["", ""], ({
|
|
46
|
+
$isActive
|
|
47
|
+
}) => $isActive && css`
|
|
48
|
+
${screenMaxS()`
|
|
49
|
+
border-bottom: 2px solid #454448;
|
|
50
|
+
|
|
51
|
+
${Trigger} {
|
|
52
|
+
padding-bottom: 12px;
|
|
53
|
+
border-bottom: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${Arrow} {
|
|
57
|
+
transform: rotate(180deg);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
${Content} {
|
|
61
|
+
display: block;
|
|
62
|
+
padding-top: 0;
|
|
63
|
+
padding-bottom: 20px;
|
|
64
|
+
}
|
|
65
|
+
`}
|
|
66
|
+
`);
|
|
67
|
+
export {
|
|
68
|
+
Arrow,
|
|
69
|
+
Content,
|
|
70
|
+
Root,
|
|
71
|
+
Trigger,
|
|
72
|
+
TriggerText
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/footer/atoms/license-link/index.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAiB,EAAE,OAAO,EAAE,EAAE,gBAAgB,gCAW3E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Root, Icon, Text } from "./styled.js";
|
|
2
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
3
|
+
function LicenseLink({
|
|
4
|
+
href = "/license",
|
|
5
|
+
onClick
|
|
6
|
+
}) {
|
|
7
|
+
return jsxs(Root, {
|
|
8
|
+
href,
|
|
9
|
+
onClick,
|
|
10
|
+
children: [jsx(Icon, {}), jsxs(Text, {
|
|
11
|
+
children: ["Государственная", jsx("br", {}), "лицензия"]
|
|
12
|
+
})]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
LicenseLink
|
|
17
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const Icon: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("preact").JSX.HTMLAttributes<HTMLDivElement>, "style"> & {
|
|
2
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
3
|
+
}> & string;
|
|
4
|
+
export declare const Text: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("preact").JSX.HTMLAttributes<HTMLDivElement>, "style"> & {
|
|
5
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
6
|
+
}> & string;
|
|
7
|
+
export declare const Root: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react-dom/src").PropsWithoutRef<import("../../..").LinkProps> & {
|
|
8
|
+
ref?: import("preact").Ref<HTMLAnchorElement> | undefined;
|
|
9
|
+
}, "style"> & {
|
|
10
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
11
|
+
}> & string & Omit<import("preact").FunctionalComponent<import("react-dom/src").PropsWithoutRef<import("../../..").LinkProps> & {
|
|
12
|
+
ref?: import("preact").Ref<HTMLAnchorElement> | undefined;
|
|
13
|
+
}>, keyof import("preact").Component<any, {}>>;
|
|
14
|
+
//# sourceMappingURL=styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../src/footer/atoms/license-link/styled.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;WAQhB,CAAA;AAED,eAAO,MAAM,IAAI;;WAMhB,CAAA;AAED,eAAO,MAAM,IAAI;;;;;;8CAWhB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { styled } from "styled-components";
|
|
2
|
+
import { Link } from "../../../shared/link.js";
|
|
3
|
+
const Icon = styled.div.withConfig({
|
|
4
|
+
displayName: "styled__Icon",
|
|
5
|
+
componentId: "sc-1rb7k6m-0"
|
|
6
|
+
})(["display:block;width:27px;height:40px;background:url('data:image/jpeg;base64,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') center no-repeat;background-size:100% 100%;transition:all 0.2s ease-in-out;"]);
|
|
7
|
+
const Text = styled.div.withConfig({
|
|
8
|
+
displayName: "styled__Text",
|
|
9
|
+
componentId: "sc-1rb7k6m-1"
|
|
10
|
+
})(["margin-left:12px;font-size:14px;display:block;line-height:1.2;color:rgba(255,255,255,0.7);"]);
|
|
11
|
+
const Root = styled(Link).withConfig({
|
|
12
|
+
displayName: "styled__Root",
|
|
13
|
+
componentId: "sc-1rb7k6m-2"
|
|
14
|
+
})(["display:flex;align-items:flex-end;vertical-align:bottom;text-decoration:none;&:hover{", "{opacity:0.8;}}"], Icon);
|
|
15
|
+
export {
|
|
16
|
+
Icon,
|
|
17
|
+
Root,
|
|
18
|
+
Text
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="109" height="32" fill="none"><g clip-path="url(#clip0_1067_3985)"><path fill="#B1EC52" d="M7.972 0C3.568 0 0 3.58 0 8v16c0 4.42 3.568 8 7.972 8h15.943c4.404 0 7.972-3.58 7.972-8V0H7.972Z"/><path fill="#4D5759" d="M26.35 11.996h-3.827L18.883 16V8H15.93v1.936a7.885 7.885 0 0 0-.31-.37c-1.075-1.144-2.623-1.722-4.605-1.722-2.286 0-3.587 1.027-4.28 1.89-.855 1.073-1.237 2.535-.972 3.725.687 3.08 3.536 3.574 5.628 3.847 1.651.214 3.231.52 3.192 1.995-.045 1.534-1.768 1.91-2.9 1.91-2.947 0-3.044-2.183-3.044-2.183H5.472c.045.819.291 2.138 1.302 3.269 1.1 1.241 2.758 1.865 4.915 1.865 1.658 0 3.166-.54 4.241-1.501v1.32h2.953v-3.777l1.043-1.15 2.985 4.926h3.439l-4.345-7.207 4.345-4.777Zm-17.634.78c-.259-1.143.875-2.157 2.351-2.157 1.328 0 2.655.299 3.16 2.15h1.697v2.834c-2.118-1.748-6.715-.65-7.208-2.827Z"/><path fill="#B1EC52" d="M39.405 21.979c.2.065.427.098.693.098.33 0 .596-.098.796-.3.201-.2.33-.467.395-.76l-4.202-8.93h2.797l2.694 6.409 2.364-6.408h2.661l-3.788 8.8c-.499 1.162-1.01 2.027-1.574 2.573-.563.565-1.172.845-1.852.845-.233 0-.414 0-.563-.033a2.566 2.566 0 0 1-.415-.084l-.317-.098a2.215 2.215 0 0 0-.246-.084v-2.255c.149.097.33.181.544.233l.013-.006ZM52.162 20.654c-.168.052-.35.084-.544.13-.2.032-.414.065-.628.084-.214.033-.427.033-.628.033-.512 0-.946-.052-1.34-.13-.383-.098-.713-.234-.978-.43a1.773 1.773 0 0 1-.596-.799c-.13-.318-.2-.715-.2-1.176v-3.184h2.279v2.736c0 .247.032.468.097.61a.766.766 0 0 0 .278.397c.13.097.279.169.48.201.2.033.427.052.692.052.395 0 .693-.032.926-.097.233-.085.415-.17.544-.247v-3.652h2.28v8.832h-2.28V20.53c-.097.033-.233.085-.395.13l.013-.006ZM63.676 22.909c.02.169.065.318.117.396a.52.52 0 0 0 .168.234.389.389 0 0 0 .2.098V24H61.63l-.13-.416c-.065-.17-.084-.364-.084-.618l-.511.514c-.182.15-.363.28-.577.396a2.814 2.814 0 0 1-.725.28 4.446 4.446 0 0 1-.99.097c-.377 0-.759-.052-1.095-.169a2.738 2.738 0 0 1-.862-.513 2.468 2.468 0 0 1-.563-.865c-.13-.331-.2-.727-.2-1.176 0-.364.051-.695.168-1.014a2.59 2.59 0 0 1 .479-.812c.214-.234.466-.429.758-.578a2.755 2.755 0 0 1 1.01-.319l2.234-.331c.084-.02.168-.02.265-.052a.606.606 0 0 0 .266-.117.596.596 0 0 0 .2-.202.755.755 0 0 0 .085-.364c0-.15-.033-.28-.065-.396a.77.77 0 0 0-.233-.319 1.018 1.018 0 0 0-.428-.214c-.18-.052-.414-.065-.68-.065-.317 0-.543.032-.725.084-.2.065-.35.17-.446.267a.994.994 0 0 0-.247.383l-.097.481h-2.28c0-.097.02-.247.053-.448.032-.182.097-.397.2-.63.085-.215.234-.449.395-.683a2.62 2.62 0 0 1 .68-.65c.266-.182.615-.35 1.01-.468.396-.117.862-.182 1.425-.201.777 0 1.425.084 1.917.234.48.169.861.383 1.14.63.265.267.447.546.544.864.084.319.13.63.13.95v4.678c0 .267.019.481.051.65l-.026.02Zm-2.746-3.016c-.148.065-.33.13-.563.17l-.609.116c-.265.052-.498.098-.693.17-.2.064-.362.149-.498.246-.13.117-.233.247-.298.397-.065.15-.097.331-.097.565 0 .182.032.351.084.481.065.15.149.247.265.35a.855.855 0 0 0 .35.202c.15.052.298.065.466.065.085 0 .201-.02.33-.032.13-.02.266-.052.428-.098a2.46 2.46 0 0 0 .447-.234c.149-.084.278-.214.395-.364.13-.149.233-.33.298-.565.065-.214.116-.468.116-.76v-.897c-.13.084-.278.15-.414.201l-.007-.013ZM70.061 17.683a1.285 1.285 0 0 0-.278-.448 1.237 1.237 0 0 0-.447-.28 2.339 2.339 0 0 0-.648-.084c-.382 0-.68.084-.906.266a1.698 1.698 0 0 0-.531.663c-.13.28-.201.579-.246.897-.033.318-.065.61-.065.897 0 .286.02.598.052.91.032.331.097.61.233.877.116.266.278.5.53.663.234.182.545.266.946.266.266 0 .499-.052.693-.169a1.73 1.73 0 0 0 .48-.383c.129-.17.233-.331.297-.514.052-.168.084-.33.084-.48h2.384c0 .15-.02.331-.065.565a4.95 4.95 0 0 1-.266.747 5.374 5.374 0 0 1-.466.78c-.214.267-.447.5-.745.696a3.69 3.69 0 0 1-1.023.513c-.395.13-.861.201-1.373.201-.66 0-1.256-.097-1.768-.298a3.421 3.421 0 0 1-1.288-.91c-.35-.397-.615-.878-.797-1.476a6.67 6.67 0 0 1-.278-1.988c0-.741.097-1.43.298-2.008.2-.566.479-1.06.842-1.462a3.468 3.468 0 0 1 1.308-.897c.498-.215 1.075-.319 1.69-.319.265 0 .544.033.842.065.278.033.563.117.841.215.279.117.544.247.81.416.246.169.48.383.693.63.2.247.362.546.498.877.13.332.214.728.247 1.177h-2.383c-.052-.234-.098-.449-.182-.611l-.013.006ZM80.59 15.175v1.858h-2.66v6.974h-2.28v-6.974h-2.662v-1.858h7.61-.007ZM86.937 18.366v-3.184h2.28v8.832h-2.28V20.23h-3.354v3.782h-2.28v-8.831h2.28v3.184h3.354ZM93.063 20.62l3.212-5.445h2.396v8.832h-2.28v-5.33h-.032l-3.108 5.33h-2.5v-8.832h2.28v5.446h.032ZM105.807 15.175h3.044l-3.639 3.665L109 24h-2.979l-2.577-3.737-.926.949V24h-2.28v-8.832h2.28v3.353l3.289-3.353v.007Z"/></g><defs><clipPath id="clip0_1067_3985"><path fill="#fff" d="M0 0h109v32H0z"/></clipPath></defs></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/footer/atoms/logo-sk/index.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,WAAW,gCAM9C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Root, Icon } from "./styled.js";
|
|
2
|
+
import { jsx } from "preact/jsx-runtime";
|
|
3
|
+
function LogoSk({
|
|
4
|
+
onClick
|
|
5
|
+
}) {
|
|
6
|
+
return jsx(Root, {
|
|
7
|
+
"aria-label": "Skolkovo",
|
|
8
|
+
href: "http://sk.ru",
|
|
9
|
+
onClick,
|
|
10
|
+
target: "_blank",
|
|
11
|
+
children: jsx(Icon, {})
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
LogoSk
|
|
16
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Icon: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("preact").JSX.HTMLAttributes<HTMLDivElement>, "style"> & {
|
|
2
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
3
|
+
}> & string;
|
|
4
|
+
export declare const Root: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react-dom/src").PropsWithoutRef<import("../../..").LinkProps> & {
|
|
5
|
+
ref?: import("preact").Ref<HTMLAnchorElement> | undefined;
|
|
6
|
+
}, "style"> & {
|
|
7
|
+
style?: string | import("styled-components/dist/types").CSSPropertiesWithVars | import("preact").JSX.CSSProperties | import("preact").JSX.SignalLike<string | import("preact").JSX.CSSProperties | undefined> | undefined;
|
|
8
|
+
}> & string & Omit<import("preact").FunctionalComponent<import("react-dom/src").PropsWithoutRef<import("../../..").LinkProps> & {
|
|
9
|
+
ref?: import("preact").Ref<HTMLAnchorElement> | undefined;
|
|
10
|
+
}>, keyof import("preact").Component<any, {}>>;
|
|
11
|
+
//# sourceMappingURL=styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../../src/footer/atoms/logo-sk/styled.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;WAOhB,CAAA;AAED,eAAO,MAAM,IAAI;;;;;;8CAUhB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { styled } from "styled-components";
|
|
2
|
+
import logoSk from "./assets/sk_logo.svg";
|
|
3
|
+
import { Link } from "../../../shared/link.js";
|
|
4
|
+
const Icon = styled.div.withConfig({
|
|
5
|
+
displayName: "styled__Icon",
|
|
6
|
+
componentId: "sc-1mek107-0"
|
|
7
|
+
})(["display:block;width:109px;height:32px;background:url(", ") center bottom no-repeat;background-size:100% 100%;transition:all 0.2s ease-in-out;"], logoSk);
|
|
8
|
+
const Root = styled(Link).withConfig({
|
|
9
|
+
displayName: "styled__Root",
|
|
10
|
+
componentId: "sc-1mek107-1"
|
|
11
|
+
})(["display:flex;align-items:flex-end;text-decoration:none;&:hover{", "{opacity:0.8;}}"], Icon);
|
|
12
|
+
export {
|
|
13
|
+
Icon,
|
|
14
|
+
Root
|
|
15
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IconName } from '@foxford/ui';
|
|
2
|
+
export interface SocialLinkProps {
|
|
3
|
+
href: string;
|
|
4
|
+
iconName: IconName;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function SocialLink({ href, iconName, onClick }: SocialLinkProps): import("preact").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/footer/atoms/social-link/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAU3C,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,QAAQ,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,eAAe,gCAgBtE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { styled } from "styled-components";
|
|
2
|
+
import { Button } from "@foxford/ui";
|
|
3
|
+
import { jsx } from "preact/jsx-runtime";
|
|
4
|
+
const Root = styled(Button).withConfig({
|
|
5
|
+
displayName: "social-link__Root",
|
|
6
|
+
componentId: "sc-o6awox-0"
|
|
7
|
+
})(["& + &{margin-left:8px;}"]);
|
|
8
|
+
const palette = {
|
|
9
|
+
color: "content-oncolor-secondary"
|
|
10
|
+
};
|
|
11
|
+
function SocialLink({
|
|
12
|
+
href,
|
|
13
|
+
iconName,
|
|
14
|
+
onClick
|
|
15
|
+
}) {
|
|
16
|
+
return jsx(Root, {
|
|
17
|
+
href,
|
|
18
|
+
icon: iconName,
|
|
19
|
+
iconProps: {
|
|
20
|
+
preset: "brand",
|
|
21
|
+
size: 24
|
|
22
|
+
},
|
|
23
|
+
onClick,
|
|
24
|
+
onColored: true,
|
|
25
|
+
outline: true,
|
|
26
|
+
palette,
|
|
27
|
+
preset: "brand",
|
|
28
|
+
round: true,
|
|
29
|
+
size: "s",
|
|
30
|
+
target: "_blank"
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
SocialLink
|
|
35
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FooterProps } from './types';
|
|
2
|
+
type ContactsColumnProps = Pick<FooterProps, 'contacts' | 'hideDataOnMirror' | 'salesLinks' | 'socialLinks'>;
|
|
3
|
+
export declare function ContactsColumn({ contacts, hideDataOnMirror, salesLinks, socialLinks, }: ContactsColumnProps): import("preact").JSX.Element;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=contacts-column.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contacts-column.d.ts","sourceRoot":"","sources":["../../src/footer/contacts-column.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,SAAS,CAAA;AAE5D,KAAK,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,kBAAkB,GAAG,YAAY,GAAG,aAAa,CAAC,CAAA;AAmB5G,wBAAgB,cAAc,CAAC,EAC7B,QAAa,EACb,gBAAwB,EACxB,UAAe,EACf,WAAgB,GACjB,EAAE,mBAAmB,gCAmCrB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { Spacer } from "@foxford/ui";
|
|
21
|
+
import { SocialLink } from "./atoms/social-link/index.js";
|
|
22
|
+
import { ContactsColumn as ContactsColumn$1, Contacts, ContactsTitle, ContactsWrapper, SocialLinks } from "./styled.js";
|
|
23
|
+
import { formatPhone } from "../shared/phone.js";
|
|
24
|
+
import { jsxs, jsx } from "preact/jsx-runtime";
|
|
25
|
+
function LinkGroup({
|
|
26
|
+
bottom,
|
|
27
|
+
links,
|
|
28
|
+
title
|
|
29
|
+
}) {
|
|
30
|
+
if (links.length === 0) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
return jsxs(Spacer, {
|
|
34
|
+
bottom,
|
|
35
|
+
bottomL: 12,
|
|
36
|
+
bottomS: 24,
|
|
37
|
+
children: [jsx(ContactsTitle, {
|
|
38
|
+
children: title
|
|
39
|
+
}), jsx(SocialLinks, {
|
|
40
|
+
children: links.map((link) => jsx(SocialLink, {
|
|
41
|
+
href: link.href,
|
|
42
|
+
iconName: link.iconName
|
|
43
|
+
}, link.id))
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function ContactsColumn({
|
|
48
|
+
contacts = {},
|
|
49
|
+
hideDataOnMirror = false,
|
|
50
|
+
salesLinks = [],
|
|
51
|
+
socialLinks = []
|
|
52
|
+
}) {
|
|
53
|
+
const supportChatLinks = [{
|
|
54
|
+
href: contacts.vkontakte,
|
|
55
|
+
iconName: "vkSocial",
|
|
56
|
+
id: "vkontakte"
|
|
57
|
+
}, {
|
|
58
|
+
href: contacts.telegram,
|
|
59
|
+
iconName: "telegramSocial",
|
|
60
|
+
id: "telegram"
|
|
61
|
+
}, {
|
|
62
|
+
href: contacts.max,
|
|
63
|
+
iconName: "maxSocial",
|
|
64
|
+
id: "max"
|
|
65
|
+
}].flatMap((link) => link.href ? [__spreadProps(__spreadValues({}, link), {
|
|
66
|
+
href: link.href
|
|
67
|
+
})] : []);
|
|
68
|
+
const hasPhone = !hideDataOnMirror && Boolean(contacts.phone);
|
|
69
|
+
return jsxs(ContactsColumn$1, {
|
|
70
|
+
children: [jsx(LinkGroup, {
|
|
71
|
+
bottom: 16,
|
|
72
|
+
links: salesLinks,
|
|
73
|
+
title: "Подобрать занятия"
|
|
74
|
+
}), jsx(LinkGroup, {
|
|
75
|
+
bottom: 16,
|
|
76
|
+
links: supportChatLinks,
|
|
77
|
+
title: "Чат с поддержкой"
|
|
78
|
+
}), jsx(LinkGroup, {
|
|
79
|
+
bottom: 24,
|
|
80
|
+
links: socialLinks,
|
|
81
|
+
title: "Социальные сети"
|
|
82
|
+
}), (Boolean(contacts.email) || hasPhone) && jsxs(Contacts, {
|
|
83
|
+
children: [jsx(ContactsTitle, {
|
|
84
|
+
children: "Контакты"
|
|
85
|
+
}), jsxs(ContactsWrapper, {
|
|
86
|
+
children: [contacts.email && jsx("a", {
|
|
87
|
+
href: `mailto:${contacts.email}`,
|
|
88
|
+
rel: "noreferrer",
|
|
89
|
+
target: "_blank",
|
|
90
|
+
children: contacts.email
|
|
91
|
+
}), hasPhone && contacts.phone !== void 0 && jsx(Spacer, {
|
|
92
|
+
top: 16,
|
|
93
|
+
topS: 8,
|
|
94
|
+
children: jsx("a", {
|
|
95
|
+
href: `tel:${contacts.phone}`,
|
|
96
|
+
children: formatPhone(contacts.phone)
|
|
97
|
+
})
|
|
98
|
+
})]
|
|
99
|
+
})]
|
|
100
|
+
})]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
ContactsColumn
|
|
105
|
+
};
|