@scbt-ecom/ui 0.176.0 → 0.177.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.
Files changed (106) hide show
  1. package/dist/lib/shared/dataLayers/types.js +2 -0
  2. package/dist/lib/shared/dataLayers/types.js.map +1 -0
  3. package/dist/lib/shared/dataLayers/utils.js +1 -1
  4. package/dist/lib/shared/dataLayers/utils.js.map +1 -1
  5. package/dist/lib/shared/ui/carousel/ui/slideVariants/SlideMultipleCards.js +1 -1
  6. package/dist/lib/shared/ui/carousel/ui/slideVariants/SlideMultipleCards.js.map +1 -1
  7. package/dist/lib/shared/ui/popover/Popover.js +1 -1
  8. package/dist/lib/shared/ui/popover/Popover.js.map +1 -1
  9. package/dist/lib/widgets/banner/ui/banners/ui/Buttons.js +1 -1
  10. package/dist/lib/widgets/banner/ui/banners/ui/Buttons.js.map +1 -1
  11. package/dist/lib/widgets/benefit/ui/BenefitItem.js +1 -1
  12. package/dist/lib/widgets/benefit/ui/BenefitItem.js.map +1 -1
  13. package/dist/lib/widgets/breadcrumbs/Breadcrumb.js +1 -1
  14. package/dist/lib/widgets/breadcrumbs/Breadcrumb.js.map +1 -1
  15. package/dist/lib/widgets/calculator/ui/CalculatorTabs.js +1 -1
  16. package/dist/lib/widgets/calculator/ui/CalculatorTabs.js.map +1 -1
  17. package/dist/lib/widgets/calculator/ui/calculatorInfo/ui/AssistHint.js +1 -1
  18. package/dist/lib/widgets/calculator/ui/calculatorInfo/ui/AssistHint.js.map +1 -1
  19. package/dist/lib/widgets/calculator/ui/calculatorInfo/ui/CalculatorInfoFooter.js +1 -1
  20. package/dist/lib/widgets/calculator/ui/calculatorInfo/ui/CalculatorInfoFooter.js.map +1 -1
  21. package/dist/lib/widgets/calculator/ui/calculatorInfo/ui/InfoListItem.js +1 -1
  22. package/dist/lib/widgets/calculator/ui/calculatorInfo/ui/InfoListItem.js.map +1 -1
  23. package/dist/lib/widgets/conditionBlock/ui/ConditionsWithCTA.js +1 -1
  24. package/dist/lib/widgets/conditionBlock/ui/ConditionsWithCTA.js.map +1 -1
  25. package/dist/lib/widgets/dynamicForm/DynamicForm.js +1 -1
  26. package/dist/lib/widgets/dynamicForm/DynamicForm.js.map +1 -1
  27. package/dist/lib/widgets/errorPage/ErrorPage.js +1 -1
  28. package/dist/lib/widgets/errorPage/ErrorPage.js.map +1 -1
  29. package/dist/lib/widgets/footer/ui/NavLinks.js +1 -1
  30. package/dist/lib/widgets/footer/ui/NavLinks.js.map +1 -1
  31. package/dist/lib/widgets/footer/ui/PhonesBlock.js +1 -1
  32. package/dist/lib/widgets/footer/ui/PhonesBlock.js.map +1 -1
  33. package/dist/lib/widgets/footer/ui/SiteMap.js +1 -1
  34. package/dist/lib/widgets/footer/ui/SiteMap.js.map +1 -1
  35. package/dist/lib/widgets/footer/ui/SocialLinks.js +1 -1
  36. package/dist/lib/widgets/footer/ui/SocialLinks.js.map +1 -1
  37. package/dist/lib/widgets/header/model/helpers.js +1 -1
  38. package/dist/lib/widgets/header/model/helpers.js.map +1 -1
  39. package/dist/lib/widgets/infoBlock/ui/LinksList.js +1 -1
  40. package/dist/lib/widgets/infoBlock/ui/LinksList.js.map +1 -1
  41. package/dist/lib/widgets/infoBlock/ui/RootContent.js +1 -1
  42. package/dist/lib/widgets/infoBlock/ui/RootContent.js.map +1 -1
  43. package/dist/lib/widgets/interLinking/InterLinking.js +1 -1
  44. package/dist/lib/widgets/interLinking/InterLinking.js.map +1 -1
  45. package/dist/lib/widgets/interLinking/ui/Column.js +1 -1
  46. package/dist/lib/widgets/interLinking/ui/Column.js.map +1 -1
  47. package/dist/lib/widgets/interLinking/ui/ColumnGroup.js +1 -1
  48. package/dist/lib/widgets/interLinking/ui/ColumnGroup.js.map +1 -1
  49. package/dist/lib/widgets/interLinking/ui/LinksList.js +1 -1
  50. package/dist/lib/widgets/interLinking/ui/LinksList.js.map +1 -1
  51. package/dist/lib/widgets/longBanner/LongBanner.js +1 -1
  52. package/dist/lib/widgets/longBanner/LongBanner.js.map +1 -1
  53. package/dist/lib/widgets/longBanner/ui/TextItem.js +1 -1
  54. package/dist/lib/widgets/longBanner/ui/TextItem.js.map +1 -1
  55. package/dist/lib/widgets/model/helpers.js +1 -1
  56. package/dist/lib/widgets/model/helpers.js.map +1 -1
  57. package/dist/lib/widgets/seoHeader/ui/desktop/CategoriesDesktop.js +1 -1
  58. package/dist/lib/widgets/seoHeader/ui/desktop/CategoriesDesktop.js.map +1 -1
  59. package/dist/lib/widgets/seoHeader/ui/desktop/CategoryTabs.js +1 -1
  60. package/dist/lib/widgets/seoHeader/ui/desktop/CategoryTabs.js.map +1 -1
  61. package/dist/lib/widgets/seoHeader/ui/desktop/rootTab/RootTab.js +1 -1
  62. package/dist/lib/widgets/seoHeader/ui/desktop/rootTab/RootTab.js.map +1 -1
  63. package/dist/lib/widgets/seoHeader/ui/desktop/tab/Tab.js +1 -1
  64. package/dist/lib/widgets/seoHeader/ui/desktop/tab/Tab.js.map +1 -1
  65. package/dist/lib/widgets/seoHeader/ui/desktop/tab/ui/content/TabContent.js +1 -1
  66. package/dist/lib/widgets/seoHeader/ui/desktop/tab/ui/content/TabContent.js.map +1 -1
  67. package/dist/lib/widgets/seoHeader/ui/mobile/CategoriesMobile.js +1 -1
  68. package/dist/lib/widgets/seoHeader/ui/mobile/CategoriesMobile.js.map +1 -1
  69. package/dist/lib/widgets/seoHeader/ui/mobile/menu/Menu.js +1 -1
  70. package/dist/lib/widgets/seoHeader/ui/mobile/menu/Menu.js.map +1 -1
  71. package/dist/lib/widgets/seoHeader/ui/mobile/menu/MenuItem.js +1 -1
  72. package/dist/lib/widgets/seoHeader/ui/mobile/menu/MenuItem.js.map +1 -1
  73. package/dist/lib/widgets/stepper/Stepper.js +1 -1
  74. package/dist/lib/widgets/stepper/Stepper.js.map +1 -1
  75. package/dist/lib/widgets/stepper/ui/StepperTabs.js +1 -1
  76. package/dist/lib/widgets/stepper/ui/StepperTabs.js.map +1 -1
  77. package/dist/lib/widgets/usefulInfo/model/utils.js +1 -1
  78. package/dist/lib/widgets/usefulInfo/model/utils.js.map +1 -1
  79. package/dist/lib/widgets/usefulInfo/ui/Tabs.js +1 -1
  80. package/dist/lib/widgets/usefulInfo/ui/Tabs.js.map +1 -1
  81. package/dist/lib/widgets/usefulInfo/ui/subEntities/documents/Documents.js +1 -1
  82. package/dist/lib/widgets/usefulInfo/ui/subEntities/documents/Documents.js.map +1 -1
  83. package/dist/lib/widgets/usefulInfo/ui/subEntities/documents/ui/document/Document.js +1 -1
  84. package/dist/lib/widgets/usefulInfo/ui/subEntities/documents/ui/document/Document.js.map +1 -1
  85. package/dist/lib/widgets/usefulInfo/ui/subEntities/experts/Experts.js +1 -1
  86. package/dist/lib/widgets/usefulInfo/ui/subEntities/experts/Experts.js.map +1 -1
  87. package/dist/lib/widgets/usefulInfo/ui/subEntities/html/Html.js +1 -1
  88. package/dist/lib/widgets/usefulInfo/ui/subEntities/html/Html.js.map +1 -1
  89. package/dist/lib/widgets/usefulInfo/ui/subEntities/table/Table.js +1 -1
  90. package/dist/lib/widgets/usefulInfo/ui/subEntities/table/Table.js.map +1 -1
  91. package/dist/lib/widgets/userFeedback/UserFeedback.js +1 -1
  92. package/dist/lib/widgets/userFeedback/UserFeedback.js.map +1 -1
  93. package/dist/lib/widgets/userFeedback/ui/SelectRating.js +1 -1
  94. package/dist/lib/widgets/userFeedback/ui/SelectRating.js.map +1 -1
  95. package/dist/stats.html +1 -1
  96. package/dist/types/lib/shared/dataLayers/types.d.ts +1 -0
  97. package/dist/types/lib/shared/dataLayers/utils.d.ts +33 -5
  98. package/dist/types/lib/shared/ui/popover/Popover.d.ts +3 -2
  99. package/dist/types/lib/widgets/dynamicForm/model/types.d.ts +1 -0
  100. package/dist/types/lib/widgets/interLinking/ui/Column.d.ts +2 -1
  101. package/dist/types/lib/widgets/interLinking/ui/ColumnGroup.d.ts +2 -1
  102. package/dist/types/lib/widgets/interLinking/ui/LinksList.d.ts +2 -1
  103. package/dist/types/lib/widgets/seoHeader/ui/desktop/tab/ui/content/TabContent.d.ts +2 -1
  104. package/dist/types/lib/widgets/stepper/ui/StepperTabs.d.ts +1 -2
  105. package/dist/types/lib/widgets/usefulInfo/ui/subEntities/documents/ui/document/Document.d.ts +2 -1
  106. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"RootTab.js","sources":["../../../../../../../lib/widgets/seoHeader/ui/desktop/rootTab/RootTab.tsx"],"sourcesContent":["import { type Category } from '../../../model'\nimport { cn } from '$/shared/utils'\n\ntype RootTabProps = React.HTMLAttributes<HTMLDivElement | HTMLAnchorElement> & {\n category: Category\n selectedCategory: Category | undefined\n onCurrentCategoryChange: (category: Category) => void\n onRootCategoryChange: (category: Category) => void\n active: boolean\n}\n\nexport const RootTab = ({ category, onCurrentCategoryChange, onRootCategoryChange, active, ...props }: RootTabProps) => {\n const isLink = Boolean(category?.link?.href)\n const Comp = isLink ? 'a' : 'div'\n\n const attrs = isLink\n ? {\n href: category.link?.href,\n target: category.link?.target\n }\n : {\n onClick: () => {\n if (!category.children) return\n\n onCurrentCategoryChange(category.children?.[0])\n onRootCategoryChange(category)\n }\n }\n\n return (\n <div className='group/category relative'>\n <Comp\n {...props}\n {...attrs}\n className={cn('cursor-pointer text-color-tetriary duration-100 hover:text-color-dark', {\n 'text-color-dark': active\n })}\n >\n <span className='desk-body-regular-m'>{category.title}</span>\n </Comp>\n {/*{category?.children && category?.children?.length > 1 && (*/}\n {/* <div*/}\n {/* className={cn(*/}\n {/* 'absolute right-0 top-full z-10 flex w-max flex-col',*/}\n {/* 'invisible bg-color-white opacity-0 shadow-sm group-hover/category:visible group-hover/category:opacity-100',*/}\n {/* 'rounded-sm p-1'*/}\n {/* )}*/}\n {/* >*/}\n {/* {category?.children?.map((child) => (*/}\n {/* <span*/}\n {/* onPointerDown={() => pushToDlLink(child?.title, '', 'seoHeader')}*/}\n {/* onClick={(event) => {*/}\n {/* event.stopPropagation()*/}\n {/* event.nativeEvent.stopPropagation()*/}\n {/* onRootCategoryChange(category)*/}\n {/* onCurrentCategoryChange(child)*/}\n {/* }}*/}\n {/* key={child.title}*/}\n {/* className={cn(*/}\n {/* 'desk-body-regular-l rounded-sm px-3 py-3.5 text-color-dark duration-100 hover:bg-color-primary-tr-hover hover:text-color-dark',*/}\n {/* {*/}\n {/* 'text-color-primary-default': selectedCategory?.title === child?.title*/}\n {/* }*/}\n {/* )}*/}\n {/* >*/}\n {/* {child.title}*/}\n {/* </span>*/}\n {/* ))}*/}\n {/* </div>*/}\n {/*)}*/}\n </div>\n )\n}\n"],"names":["RootTab","category","onCurrentCategoryChange","onRootCategoryChange","active","props","isLink","Comp","attrs","jsx","cn"],"mappings":"+FAWO,MAAMA,EAAU,CAAC,CAAE,SAAAC,EAAU,wBAAAC,EAAyB,qBAAAC,EAAsB,OAAAC,EAAQ,GAAGC,KAA0B,CACtH,MAAMC,EAAS,EAAQL,GAAU,MAAM,KACjCM,EAAOD,EAAS,IAAM,MAEtBE,EAAQF,EACV,CACE,KAAML,EAAS,MAAM,KACrB,OAAQA,EAAS,MAAM,MAAA,EAEzB,CACE,QAAS,IAAM,CACRA,EAAS,WAEdC,EAAwBD,EAAS,WAAW,CAAC,CAAC,EAC9CE,EAAqBF,CAAQ,EAC/B,CAAA,EAGN,OACEQ,EAAC,MAAA,CAAI,UAAU,0BACb,SAAAA,EAACF,EAAA,CACE,GAAGF,EACH,GAAGG,EACJ,UAAWE,EAAG,wEAAyE,CACrF,kBAAmBN,CAAA,CACpB,EAED,SAAAK,EAAC,OAAA,CAAK,UAAU,sBAAuB,WAAS,KAAA,CAAM,CAAA,CAAA,EAgC1D,CAEJ"}
1
+ {"version":3,"file":"RootTab.js","sources":["../../../../../../../lib/widgets/seoHeader/ui/desktop/rootTab/RootTab.tsx"],"sourcesContent":["import { pushToDlLink } from '../../../../../shared/dataLayers'\nimport { type Category } from '../../../model'\nimport { cn } from '$/shared/utils'\n\ntype RootTabProps = React.HTMLAttributes<HTMLDivElement | HTMLAnchorElement> & {\n category: Category\n selectedCategory: Category | undefined\n onCurrentCategoryChange: (category: Category) => void\n onRootCategoryChange: (category: Category) => void\n active: boolean\n}\n\nexport const RootTab = ({ category, onCurrentCategoryChange, onRootCategoryChange, active, ...props }: RootTabProps) => {\n const isLink = Boolean(category?.link?.href)\n const Comp = isLink ? 'a' : 'div'\n\n const attrs = isLink\n ? {\n href: category.link?.href,\n target: category.link?.target\n }\n : {\n onClick: () => {\n if (!category.children) return\n\n onCurrentCategoryChange(category.children?.[0])\n onRootCategoryChange(category)\n }\n }\n\n return (\n <div className='group/category relative'>\n <Comp\n {...props}\n {...attrs}\n onPointerDown={() =>\n pushToDlLink({\n name: category.title,\n placement: 'top_menu',\n link: 'Верхнее меню'\n })\n }\n className={cn('cursor-pointer text-color-tetriary duration-100 hover:text-color-dark', {\n 'text-color-dark': active\n })}\n >\n <span className='desk-body-regular-m'>{category.title}</span>\n </Comp>\n {/*{category?.children && category?.children?.length > 1 && (*/}\n {/* <div*/}\n {/* className={cn(*/}\n {/* 'absolute right-0 top-full z-10 flex w-max flex-col',*/}\n {/* 'invisible bg-color-white opacity-0 shadow-sm group-hover/category:visible group-hover/category:opacity-100',*/}\n {/* 'rounded-sm p-1'*/}\n {/* )}*/}\n {/* >*/}\n {/* {category?.children?.map((child) => (*/}\n {/* <span*/}\n {/* onPointerDown={() => pushToDlLink(child?.title, '', 'seoHeader')}*/}\n {/* onClick={(event) => {*/}\n {/* event.stopPropagation()*/}\n {/* event.nativeEvent.stopPropagation()*/}\n {/* onRootCategoryChange(category)*/}\n {/* onCurrentCategoryChange(child)*/}\n {/* }}*/}\n {/* key={child.title}*/}\n {/* className={cn(*/}\n {/* 'desk-body-regular-l rounded-sm px-3 py-3.5 text-color-dark duration-100 hover:bg-color-primary-tr-hover hover:text-color-dark',*/}\n {/* {*/}\n {/* 'text-color-primary-default': selectedCategory?.title === child?.title*/}\n {/* }*/}\n {/* )}*/}\n {/* >*/}\n {/* {child.title}*/}\n {/* </span>*/}\n {/* ))}*/}\n {/* </div>*/}\n {/*)}*/}\n </div>\n )\n}\n"],"names":["RootTab","category","onCurrentCategoryChange","onRootCategoryChange","active","props","isLink","Comp","attrs","jsx","pushToDlLink","cn"],"mappings":"wKAYO,MAAMA,EAAU,CAAC,CAAE,SAAAC,EAAU,wBAAAC,EAAyB,qBAAAC,EAAsB,OAAAC,EAAQ,GAAGC,KAA0B,CACtH,MAAMC,EAAS,EAAQL,GAAU,MAAM,KACjCM,EAAOD,EAAS,IAAM,MAEtBE,EAAQF,EACV,CACE,KAAML,EAAS,MAAM,KACrB,OAAQA,EAAS,MAAM,MAAA,EAEzB,CACE,QAAS,IAAM,CACRA,EAAS,WAEdC,EAAwBD,EAAS,WAAW,CAAC,CAAC,EAC9CE,EAAqBF,CAAQ,EAC/B,CAAA,EAGN,OACEQ,EAAC,MAAA,CAAI,UAAU,0BACb,SAAAA,EAACF,EAAA,CACE,GAAGF,EACH,GAAGG,EACJ,cAAe,IACbE,EAAa,CACX,KAAMT,EAAS,MACf,UAAW,WACX,KAAM,cAAA,CACP,EAEH,UAAWU,EAAG,wEAAyE,CACrF,kBAAmBP,CAAA,CACpB,EAED,SAAAK,EAAC,OAAA,CAAK,UAAU,sBAAuB,WAAS,KAAA,CAAM,CAAA,CAAA,EAgC1D,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{jsxs as m,jsx as l}from"react/jsx-runtime";import{memo as a,forwardRef as u}from"react";import{motion as p}from"framer-motion";import{TypeGuards as s}from"../../../../../shared/utils/typeGuards.js";import{TabContent as d}from"./ui/content/TabContent.js";import{cn as c}from"../../../../../shared/utils/cn.js";import{pushToDlLink as h}from"../../../../../shared/dataLayers/utils.js";const x=u(({category:t,active:f,onActiveTabChange:r},e)=>{const o=(e&&"current"in e?e:null)?.current?.getBoundingClientRect(),n=f&&!s.isArrayEmpty(t.children),i=t.link?s.isStringEmpty(t?.link?.href)?"span":"a":"span";return m(p.div,{ref:e,className:c("relative flex cursor-default items-center justify-center py-4 text-color-dark after:z-30",'after:content="" after:absolute after:bottom-0 after:left-1/2 after:h-[1px]',"after:w-0 after:-translate-x-1/2 after:bg-color-primary-default after:duration-100",{"text-color-primary-default":n,"after:w-full":n}),onMouseEnter:()=>r(t.title),onMouseLeave:()=>r(null),onFocus:()=>r(t.title),children:[l(i,{onPointerDown:()=>h(t?.title,t?.link?.href,"seoHeader"),href:i==="a"?t.link?.href:void 0,className:"desk-body-regular-m outline-none",children:t.title}),n&&l(d,{categories:t.children,style:{top:o?o.top+o.height:0}})]})}),C=a(x);export{C as Tab};
1
+ import{jsxs as a,jsx as l}from"react/jsx-runtime";import{memo as f,forwardRef as u}from"react";import{motion as p}from"framer-motion";import{TypeGuards as m}from"../../../../../shared/utils/typeGuards.js";import{TabContent as d}from"./ui/content/TabContent.js";import{cn as c}from"../../../../../shared/utils/cn.js";import{pushToDlLink as h}from"../../../../../shared/dataLayers/utils.js";const x=u(({category:t,active:s,onActiveTabChange:r},e)=>{const o=(e&&"current"in e?e:null)?.current?.getBoundingClientRect(),n=s&&!m.isArrayEmpty(t.children),i=t.link?m.isStringEmpty(t?.link?.href)?"span":"a":"span";return a(p.div,{ref:e,className:c("relative flex cursor-default items-center justify-center py-4 text-color-dark after:z-30",'after:content="" after:absolute after:bottom-0 after:left-1/2 after:h-[1px]',"after:w-0 after:-translate-x-1/2 after:bg-color-primary-default after:duration-100",{"text-color-primary-default":n,"after:w-full":n}),onMouseEnter:()=>r(t.title),onMouseLeave:()=>r(null),onFocus:()=>r(t.title),children:[l(i,{onPointerDown:()=>h({name:t?.title,placement:"bottom_menu",link:"Нижнее меню"}),href:i==="a"?t.link?.href:void 0,className:"desk-body-regular-m outline-none",children:t.title}),n&&l(d,{parentCategory:t,categories:t.children,style:{top:o?o.top+o.height:0}})]})}),y=f(x);export{y as Tab};
2
2
  //# sourceMappingURL=Tab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.js","sources":["../../../../../../../lib/widgets/seoHeader/ui/desktop/tab/Tab.tsx"],"sourcesContent":["import { forwardRef, memo } from 'react'\nimport { motion } from 'framer-motion'\nimport { pushToDlLink } from '../../../../../shared/dataLayers'\nimport { type Category } from '../../../model'\nimport { TabContent } from './ui'\nimport { cn, TypeGuards } from '$/shared/utils'\n\ntype TabProps = {\n category: Category\n active: boolean\n onActiveTabChange: (active: string | null) => void\n}\n\nconst InnerComponent = forwardRef<HTMLDivElement, TabProps>(({ category, active, onActiveTabChange }, ref) => {\n const rootRef = ref && 'current' in ref ? ref : null\n const triggerClientRect = rootRef?.current?.getBoundingClientRect()\n\n const contentShouldRender = active && !TypeGuards.isArrayEmpty(category.children)\n\n const Button = !category.link ? 'span' : TypeGuards.isStringEmpty(category?.link?.href) ? 'span' : 'a'\n\n return (\n <motion.div\n ref={ref}\n className={cn(\n 'relative flex cursor-default items-center justify-center py-4 text-color-dark after:z-30',\n 'after:content=\"\" after:absolute after:bottom-0 after:left-1/2 after:h-[1px]',\n 'after:w-0 after:-translate-x-1/2 after:bg-color-primary-default after:duration-100',\n {\n 'text-color-primary-default': contentShouldRender,\n 'after:w-full': contentShouldRender\n }\n )}\n onMouseEnter={() => onActiveTabChange(category.title!)}\n onMouseLeave={() => onActiveTabChange(null)}\n onFocus={() => onActiveTabChange(category.title!)}\n >\n <Button\n onPointerDown={() => pushToDlLink(category?.title, category?.link?.href, 'seoHeader')}\n href={Button === 'a' ? category.link?.href : undefined}\n className='desk-body-regular-m outline-none'\n >\n {category.title}\n </Button>\n {contentShouldRender && (\n <TabContent\n categories={category.children}\n style={{\n top: triggerClientRect ? triggerClientRect.top + triggerClientRect.height : 0\n }}\n />\n )}\n </motion.div>\n )\n})\n\nexport const Tab = memo(InnerComponent) as typeof InnerComponent\n"],"names":["InnerComponent","forwardRef","category","active","onActiveTabChange","ref","triggerClientRect","contentShouldRender","TypeGuards","Button","jsxs","motion","cn","jsx","pushToDlLink","TabContent","Tab","memo"],"mappings":"qYAaA,MAAMA,EAAiBC,EAAqC,CAAC,CAAE,SAAAC,EAAU,OAAAC,EAAQ,kBAAAC,CAAA,EAAqBC,IAAQ,CAE5G,MAAMC,GADUD,GAAO,YAAaA,EAAMA,EAAM,OACb,SAAS,sBAAA,EAEtCE,EAAsBJ,GAAU,CAACK,EAAW,aAAaN,EAAS,QAAQ,EAE1EO,EAAUP,EAAS,KAAgBM,EAAW,cAAcN,GAAU,MAAM,IAAI,EAAI,OAAS,IAAnE,OAEhC,OACEQ,EAACC,EAAO,IAAP,CACC,IAAAN,EACA,UAAWO,EACT,2FACA,8EACA,qFACA,CACE,6BAA8BL,EAC9B,eAAgBA,CAAA,CAClB,EAEF,aAAc,IAAMH,EAAkBF,EAAS,KAAM,EACrD,aAAc,IAAME,EAAkB,IAAI,EAC1C,QAAS,IAAMA,EAAkBF,EAAS,KAAM,EAEhD,SAAA,CAAAW,EAACJ,EAAA,CACC,cAAe,IAAMK,EAAaZ,GAAU,MAAOA,GAAU,MAAM,KAAM,WAAW,EACpF,KAAMO,IAAW,IAAMP,EAAS,MAAM,KAAO,OAC7C,UAAU,mCAET,SAAAA,EAAS,KAAA,CAAA,EAEXK,GACCM,EAACE,EAAA,CACC,WAAYb,EAAS,SACrB,MAAO,CACL,IAAKI,EAAoBA,EAAkB,IAAMA,EAAkB,OAAS,CAAA,CAC9E,CAAA,CACF,CAAA,CAAA,CAIR,CAAC,EAEYU,EAAMC,EAAKjB,CAAc"}
1
+ {"version":3,"file":"Tab.js","sources":["../../../../../../../lib/widgets/seoHeader/ui/desktop/tab/Tab.tsx"],"sourcesContent":["import { forwardRef, memo } from 'react'\nimport { motion } from 'framer-motion'\nimport { pushToDlLink } from '../../../../../shared/dataLayers'\nimport { type Category } from '../../../model'\nimport { TabContent } from './ui'\nimport { cn, TypeGuards } from '$/shared/utils'\n\ntype TabProps = {\n category: Category\n active: boolean\n onActiveTabChange: (active: string | null) => void\n}\n\nconst InnerComponent = forwardRef<HTMLDivElement, TabProps>(({ category, active, onActiveTabChange }, ref) => {\n const rootRef = ref && 'current' in ref ? ref : null\n const triggerClientRect = rootRef?.current?.getBoundingClientRect()\n\n const contentShouldRender = active && !TypeGuards.isArrayEmpty(category.children)\n\n const Button = !category.link ? 'span' : TypeGuards.isStringEmpty(category?.link?.href) ? 'span' : 'a'\n\n return (\n <motion.div\n ref={ref}\n className={cn(\n 'relative flex cursor-default items-center justify-center py-4 text-color-dark after:z-30',\n 'after:content=\"\" after:absolute after:bottom-0 after:left-1/2 after:h-[1px]',\n 'after:w-0 after:-translate-x-1/2 after:bg-color-primary-default after:duration-100',\n {\n 'text-color-primary-default': contentShouldRender,\n 'after:w-full': contentShouldRender\n }\n )}\n onMouseEnter={() => onActiveTabChange(category.title!)}\n onMouseLeave={() => onActiveTabChange(null)}\n onFocus={() => onActiveTabChange(category.title!)}\n >\n <Button\n onPointerDown={() => pushToDlLink({ name: category?.title, placement: 'bottom_menu', link: 'Нижнее меню' })}\n href={Button === 'a' ? category.link?.href : undefined}\n className='desk-body-regular-m outline-none'\n >\n {category.title}\n </Button>\n {contentShouldRender && (\n <TabContent\n parentCategory={category}\n categories={category.children}\n style={{\n top: triggerClientRect ? triggerClientRect.top + triggerClientRect.height : 0\n }}\n />\n )}\n </motion.div>\n )\n})\n\nexport const Tab = memo(InnerComponent) as typeof InnerComponent\n"],"names":["InnerComponent","forwardRef","category","active","onActiveTabChange","ref","triggerClientRect","contentShouldRender","TypeGuards","Button","jsxs","motion","cn","jsx","pushToDlLink","TabContent","Tab","memo"],"mappings":"qYAaA,MAAMA,EAAiBC,EAAqC,CAAC,CAAE,SAAAC,EAAU,OAAAC,EAAQ,kBAAAC,CAAA,EAAqBC,IAAQ,CAE5G,MAAMC,GADUD,GAAO,YAAaA,EAAMA,EAAM,OACb,SAAS,sBAAA,EAEtCE,EAAsBJ,GAAU,CAACK,EAAW,aAAaN,EAAS,QAAQ,EAE1EO,EAAUP,EAAS,KAAgBM,EAAW,cAAcN,GAAU,MAAM,IAAI,EAAI,OAAS,IAAnE,OAEhC,OACEQ,EAACC,EAAO,IAAP,CACC,IAAAN,EACA,UAAWO,EACT,2FACA,8EACA,qFACA,CACE,6BAA8BL,EAC9B,eAAgBA,CAAA,CAClB,EAEF,aAAc,IAAMH,EAAkBF,EAAS,KAAM,EACrD,aAAc,IAAME,EAAkB,IAAI,EAC1C,QAAS,IAAMA,EAAkBF,EAAS,KAAM,EAEhD,SAAA,CAAAW,EAACJ,EAAA,CACC,cAAe,IAAMK,EAAa,CAAE,KAAMZ,GAAU,MAAO,UAAW,cAAe,KAAM,cAAe,EAC1G,KAAMO,IAAW,IAAMP,EAAS,MAAM,KAAO,OAC7C,UAAU,mCAET,SAAAA,EAAS,KAAA,CAAA,EAEXK,GACCM,EAACE,EAAA,CACC,eAAgBb,EAChB,WAAYA,EAAS,SACrB,MAAO,CACL,IAAKI,EAAoBA,EAAkB,IAAMA,EAAkB,OAAS,CAAA,CAC9E,CAAA,CACF,CAAA,CAAA,CAIR,CAAC,EAEYU,EAAMC,EAAKjB,CAAc"}
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as l}from"react/jsx-runtime";import{createPortal as m}from"react-dom";import{motion as s}from"framer-motion";import{cn as f}from"../../../../../../../shared/utils/cn.js";import{Icon as p}from"../../../../../../../shared/ui/icon/Icon.js";import{pushToDlLink as a}from"../../../../../../../shared/dataLayers/utils.js";const b=({categories:o,...i})=>m(r(s.div,{...i,layout:!0,initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:f("absolute z-20 w-full bg-color-white",'after:absolute after:left-1/2 after:top-[-1px] after:h-[1px] after:w-full after:max-w-[636px] after:-translate-x-1/2 after:bg-color-blue-grey-200 after:content-[""] after:desktop:max-w-[1140px]'),children:r("div",{className:"mx-auto flex w-full max-w-[1140px] gap-x-[56px] py-10",children:o?.map(e=>{const n=e.link?"a":"p";return l("div",{className:"flex flex-col gap-y-6",children:[e.title&&l(n,{onPointerDown:()=>a(e?.title,e?.link?.href,"seoHeader"),href:e.link?.href??void 0,className:"flex items-center gap-x-1 text-16 uppercase text-color-primary-default",children:[e.title,r(p,{name:"arrows/arrowLink",className:"size-6"})]}),r("ul",{className:"w-[328px]",children:e?.children?.map(t=>r("li",{className:"w-full [&:not(:last-child)]:mb-4",children:r("a",{href:t.link?.href,onPointerDown:()=>a(t?.title,t?.link?.href,"seoHeader"),target:t.link?.target,className:"w-full text-16",children:t.title})},t.title))})]},e.title)})})}),document.body.querySelector("#modal-preview")?.contentDocument?.body??document.body);export{b as TabContent};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{createPortal as s}from"react-dom";import{motion as f}from"framer-motion";import{cn as p}from"../../../../../../../shared/utils/cn.js";import{Icon as c}from"../../../../../../../shared/ui/icon/Icon.js";import{pushToDlLink as o}from"../../../../../../../shared/dataLayers/utils.js";const k=({categories:n,parentCategory:a,...i})=>s(e(f.div,{...i,layout:!0,initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:p("absolute z-20 w-full bg-color-white",'after:absolute after:left-1/2 after:top-[-1px] after:h-[1px] after:w-full after:max-w-[636px] after:-translate-x-1/2 after:bg-color-blue-grey-200 after:content-[""] after:desktop:max-w-[1140px]'),children:e("div",{className:"mx-auto flex w-full max-w-[1140px] gap-x-[56px] py-10",children:n?.map(t=>{const m=t.link?"a":"p";return r("div",{className:"flex flex-col gap-y-6",children:[t.title&&r(m,{onPointerDown:()=>o({name:t?.title,link:a?.title,placement:"bottom_menu"}),href:t.link?.href??void 0,className:"flex items-center gap-x-1 text-16 uppercase text-color-primary-default",children:[t.title,e(c,{name:"arrows/arrowLink",className:"size-6"})]}),e("ul",{className:"w-[328px]",children:t?.children?.map(l=>e("li",{className:"w-full [&:not(:last-child)]:mb-4",children:e("a",{href:l.link?.href,onPointerDown:()=>o({name:l?.title,link:a?.title,placement:"bottom_menu"}),target:l.link?.target,className:"w-full text-16",children:l.title})},l.title))})]},t.title)})})}),document.body.querySelector("#modal-preview")?.contentDocument?.body??document.body);export{k as TabContent};
2
2
  //# sourceMappingURL=TabContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabContent.js","sources":["../../../../../../../../../lib/widgets/seoHeader/ui/desktop/tab/ui/content/TabContent.tsx"],"sourcesContent":["import { createPortal } from 'react-dom'\nimport { motion } from 'framer-motion'\nimport { pushToDlLink } from '../../../../../../../shared/dataLayers'\nimport { type Category } from '../../../../../model'\nimport { Icon } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\ntype TabContentProps = React.ComponentProps<typeof motion.div> & {\n categories: Category[] | undefined\n}\n\nexport const TabContent = ({ categories, ...props }: TabContentProps) => {\n return createPortal(\n <motion.div\n {...props}\n layout\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.2 }}\n className={cn(\n 'absolute z-20 w-full bg-color-white',\n 'after:absolute after:left-1/2 after:top-[-1px] after:h-[1px] after:w-full after:max-w-[636px] after:-translate-x-1/2 after:bg-color-blue-grey-200 after:content-[\"\"] after:desktop:max-w-[1140px]'\n )}\n >\n <div className='mx-auto flex w-full max-w-[1140px] gap-x-[56px] py-10'>\n {categories?.map((category) => {\n const CategoryTitle = category.link ? 'a' : 'p'\n\n return (\n <div key={category.title} className='flex flex-col gap-y-6'>\n {category.title && (\n <CategoryTitle\n onPointerDown={() => pushToDlLink(category?.title, category?.link?.href, 'seoHeader')}\n href={category.link?.href ?? undefined}\n className='flex items-center gap-x-1 text-16 uppercase text-color-primary-default'\n >\n {category.title}\n\n <Icon name='arrows/arrowLink' className='size-6' />\n </CategoryTitle>\n )}\n <ul className='w-[328px]'>\n {category?.children?.map((child) => (\n <li key={child.title} className='w-full [&:not(:last-child)]:mb-4'>\n <a\n href={child.link?.href}\n onPointerDown={() => pushToDlLink(child?.title, child?.link?.href, 'seoHeader')}\n target={child.link?.target}\n className='w-full text-16'\n >\n {child.title}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )\n })}\n </div>\n </motion.div>,\n /**\n * Нужно для preview, чтобы категории рендерились в iframe\n */\n document.body.querySelector<HTMLIFrameElement>('#modal-preview')?.contentDocument?.body ?? document.body\n )\n}\n"],"names":["TabContent","categories","props","createPortal","jsx","motion","cn","category","CategoryTitle","jsxs","pushToDlLink","Icon","child"],"mappings":"iVAWO,MAAMA,EAAa,CAAC,CAAE,WAAAC,EAAY,GAAGC,KACnCC,EACLC,EAACC,EAAO,IAAP,CACE,GAAGH,EACJ,OAAM,GACN,QAAS,CAAE,QAAS,CAAA,EACpB,QAAS,CAAE,QAAS,CAAA,EACpB,WAAY,CAAE,SAAU,EAAA,EACxB,UAAWI,EACT,sCACA,mMAAA,EAGF,WAAC,MAAA,CAAI,UAAU,wDACZ,SAAAL,GAAY,IAAKM,GAAa,CAC7B,MAAMC,EAAgBD,EAAS,KAAO,IAAM,IAE5C,OACEE,EAAC,MAAA,CAAyB,UAAU,wBACjC,SAAA,CAAAF,EAAS,OACRE,EAACD,EAAA,CACC,cAAe,IAAME,EAAaH,GAAU,MAAOA,GAAU,MAAM,KAAM,WAAW,EACpF,KAAMA,EAAS,MAAM,MAAQ,OAC7B,UAAU,yEAET,SAAA,CAAAA,EAAS,MAEVH,EAACO,EAAA,CAAK,KAAK,mBAAmB,UAAU,QAAA,CAAS,CAAA,CAAA,CAAA,EAGrDP,EAAC,KAAA,CAAG,UAAU,YACX,SAAAG,GAAU,UAAU,IAAKK,GACxBR,EAAC,KAAA,CAAqB,UAAU,mCAC9B,SAAAA,EAAC,IAAA,CACC,KAAMQ,EAAM,MAAM,KAClB,cAAe,IAAMF,EAAaE,GAAO,MAAOA,GAAO,MAAM,KAAM,WAAW,EAC9E,OAAQA,EAAM,MAAM,OACpB,UAAU,iBAET,SAAAA,EAAM,KAAA,CAAA,GAPFA,EAAM,KASf,CACD,CAAA,CACH,CAAA,CAAA,EAzBQL,EAAS,KA0BnB,CAEJ,CAAC,CAAA,CACH,CAAA,CAAA,EAKF,SAAS,KAAK,cAAiC,gBAAgB,GAAG,iBAAiB,MAAQ,SAAS,IAAA"}
1
+ {"version":3,"file":"TabContent.js","sources":["../../../../../../../../../lib/widgets/seoHeader/ui/desktop/tab/ui/content/TabContent.tsx"],"sourcesContent":["import { createPortal } from 'react-dom'\nimport { motion } from 'framer-motion'\nimport { pushToDlLink } from '../../../../../../../shared/dataLayers'\nimport { type Category } from '../../../../../model'\nimport { Icon } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\ntype TabContentProps = React.ComponentProps<typeof motion.div> & {\n categories: Category[] | undefined\n parentCategory: Category\n}\n\nexport const TabContent = ({ categories, parentCategory, ...props }: TabContentProps) => {\n return createPortal(\n <motion.div\n {...props}\n layout\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ duration: 0.2 }}\n className={cn(\n 'absolute z-20 w-full bg-color-white',\n 'after:absolute after:left-1/2 after:top-[-1px] after:h-[1px] after:w-full after:max-w-[636px] after:-translate-x-1/2 after:bg-color-blue-grey-200 after:content-[\"\"] after:desktop:max-w-[1140px]'\n )}\n >\n <div className='mx-auto flex w-full max-w-[1140px] gap-x-[56px] py-10'>\n {categories?.map((category) => {\n const CategoryTitle = category.link ? 'a' : 'p'\n\n return (\n <div key={category.title} className='flex flex-col gap-y-6'>\n {category.title && (\n <CategoryTitle\n onPointerDown={() =>\n pushToDlLink({ name: category?.title, link: parentCategory?.title, placement: 'bottom_menu' })\n }\n href={category.link?.href ?? undefined}\n className='flex items-center gap-x-1 text-16 uppercase text-color-primary-default'\n >\n {category.title}\n\n <Icon name='arrows/arrowLink' className='size-6' />\n </CategoryTitle>\n )}\n <ul className='w-[328px]'>\n {category?.children?.map((child) => (\n <li key={child.title} className='w-full [&:not(:last-child)]:mb-4'>\n <a\n href={child.link?.href}\n onPointerDown={() =>\n pushToDlLink({ name: child?.title, link: parentCategory?.title, placement: 'bottom_menu' })\n }\n target={child.link?.target}\n className='w-full text-16'\n >\n {child.title}\n </a>\n </li>\n ))}\n </ul>\n </div>\n )\n })}\n </div>\n </motion.div>,\n /**\n * Нужно для preview, чтобы категории рендерились в iframe\n */\n document.body.querySelector<HTMLIFrameElement>('#modal-preview')?.contentDocument?.body ?? document.body\n )\n}\n"],"names":["TabContent","categories","parentCategory","props","createPortal","jsx","motion","cn","category","CategoryTitle","jsxs","pushToDlLink","Icon","child"],"mappings":"iVAYO,MAAMA,EAAa,CAAC,CAAE,WAAAC,EAAY,eAAAC,EAAgB,GAAGC,KACnDC,EACLC,EAACC,EAAO,IAAP,CACE,GAAGH,EACJ,OAAM,GACN,QAAS,CAAE,QAAS,CAAA,EACpB,QAAS,CAAE,QAAS,CAAA,EACpB,WAAY,CAAE,SAAU,EAAA,EACxB,UAAWI,EACT,sCACA,mMAAA,EAGF,WAAC,MAAA,CAAI,UAAU,wDACZ,SAAAN,GAAY,IAAKO,GAAa,CAC7B,MAAMC,EAAgBD,EAAS,KAAO,IAAM,IAE5C,OACEE,EAAC,MAAA,CAAyB,UAAU,wBACjC,SAAA,CAAAF,EAAS,OACRE,EAACD,EAAA,CACC,cAAe,IACbE,EAAa,CAAE,KAAMH,GAAU,MAAO,KAAMN,GAAgB,MAAO,UAAW,aAAA,CAAe,EAE/F,KAAMM,EAAS,MAAM,MAAQ,OAC7B,UAAU,yEAET,SAAA,CAAAA,EAAS,MAEVH,EAACO,EAAA,CAAK,KAAK,mBAAmB,UAAU,QAAA,CAAS,CAAA,CAAA,CAAA,EAGrDP,EAAC,KAAA,CAAG,UAAU,YACX,SAAAG,GAAU,UAAU,IAAKK,GACxBR,EAAC,KAAA,CAAqB,UAAU,mCAC9B,SAAAA,EAAC,IAAA,CACC,KAAMQ,EAAM,MAAM,KAClB,cAAe,IACbF,EAAa,CAAE,KAAME,GAAO,MAAO,KAAMX,GAAgB,MAAO,UAAW,aAAA,CAAe,EAE5F,OAAQW,EAAM,MAAM,OACpB,UAAU,iBAET,SAAAA,EAAM,KAAA,CAAA,GATFA,EAAM,KAWf,CACD,CAAA,CACH,CAAA,CAAA,EA7BQL,EAAS,KA8BnB,CAEJ,CAAC,CAAA,CACH,CAAA,CAAA,EAKF,SAAS,KAAK,cAAiC,gBAAgB,GAAG,iBAAiB,MAAQ,SAAS,IAAA"}
@@ -1,2 +1,2 @@
1
- import{jsxs as m,jsx as o}from"react/jsx-runtime";import{useRef as u,useState as d,useEffect as p}from"react";import{createPortal as b}from"react-dom";import{Menu as f}from"./menu/Menu.js";import{pushToDL as y}from"../../../../shared/dataLayers/pushToDL.js";import{Icon as r}from"../../../../shared/ui/icon/Icon.js";const k=({categories:l,helpers:c,phone:i})=>{const n=u(null),t=n.current?.getBoundingClientRect(),[e,a]=d(!1),s=()=>{a(!e),y({event:"buttonClick",name:"Бургер меню",eventCategory:"click_block",eventAction:e?"Открыл":"Закрыл",placement:"burger"})};return p(()=>(e&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="visible"}),[e]),m("div",{ref:n,className:"relative flex w-full items-center justify-between border-b border-b-blue-grey-200 py-4 desktop:hidden",children:[o(r,{name:"brandLogos/logoMain",className:"w-[130px]"}),o("button",{"aria-label":"Open menu",type:"button",onClick:s,className:"h-max w-max",children:o(r,{name:e?"general/close":"general/menu",className:"size-6 text-color-primary-default"})}),e&&b(o(f,{categories:l,helpers:c,phone:i,style:{top:t?t.top+t.height:0}}),document.body.querySelector("#modal-preview")?.contentDocument?.body??document.body)]})};export{k as CategoriesMobile};
1
+ import{jsxs as m,jsx as o}from"react/jsx-runtime";import{useRef as u,useState as d,useEffect as p}from"react";import{createPortal as b}from"react-dom";import{Menu as f}from"./menu/Menu.js";import{pushToDL as y}from"../../../../shared/dataLayers/pushToDL.js";import{Icon as r}from"../../../../shared/ui/icon/Icon.js";const k=({categories:l,helpers:c,phone:i})=>{const n=u(null),t=n.current?.getBoundingClientRect(),[e,a]=d(!1),s=()=>{a(!e),y({event:"buttonClick",name:"Бургер меню",eventCategory:"click_block",eventAction:e?"Закрыл":"Открыл",placement:"burger"})};return p(()=>(e&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="visible"}),[e]),m("div",{ref:n,className:"relative flex w-full items-center justify-between border-b border-b-blue-grey-200 py-4 desktop:hidden",children:[o(r,{name:"brandLogos/logoMain",className:"w-[130px]"}),o("button",{"aria-label":"Open menu",type:"button",onClick:s,className:"h-max w-max",children:o(r,{name:e?"general/close":"general/menu",className:"size-6 text-color-primary-default"})}),e&&b(o(f,{categories:l,helpers:c,phone:i,style:{top:t?t.top+t.height:0}}),document.body.querySelector("#modal-preview")?.contentDocument?.body??document.body)]})};export{k as CategoriesMobile};
2
2
  //# sourceMappingURL=CategoriesMobile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CategoriesMobile.js","sources":["../../../../../../lib/widgets/seoHeader/ui/mobile/CategoriesMobile.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport { pushToDL } from '../../../../shared/dataLayers'\nimport type { Category, SeoHeaderHelpers } from '../../model'\nimport { Menu } from './menu'\nimport { Icon } from '$/shared/ui'\n\ntype CategoriesMobileProps = {\n categories: Category[]\n helpers: SeoHeaderHelpers[]\n phone: string\n}\n\nexport const CategoriesMobile = ({ categories, helpers, phone }: CategoriesMobileProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const containerClientRect = containerRef.current?.getBoundingClientRect()\n\n const [open, setOpen] = useState<boolean>(false)\n\n const onOpenToggle = () => {\n setOpen(!open)\n\n pushToDL({\n event: 'buttonClick',\n name: 'Бургер меню',\n eventCategory: 'click_block',\n eventAction: open ? 'Открыл' : 'Закрыл',\n placement: 'burger'\n })\n }\n\n useEffect(() => {\n if (open) {\n document.body.style.overflow = 'hidden'\n }\n return () => {\n document.body.style.overflow = 'visible'\n }\n }, [open])\n\n return (\n <div\n ref={containerRef}\n className='relative flex w-full items-center justify-between border-b border-b-blue-grey-200 py-4 desktop:hidden'\n >\n <Icon name='brandLogos/logoMain' className='w-[130px]' />\n <button aria-label='Open menu' type='button' onClick={onOpenToggle} className='h-max w-max'>\n <Icon name={open ? 'general/close' : 'general/menu'} className='size-6 text-color-primary-default' />\n </button>\n\n {open &&\n createPortal(\n <Menu\n categories={categories}\n helpers={helpers}\n phone={phone}\n style={{ top: containerClientRect ? containerClientRect.top + containerClientRect.height : 0 }}\n />,\n /**\n * Нужно для preview, чтобы категории рендерились в iframe\n */\n document.body.querySelector<HTMLIFrameElement>('#modal-preview')?.contentDocument?.body ?? document.body\n )}\n </div>\n )\n}\n"],"names":["CategoriesMobile","categories","helpers","phone","containerRef","useRef","containerClientRect","open","setOpen","useState","onOpenToggle","pushToDL","useEffect","jsxs","jsx","Icon","createPortal","Menu"],"mappings":"4TAaO,MAAMA,EAAmB,CAAC,CAAE,WAAAC,EAAY,QAAAC,EAAS,MAAAC,KAAmC,CACzF,MAAMC,EAAeC,EAAuB,IAAI,EAC1CC,EAAsBF,EAAa,SAAS,sBAAA,EAE5C,CAACG,EAAMC,CAAO,EAAIC,EAAkB,EAAK,EAEzCC,EAAe,IAAM,CACzBF,EAAQ,CAACD,CAAI,EAEbI,EAAS,CACP,MAAO,cACP,KAAM,cACN,cAAe,cACf,YAAaJ,EAAO,SAAW,SAC/B,UAAW,QAAA,CACZ,CACH,EAEA,OAAAK,EAAU,KACJL,IACF,SAAS,KAAK,MAAM,SAAW,UAE1B,IAAM,CACX,SAAS,KAAK,MAAM,SAAW,SACjC,GACC,CAACA,CAAI,CAAC,EAGPM,EAAC,MAAA,CACC,IAAKT,EACL,UAAU,wGAEV,SAAA,CAAAU,EAACC,EAAA,CAAK,KAAK,sBAAsB,UAAU,YAAY,IACtD,SAAA,CAAO,aAAW,YAAY,KAAK,SAAS,QAASL,EAAc,UAAU,cAC5E,SAAAI,EAACC,GAAK,KAAMR,EAAO,gBAAkB,eAAgB,UAAU,oCAAoC,EACrG,EAECA,GACCS,EACEF,EAACG,EAAA,CACC,WAAAhB,EACA,QAAAC,EACA,MAAAC,EACA,MAAO,CAAE,IAAKG,EAAsBA,EAAoB,IAAMA,EAAoB,OAAS,CAAA,CAAE,CAAA,EAK/F,SAAS,KAAK,cAAiC,gBAAgB,GAAG,iBAAiB,MAAQ,SAAS,IAAA,CACtG,CAAA,CAAA,CAGR"}
1
+ {"version":3,"file":"CategoriesMobile.js","sources":["../../../../../../lib/widgets/seoHeader/ui/mobile/CategoriesMobile.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport { pushToDL } from '../../../../shared/dataLayers'\nimport type { Category, SeoHeaderHelpers } from '../../model'\nimport { Menu } from './menu'\nimport { Icon } from '$/shared/ui'\n\ntype CategoriesMobileProps = {\n categories: Category[]\n helpers: SeoHeaderHelpers[]\n phone: string\n}\n\nexport const CategoriesMobile = ({ categories, helpers, phone }: CategoriesMobileProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const containerClientRect = containerRef.current?.getBoundingClientRect()\n\n const [open, setOpen] = useState<boolean>(false)\n\n const onOpenToggle = () => {\n setOpen(!open)\n\n pushToDL({\n event: 'buttonClick',\n name: 'Бургер меню',\n eventCategory: 'click_block',\n eventAction: open ? 'Закрыл' : 'Открыл',\n placement: 'burger'\n })\n }\n\n useEffect(() => {\n if (open) {\n document.body.style.overflow = 'hidden'\n }\n return () => {\n document.body.style.overflow = 'visible'\n }\n }, [open])\n\n return (\n <div\n ref={containerRef}\n className='relative flex w-full items-center justify-between border-b border-b-blue-grey-200 py-4 desktop:hidden'\n >\n <Icon name='brandLogos/logoMain' className='w-[130px]' />\n <button aria-label='Open menu' type='button' onClick={onOpenToggle} className='h-max w-max'>\n <Icon name={open ? 'general/close' : 'general/menu'} className='size-6 text-color-primary-default' />\n </button>\n\n {open &&\n createPortal(\n <Menu\n categories={categories}\n helpers={helpers}\n phone={phone}\n style={{ top: containerClientRect ? containerClientRect.top + containerClientRect.height : 0 }}\n />,\n /**\n * Нужно для preview, чтобы категории рендерились в iframe\n */\n document.body.querySelector<HTMLIFrameElement>('#modal-preview')?.contentDocument?.body ?? document.body\n )}\n </div>\n )\n}\n"],"names":["CategoriesMobile","categories","helpers","phone","containerRef","useRef","containerClientRect","open","setOpen","useState","onOpenToggle","pushToDL","useEffect","jsxs","jsx","Icon","createPortal","Menu"],"mappings":"4TAaO,MAAMA,EAAmB,CAAC,CAAE,WAAAC,EAAY,QAAAC,EAAS,MAAAC,KAAmC,CACzF,MAAMC,EAAeC,EAAuB,IAAI,EAC1CC,EAAsBF,EAAa,SAAS,sBAAA,EAE5C,CAACG,EAAMC,CAAO,EAAIC,EAAkB,EAAK,EAEzCC,EAAe,IAAM,CACzBF,EAAQ,CAACD,CAAI,EAEbI,EAAS,CACP,MAAO,cACP,KAAM,cACN,cAAe,cACf,YAAaJ,EAAO,SAAW,SAC/B,UAAW,QAAA,CACZ,CACH,EAEA,OAAAK,EAAU,KACJL,IACF,SAAS,KAAK,MAAM,SAAW,UAE1B,IAAM,CACX,SAAS,KAAK,MAAM,SAAW,SACjC,GACC,CAACA,CAAI,CAAC,EAGPM,EAAC,MAAA,CACC,IAAKT,EACL,UAAU,wGAEV,SAAA,CAAAU,EAACC,EAAA,CAAK,KAAK,sBAAsB,UAAU,YAAY,IACtD,SAAA,CAAO,aAAW,YAAY,KAAK,SAAS,QAASL,EAAc,UAAU,cAC5E,SAAAI,EAACC,GAAK,KAAMR,EAAO,gBAAkB,eAAgB,UAAU,oCAAoC,EACrG,EAECA,GACCS,EACEF,EAACG,EAAA,CACC,WAAAhB,EACA,QAAAC,EACA,MAAAC,EACA,MAAO,CAAE,IAAKG,EAAsBA,EAAoB,IAAMA,EAAoB,OAAS,CAAA,CAAE,CAAA,EAK/F,SAAS,KAAK,cAAiC,gBAAgB,GAAG,iBAAiB,MAAQ,SAAS,IAAA,CACtG,CAAA,CAAA,CAGR"}
@@ -1,2 +1,2 @@
1
- import{jsxs as a,jsx as l}from"react/jsx-runtime";import{useState as x,useMemo as h}from"react";import{motion as w}from"framer-motion";import{MenuItem as N}from"./MenuItem.js";import{TypeGuards as o}from"../../../../../shared/utils/typeGuards.js";import{cn as v}from"../../../../../shared/utils/cn.js";import{Combobox as y}from"../../../../../shared/ui/formElements/uncontrolled/combobox/combobox.js";import{pushToDlLink as s}from"../../../../../shared/dataLayers/utils.js";import{Icon as m}from"../../../../../shared/ui/icon/Icon.js";const k=i=>i?.map(t=>({value:t.title??"",label:t.title??""})),A=({categories:i,helpers:t,phone:n,...f})=>{const c=k(i),[r,d]=x(c?.[0]),u=e=>{o.isUndefined(e)||o.isArray(e)||d(e)},p=h(()=>r?i?.find(e=>e.title===r.value)?.children??[]:[],[r,i]);return a(w.div,{...f,className:v("fixed z-10 h-full w-full max-w-[calc(636px-32px)]","absolute left-1/2 top-full bg-color-white p-4","-translate-x-1/2 overflow-x-hidden","flex flex-col items-center justify-start gap-y-4"),initial:{opacity:0},animate:{opacity:1},children:[l(y,{multiple:!1,label:"Категория",options:c??[],value:r,onChange:u}),l("div",{className:"flex w-full flex-col items-center justify-center gap-y-1",children:p.map(e=>o.isArrayEmpty(e.children)?l("div",{className:"w-full px-4 py-2.5",children:l("a",{onPointerDown:()=>s(e?.title,e.link?.href,"seoHeader"),href:e.link?.href,className:"desk-body-regular-m inline-block w-full",children:e.title})},e.title):l(N,{category:e},e.title))}),l("div",{className:"h-[1px] w-full bg-color-blue-grey-200"}),a("div",{className:"flex w-full flex-col items-center justify-center gap-y-1",children:[t?.map(e=>l("div",{className:"w-full px-4 py-2.5",children:a("a",{onPointerDown:()=>s(e?.title,e?.link?.href,"seoHeader"),href:e.link?.href,className:"flex w-full items-center gap-x-1",children:[e.link?.icon&&l(m,{name:e?.link?.icon,className:"size-4"}),e?.title]})},e.title)),l("div",{className:"w-full px-4 py-2.5",children:a("a",{onPointerDown:()=>s(n,`tel:${n}`,"seoHeader"),href:`tel:${n}`,className:"flex w-full items-center gap-x-1",children:[l(m,{name:"communication/phone",className:"size-4"}),n]})})]})]})};export{A as Menu};
1
+ import{jsxs as a,jsx as l}from"react/jsx-runtime";import{useState as x,useMemo as h}from"react";import{motion as k}from"framer-motion";import{MenuItem as w}from"./MenuItem.js";import{TypeGuards as c}from"../../../../../shared/utils/typeGuards.js";import{cn as g}from"../../../../../shared/utils/cn.js";import{Combobox as v}from"../../../../../shared/ui/formElements/uncontrolled/combobox/combobox.js";import{pushToDlLink as o,pushToDlButton as y}from"../../../../../shared/dataLayers/utils.js";import{Icon as s}from"../../../../../shared/ui/icon/Icon.js";const b=t=>t?.map(i=>({value:i.title??"",label:i.title??""})),_=({categories:t,helpers:i,phone:n,...f})=>{const m=b(t),[r,u]=x(m?.[0]),d=e=>{c.isUndefined(e)||c.isArray(e)||(y({name:e?.label,placement:"burger",headline:""}),u(e))},p=h(()=>r?t?.find(e=>e.title===r.value)?.children??[]:[],[r,t]);return a(k.div,{...f,className:g("fixed z-10 h-full w-full max-w-[calc(636px-32px)]","absolute left-1/2 top-full bg-color-white p-4","-translate-x-1/2 overflow-x-hidden","flex flex-col items-center justify-start gap-y-4"),initial:{opacity:0},animate:{opacity:1},children:[l(v,{multiple:!1,label:"Категория",options:m??[],value:r,onChange:d}),l("div",{className:"flex w-full flex-col items-center justify-center gap-y-1",children:p.map(e=>c.isArrayEmpty(e.children)?l("div",{className:"w-full px-4 py-2.5",children:l("a",{onPointerDown:()=>o({name:e?.title,link:e.link?.href,placement:"burger",eventCategory:"click_block"}),href:e.link?.href,className:"desk-body-regular-m inline-block w-full",children:e.title})},e.title):l(w,{category:e},e.title))}),l("div",{className:"h-[1px] w-full bg-color-blue-grey-200"}),a("div",{className:"flex w-full flex-col items-center justify-center gap-y-1",children:[i?.map(e=>l("div",{className:"w-full px-4 py-2.5",children:a("a",{onPointerDown:()=>o({name:e?.title,link:e?.link?.href,placement:"burger",eventCategory:"click_block"}),href:e.link?.href,className:"flex w-full items-center gap-x-1",children:[e.link?.icon&&l(s,{name:e?.link?.icon,className:"size-4"}),e?.title]})},e.title)),l("div",{className:"w-full px-4 py-2.5",children:a("a",{onPointerDown:()=>o({name:n,link:`tel:${n}`,placement:"burger",eventCategory:"click_block"}),href:`tel:${n}`,className:"flex w-full items-center gap-x-1",children:[l(s,{name:"communication/phone",className:"size-4"}),n]})})]})]})};export{_ as Menu};
2
2
  //# sourceMappingURL=Menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.js","sources":["../../../../../../../lib/widgets/seoHeader/ui/mobile/menu/Menu.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { motion } from 'framer-motion'\nimport { pushToDlLink } from '../../../../../shared/dataLayers'\nimport { type Category, type SeoHeaderHelpers } from '../../../model'\nimport { MenuItem } from './MenuItem'\nimport { Combobox, type ComboboxItemOption, type ComboboxValue, Icon } from '$/shared/ui'\nimport { cn, TypeGuards } from '$/shared/utils'\n\nexport type MenuProps = React.ComponentProps<typeof motion.div> & {\n categories: Category[] | undefined\n helpers: SeoHeaderHelpers[]\n phone: string\n}\n\nconst getSelectCategories = (categories: Category[] | undefined): ComboboxItemOption[] | undefined =>\n categories?.map((category) => ({\n value: category.title ?? '',\n label: category.title ?? ''\n }))\n\nexport const Menu = ({ categories, helpers, phone, ...props }: MenuProps) => {\n const selectCategories = getSelectCategories(categories)\n\n const [selected, setSelected] = useState<ComboboxValue<false> | undefined>(selectCategories?.[0])\n\n const onCategoryChange = (option?: ComboboxValue<false>) => {\n if (TypeGuards.isUndefined(option) || TypeGuards.isArray(option)) return\n\n setSelected(option)\n }\n\n const selectedSubCategories = useMemo<Category[]>(() => {\n if (!selected) return []\n\n return categories?.find((category) => category.title === selected.value)?.children ?? []\n }, [selected, categories])\n\n return (\n <motion.div\n {...props}\n className={cn(\n 'fixed z-10 h-full w-full max-w-[calc(636px-32px)]',\n 'absolute left-1/2 top-full bg-color-white p-4',\n '-translate-x-1/2 overflow-x-hidden',\n 'flex flex-col items-center justify-start gap-y-4'\n )}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n >\n <Combobox\n multiple={false}\n label='Категория'\n options={selectCategories ?? []}\n value={selected}\n onChange={onCategoryChange}\n />\n <div className='flex w-full flex-col items-center justify-center gap-y-1'>\n {selectedSubCategories.map((subCategory) => {\n if (TypeGuards.isArrayEmpty(subCategory.children)) {\n return (\n <div key={subCategory.title} className='w-full px-4 py-2.5'>\n <a\n onPointerDown={() => pushToDlLink(subCategory?.title, subCategory.link?.href, 'seoHeader')}\n href={subCategory.link?.href}\n className='desk-body-regular-m inline-block w-full'\n >\n {subCategory.title}\n </a>\n </div>\n )\n }\n\n return <MenuItem key={subCategory.title} category={subCategory} />\n })}\n </div>\n <div className='h-[1px] w-full bg-color-blue-grey-200' />\n <div className='flex w-full flex-col items-center justify-center gap-y-1'>\n {helpers?.map((helper) => (\n <div key={helper.title} className='w-full px-4 py-2.5'>\n <a\n onPointerDown={() => pushToDlLink(helper?.title, helper?.link?.href, 'seoHeader')}\n href={helper.link?.href}\n className='flex w-full items-center gap-x-1'\n >\n {helper.link?.icon && <Icon name={helper?.link?.icon} className='size-4' />}\n {helper?.title}\n </a>\n </div>\n ))}\n <div className='w-full px-4 py-2.5'>\n <a\n onPointerDown={() => pushToDlLink(phone, `tel:${phone}`, 'seoHeader')}\n href={`tel:${phone}`}\n className='flex w-full items-center gap-x-1'\n >\n <Icon name='communication/phone' className='size-4' />\n {phone}\n </a>\n </div>\n </div>\n </motion.div>\n )\n}\n"],"names":["getSelectCategories","categories","category","Menu","helpers","phone","props","selectCategories","selected","setSelected","useState","onCategoryChange","option","TypeGuards","selectedSubCategories","useMemo","jsxs","motion","cn","jsx","Combobox","subCategory","pushToDlLink","MenuItem","helper","Icon"],"mappings":"uhBAcA,MAAMA,EAAuBC,GAC3BA,GAAY,IAAKC,IAAc,CAC7B,MAAOA,EAAS,OAAS,GACzB,MAAOA,EAAS,OAAS,EAC3B,EAAE,EAESC,EAAO,CAAC,CAAE,WAAAF,EAAY,QAAAG,EAAS,MAAAC,EAAO,GAAGC,KAAuB,CAC3E,MAAMC,EAAmBP,EAAoBC,CAAU,EAEjD,CAACO,EAAUC,CAAW,EAAIC,EAA2CH,IAAmB,CAAC,CAAC,EAE1FI,EAAoBC,GAAkC,CACtDC,EAAW,YAAYD,CAAM,GAAKC,EAAW,QAAQD,CAAM,GAE/DH,EAAYG,CAAM,CACpB,EAEME,EAAwBC,EAAoB,IAC3CP,EAEEP,GAAY,KAAMC,GAAaA,EAAS,QAAUM,EAAS,KAAK,GAAG,UAAY,CAAA,EAFhE,CAAA,EAGrB,CAACA,EAAUP,CAAU,CAAC,EAEzB,OACEe,EAACC,EAAO,IAAP,CACE,GAAGX,EACJ,UAAWY,EACT,oDACA,gDACA,qCACA,kDAAA,EAEF,QAAS,CAAE,QAAS,CAAA,EACpB,QAAS,CAAE,QAAS,CAAA,EAEpB,SAAA,CAAAC,EAACC,EAAA,CACC,SAAU,GACV,MAAM,YACN,QAASb,GAAoB,CAAA,EAC7B,MAAOC,EACP,SAAUG,CAAA,CAAA,IAEX,MAAA,CAAI,UAAU,2DACZ,SAAAG,EAAsB,IAAKO,GACtBR,EAAW,aAAaQ,EAAY,QAAQ,EAE5CF,EAAC,MAAA,CAA4B,UAAU,qBACrC,SAAAA,EAAC,IAAA,CACC,cAAe,IAAMG,EAAaD,GAAa,MAAOA,EAAY,MAAM,KAAM,WAAW,EACzF,KAAMA,EAAY,MAAM,KACxB,UAAU,0CAET,SAAAA,EAAY,KAAA,CAAA,CACf,EAPQA,EAAY,KAQtB,EAIGF,EAACI,EAAA,CAAiC,SAAUF,CAAA,EAA7BA,EAAY,KAA8B,CACjE,CAAA,CACH,EACAF,EAAC,MAAA,CAAI,UAAU,uCAAA,CAAwC,EACvDH,EAAC,MAAA,CAAI,UAAU,2DACZ,SAAA,CAAAZ,GAAS,IAAKoB,GACbL,EAAC,MAAA,CAAuB,UAAU,qBAChC,SAAAH,EAAC,IAAA,CACC,cAAe,IAAMM,EAAaE,GAAQ,MAAOA,GAAQ,MAAM,KAAM,WAAW,EAChF,KAAMA,EAAO,MAAM,KACnB,UAAU,mCAET,SAAA,CAAAA,EAAO,MAAM,MAAQL,EAACM,EAAA,CAAK,KAAMD,GAAQ,MAAM,KAAM,UAAU,QAAA,CAAS,EACxEA,GAAQ,KAAA,CAAA,CAAA,GAPHA,EAAO,KASjB,CACD,EACDL,EAAC,MAAA,CAAI,UAAU,qBACb,SAAAH,EAAC,IAAA,CACC,cAAe,IAAMM,EAAajB,EAAO,OAAOA,CAAK,GAAI,WAAW,EACpE,KAAM,OAAOA,CAAK,GAClB,UAAU,mCAEV,SAAA,CAAAc,EAACM,EAAA,CAAK,KAAK,sBAAsB,UAAU,SAAS,EACnDpB,CAAA,CAAA,CAAA,CACH,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CAGN"}
1
+ {"version":3,"file":"Menu.js","sources":["../../../../../../../lib/widgets/seoHeader/ui/mobile/menu/Menu.tsx"],"sourcesContent":["import { useMemo, useState } from 'react'\nimport { motion } from 'framer-motion'\nimport { pushToDlButton, pushToDlLink } from '../../../../../shared/dataLayers'\nimport { type Category, type SeoHeaderHelpers } from '../../../model'\nimport { MenuItem } from './MenuItem'\nimport { Combobox, type ComboboxItemOption, type ComboboxValue, Icon } from '$/shared/ui'\nimport { cn, TypeGuards } from '$/shared/utils'\n\nexport type MenuProps = React.ComponentProps<typeof motion.div> & {\n categories: Category[] | undefined\n helpers: SeoHeaderHelpers[]\n phone: string\n}\n\nconst getSelectCategories = (categories: Category[] | undefined): ComboboxItemOption[] | undefined =>\n categories?.map((category) => ({\n value: category.title ?? '',\n label: category.title ?? ''\n }))\n\nexport const Menu = ({ categories, helpers, phone, ...props }: MenuProps) => {\n const selectCategories = getSelectCategories(categories)\n\n const [selected, setSelected] = useState<ComboboxValue<false> | undefined>(selectCategories?.[0])\n\n const onCategoryChange = (option?: ComboboxValue<false>) => {\n if (TypeGuards.isUndefined(option) || TypeGuards.isArray(option)) return\n\n pushToDlButton({\n name: option?.label,\n placement: 'burger',\n headline: ''\n })\n\n setSelected(option)\n }\n\n const selectedSubCategories = useMemo<Category[]>(() => {\n if (!selected) return []\n\n return categories?.find((category) => category.title === selected.value)?.children ?? []\n }, [selected, categories])\n\n return (\n <motion.div\n {...props}\n className={cn(\n 'fixed z-10 h-full w-full max-w-[calc(636px-32px)]',\n 'absolute left-1/2 top-full bg-color-white p-4',\n '-translate-x-1/2 overflow-x-hidden',\n 'flex flex-col items-center justify-start gap-y-4'\n )}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n >\n <Combobox\n multiple={false}\n label='Категория'\n options={selectCategories ?? []}\n value={selected}\n onChange={onCategoryChange}\n />\n <div className='flex w-full flex-col items-center justify-center gap-y-1'>\n {selectedSubCategories.map((subCategory) => {\n if (TypeGuards.isArrayEmpty(subCategory.children)) {\n return (\n <div key={subCategory.title} className='w-full px-4 py-2.5'>\n <a\n onPointerDown={() =>\n pushToDlLink({\n name: subCategory?.title,\n link: subCategory.link?.href,\n placement: 'burger',\n eventCategory: 'click_block'\n })\n }\n href={subCategory.link?.href}\n className='desk-body-regular-m inline-block w-full'\n >\n {subCategory.title}\n </a>\n </div>\n )\n }\n\n return <MenuItem key={subCategory.title} category={subCategory} />\n })}\n </div>\n <div className='h-[1px] w-full bg-color-blue-grey-200' />\n <div className='flex w-full flex-col items-center justify-center gap-y-1'>\n {helpers?.map((helper) => (\n <div key={helper.title} className='w-full px-4 py-2.5'>\n <a\n onPointerDown={() =>\n pushToDlLink({ name: helper?.title, link: helper?.link?.href, placement: 'burger', eventCategory: 'click_block' })\n }\n href={helper.link?.href}\n className='flex w-full items-center gap-x-1'\n >\n {helper.link?.icon && <Icon name={helper?.link?.icon} className='size-4' />}\n {helper?.title}\n </a>\n </div>\n ))}\n <div className='w-full px-4 py-2.5'>\n <a\n onPointerDown={() =>\n pushToDlLink({ name: phone, link: `tel:${phone}`, placement: 'burger', eventCategory: 'click_block' })\n }\n href={`tel:${phone}`}\n className='flex w-full items-center gap-x-1'\n >\n <Icon name='communication/phone' className='size-4' />\n {phone}\n </a>\n </div>\n </div>\n </motion.div>\n )\n}\n"],"names":["getSelectCategories","categories","category","Menu","helpers","phone","props","selectCategories","selected","setSelected","useState","onCategoryChange","option","TypeGuards","pushToDlButton","selectedSubCategories","useMemo","jsxs","motion","cn","jsx","Combobox","subCategory","pushToDlLink","MenuItem","helper","Icon"],"mappings":"2iBAcA,MAAMA,EAAuBC,GAC3BA,GAAY,IAAKC,IAAc,CAC7B,MAAOA,EAAS,OAAS,GACzB,MAAOA,EAAS,OAAS,EAC3B,EAAE,EAESC,EAAO,CAAC,CAAE,WAAAF,EAAY,QAAAG,EAAS,MAAAC,EAAO,GAAGC,KAAuB,CAC3E,MAAMC,EAAmBP,EAAoBC,CAAU,EAEjD,CAACO,EAAUC,CAAW,EAAIC,EAA2CH,IAAmB,CAAC,CAAC,EAE1FI,EAAoBC,GAAkC,CACtDC,EAAW,YAAYD,CAAM,GAAKC,EAAW,QAAQD,CAAM,IAE/DE,EAAe,CACb,KAAMF,GAAQ,MACd,UAAW,SACX,SAAU,EAAA,CACX,EAEDH,EAAYG,CAAM,EACpB,EAEMG,EAAwBC,EAAoB,IAC3CR,EAEEP,GAAY,KAAMC,GAAaA,EAAS,QAAUM,EAAS,KAAK,GAAG,UAAY,CAAA,EAFhE,CAAA,EAGrB,CAACA,EAAUP,CAAU,CAAC,EAEzB,OACEgB,EAACC,EAAO,IAAP,CACE,GAAGZ,EACJ,UAAWa,EACT,oDACA,gDACA,qCACA,kDAAA,EAEF,QAAS,CAAE,QAAS,CAAA,EACpB,QAAS,CAAE,QAAS,CAAA,EAEpB,SAAA,CAAAC,EAACC,EAAA,CACC,SAAU,GACV,MAAM,YACN,QAASd,GAAoB,CAAA,EAC7B,MAAOC,EACP,SAAUG,CAAA,CAAA,IAEX,MAAA,CAAI,UAAU,2DACZ,SAAAI,EAAsB,IAAKO,GACtBT,EAAW,aAAaS,EAAY,QAAQ,EAE5CF,EAAC,MAAA,CAA4B,UAAU,qBACrC,SAAAA,EAAC,IAAA,CACC,cAAe,IACbG,EAAa,CACX,KAAMD,GAAa,MACnB,KAAMA,EAAY,MAAM,KACxB,UAAW,SACX,cAAe,aAAA,CAChB,EAEH,KAAMA,EAAY,MAAM,KACxB,UAAU,0CAET,SAAAA,EAAY,KAAA,CAAA,CACf,EAdQA,EAAY,KAetB,EAIGF,EAACI,EAAA,CAAiC,SAAUF,CAAA,EAA7BA,EAAY,KAA8B,CACjE,CAAA,CACH,EACAF,EAAC,MAAA,CAAI,UAAU,uCAAA,CAAwC,EACvDH,EAAC,MAAA,CAAI,UAAU,2DACZ,SAAA,CAAAb,GAAS,IAAKqB,GACbL,EAAC,MAAA,CAAuB,UAAU,qBAChC,SAAAH,EAAC,IAAA,CACC,cAAe,IACbM,EAAa,CAAE,KAAME,GAAQ,MAAO,KAAMA,GAAQ,MAAM,KAAM,UAAW,SAAU,cAAe,cAAe,EAEnH,KAAMA,EAAO,MAAM,KACnB,UAAU,mCAET,SAAA,CAAAA,EAAO,MAAM,MAAQL,EAACM,EAAA,CAAK,KAAMD,GAAQ,MAAM,KAAM,UAAU,QAAA,CAAS,EACxEA,GAAQ,KAAA,CAAA,CAAA,GATHA,EAAO,KAWjB,CACD,EACDL,EAAC,MAAA,CAAI,UAAU,qBACb,SAAAH,EAAC,IAAA,CACC,cAAe,IACbM,EAAa,CAAE,KAAMlB,EAAO,KAAM,OAAOA,CAAK,GAAI,UAAW,SAAU,cAAe,cAAe,EAEvG,KAAM,OAAOA,CAAK,GAClB,UAAU,mCAEV,SAAA,CAAAe,EAACM,EAAA,CAAK,KAAK,sBAAsB,UAAU,SAAS,EACnDrB,CAAA,CAAA,CAAA,CACH,CACF,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CAGN"}
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{cn as s}from"../../../../../shared/utils/cn.js";import{Accordion as f}from"../../../../../shared/ui/accordion/Accordion.js";import{Icon as i}from"../../../../../shared/ui/icon/Icon.js";import{pushToDlLink as n}from"../../../../../shared/dataLayers/utils.js";const x=({category:l})=>e(f,{onPointerDown:()=>n(l?.title,"","seoHeader"),label:l.title??"",icon:e(i,{name:"arrows/arrowRight",className:"-rotate-90"}),classes:{root:"w-full",header:{trigger:"py-2 data-[open=false]:bg-color-white",label:"desk-body-regular-m"},content:s("relative",'after:content-"" after:absolute after:w-[calc(100%-32px)]',"after:bottom-0 after:left-1/2 after:-translate-x-1/2","after:h-[1px] after:bg-color-blue-grey-200")},children:e("div",{className:"flex flex-col items-start justify-center gap-y-4",children:l?.children?.map(t=>{const o=!!t?.link?.href;return a("ul",{className:"w-full list-none p-0",children:[a(o?"a":"p",{href:o?t.link?.href:void 0,className:"mb-3 flex items-center gap-x-1 text-16 text-color-primary-default",children:[t.title,e(i,{name:"arrows/arrowLink"})]}),t?.children?.map(r=>e("li",{className:"inline-block w-full [&:not(:last-child)]:mb-3",children:e("a",{onPointerDown:()=>n(r?.title,r?.link?.href,"seoHeader"),href:r.link?.href,className:"w-full",children:r.title})},r.title))]},t.title)})})},l.title);export{x as MenuItem};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{cn as c}from"../../../../../shared/utils/cn.js";import{Accordion as s}from"../../../../../shared/ui/accordion/Accordion.js";import{Icon as n}from"../../../../../shared/ui/icon/Icon.js";import{pushToDlLink as i}from"../../../../../shared/dataLayers/utils.js";const h=({category:t})=>e(s,{onPointerDown:()=>i({name:t?.title,link:t?.link?.href,placement:"burger",eventCategory:"click_block"}),label:t.title??"",icon:e(n,{name:"arrows/arrowRight",className:"-rotate-90"}),classes:{root:"w-full",header:{trigger:"py-2 data-[open=false]:bg-color-white",label:"desk-body-regular-m"},content:c("relative",'after:content-"" after:absolute after:w-[calc(100%-32px)]',"after:bottom-0 after:left-1/2 after:-translate-x-1/2","after:h-[1px] after:bg-color-blue-grey-200")},children:e("div",{className:"flex flex-col items-start justify-center gap-y-4",children:t?.children?.map(l=>{const a=!!l?.link?.href;return o("ul",{className:"w-full list-none p-0",children:[o(a?"a":"p",{href:a?l.link?.href:void 0,className:"mb-3 flex items-center gap-x-1 text-16 text-color-primary-default",children:[l.title,e(n,{name:"arrows/arrowLink"})]}),l?.children?.map(r=>e("li",{className:"inline-block w-full [&:not(:last-child)]:mb-3",children:e("a",{onPointerDown:()=>i({name:r?.title,link:r?.link?.href,placement:"burger",eventCategory:"click_block"}),href:r.link?.href,className:"w-full",children:r.title})},r.title))]},l.title)})})},t.title);export{h as MenuItem};
2
2
  //# sourceMappingURL=MenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.js","sources":["../../../../../../../lib/widgets/seoHeader/ui/mobile/menu/MenuItem.tsx"],"sourcesContent":["import { pushToDlLink } from '../../../../../shared/dataLayers'\nimport { type Category } from '../../../model'\nimport { Accordion, Icon } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\ntype MenuItemProps = {\n category: Category\n}\n\nexport const MenuItem = ({ category }: MenuItemProps) => (\n <Accordion\n key={category.title}\n onPointerDown={() => pushToDlLink(category?.title, '', 'seoHeader')}\n label={category.title ?? ''}\n icon={<Icon name='arrows/arrowRight' className='-rotate-90' />}\n classes={{\n root: 'w-full',\n header: {\n trigger: 'py-2 data-[open=false]:bg-color-white',\n label: 'desk-body-regular-m'\n },\n content: cn(\n 'relative',\n 'after:content-\"\" after:absolute after:w-[calc(100%-32px)]',\n 'after:bottom-0 after:left-1/2 after:-translate-x-1/2',\n 'after:h-[1px] after:bg-color-blue-grey-200'\n )\n }}\n >\n <div className='flex flex-col items-start justify-center gap-y-4'>\n {category?.children?.map((child) => {\n const isLink = Boolean(child?.link?.href)\n const Title = isLink ? 'a' : 'p'\n\n return (\n <ul key={child.title} className='w-full list-none p-0'>\n <Title\n href={isLink ? child.link?.href : undefined}\n className='mb-3 flex items-center gap-x-1 text-16 text-color-primary-default'\n >\n {child.title}\n <Icon name='arrows/arrowLink' />\n </Title>\n {child?.children?.map((innerChild) => (\n <li key={innerChild.title} className='inline-block w-full [&:not(:last-child)]:mb-3'>\n <a\n onPointerDown={() => pushToDlLink(innerChild?.title, innerChild?.link?.href, 'seoHeader')}\n href={innerChild.link?.href}\n className='w-full'\n >\n {innerChild.title}\n </a>\n </li>\n ))}\n </ul>\n )\n })}\n </div>\n </Accordion>\n)\n"],"names":["MenuItem","category","jsx","Accordion","pushToDlLink","Icon","cn","child","isLink","jsxs","innerChild"],"mappings":"2TASO,MAAMA,EAAW,CAAC,CAAE,SAAAC,CAAA,IACzBC,EAACC,EAAA,CAEC,cAAe,IAAMC,EAAaH,GAAU,MAAO,GAAI,WAAW,EAClE,MAAOA,EAAS,OAAS,GACzB,KAAMC,EAACG,EAAA,CAAK,KAAK,oBAAoB,UAAU,aAAa,EAC5D,QAAS,CACP,KAAM,SACN,OAAQ,CACN,QAAS,wCACT,MAAO,qBAAA,EAET,QAASC,EACP,WACA,4DACA,uDACA,4CAAA,CACF,EAGF,SAAAJ,EAAC,OAAI,UAAU,mDACZ,YAAU,UAAU,IAAKK,GAAU,CAClC,MAAMC,EAAS,EAAQD,GAAO,MAAM,KAGpC,OACEE,EAAC,KAAA,CAAqB,UAAU,uBAC9B,SAAA,CAAAA,EAJUD,EAAS,IAAM,IAIxB,CACC,KAAMA,EAASD,EAAM,MAAM,KAAO,OAClC,UAAU,oEAET,SAAA,CAAAA,EAAM,MACPL,EAACG,EAAA,CAAK,KAAK,kBAAA,CAAmB,CAAA,CAAA,CAAA,EAE/BE,GAAO,UAAU,IAAKG,GACrBR,EAAC,KAAA,CAA0B,UAAU,gDACnC,SAAAA,EAAC,IAAA,CACC,cAAe,IAAME,EAAaM,GAAY,MAAOA,GAAY,MAAM,KAAM,WAAW,EACxF,KAAMA,EAAW,MAAM,KACvB,UAAU,SAET,SAAAA,EAAW,KAAA,CAAA,CACd,EAPOA,EAAW,KAQpB,CACD,CAAA,CAAA,EAlBMH,EAAM,KAmBf,CAEJ,CAAC,CAAA,CACH,CAAA,EA9CKN,EAAS,KA+ChB"}
1
+ {"version":3,"file":"MenuItem.js","sources":["../../../../../../../lib/widgets/seoHeader/ui/mobile/menu/MenuItem.tsx"],"sourcesContent":["import { pushToDlLink } from '../../../../../shared/dataLayers'\nimport { type Category } from '../../../model'\nimport { Accordion, Icon } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\ntype MenuItemProps = {\n category: Category\n}\n\nexport const MenuItem = ({ category }: MenuItemProps) => (\n <Accordion\n key={category.title}\n onPointerDown={() =>\n pushToDlLink({ name: category?.title, link: category?.link?.href, placement: 'burger', eventCategory: 'click_block' })\n }\n label={category.title ?? ''}\n icon={<Icon name='arrows/arrowRight' className='-rotate-90' />}\n classes={{\n root: 'w-full',\n header: {\n trigger: 'py-2 data-[open=false]:bg-color-white',\n label: 'desk-body-regular-m'\n },\n content: cn(\n 'relative',\n 'after:content-\"\" after:absolute after:w-[calc(100%-32px)]',\n 'after:bottom-0 after:left-1/2 after:-translate-x-1/2',\n 'after:h-[1px] after:bg-color-blue-grey-200'\n )\n }}\n >\n <div className='flex flex-col items-start justify-center gap-y-4'>\n {category?.children?.map((child) => {\n const isLink = Boolean(child?.link?.href)\n const Title = isLink ? 'a' : 'p'\n\n return (\n <ul key={child.title} className='w-full list-none p-0'>\n <Title\n href={isLink ? child.link?.href : undefined}\n className='mb-3 flex items-center gap-x-1 text-16 text-color-primary-default'\n >\n {child.title}\n <Icon name='arrows/arrowLink' />\n </Title>\n {child?.children?.map((innerChild) => (\n <li key={innerChild.title} className='inline-block w-full [&:not(:last-child)]:mb-3'>\n <a\n onPointerDown={() =>\n pushToDlLink({\n name: innerChild?.title,\n link: innerChild?.link?.href,\n placement: 'burger',\n eventCategory: 'click_block'\n })\n }\n href={innerChild.link?.href}\n className='w-full'\n >\n {innerChild.title}\n </a>\n </li>\n ))}\n </ul>\n )\n })}\n </div>\n </Accordion>\n)\n"],"names":["MenuItem","category","jsx","Accordion","pushToDlLink","Icon","cn","child","isLink","jsxs","innerChild"],"mappings":"2TASO,MAAMA,EAAW,CAAC,CAAE,SAAAC,CAAA,IACzBC,EAACC,EAAA,CAEC,cAAe,IACbC,EAAa,CAAE,KAAMH,GAAU,MAAO,KAAMA,GAAU,MAAM,KAAM,UAAW,SAAU,cAAe,cAAe,EAEvH,MAAOA,EAAS,OAAS,GACzB,KAAMC,EAACG,EAAA,CAAK,KAAK,oBAAoB,UAAU,aAAa,EAC5D,QAAS,CACP,KAAM,SACN,OAAQ,CACN,QAAS,wCACT,MAAO,qBAAA,EAET,QAASC,EACP,WACA,4DACA,uDACA,4CAAA,CACF,EAGF,SAAAJ,EAAC,OAAI,UAAU,mDACZ,YAAU,UAAU,IAAKK,GAAU,CAClC,MAAMC,EAAS,EAAQD,GAAO,MAAM,KAGpC,OACEE,EAAC,KAAA,CAAqB,UAAU,uBAC9B,SAAA,CAAAA,EAJUD,EAAS,IAAM,IAIxB,CACC,KAAMA,EAASD,EAAM,MAAM,KAAO,OAClC,UAAU,oEAET,SAAA,CAAAA,EAAM,MACPL,EAACG,EAAA,CAAK,KAAK,kBAAA,CAAmB,CAAA,CAAA,CAAA,EAE/BE,GAAO,UAAU,IAAKG,GACrBR,EAAC,KAAA,CAA0B,UAAU,gDACnC,SAAAA,EAAC,IAAA,CACC,cAAe,IACbE,EAAa,CACX,KAAMM,GAAY,MAClB,KAAMA,GAAY,MAAM,KACxB,UAAW,SACX,cAAe,aAAA,CAChB,EAEH,KAAMA,EAAW,MAAM,KACvB,UAAU,SAET,SAAAA,EAAW,KAAA,CAAA,CACd,EAdOA,EAAW,KAepB,CACD,CAAA,CAAA,EAzBMH,EAAM,KA0Bf,CAEJ,CAAC,CAAA,CACH,CAAA,EAvDKN,EAAS,KAwDhB"}
@@ -1,2 +1,2 @@
1
- import{jsx as o,jsxs as m}from"react/jsx-runtime";import{useState as h,useMemo as x,createElement as b}from"react";import{SingleStep as u}from"./ui/SingleStep.js";import{StepperTabs as S}from"./ui/StepperTabs.js";import{cn as p}from"../../shared/utils/cn.js";import{StepperCarousel as g}from"./ui/StepperCarousel.js";import{ResponsiveContainer as k}from"../../shared/ui/responsiveContainer/ResponsiveContainer.js";const y=({steppers:t,headline:i,classes:e})=>{const s=t&&t?.length>1,[l,n]=h(s?t?.[0]?.tabName:""),d=x(()=>t?.map(({tabName:r})=>({tabName:r})),[t]),c=s?d?.findIndex(r=>r.tabName===l):0,a=t?.[c];return o("section",{id:"stepper","data-test-id":"stepper",className:p("w-full",e?.root),children:o(k,{className:p(e?.container),children:m("div",{className:p("flex flex-col gap-6 desktop:items-start desktop:gap-12",e?.wrapper),children:[o("div",{dangerouslySetInnerHTML:{__html:i},className:p("mob-headline-bold-s text-color-dark desktop:desk-headline-bold-m",e?.headline)}),m("div",{className:"flex flex-col gap-6 desktop:gap-10",children:[s&&o(S,{headline:i,stepperTabs:d,activeStepper:l,setActiveStepper:n,classes:e?.stepperTabs}),a.withImages&&o(g,{classes:e?.stepperCarousel,currentStepper:a}),o("div",{className:p("flex w-full flex-col items-start gap-6 desktop:flex-row desktop:items-start desktop:gap-12",e?.stepsWrapper,{"mobile:hidden":a.withImages}),children:a?.details?.map((r,f)=>b(u,{...r,key:r.description,index:f+1,classes:e?.step}))})]})]})})},a.tabName)};export{y as Stepper,y as default};
1
+ import{jsx as a,jsxs as d}from"react/jsx-runtime";import{useState as h,useMemo as x,createElement as b}from"react";import{SingleStep as u}from"./ui/SingleStep.js";import{StepperTabs as S}from"./ui/StepperTabs.js";import{cn as p}from"../../shared/utils/cn.js";import{StepperCarousel as g}from"./ui/StepperCarousel.js";import{ResponsiveContainer as k}from"../../shared/ui/responsiveContainer/ResponsiveContainer.js";const y=({steppers:t,headline:m,classes:e})=>{const s=t&&t?.length>1,[i,n]=h(s?t?.[0]?.tabName:""),l=x(()=>t?.map(({tabName:r})=>({tabName:r})),[t]),c=s?l?.findIndex(r=>r.tabName===i):0,o=t?.[c];return a("section",{id:"stepper","data-test-id":"stepper",className:p("w-full",e?.root),children:a(k,{className:p(e?.container),children:d("div",{className:p("flex flex-col gap-6 desktop:items-start desktop:gap-12",e?.wrapper),children:[a("div",{dangerouslySetInnerHTML:{__html:m},className:p("mob-headline-bold-s text-color-dark desktop:desk-headline-bold-m",e?.headline)}),d("div",{className:"flex flex-col gap-6 desktop:gap-10",children:[s&&a(S,{stepperTabs:l,activeStepper:i,setActiveStepper:n,classes:e?.stepperTabs}),o.withImages&&a(g,{classes:e?.stepperCarousel,currentStepper:o}),a("div",{className:p("flex w-full flex-col items-start gap-6 desktop:flex-row desktop:items-start desktop:gap-12",e?.stepsWrapper,{"mobile:hidden":o.withImages}),children:o?.details?.map((r,f)=>b(u,{...r,key:r.description,index:f+1,classes:e?.step}))})]})]})})},o.tabName)};export{y as Stepper,y as default};
2
2
  //# sourceMappingURL=Stepper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.js","sources":["../../../../lib/widgets/stepper/Stepper.tsx"],"sourcesContent":["import { type HTMLAttributes, useMemo, useState } from 'react'\nimport { type SingleStepper } from './model/types'\nimport { StepperCarousel } from './ui'\nimport { SingleStep, type SingleStepClasses } from './ui/SingleStep'\nimport { type StepperCarouselClasses } from './ui/StepperCarousel'\nimport { StepperTabs, type StepperTabsClasses, type StepperTabValue } from './ui/StepperTabs'\nimport { ResponsiveContainer } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport type StepperClasses = {\n root?: string\n container?: string\n wrapper?: string\n headline?: string\n stepsWrapper?: string\n step?: SingleStepClasses\n stepperTabs?: StepperTabsClasses\n stepperCarousel?: StepperCarouselClasses\n}\n\nexport interface StepperProps<WithImages extends boolean> extends HTMLAttributes<HTMLDivElement> {\n headline: string\n steppers: SingleStepper<WithImages>[]\n classes?: StepperClasses\n}\n\nexport const Stepper = <WithImages extends boolean>({ steppers, headline, classes }: StepperProps<WithImages>) => {\n const shouldShowTabs = steppers && steppers?.length > 1\n const [activeStepper, setActiveStepper] = useState<StepperTabValue>(shouldShowTabs ? steppers?.[0]?.tabName : '')\n\n const steppersTabs = useMemo(() => steppers?.map(({ tabName }) => ({ tabName })), [steppers])\n\n const currentStepperIndex = shouldShowTabs ? steppersTabs?.findIndex((tab) => tab.tabName === activeStepper) : 0\n const currentStepper = steppers?.[currentStepperIndex]\n\n return (\n <section key={currentStepper.tabName} id='stepper' data-test-id='stepper' className={cn('w-full', classes?.root)}>\n <ResponsiveContainer className={cn(classes?.container)}>\n <div className={cn('flex flex-col gap-6 desktop:items-start desktop:gap-12', classes?.wrapper)}>\n <div\n dangerouslySetInnerHTML={{ __html: headline }}\n className={cn('mob-headline-bold-s text-color-dark desktop:desk-headline-bold-m', classes?.headline)}\n />\n\n <div className='flex flex-col gap-6 desktop:gap-10'>\n {shouldShowTabs && (\n <StepperTabs\n headline={headline}\n stepperTabs={steppersTabs}\n activeStepper={activeStepper}\n setActiveStepper={setActiveStepper}\n classes={classes?.stepperTabs}\n />\n )}\n\n {currentStepper.withImages && <StepperCarousel classes={classes?.stepperCarousel} currentStepper={currentStepper} />}\n\n <div\n className={cn(\n 'flex w-full flex-col items-start gap-6 desktop:flex-row desktop:items-start desktop:gap-12',\n classes?.stepsWrapper,\n { ['mobile:hidden']: currentStepper.withImages }\n )}\n >\n {currentStepper?.details?.map((step, index) => (\n <SingleStep {...step} key={step.description} index={index + 1} classes={classes?.step} />\n ))}\n </div>\n </div>\n </div>\n </ResponsiveContainer>\n </section>\n )\n}\n\nexport default Stepper\n"],"names":["Stepper","steppers","headline","classes","shouldShowTabs","activeStepper","setActiveStepper","useState","steppersTabs","useMemo","tabName","currentStepperIndex","tab","currentStepper","jsx","cn","ResponsiveContainer","jsxs","StepperTabs","StepperCarousel","step","index","SingleStep"],"mappings":"8ZA0BO,MAAMA,EAAU,CAA6B,CAAE,SAAAC,EAAU,SAAAC,EAAU,QAAAC,KAAwC,CAChH,MAAMC,EAAiBH,GAAYA,GAAU,OAAS,EAChD,CAACI,EAAeC,CAAgB,EAAIC,EAA0BH,EAAiBH,IAAW,CAAC,GAAG,QAAU,EAAE,EAE1GO,EAAeC,EAAQ,IAAMR,GAAU,IAAI,CAAC,CAAE,QAAAS,CAAA,KAAe,CAAE,QAAAA,CAAA,EAAU,EAAG,CAACT,CAAQ,CAAC,EAEtFU,EAAsBP,EAAiBI,GAAc,UAAWI,GAAQA,EAAI,UAAYP,CAAa,EAAI,EACzGQ,EAAiBZ,IAAWU,CAAmB,EAErD,OACEG,EAAC,UAAA,CAAqC,GAAG,UAAU,eAAa,UAAU,UAAWC,EAAG,SAAUZ,GAAS,IAAI,EAC7G,SAAAW,EAACE,GAAoB,UAAWD,EAAGZ,GAAS,SAAS,EACnD,SAAAc,EAAC,MAAA,CAAI,UAAWF,EAAG,yDAA0DZ,GAAS,OAAO,EAC3F,SAAA,CAAAW,EAAC,MAAA,CACC,wBAAyB,CAAE,OAAQZ,CAAA,EACnC,UAAWa,EAAG,mEAAoEZ,GAAS,QAAQ,CAAA,CAAA,EAGrGc,EAAC,MAAA,CAAI,UAAU,qCACZ,SAAA,CAAAb,GACCU,EAACI,EAAA,CACC,SAAAhB,EACA,YAAaM,EACb,cAAAH,EACA,iBAAAC,EACA,QAASH,GAAS,WAAA,CAAA,EAIrBU,EAAe,YAAcC,EAACK,GAAgB,QAAShB,GAAS,gBAAiB,eAAAU,EAAgC,EAElHC,EAAC,MAAA,CACC,UAAWC,EACT,6FACAZ,GAAS,aACT,CAAG,gBAAkBU,EAAe,UAAA,CAAW,EAGhD,YAAgB,SAAS,IAAI,CAACO,EAAMC,MAClCC,EAAA,CAAY,GAAGF,EAAM,IAAKA,EAAK,YAAa,MAAOC,EAAQ,EAAG,QAASlB,GAAS,KAAM,CACxF,CAAA,CAAA,CACH,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,GAlCYU,EAAe,OAmC7B,CAEJ"}
1
+ {"version":3,"file":"Stepper.js","sources":["../../../../lib/widgets/stepper/Stepper.tsx"],"sourcesContent":["import { type HTMLAttributes, useMemo, useState } from 'react'\nimport { type SingleStepper } from './model/types'\nimport { StepperCarousel } from './ui'\nimport { SingleStep, type SingleStepClasses } from './ui/SingleStep'\nimport { type StepperCarouselClasses } from './ui/StepperCarousel'\nimport { StepperTabs, type StepperTabsClasses, type StepperTabValue } from './ui/StepperTabs'\nimport { ResponsiveContainer } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport type StepperClasses = {\n root?: string\n container?: string\n wrapper?: string\n headline?: string\n stepsWrapper?: string\n step?: SingleStepClasses\n stepperTabs?: StepperTabsClasses\n stepperCarousel?: StepperCarouselClasses\n}\n\nexport interface StepperProps<WithImages extends boolean> extends HTMLAttributes<HTMLDivElement> {\n headline: string\n steppers: SingleStepper<WithImages>[]\n classes?: StepperClasses\n}\n\nexport const Stepper = <WithImages extends boolean>({ steppers, headline, classes }: StepperProps<WithImages>) => {\n const shouldShowTabs = steppers && steppers?.length > 1\n const [activeStepper, setActiveStepper] = useState<StepperTabValue>(shouldShowTabs ? steppers?.[0]?.tabName : '')\n\n const steppersTabs = useMemo(() => steppers?.map(({ tabName }) => ({ tabName })), [steppers])\n\n const currentStepperIndex = shouldShowTabs ? steppersTabs?.findIndex((tab) => tab.tabName === activeStepper) : 0\n const currentStepper = steppers?.[currentStepperIndex]\n\n return (\n <section key={currentStepper.tabName} id='stepper' data-test-id='stepper' className={cn('w-full', classes?.root)}>\n <ResponsiveContainer className={cn(classes?.container)}>\n <div className={cn('flex flex-col gap-6 desktop:items-start desktop:gap-12', classes?.wrapper)}>\n <div\n dangerouslySetInnerHTML={{ __html: headline }}\n className={cn('mob-headline-bold-s text-color-dark desktop:desk-headline-bold-m', classes?.headline)}\n />\n\n <div className='flex flex-col gap-6 desktop:gap-10'>\n {shouldShowTabs && (\n <StepperTabs\n stepperTabs={steppersTabs}\n activeStepper={activeStepper}\n setActiveStepper={setActiveStepper}\n classes={classes?.stepperTabs}\n />\n )}\n\n {currentStepper.withImages && <StepperCarousel classes={classes?.stepperCarousel} currentStepper={currentStepper} />}\n\n <div\n className={cn(\n 'flex w-full flex-col items-start gap-6 desktop:flex-row desktop:items-start desktop:gap-12',\n classes?.stepsWrapper,\n { ['mobile:hidden']: currentStepper.withImages }\n )}\n >\n {currentStepper?.details?.map((step, index) => (\n <SingleStep {...step} key={step.description} index={index + 1} classes={classes?.step} />\n ))}\n </div>\n </div>\n </div>\n </ResponsiveContainer>\n </section>\n )\n}\n\nexport default Stepper\n"],"names":["Stepper","steppers","headline","classes","shouldShowTabs","activeStepper","setActiveStepper","useState","steppersTabs","useMemo","tabName","currentStepperIndex","tab","currentStepper","jsx","cn","ResponsiveContainer","jsxs","StepperTabs","StepperCarousel","step","index","SingleStep"],"mappings":"8ZA0BO,MAAMA,EAAU,CAA6B,CAAE,SAAAC,EAAU,SAAAC,EAAU,QAAAC,KAAwC,CAChH,MAAMC,EAAiBH,GAAYA,GAAU,OAAS,EAChD,CAACI,EAAeC,CAAgB,EAAIC,EAA0BH,EAAiBH,IAAW,CAAC,GAAG,QAAU,EAAE,EAE1GO,EAAeC,EAAQ,IAAMR,GAAU,IAAI,CAAC,CAAE,QAAAS,CAAA,KAAe,CAAE,QAAAA,CAAA,EAAU,EAAG,CAACT,CAAQ,CAAC,EAEtFU,EAAsBP,EAAiBI,GAAc,UAAWI,GAAQA,EAAI,UAAYP,CAAa,EAAI,EACzGQ,EAAiBZ,IAAWU,CAAmB,EAErD,OACEG,EAAC,UAAA,CAAqC,GAAG,UAAU,eAAa,UAAU,UAAWC,EAAG,SAAUZ,GAAS,IAAI,EAC7G,SAAAW,EAACE,GAAoB,UAAWD,EAAGZ,GAAS,SAAS,EACnD,SAAAc,EAAC,MAAA,CAAI,UAAWF,EAAG,yDAA0DZ,GAAS,OAAO,EAC3F,SAAA,CAAAW,EAAC,MAAA,CACC,wBAAyB,CAAE,OAAQZ,CAAA,EACnC,UAAWa,EAAG,mEAAoEZ,GAAS,QAAQ,CAAA,CAAA,EAGrGc,EAAC,MAAA,CAAI,UAAU,qCACZ,SAAA,CAAAb,GACCU,EAACI,EAAA,CACC,YAAaV,EACb,cAAAH,EACA,iBAAAC,EACA,QAASH,GAAS,WAAA,CAAA,EAIrBU,EAAe,YAAcC,EAACK,GAAgB,QAAShB,GAAS,gBAAiB,eAAAU,EAAgC,EAElHC,EAAC,MAAA,CACC,UAAWC,EACT,6FACAZ,GAAS,aACT,CAAG,gBAAkBU,EAAe,UAAA,CAAW,EAGhD,YAAgB,SAAS,IAAI,CAACO,EAAMC,MAClCC,EAAA,CAAY,GAAGF,EAAM,IAAKA,EAAK,YAAa,MAAOC,EAAQ,EAAG,QAASlB,GAAS,KAAM,CACxF,CAAA,CAAA,CACH,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,GAjCYU,EAAe,OAkC7B,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import{memo as m}from"react";import{cn as t}from"../../../shared/utils/cn.js";import{pushToDlTab as s}from"../../../shared/dataLayers/utils.js";import{extractTextFromHtml as c}from"../../../shared/utils/extractTextFromHtml.js";const y=m(({stepperTabs:p,activeStepper:l,setActiveStepper:n,classes:r,headline:i})=>e("div",{className:t("customScrollbar-y scrollHidden flex items-center gap-4 overflow-x-auto",r?.wrapper),children:p?.map(({tabName:o})=>e("button",{onClick:()=>n(o),onPointerDown:()=>s(o,c(i),"stepper"),className:t("mob-body-regular-m text-nowrap rounded-sm bg-color-blue-grey-100 px-3 py-1.5 text-color-secondary outline-1 outline-offset-4 outline-transparent desktop:desk-body-regular-l focus:outline-primary-focus desktop:px-4 desktop:py-3",{"bg-icon-primary-default text-color-white":l===o},r?.tab),children:o},o))}));export{y as StepperTabs};
1
+ import{jsx as r}from"react/jsx-runtime";import{memo as i}from"react";import{cn as t}from"../../../shared/utils/cn.js";import{pushToDlTab as s}from"../../../shared/dataLayers/utils.js";const a=i(({stepperTabs:l,activeStepper:n,setActiveStepper:p,classes:e})=>r("div",{className:t("customScrollbar-y scrollHidden flex items-center gap-4 overflow-x-auto",e?.wrapper),children:l?.map(({tabName:o})=>r("button",{onClick:()=>p(o),onPointerDown:()=>s({name:o,headline:"Клик на табы",placement:"steps"}),className:t("mob-body-regular-m text-nowrap rounded-sm bg-color-blue-grey-100 px-3 py-1.5 text-color-secondary outline-1 outline-offset-4 outline-transparent desktop:desk-body-regular-l focus:outline-primary-focus desktop:px-4 desktop:py-3",{"bg-icon-primary-default text-color-white":n===o},e?.tab),children:o},o))}));export{a as StepperTabs};
2
2
  //# sourceMappingURL=StepperTabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StepperTabs.js","sources":["../../../../../lib/widgets/stepper/ui/StepperTabs.tsx"],"sourcesContent":["import { type Dispatch, memo, type SetStateAction } from 'react'\nimport { pushToDlTab } from '../../../shared/dataLayers'\nimport { cn, extractTextFromHtml } from '$/shared/utils'\n\nexport type StepperTabsClasses = {\n wrapper?: string\n tab?: string\n}\n\nexport interface StepperTab {\n tabName: string\n}\n\nexport type StepperTabValue = string | undefined\n\nexport interface StepperTabsProps {\n stepperTabs?: StepperTab[]\n activeStepper: StepperTabValue\n setActiveStepper: Dispatch<SetStateAction<StepperTabValue>>\n classes?: StepperTabsClasses\n headline?: string\n}\n\nexport const StepperTabs = memo(({ stepperTabs, activeStepper, setActiveStepper, classes, headline }: StepperTabsProps) => {\n return (\n <div className={cn('customScrollbar-y scrollHidden flex items-center gap-4 overflow-x-auto', classes?.wrapper)}>\n {stepperTabs?.map(({ tabName }) => (\n <button\n key={tabName}\n onClick={() => setActiveStepper(tabName)}\n onPointerDown={() => pushToDlTab(tabName, extractTextFromHtml(headline), 'stepper')}\n className={cn(\n 'mob-body-regular-m text-nowrap rounded-sm bg-color-blue-grey-100 px-3 py-1.5 text-color-secondary outline-1 outline-offset-4 outline-transparent desktop:desk-body-regular-l focus:outline-primary-focus desktop:px-4 desktop:py-3',\n { 'bg-icon-primary-default text-color-white': activeStepper === tabName },\n classes?.tab\n )}\n >\n {tabName}\n </button>\n ))}\n </div>\n )\n})\n"],"names":["StepperTabs","memo","stepperTabs","activeStepper","setActiveStepper","classes","headline","jsx","cn","tabName","pushToDlTab","extractTextFromHtml"],"mappings":"2QAuBO,MAAMA,EAAcC,EAAK,CAAC,CAAE,YAAAC,EAAa,cAAAC,EAAe,iBAAAC,EAAkB,QAAAC,EAAS,SAAAC,KAEtFC,EAAC,MAAA,CAAI,UAAWC,EAAG,yEAA0EH,GAAS,OAAO,EAC1G,SAAAH,GAAa,IAAI,CAAC,CAAE,QAAAO,KACnBF,EAAC,SAAA,CAEC,QAAS,IAAMH,EAAiBK,CAAO,EACvC,cAAe,IAAMC,EAAYD,EAASE,EAAoBL,CAAQ,EAAG,SAAS,EAClF,UAAWE,EACT,qOACA,CAAE,2CAA4CL,IAAkBM,CAAA,EAChEJ,GAAS,GAAA,EAGV,SAAAI,CAAA,EATIA,CAAA,CAWR,EACH,CAEH"}
1
+ {"version":3,"file":"StepperTabs.js","sources":["../../../../../lib/widgets/stepper/ui/StepperTabs.tsx"],"sourcesContent":["import { type Dispatch, memo, type SetStateAction } from 'react'\nimport { pushToDlTab } from '../../../shared/dataLayers'\nimport { cn } from '$/shared/utils'\n\nexport type StepperTabsClasses = {\n wrapper?: string\n tab?: string\n}\n\nexport interface StepperTab {\n tabName: string\n}\n\nexport type StepperTabValue = string | undefined\n\nexport interface StepperTabsProps {\n stepperTabs?: StepperTab[]\n activeStepper: StepperTabValue\n setActiveStepper: Dispatch<SetStateAction<StepperTabValue>>\n classes?: StepperTabsClasses\n}\n\nexport const StepperTabs = memo(({ stepperTabs, activeStepper, setActiveStepper, classes }: StepperTabsProps) => {\n return (\n <div className={cn('customScrollbar-y scrollHidden flex items-center gap-4 overflow-x-auto', classes?.wrapper)}>\n {stepperTabs?.map(({ tabName }) => (\n <button\n key={tabName}\n onClick={() => setActiveStepper(tabName)}\n onPointerDown={() => pushToDlTab({ name: tabName, headline: 'Клик на табы', placement: 'steps' })}\n className={cn(\n 'mob-body-regular-m text-nowrap rounded-sm bg-color-blue-grey-100 px-3 py-1.5 text-color-secondary outline-1 outline-offset-4 outline-transparent desktop:desk-body-regular-l focus:outline-primary-focus desktop:px-4 desktop:py-3',\n { 'bg-icon-primary-default text-color-white': activeStepper === tabName },\n classes?.tab\n )}\n >\n {tabName}\n </button>\n ))}\n </div>\n )\n})\n"],"names":["StepperTabs","memo","stepperTabs","activeStepper","setActiveStepper","classes","jsx","cn","tabName","pushToDlTab"],"mappings":"wLAsBO,MAAMA,EAAcC,EAAK,CAAC,CAAE,YAAAC,EAAa,cAAAC,EAAe,iBAAAC,EAAkB,QAAAC,KAE7EC,EAAC,MAAA,CAAI,UAAWC,EAAG,yEAA0EF,GAAS,OAAO,EAC1G,SAAAH,GAAa,IAAI,CAAC,CAAE,QAAAM,KACnBF,EAAC,SAAA,CAEC,QAAS,IAAMF,EAAiBI,CAAO,EACvC,cAAe,IAAMC,EAAY,CAAE,KAAMD,EAAS,SAAU,eAAgB,UAAW,QAAS,EAChG,UAAWD,EACT,qOACA,CAAE,2CAA4CJ,IAAkBK,CAAA,EAChEH,GAAS,GAAA,EAGV,SAAAG,CAAA,EATIA,CAAA,CAWR,EACH,CAEH"}
@@ -1,2 +1,2 @@
1
- import{pushToDL as e}from"../../../shared/dataLayers/pushToDL.js";const o=t=>t.variant==="HTML",s=t=>t.variant==="DOCUMENTS",i=t=>t.variant==="TABLE",a=t=>t.variant==="EXPERTS",c=(t,n)=>{e({event:"buttonClick",name:t,eventCategory:"click_block",eventAction:n,placement:"usefulInfo"})};export{s as isDocuments,a as isExperts,o as isHtml,i as isTable,c as subEntityDL};
1
+ import{pushToDL as e}from"../../../shared/dataLayers/pushToDL.js";const o=t=>t.variant==="HTML",c=t=>t.variant==="DOCUMENTS",i=t=>t.variant==="TABLE",s=t=>t.variant==="EXPERTS",a=(t,n)=>{e({event:"buttonClick",name:t,eventCategory:"click_block",eventAction:n,placement:"switcher_content"})};export{c as isDocuments,s as isExperts,o as isHtml,i as isTable,a as subEntityDL};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../../lib/widgets/usefulInfo/model/utils.ts"],"sourcesContent":["import { pushToDL } from '../../../shared/dataLayers'\nimport { type Entity } from './types'\n\nexport const isHtml = (entity: Entity): entity is Entity<'HTML'> => {\n return entity.variant === 'HTML'\n}\n\nexport const isDocuments = (entity: Entity): entity is Entity<'DOCUMENTS'> => {\n return entity.variant === 'DOCUMENTS'\n}\n\nexport const isTable = (entity: Entity): entity is Entity<'TABLE'> => {\n return entity.variant === 'TABLE'\n}\n\nexport const isExperts = (entity: Entity): entity is Entity<'EXPERTS'> => {\n return entity.variant === 'EXPERTS'\n}\n\nexport const subEntityDL = (accordionTitle: string | undefined, tabName: string | undefined) => {\n pushToDL({\n event: 'buttonClick',\n name: accordionTitle,\n eventCategory: 'click_block',\n eventAction: tabName,\n placement: 'usefulInfo'\n })\n}\n"],"names":["isHtml","entity","isDocuments","isTable","isExperts","subEntityDL","accordionTitle","tabName","pushToDL"],"mappings":"kEAGO,MAAMA,EAAUC,GACdA,EAAO,UAAY,OAGfC,EAAeD,GACnBA,EAAO,UAAY,YAGfE,EAAWF,GACfA,EAAO,UAAY,QAGfG,EAAaH,GACjBA,EAAO,UAAY,UAGfI,EAAc,CAACC,EAAoCC,IAAgC,CAC9FC,EAAS,CACP,MAAO,cACP,KAAMF,EACN,cAAe,cACf,YAAaC,EACb,UAAW,YAAA,CACZ,CACH"}
1
+ {"version":3,"file":"utils.js","sources":["../../../../../lib/widgets/usefulInfo/model/utils.ts"],"sourcesContent":["import { pushToDL } from '../../../shared/dataLayers'\nimport { type Entity } from './types'\n\nexport const isHtml = (entity: Entity): entity is Entity<'HTML'> => {\n return entity.variant === 'HTML'\n}\n\nexport const isDocuments = (entity: Entity): entity is Entity<'DOCUMENTS'> => {\n return entity.variant === 'DOCUMENTS'\n}\n\nexport const isTable = (entity: Entity): entity is Entity<'TABLE'> => {\n return entity.variant === 'TABLE'\n}\n\nexport const isExperts = (entity: Entity): entity is Entity<'EXPERTS'> => {\n return entity.variant === 'EXPERTS'\n}\n\nexport const subEntityDL = (accordionTitle: string | undefined, tabName: string | undefined) => {\n pushToDL({\n event: 'buttonClick',\n name: accordionTitle,\n eventCategory: 'click_block',\n eventAction: tabName,\n placement: 'switcher_content'\n })\n}\n"],"names":["isHtml","entity","isDocuments","isTable","isExperts","subEntityDL","accordionTitle","tabName","pushToDL"],"mappings":"kEAGO,MAAMA,EAAUC,GACdA,EAAO,UAAY,OAGfC,EAAeD,GACnBA,EAAO,UAAY,YAGfE,EAAWF,GACfA,EAAO,UAAY,QAGfG,EAAaH,GACjBA,EAAO,UAAY,UAGfI,EAAc,CAACC,EAAoCC,IAAgC,CAC9FC,EAAS,CACP,MAAO,cACP,KAAMF,EACN,cAAe,cACf,YAAaC,EACb,UAAW,kBAAA,CACZ,CACH"}
@@ -1,2 +1,2 @@
1
- import{jsx as a}from"react/jsx-runtime";import{cn as l}from"../../../shared/utils/cn.js";import{pushToDlTab as s}from"../../../shared/dataLayers/utils.js";const c=({tabsShortInfo:o,activeTab:n,setActiveTab:i,classes:r,headline:m})=>a("div",{className:l("hidden-scroll flex items-center gap-4 overflow-x-auto",r?.tabs),children:o&&o.map((e,t)=>a("button",{"aria-label":e?.tabName,"data-layer-id":e?.dataLayers?.targetId,onClick:()=>i(t),onPointerDown:()=>s(e?.tabName,m,"usefulInfo"),className:l("mob-body-regular-m text-nowrap rounded-sm bg-color-blue-grey-100 px-3 py-1.5 text-color-secondary outline-1 outline-offset-4 outline-transparent desktop:desk-body-regular-l focus:outline-primary-focus desktop:px-4 desktop:py-3",{"bg-icon-primary-default text-color-white":n===t},r?.button),children:e?.tabName},e?.tabName))});export{c as Tabs};
1
+ import{jsx as a}from"react/jsx-runtime";import{cn as l}from"../../../shared/utils/cn.js";import{pushToDlTab as p}from"../../../shared/dataLayers/utils.js";const u=({tabsShortInfo:o,activeTab:n,setActiveTab:i,classes:t,headline:m})=>a("div",{className:l("hidden-scroll flex items-center gap-4 overflow-x-auto",t?.tabs),children:o&&o.map((e,r)=>a("button",{"aria-label":e?.tabName,"data-layer-id":e?.dataLayers?.targetId,onClick:()=>i(r),onPointerDown:()=>p({name:e?.tabName,headline:m,placement:"switcher_content"}),className:l("mob-body-regular-m text-nowrap rounded-sm bg-color-blue-grey-100 px-3 py-1.5 text-color-secondary outline-1 outline-offset-4 outline-transparent desktop:desk-body-regular-l focus:outline-primary-focus desktop:px-4 desktop:py-3",{"bg-icon-primary-default text-color-white":n===r},t?.button),children:e?.tabName},e?.tabName))});export{u as Tabs};
2
2
  //# sourceMappingURL=Tabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sources":["../../../../../lib/widgets/usefulInfo/ui/Tabs.tsx"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { pushToDlTab } from '../../../shared/dataLayers'\nimport { type UsefulInfoTab } from '../model'\nimport { cn } from '$/shared/utils'\n\nexport type TabsClasses = {\n tabs?: string\n button?: string\n}\n\ntype TabsShortInfo = Pick<UsefulInfoTab, 'tabName' | 'dataLayers'> & {}\n\nexport interface TabsProps {\n tabsShortInfo?: TabsShortInfo[]\n activeTab?: number\n setActiveTab: Dispatch<SetStateAction<number>>\n classes?: TabsClasses\n headline: string\n}\n\nexport const Tabs = ({ tabsShortInfo, activeTab, setActiveTab, classes, headline }: TabsProps) => {\n return (\n <div className={cn('hidden-scroll flex items-center gap-4 overflow-x-auto', classes?.tabs)}>\n {tabsShortInfo &&\n tabsShortInfo.map((tab, tabIndex) => (\n <button\n aria-label={tab?.tabName}\n key={tab?.tabName}\n data-layer-id={tab?.dataLayers?.targetId}\n onClick={() => setActiveTab(tabIndex)}\n onPointerDown={() => pushToDlTab(tab?.tabName, headline, 'usefulInfo')}\n className={cn(\n 'mob-body-regular-m text-nowrap rounded-sm bg-color-blue-grey-100 px-3 py-1.5 text-color-secondary outline-1 outline-offset-4 outline-transparent desktop:desk-body-regular-l focus:outline-primary-focus desktop:px-4 desktop:py-3',\n {\n 'bg-icon-primary-default text-color-white': activeTab === tabIndex\n },\n classes?.button\n )}\n >\n {tab?.tabName}\n </button>\n ))}\n </div>\n )\n}\n"],"names":["Tabs","tabsShortInfo","activeTab","setActiveTab","classes","headline","jsx","cn","tab","tabIndex","pushToDlTab"],"mappings":"2JAoBO,MAAMA,EAAO,CAAC,CAAE,cAAAC,EAAe,UAAAC,EAAW,aAAAC,EAAc,QAAAC,EAAS,SAAAC,KAEpEC,EAAC,MAAA,CAAI,UAAWC,EAAG,wDAAyDH,GAAS,IAAI,EACtF,SAAAH,GACCA,EAAc,IAAI,CAACO,EAAKC,IACtBH,EAAC,SAAA,CACC,aAAYE,GAAK,QAEjB,gBAAeA,GAAK,YAAY,SAChC,QAAS,IAAML,EAAaM,CAAQ,EACpC,cAAe,IAAMC,EAAYF,GAAK,QAASH,EAAU,YAAY,EACrE,UAAWE,EACT,qOACA,CACE,2CAA4CL,IAAcO,CAAA,EAE5DL,GAAS,MAAA,EAGV,SAAAI,GAAK,OAAA,EAZDA,GAAK,OAAA,CAcb,EACL"}
1
+ {"version":3,"file":"Tabs.js","sources":["../../../../../lib/widgets/usefulInfo/ui/Tabs.tsx"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { pushToDlTab } from '../../../shared/dataLayers'\nimport { type UsefulInfoTab } from '../model'\nimport { cn } from '$/shared/utils'\n\nexport type TabsClasses = {\n tabs?: string\n button?: string\n}\n\ntype TabsShortInfo = Pick<UsefulInfoTab, 'tabName' | 'dataLayers'> & {}\n\nexport interface TabsProps {\n tabsShortInfo?: TabsShortInfo[]\n activeTab?: number\n setActiveTab: Dispatch<SetStateAction<number>>\n classes?: TabsClasses\n headline: string\n}\n\nexport const Tabs = ({ tabsShortInfo, activeTab, setActiveTab, classes, headline }: TabsProps) => {\n return (\n <div className={cn('hidden-scroll flex items-center gap-4 overflow-x-auto', classes?.tabs)}>\n {tabsShortInfo &&\n tabsShortInfo.map((tab, tabIndex) => (\n <button\n aria-label={tab?.tabName}\n key={tab?.tabName}\n data-layer-id={tab?.dataLayers?.targetId}\n onClick={() => setActiveTab(tabIndex)}\n onPointerDown={() => pushToDlTab({ name: tab?.tabName, headline, placement: 'switcher_content' })}\n className={cn(\n 'mob-body-regular-m text-nowrap rounded-sm bg-color-blue-grey-100 px-3 py-1.5 text-color-secondary outline-1 outline-offset-4 outline-transparent desktop:desk-body-regular-l focus:outline-primary-focus desktop:px-4 desktop:py-3',\n {\n 'bg-icon-primary-default text-color-white': activeTab === tabIndex\n },\n classes?.button\n )}\n >\n {tab?.tabName}\n </button>\n ))}\n </div>\n )\n}\n"],"names":["Tabs","tabsShortInfo","activeTab","setActiveTab","classes","headline","jsx","cn","tab","tabIndex","pushToDlTab"],"mappings":"2JAoBO,MAAMA,EAAO,CAAC,CAAE,cAAAC,EAAe,UAAAC,EAAW,aAAAC,EAAc,QAAAC,EAAS,SAAAC,KAEpEC,EAAC,MAAA,CAAI,UAAWC,EAAG,wDAAyDH,GAAS,IAAI,EACtF,SAAAH,GACCA,EAAc,IAAI,CAACO,EAAKC,IACtBH,EAAC,SAAA,CACC,aAAYE,GAAK,QAEjB,gBAAeA,GAAK,YAAY,SAChC,QAAS,IAAML,EAAaM,CAAQ,EACpC,cAAe,IAAMC,EAAY,CAAE,KAAMF,GAAK,QAAS,SAAAH,EAAU,UAAW,mBAAoB,EAChG,UAAWE,EACT,qOACA,CACE,2CAA4CL,IAAcO,CAAA,EAE5DL,GAAS,MAAA,EAGV,SAAAI,GAAK,OAAA,EAZDA,GAAK,OAAA,CAcb,EACL"}
@@ -1,2 +1,2 @@
1
- import{jsxs as h,jsx as e,Fragment as x}from"react/jsx-runtime";import{Document as u}from"./ui/document/Document.js";import{cn as l}from"../../../../../shared/utils/cn.js";import{Heading as f}from"../../../../../shared/ui/heading/Heading.js";import{Accordion as b}from"../../../../../shared/ui/accordion/Accordion.js";import{subEntityDL as D}from"../../../model/utils.js";const y=({docs:a,config:r,title:m,iconType:d,description:n,classes:o,accordionConfig:c,tabName:s})=>{const t=h("div",{className:l("flex max-w-[680px] flex-col",o?.wrapper),children:[m&&e(f,{as:"h4",className:"mb-4",children:m}),e("div",{className:l("flex flex-col gap-4",o?.documentsWrapper),children:a?.map(i=>e(u,{iconType:d,...i,classes:o?.singleDocument},i.label))}),n&&e("div",{className:l("mt-4",o?.description),dangerouslySetInnerHTML:{__html:n??""}})]}),p=()=>{D(r?.accordionTitle,s)};return e(x,{children:r&&r?.isAccordion&&r?.accordionTitle?e(b,{onClick:p,label:r?.accordionTitle,...c,children:c?.children||t}):t})};export{y as Documents};
1
+ import{jsxs as h,jsx as r,Fragment as x}from"react/jsx-runtime";import{Document as u}from"./ui/document/Document.js";import{cn as n}from"../../../../../shared/utils/cn.js";import{Heading as f}from"../../../../../shared/ui/heading/Heading.js";import{Accordion as D}from"../../../../../shared/ui/accordion/Accordion.js";import{subEntityDL as T}from"../../../model/utils.js";const A=({docs:d,config:e,title:l,iconType:s,description:m,classes:o,accordionConfig:t,tabName:c})=>{const i=h("div",{className:n("flex max-w-[680px] flex-col",o?.wrapper),children:[l&&r(f,{as:"h4",className:"mb-4",children:l}),r("div",{className:n("flex flex-col gap-4",o?.documentsWrapper),children:d?.map(a=>r(u,{tabName:c,iconType:s,...a,classes:o?.singleDocument},a.label))}),m&&r("div",{className:n("mt-4",o?.description),dangerouslySetInnerHTML:{__html:m??""}})]}),p=()=>{T(e?.accordionTitle,c)};return r(x,{children:e&&e?.isAccordion&&e?.accordionTitle?r(D,{onPointerDown:p,label:e?.accordionTitle,...t,children:t?.children||i}):i})};export{A as Documents};
2
2
  //# sourceMappingURL=Documents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Documents.js","sources":["../../../../../../../lib/widgets/usefulInfo/ui/subEntities/documents/Documents.tsx"],"sourcesContent":["import { Accordion, Heading } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\nimport {\n type EntitiesAccordionsConfig,\n type SubEntityDetailsCommon,\n type SubEntityDetailsConfig,\n subEntityDL\n} from '$/widgets/usefulInfo/model'\nimport { Document, type DocumentClasses } from '$/widgets/usefulInfo/ui/subEntities/documents/ui/document'\n\nexport type EntityDocumentsClasses = {\n wrapper?: string\n headline?: string\n documentsWrapper?: string\n description?: string\n singleDocument?: DocumentClasses\n}\n\nexport type EntityDocumentsProps = SubEntityDetailsCommon & {\n iconType: 'documentOutline' | 'documentFilled'\n title?: string\n description?: string\n docs: {\n url: string\n size: string\n label: string\n }[]\n config?: SubEntityDetailsConfig\n classes?: EntityDocumentsClasses\n accordionConfig?: EntitiesAccordionsConfig['documentAccordion']\n}\n\nexport const Documents = ({\n docs,\n config,\n title,\n iconType,\n description,\n classes,\n accordionConfig,\n tabName\n}: EntityDocumentsProps) => {\n const content = (\n <div className={cn('flex max-w-[680px] flex-col', classes?.wrapper)}>\n {title && (\n <Heading as='h4' className='mb-4'>\n {title}\n </Heading>\n )}\n <div className={cn('flex flex-col gap-4', classes?.documentsWrapper)}>\n {docs?.map((doc) => (\n <Document iconType={iconType} key={doc.label} {...doc} classes={classes?.singleDocument} />\n ))}\n </div>\n\n {description && (\n <div className={cn('mt-4', classes?.description)} dangerouslySetInnerHTML={{ __html: description ?? '' }} />\n )}\n </div>\n )\n\n const handleClick = () => {\n subEntityDL(config?.accordionTitle, tabName)\n }\n\n return (\n <>\n {config && config?.isAccordion && config?.accordionTitle ? (\n <Accordion onClick={handleClick} label={config?.accordionTitle} {...accordionConfig}>\n {accordionConfig?.children || content}\n </Accordion>\n ) : (\n content\n )}\n </>\n )\n}\n"],"names":["Documents","docs","config","title","iconType","description","classes","accordionConfig","tabName","content","cn","Heading","jsx","doc","Document","handleClick","subEntityDL","Accordion"],"mappings":"oXAgCO,MAAMA,EAAY,CAAC,CACxB,KAAAC,EACA,OAAAC,EACA,MAAAC,EACA,SAAAC,EACA,YAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,QAAAC,CACF,IAA4B,CAC1B,MAAMC,IACH,MAAA,CAAI,UAAWC,EAAG,8BAA+BJ,GAAS,OAAO,EAC/D,SAAA,CAAAH,KACEQ,EAAA,CAAQ,GAAG,KAAK,UAAU,OACxB,SAAAR,EACH,EAEFS,EAAC,OAAI,UAAWF,EAAG,sBAAuBJ,GAAS,gBAAgB,EAChE,SAAAL,GAAM,IAAKY,GACVD,EAACE,EAAA,CAAS,SAAAV,EAAqC,GAAGS,EAAK,QAASP,GAAS,gBAAtCO,EAAI,KAAkD,CAC1F,CAAA,CACH,EAECR,GACCO,EAAC,MAAA,CAAI,UAAWF,EAAG,OAAQJ,GAAS,WAAW,EAAG,wBAAyB,CAAE,OAAQD,GAAe,GAAG,CAAG,CAAA,EAE9G,EAGIU,EAAc,IAAM,CACxBC,EAAYd,GAAQ,eAAgBM,CAAO,CAC7C,EAEA,YAEK,SAAAN,GAAUA,GAAQ,aAAeA,GAAQ,iBACvCe,EAAA,CAAU,QAASF,EAAa,MAAOb,GAAQ,eAAiB,GAAGK,EACjE,YAAiB,UAAYE,EAChC,EAEAA,CAAA,CAEJ,CAEJ"}
1
+ {"version":3,"file":"Documents.js","sources":["../../../../../../../lib/widgets/usefulInfo/ui/subEntities/documents/Documents.tsx"],"sourcesContent":["import { Accordion, Heading } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\nimport {\n type EntitiesAccordionsConfig,\n type SubEntityDetailsCommon,\n type SubEntityDetailsConfig,\n subEntityDL\n} from '$/widgets/usefulInfo/model'\nimport { Document, type DocumentClasses } from '$/widgets/usefulInfo/ui/subEntities/documents/ui/document'\n\nexport type EntityDocumentsClasses = {\n wrapper?: string\n headline?: string\n documentsWrapper?: string\n description?: string\n singleDocument?: DocumentClasses\n}\n\nexport type EntityDocumentsProps = SubEntityDetailsCommon & {\n iconType: 'documentOutline' | 'documentFilled'\n title?: string\n description?: string\n docs: {\n url: string\n size: string\n label: string\n }[]\n config?: SubEntityDetailsConfig\n classes?: EntityDocumentsClasses\n accordionConfig?: EntitiesAccordionsConfig['documentAccordion']\n}\n\nexport const Documents = ({\n docs,\n config,\n title,\n iconType,\n description,\n classes,\n accordionConfig,\n tabName\n}: EntityDocumentsProps) => {\n const content = (\n <div className={cn('flex max-w-[680px] flex-col', classes?.wrapper)}>\n {title && (\n <Heading as='h4' className='mb-4'>\n {title}\n </Heading>\n )}\n <div className={cn('flex flex-col gap-4', classes?.documentsWrapper)}>\n {docs?.map((doc) => (\n <Document tabName={tabName} iconType={iconType} key={doc.label} {...doc} classes={classes?.singleDocument} />\n ))}\n </div>\n\n {description && (\n <div className={cn('mt-4', classes?.description)} dangerouslySetInnerHTML={{ __html: description ?? '' }} />\n )}\n </div>\n )\n\n const handleClick = () => {\n subEntityDL(config?.accordionTitle, tabName)\n }\n\n return (\n <>\n {config && config?.isAccordion && config?.accordionTitle ? (\n <Accordion onPointerDown={handleClick} label={config?.accordionTitle} {...accordionConfig}>\n {accordionConfig?.children || content}\n </Accordion>\n ) : (\n content\n )}\n </>\n )\n}\n"],"names":["Documents","docs","config","title","iconType","description","classes","accordionConfig","tabName","content","cn","Heading","jsx","doc","Document","handleClick","subEntityDL","Accordion"],"mappings":"oXAgCO,MAAMA,EAAY,CAAC,CACxB,KAAAC,EACA,OAAAC,EACA,MAAAC,EACA,SAAAC,EACA,YAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,QAAAC,CACF,IAA4B,CAC1B,MAAMC,IACH,MAAA,CAAI,UAAWC,EAAG,8BAA+BJ,GAAS,OAAO,EAC/D,SAAA,CAAAH,KACEQ,EAAA,CAAQ,GAAG,KAAK,UAAU,OACxB,SAAAR,EACH,EAEFS,EAAC,MAAA,CAAI,UAAWF,EAAG,sBAAuBJ,GAAS,gBAAgB,EAChE,SAAAL,GAAM,IAAKY,KACTC,EAAA,CAAS,QAAAN,EAAkB,SAAAJ,EAAqC,GAAGS,EAAK,QAASP,GAAS,cAAA,EAAtCO,EAAI,KAAkD,CAC5G,CAAA,CACH,EAECR,GACCO,EAAC,MAAA,CAAI,UAAWF,EAAG,OAAQJ,GAAS,WAAW,EAAG,wBAAyB,CAAE,OAAQD,GAAe,GAAG,CAAG,CAAA,EAE9G,EAGIU,EAAc,IAAM,CACxBC,EAAYd,GAAQ,eAAgBM,CAAO,CAC7C,EAEA,YAEK,SAAAN,GAAUA,GAAQ,aAAeA,GAAQ,iBACvCe,EAAA,CAAU,cAAeF,EAAa,MAAOb,GAAQ,eAAiB,GAAGK,EACvE,YAAiB,UAAYE,EAChC,EAEAA,CAAA,CAEJ,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{jsxs as o,jsx as l}from"react/jsx-runtime";import{iconsMap as m,iconConfig as c}from"./model/utils.js";import{cn as e}from"../../../../../../../shared/utils/cn.js";import{Icon as d}from"../../../../../../../shared/ui/icon/Icon.js";const x=({label:t,size:i,url:a,iconType:n,classes:r})=>o("a",{href:a,target:"_blank",rel:"noreferrer",tabIndex:0,className:e("group flex w-full cursor-pointer items-center gap-2 rounded-sm p-1 outline outline-2 outline-transparent transition-colors",r?.link),children:[l(d,{name:m[n],className:e(c({iconType:n}),r?.icon)}),o("div",{className:e("flex flex-1 flex-col",r?.wrapper),children:[l("p",{className:e("desk-body-medium-l text-color-dark",r?.label),children:t}),o("div",{className:e("desk-body-regular-m text-color-disabled",r?.size),children:[Number(i)," КБ"]})]})]});export{x as Document};
1
+ import{jsxs as o,jsx as i}from"react/jsx-runtime";import{iconsMap as c,iconConfig as d}from"./model/utils.js";import{cn as r}from"../../../../../../../shared/utils/cn.js";import{Icon as p}from"../../../../../../../shared/ui/icon/Icon.js";import{pushToDlLink as s}from"../../../../../../../shared/dataLayers/utils.js";const h=({label:n,size:l,url:m,iconType:t,classes:e,tabName:a})=>o("a",{onPointerDown:()=>s({name:n,placement:"switcher_content",eventCategory:"click_block",link:a}),href:m,target:"_blank",rel:"noreferrer",tabIndex:0,className:r("group flex w-full cursor-pointer items-center gap-2 rounded-sm p-1 outline outline-2 outline-transparent transition-colors",e?.link),children:[i(p,{name:c[t],className:r(d({iconType:t}),e?.icon)}),o("div",{className:r("flex flex-1 flex-col",e?.wrapper),children:[i("p",{className:r("desk-body-medium-l text-color-dark",e?.label),children:n}),o("div",{className:r("desk-body-regular-m text-color-disabled",e?.size),children:[Number(l)," КБ"]})]})]});export{h as Document};
2
2
  //# sourceMappingURL=Document.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Document.js","sources":["../../../../../../../../../lib/widgets/usefulInfo/ui/subEntities/documents/ui/document/Document.tsx"],"sourcesContent":["import { iconConfig, type IconNames, iconsMap } from './model/utils'\nimport { Icon } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport type DocumentClasses = {\n link?: string\n icon?: string\n wrapper?: string\n label?: string\n size?: string\n}\n\nexport interface DocumentProps {\n label: string\n size: string\n url: string\n iconType: IconNames\n classes?: DocumentClasses\n}\n\nexport const Document = ({ label, size, url, iconType, classes }: DocumentProps) => {\n return (\n <a\n href={url}\n target='_blank'\n rel='noreferrer'\n tabIndex={0}\n className={cn(\n 'group flex w-full cursor-pointer items-center gap-2 rounded-sm p-1 outline outline-2 outline-transparent transition-colors',\n classes?.link\n )}\n >\n <Icon name={iconsMap[iconType]} className={cn(iconConfig({ iconType }), classes?.icon)} />\n <div className={cn('flex flex-1 flex-col', classes?.wrapper)}>\n <p className={cn('desk-body-medium-l text-color-dark', classes?.label)}>{label}</p>\n <div className={cn('desk-body-regular-m text-color-disabled', classes?.size)}>{Number(size)} КБ</div>\n </div>\n </a>\n )\n}\n"],"names":["Document","label","size","url","iconType","classes","jsxs","cn","jsx","Icon","iconsMap","iconConfig"],"mappings":"8OAoBO,MAAMA,EAAW,CAAC,CAAE,MAAAC,EAAO,KAAAC,EAAM,IAAAC,EAAK,SAAAC,EAAU,QAAAC,KAEnDC,EAAC,IAAA,CACC,KAAMH,EACN,OAAO,SACP,IAAI,aACJ,SAAU,EACV,UAAWI,EACT,6HACAF,GAAS,IAAA,EAGX,SAAA,CAAAG,EAACC,EAAA,CAAK,KAAMC,EAASN,CAAQ,EAAG,UAAWG,EAAGI,EAAW,CAAE,SAAAP,CAAA,CAAU,EAAGC,GAAS,IAAI,CAAA,CAAG,IACvF,MAAA,CAAI,UAAWE,EAAG,uBAAwBF,GAAS,OAAO,EACzD,SAAA,CAAAG,EAAC,KAAE,UAAWD,EAAG,qCAAsCF,GAAS,KAAK,EAAI,SAAAJ,EAAM,IAC9E,MAAA,CAAI,UAAWM,EAAG,0CAA2CF,GAAS,IAAI,EAAI,SAAA,CAAA,OAAOH,CAAI,EAAE,KAAA,CAAA,CAAG,CAAA,CAAA,CACjG,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Document.js","sources":["../../../../../../../../../lib/widgets/usefulInfo/ui/subEntities/documents/ui/document/Document.tsx"],"sourcesContent":["import { pushToDlLink } from '../../../../../../../shared/dataLayers'\nimport { iconConfig, type IconNames, iconsMap } from './model/utils'\nimport { Icon } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport type DocumentClasses = {\n link?: string\n icon?: string\n wrapper?: string\n label?: string\n size?: string\n}\n\nexport interface DocumentProps {\n label: string\n size: string\n url: string\n iconType: IconNames\n classes?: DocumentClasses\n tabName?: string\n}\n\nexport const Document = ({ label, size, url, iconType, classes, tabName }: DocumentProps) => {\n return (\n <a\n onPointerDown={() =>\n pushToDlLink({\n name: label,\n placement: 'switcher_content',\n eventCategory: 'click_block',\n link: tabName\n })\n }\n href={url}\n target='_blank'\n rel='noreferrer'\n tabIndex={0}\n className={cn(\n 'group flex w-full cursor-pointer items-center gap-2 rounded-sm p-1 outline outline-2 outline-transparent transition-colors',\n classes?.link\n )}\n >\n <Icon name={iconsMap[iconType]} className={cn(iconConfig({ iconType }), classes?.icon)} />\n <div className={cn('flex flex-1 flex-col', classes?.wrapper)}>\n <p className={cn('desk-body-medium-l text-color-dark', classes?.label)}>{label}</p>\n <div className={cn('desk-body-regular-m text-color-disabled', classes?.size)}>{Number(size)} КБ</div>\n </div>\n </a>\n )\n}\n"],"names":["Document","label","size","url","iconType","classes","tabName","jsxs","pushToDlLink","cn","jsx","Icon","iconsMap","iconConfig"],"mappings":"6TAsBO,MAAMA,EAAW,CAAC,CAAE,MAAAC,EAAO,KAAAC,EAAM,IAAAC,EAAK,SAAAC,EAAU,QAAAC,EAAS,QAAAC,KAE5DC,EAAC,IAAA,CACC,cAAe,IACbC,EAAa,CACX,KAAMP,EACN,UAAW,mBACX,cAAe,cACf,KAAMK,CAAA,CACP,EAEH,KAAMH,EACN,OAAO,SACP,IAAI,aACJ,SAAU,EACV,UAAWM,EACT,6HACAJ,GAAS,IAAA,EAGX,SAAA,CAAAK,EAACC,EAAA,CAAK,KAAMC,EAASR,CAAQ,EAAG,UAAWK,EAAGI,EAAW,CAAE,SAAAT,CAAA,CAAU,EAAGC,GAAS,IAAI,CAAA,CAAG,IACvF,MAAA,CAAI,UAAWI,EAAG,uBAAwBJ,GAAS,OAAO,EACzD,SAAA,CAAAK,EAAC,KAAE,UAAWD,EAAG,qCAAsCJ,GAAS,KAAK,EAAI,SAAAJ,EAAM,IAC9E,MAAA,CAAI,UAAWQ,EAAG,0CAA2CJ,GAAS,IAAI,EAAI,SAAA,CAAA,OAAOH,CAAI,EAAE,KAAA,CAAA,CAAG,CAAA,CAAA,CACjG,CAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- import{jsxs as p,jsx as e,Fragment as s}from"react/jsx-runtime";import{cn as i}from"../../../../../shared/utils/cn.js";import{ExpertCard as x}from"./ui/ExpertCard.js";import{Heading as h}from"../../../../../shared/ui/heading/Heading.js";import{Accordion as f}from"../../../../../shared/ui/accordion/Accordion.js";import{subEntityDL as C}from"../../../model/utils.js";const u=({expertsList:m,classes:o,accordionConfig:l,config:r,headline:t,tabName:a})=>{const c=p("div",{className:i("flex flex-col gap-4",o?.root),children:[t&&e(h,{className:i(o?.headline),as:"h4",children:t}),e("div",{className:i("flex flex-col gap-6",o?.wrapper),children:m?.map(n=>e(x,{classes:o?.singleCard,...n},n.name))})]}),d=()=>{C(r?.accordionTitle,a)};return e(s,{children:r&&r?.isAccordion&&r?.accordionTitle?e(f,{onClick:d,label:r?.accordionTitle,...l,children:l?.children??c}):c})};export{u as Experts};
1
+ import{jsxs as p,jsx as e,Fragment as s}from"react/jsx-runtime";import{cn as t}from"../../../../../shared/utils/cn.js";import{ExpertCard as x}from"./ui/ExpertCard.js";import{Heading as h}from"../../../../../shared/ui/heading/Heading.js";import{Accordion as f}from"../../../../../shared/ui/accordion/Accordion.js";import{subEntityDL as E}from"../../../model/utils.js";const w=({expertsList:m,classes:o,accordionConfig:i,config:r,headline:l,tabName:a})=>{const n=p("div",{className:t("flex flex-col gap-4",o?.root),children:[l&&e(h,{className:t(o?.headline),as:"h4",children:l}),e("div",{className:t("flex flex-col gap-6",o?.wrapper),children:m?.map(c=>e(x,{classes:o?.singleCard,...c},c.name))})]}),d=()=>{E(r?.accordionTitle,a)};return e(s,{children:r&&r?.isAccordion&&r?.accordionTitle?e(f,{onPointerDown:d,label:r?.accordionTitle,...i,children:i?.children??n}):n})};export{w as Experts};
2
2
  //# sourceMappingURL=Experts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Experts.js","sources":["../../../../../../../lib/widgets/usefulInfo/ui/subEntities/experts/Experts.tsx"],"sourcesContent":["import { Accordion, Heading } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\nimport {\n type EntitiesAccordionsConfig,\n type SubEntityDetailsCommon,\n type SubEntityDetailsConfig,\n subEntityDL\n} from '$/widgets/usefulInfo/model'\nimport { ExpertCard, type ExpertCardClasses, type ExpertCardProps } from '$/widgets/usefulInfo/ui/subEntities/experts/ui'\n\nexport type EntityExpertsClasses = {\n root?: string\n headline?: string\n wrapper?: string\n singleCard?: ExpertCardClasses\n}\n\nexport type EntityExpertsProps = SubEntityDetailsCommon & {\n headline?: string\n expertsList: ExpertCardProps[]\n config?: SubEntityDetailsConfig\n classes?: EntityExpertsClasses\n accordionConfig?: EntitiesAccordionsConfig['expertsAccordion']\n}\n\nexport const Experts = ({ expertsList, classes, accordionConfig, config, headline, tabName }: EntityExpertsProps) => {\n const content = (\n <div className={cn('flex flex-col gap-4', classes?.root)}>\n {headline && (\n <Heading className={cn(classes?.headline)} as='h4'>\n {headline}\n </Heading>\n )}\n <div className={cn('flex flex-col gap-6', classes?.wrapper)}>\n {expertsList?.map((card) => (\n <ExpertCard key={card.name} classes={classes?.singleCard} {...card} />\n ))}\n </div>\n </div>\n )\n\n const handleClick = () => {\n subEntityDL(config?.accordionTitle, tabName)\n }\n\n return (\n <>\n {config && config?.isAccordion && config?.accordionTitle ? (\n <Accordion onClick={handleClick} label={config?.accordionTitle} {...accordionConfig}>\n {accordionConfig?.children ?? content}\n </Accordion>\n ) : (\n content\n )}\n </>\n )\n}\n"],"names":["Experts","expertsList","classes","accordionConfig","config","headline","tabName","content","cn","jsx","Heading","card","ExpertCard","handleClick","subEntityDL","Accordion"],"mappings":"+WAyBO,MAAMA,EAAU,CAAC,CAAE,YAAAC,EAAa,QAAAC,EAAS,gBAAAC,EAAiB,OAAAC,EAAQ,SAAAC,EAAU,QAAAC,KAAkC,CACnH,MAAMC,IACH,MAAA,CAAI,UAAWC,EAAG,sBAAuBN,GAAS,IAAI,EACpD,SAAA,CAAAG,GACCI,EAACC,GAAQ,UAAWF,EAAGN,GAAS,QAAQ,EAAG,GAAG,KAC3C,SAAAG,CAAA,CACH,EAEFI,EAAC,OAAI,UAAWD,EAAG,sBAAuBN,GAAS,OAAO,EACvD,SAAAD,GAAa,IAAKU,GACjBF,EAACG,EAAA,CAA2B,QAASV,GAAS,WAAa,GAAGS,CAAA,EAA7CA,EAAK,IAA8C,CACrE,CAAA,CACH,CAAA,EACF,EAGIE,EAAc,IAAM,CACxBC,EAAYV,GAAQ,eAAgBE,CAAO,CAC7C,EAEA,YAEK,SAAAF,GAAUA,GAAQ,aAAeA,GAAQ,iBACvCW,EAAA,CAAU,QAASF,EAAa,MAAOT,GAAQ,eAAiB,GAAGD,EACjE,YAAiB,UAAYI,EAChC,EAEAA,CAAA,CAEJ,CAEJ"}
1
+ {"version":3,"file":"Experts.js","sources":["../../../../../../../lib/widgets/usefulInfo/ui/subEntities/experts/Experts.tsx"],"sourcesContent":["import { Accordion, Heading } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\nimport {\n type EntitiesAccordionsConfig,\n type SubEntityDetailsCommon,\n type SubEntityDetailsConfig,\n subEntityDL\n} from '$/widgets/usefulInfo/model'\nimport { ExpertCard, type ExpertCardClasses, type ExpertCardProps } from '$/widgets/usefulInfo/ui/subEntities/experts/ui'\n\nexport type EntityExpertsClasses = {\n root?: string\n headline?: string\n wrapper?: string\n singleCard?: ExpertCardClasses\n}\n\nexport type EntityExpertsProps = SubEntityDetailsCommon & {\n headline?: string\n expertsList: ExpertCardProps[]\n config?: SubEntityDetailsConfig\n classes?: EntityExpertsClasses\n accordionConfig?: EntitiesAccordionsConfig['expertsAccordion']\n}\n\nexport const Experts = ({ expertsList, classes, accordionConfig, config, headline, tabName }: EntityExpertsProps) => {\n const content = (\n <div className={cn('flex flex-col gap-4', classes?.root)}>\n {headline && (\n <Heading className={cn(classes?.headline)} as='h4'>\n {headline}\n </Heading>\n )}\n <div className={cn('flex flex-col gap-6', classes?.wrapper)}>\n {expertsList?.map((card) => (\n <ExpertCard key={card.name} classes={classes?.singleCard} {...card} />\n ))}\n </div>\n </div>\n )\n\n const handleClick = () => {\n subEntityDL(config?.accordionTitle, tabName)\n }\n\n return (\n <>\n {config && config?.isAccordion && config?.accordionTitle ? (\n <Accordion onPointerDown={handleClick} label={config?.accordionTitle} {...accordionConfig}>\n {accordionConfig?.children ?? content}\n </Accordion>\n ) : (\n content\n )}\n </>\n )\n}\n"],"names":["Experts","expertsList","classes","accordionConfig","config","headline","tabName","content","cn","jsx","Heading","card","ExpertCard","handleClick","subEntityDL","Accordion"],"mappings":"+WAyBO,MAAMA,EAAU,CAAC,CAAE,YAAAC,EAAa,QAAAC,EAAS,gBAAAC,EAAiB,OAAAC,EAAQ,SAAAC,EAAU,QAAAC,KAAkC,CACnH,MAAMC,IACH,MAAA,CAAI,UAAWC,EAAG,sBAAuBN,GAAS,IAAI,EACpD,SAAA,CAAAG,GACCI,EAACC,GAAQ,UAAWF,EAAGN,GAAS,QAAQ,EAAG,GAAG,KAC3C,SAAAG,CAAA,CACH,EAEFI,EAAC,OAAI,UAAWD,EAAG,sBAAuBN,GAAS,OAAO,EACvD,SAAAD,GAAa,IAAKU,GACjBF,EAACG,EAAA,CAA2B,QAASV,GAAS,WAAa,GAAGS,CAAA,EAA7CA,EAAK,IAA8C,CACrE,CAAA,CACH,CAAA,EACF,EAGIE,EAAc,IAAM,CACxBC,EAAYV,GAAQ,eAAgBE,CAAO,CAC7C,EAEA,YAEK,SAAAF,GAAUA,GAAQ,aAAeA,GAAQ,iBACvCW,EAAA,CAAU,cAAeF,EAAa,MAAOT,GAAQ,eAAiB,GAAGD,EACvE,YAAiB,UAAYI,EAChC,EAEAA,CAAA,CAEJ,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{jsx as r,Fragment as m}from"react/jsx-runtime";import{cn as d}from"../../../../../shared/utils/cn.js";import{subEntityDL as a}from"../../../model/utils.js";import{Accordion as h}from"../../../../../shared/ui/accordion/Accordion.js";const T=({html:o,config:t,classes:l,accordionConfig:n,tabName:i})=>{const e=r("div",{className:d("leading-none max-w-[656px] [&_h2]:pb-2 [&_h2]:pt-4 [&_h2]:leading-[1]",l?.html),dangerouslySetInnerHTML:{__html:o??""}}),c=()=>{a(t?.accordionTitle,i)};return r(m,{children:t&&t?.isAccordion&&t?.accordionTitle?r(h,{onClick:c,label:t?.accordionTitle,...n,children:n?.children??e}):e})};export{T as Html};
1
+ import{jsx as n,Fragment as m}from"react/jsx-runtime";import{cn as d}from"../../../../../shared/utils/cn.js";import{subEntityDL as a}from"../../../model/utils.js";import{Accordion as h}from"../../../../../shared/ui/accordion/Accordion.js";const T=({html:e,config:t,classes:l,accordionConfig:r,tabName:i})=>{const o=n("div",{className:d("leading-none max-w-[656px] [&_h2]:pb-2 [&_h2]:pt-4 [&_h2]:leading-[1]",l?.html),dangerouslySetInnerHTML:{__html:e??""}}),c=()=>{a(t?.accordionTitle,i)};return n(m,{children:t&&t?.isAccordion&&t?.accordionTitle?n(h,{onPointerDown:c,label:t?.accordionTitle,...r,children:r?.children??o}):o})};export{T as Html};
2
2
  //# sourceMappingURL=Html.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Html.js","sources":["../../../../../../../lib/widgets/usefulInfo/ui/subEntities/html/Html.tsx"],"sourcesContent":["import { Accordion } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\nimport {\n type EntitiesAccordionsConfig,\n type SubEntityDetailsCommon,\n type SubEntityDetailsConfig,\n subEntityDL\n} from '$/widgets/usefulInfo/model'\n\nexport type EntityHtmlClasses = {\n html?: string\n}\n\nexport type EntityHtmlProps = SubEntityDetailsCommon & {\n html: string\n config?: SubEntityDetailsConfig\n classes?: EntityHtmlClasses\n accordionConfig?: EntitiesAccordionsConfig['htmlAccordion']\n}\n\nexport const Html = ({ html, config, classes, accordionConfig, tabName }: EntityHtmlProps) => {\n const content = (\n <div\n className={cn('leading-none max-w-[656px] [&_h2]:pb-2 [&_h2]:pt-4 [&_h2]:leading-[1]', classes?.html)}\n dangerouslySetInnerHTML={{ __html: html ?? '' }}\n />\n )\n\n const handleClick = () => {\n subEntityDL(config?.accordionTitle, tabName)\n }\n\n return (\n <>\n {config && config?.isAccordion && config?.accordionTitle ? (\n <Accordion onClick={handleClick} label={config?.accordionTitle} {...accordionConfig}>\n {accordionConfig?.children ?? content}\n </Accordion>\n ) : (\n content\n )}\n </>\n )\n}\n"],"names":["Html","html","config","classes","accordionConfig","tabName","content","jsx","cn","handleClick","subEntityDL","Accordion"],"mappings":"+OAoBO,MAAMA,EAAO,CAAC,CAAE,KAAAC,EAAM,OAAAC,EAAQ,QAAAC,EAAS,gBAAAC,EAAiB,QAAAC,KAA+B,CAC5F,MAAMC,EACJC,EAAC,MAAA,CACC,UAAWC,EAAG,wEAAyEL,GAAS,IAAI,EACpG,wBAAyB,CAAE,OAAQF,GAAQ,EAAA,CAAG,CAAA,EAI5CQ,EAAc,IAAM,CACxBC,EAAYR,GAAQ,eAAgBG,CAAO,CAC7C,EAEA,YAEK,SAAAH,GAAUA,GAAQ,aAAeA,GAAQ,iBACvCS,EAAA,CAAU,QAASF,EAAa,MAAOP,GAAQ,eAAiB,GAAGE,EACjE,YAAiB,UAAYE,EAChC,EAEAA,CAAA,CAEJ,CAEJ"}
1
+ {"version":3,"file":"Html.js","sources":["../../../../../../../lib/widgets/usefulInfo/ui/subEntities/html/Html.tsx"],"sourcesContent":["import { Accordion } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\nimport {\n type EntitiesAccordionsConfig,\n type SubEntityDetailsCommon,\n type SubEntityDetailsConfig,\n subEntityDL\n} from '$/widgets/usefulInfo/model'\n\nexport type EntityHtmlClasses = {\n html?: string\n}\n\nexport type EntityHtmlProps = SubEntityDetailsCommon & {\n html: string\n config?: SubEntityDetailsConfig\n classes?: EntityHtmlClasses\n accordionConfig?: EntitiesAccordionsConfig['htmlAccordion']\n}\n\nexport const Html = ({ html, config, classes, accordionConfig, tabName }: EntityHtmlProps) => {\n const content = (\n <div\n className={cn('leading-none max-w-[656px] [&_h2]:pb-2 [&_h2]:pt-4 [&_h2]:leading-[1]', classes?.html)}\n dangerouslySetInnerHTML={{ __html: html ?? '' }}\n />\n )\n\n const handleClick = () => {\n subEntityDL(config?.accordionTitle, tabName)\n }\n\n return (\n <>\n {config && config?.isAccordion && config?.accordionTitle ? (\n <Accordion onPointerDown={handleClick} label={config?.accordionTitle} {...accordionConfig}>\n {accordionConfig?.children ?? content}\n </Accordion>\n ) : (\n content\n )}\n </>\n )\n}\n"],"names":["Html","html","config","classes","accordionConfig","tabName","content","jsx","cn","handleClick","subEntityDL","Accordion"],"mappings":"+OAoBO,MAAMA,EAAO,CAAC,CAAE,KAAAC,EAAM,OAAAC,EAAQ,QAAAC,EAAS,gBAAAC,EAAiB,QAAAC,KAA+B,CAC5F,MAAMC,EACJC,EAAC,MAAA,CACC,UAAWC,EAAG,wEAAyEL,GAAS,IAAI,EACpG,wBAAyB,CAAE,OAAQF,GAAQ,EAAA,CAAG,CAAA,EAI5CQ,EAAc,IAAM,CACxBC,EAAYR,GAAQ,eAAgBG,CAAO,CAC7C,EAEA,YAEK,SAAAH,GAAUA,GAAQ,aAAeA,GAAQ,iBACvCS,EAAA,CAAU,cAAeF,EAAa,MAAOP,GAAQ,eAAiB,GAAGE,EACvE,YAAiB,UAAYE,EAChC,EAEAA,CAAA,CAEJ,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{jsxs as b,jsx as e,Fragment as T}from"react/jsx-runtime";import{tableConfig as k}from"./model/utils.js";import{TableBody as y}from"./ui/TableBody.js";import{cn as t}from"../../../../../shared/utils/cn.js";import{Heading as f}from"../../../../../shared/ui/heading/Heading.js";import{Accordion as u}from"../../../../../shared/ui/accordion/Accordion.js";import{subEntityDL as x}from"../../../model/utils.js";const _=({tableVariant:a,description:m,columnsVariant:i,config:r,rows:c,title:d,headings:p,accordionConfig:l,classes:o,tabName:s})=>{const n=b("div",{className:t(k({columnsVariant:i}),o?.wrapper),children:[d&&e(f,{as:"h4",className:t("mb-4 desktop:mb-6",o?.headline),children:d}),e(y,{tableVariant:a,rows:c,headings:p,columnsVariant:i}),m&&e("div",{className:t("mt-4 [&&]:desk-body-regular-m desktop:mt-6",o?.description),dangerouslySetInnerHTML:{__html:m??""}})]}),h=()=>{x(r?.accordionTitle,s)};return e(T,{children:r&&r?.isAccordion&&r?.accordionTitle?e(u,{onClick:h,label:r?.accordionTitle,...l,children:l?.children||n}):n})};export{_ as Table};
1
+ import{jsxs as T,jsx as r,Fragment as b}from"react/jsx-runtime";import{tableConfig as k}from"./model/utils.js";import{TableBody as u}from"./ui/TableBody.js";import{cn as t}from"../../../../../shared/utils/cn.js";import{Heading as y}from"../../../../../shared/ui/heading/Heading.js";import{Accordion as f}from"../../../../../shared/ui/accordion/Accordion.js";import{pushToDlAccordion as w}from"../../../../../shared/dataLayers/utils.js";import{subEntityDL as x}from"../../../model/utils.js";const N=({tableVariant:a,description:n,columnsVariant:i,config:o,rows:p,title:m,headings:s,accordionConfig:c,classes:e,tabName:d})=>{const l=T("div",{className:t(k({columnsVariant:i}),e?.wrapper),children:[m&&r(y,{as:"h4",className:t("mb-4 desktop:mb-6",e?.headline),children:m}),r(u,{tableVariant:a,rows:p,headings:s,columnsVariant:i}),n&&r("div",{className:t("mt-4 [&&]:desk-body-regular-m desktop:mt-6",e?.description),dangerouslySetInnerHTML:{__html:n??""}})]}),h=()=>{x(o?.accordionTitle,d)};return r(b,{children:o&&o?.isAccordion&&o?.accordionTitle?r(f,{onClick:h,onPointerDown:()=>w({tabName:d,placement:"switcher_content",name:o?.accordionTitle}),label:o?.accordionTitle,...c,children:c?.children||l}):l})};export{N as Table};
2
2
  //# sourceMappingURL=Table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sources":["../../../../../../../lib/widgets/usefulInfo/ui/subEntities/table/Table.tsx"],"sourcesContent":["import { Accordion, Heading } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\nimport {\n type EntitiesAccordionsConfig,\n type SubEntityDetailsCommon,\n type SubEntityDetailsConfig,\n subEntityDL\n} from '$/widgets/usefulInfo/model'\nimport { tableConfig } from '$/widgets/usefulInfo/ui/subEntities/table/model/utils'\nimport { TableBody, type TableBodyClasses } from '$/widgets/usefulInfo/ui/subEntities/table/ui/TableBody'\n\nexport type EntityTableClasses = {\n wrapper?: string\n headline?: string\n description?: string\n tableBody?: TableBodyClasses\n}\n\nexport type TableCell = {\n cell: string\n cellId: string\n}\n\nexport type TableRow = {\n row: TableCell[]\n rowId: string\n}\n\nexport type TableHeading = {\n heading: string\n headingId: string\n}\n\nexport type EntityTableProps = SubEntityDetailsCommon & {\n title?: string\n description?: string\n columnsVariant: 'twoCols' | 'threeCols'\n tableVariant: 'separator' | 'filled'\n headings?: TableHeading[]\n rows: TableRow[]\n config?: SubEntityDetailsConfig\n classes?: EntityTableClasses\n accordionConfig?: EntitiesAccordionsConfig['documentAccordion']\n}\n\nexport const Table = ({\n tableVariant,\n description,\n columnsVariant,\n config,\n rows,\n title,\n headings,\n accordionConfig,\n classes,\n tabName\n}: EntityTableProps) => {\n const content = (\n <div className={cn(tableConfig({ columnsVariant }), classes?.wrapper)}>\n {title && (\n <Heading as='h4' className={cn('mb-4 desktop:mb-6', classes?.headline)}>\n {title}\n </Heading>\n )}\n\n <TableBody tableVariant={tableVariant} rows={rows} headings={headings} columnsVariant={columnsVariant} />\n\n {description && (\n <div\n className={cn('mt-4 [&&]:desk-body-regular-m desktop:mt-6', classes?.description)}\n dangerouslySetInnerHTML={{ __html: description ?? '' }}\n />\n )}\n </div>\n )\n\n const handleClick = () => {\n subEntityDL(config?.accordionTitle, tabName)\n }\n\n return (\n <>\n {config && config?.isAccordion && config?.accordionTitle ? (\n <Accordion onClick={handleClick} label={config?.accordionTitle} {...accordionConfig}>\n {accordionConfig?.children || content}\n </Accordion>\n ) : (\n content\n )}\n </>\n )\n}\n"],"names":["Table","tableVariant","description","columnsVariant","config","rows","title","headings","accordionConfig","classes","tabName","content","jsxs","cn","tableConfig","jsx","Heading","TableBody","handleClick","subEntityDL","Accordion"],"mappings":"4ZA6CO,MAAMA,EAAQ,CAAC,CACpB,aAAAC,EACA,YAAAC,EACA,eAAAC,EACA,OAAAC,EACA,KAAAC,EACA,MAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,QAAAC,EACA,QAAAC,CACF,IAAwB,CACtB,MAAMC,EACJC,EAAC,MAAA,CAAI,UAAWC,EAAGC,EAAY,CAAE,eAAAX,CAAA,CAAgB,EAAGM,GAAS,OAAO,EACjE,SAAA,CAAAH,GACCS,EAACC,EAAA,CAAQ,GAAG,KAAK,UAAWH,EAAG,oBAAqBJ,GAAS,QAAQ,EAClE,SAAAH,CAAA,CACH,EAGFS,EAACE,EAAA,CAAU,aAAAhB,EAA4B,KAAAI,EAAY,SAAAE,EAAoB,eAAAJ,EAAgC,EAEtGD,GACCa,EAAC,MAAA,CACC,UAAWF,EAAG,6CAA8CJ,GAAS,WAAW,EAChF,wBAAyB,CAAE,OAAQP,GAAe,EAAA,CAAG,CAAA,CACvD,EAEJ,EAGIgB,EAAc,IAAM,CACxBC,EAAYf,GAAQ,eAAgBM,CAAO,CAC7C,EAEA,YAEK,SAAAN,GAAUA,GAAQ,aAAeA,GAAQ,iBACvCgB,EAAA,CAAU,QAASF,EAAa,MAAOd,GAAQ,eAAiB,GAAGI,EACjE,YAAiB,UAAYG,EAChC,EAEAA,CAAA,CAEJ,CAEJ"}
1
+ {"version":3,"file":"Table.js","sources":["../../../../../../../lib/widgets/usefulInfo/ui/subEntities/table/Table.tsx"],"sourcesContent":["import { pushToDlAccordion } from '../../../../../shared/dataLayers'\nimport { Accordion, Heading } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\nimport {\n type EntitiesAccordionsConfig,\n type SubEntityDetailsCommon,\n type SubEntityDetailsConfig,\n subEntityDL\n} from '$/widgets/usefulInfo/model'\nimport { tableConfig } from '$/widgets/usefulInfo/ui/subEntities/table/model/utils'\nimport { TableBody, type TableBodyClasses } from '$/widgets/usefulInfo/ui/subEntities/table/ui/TableBody'\n\nexport type EntityTableClasses = {\n wrapper?: string\n headline?: string\n description?: string\n tableBody?: TableBodyClasses\n}\n\nexport type TableCell = {\n cell: string\n cellId: string\n}\n\nexport type TableRow = {\n row: TableCell[]\n rowId: string\n}\n\nexport type TableHeading = {\n heading: string\n headingId: string\n}\n\nexport type EntityTableProps = SubEntityDetailsCommon & {\n title?: string\n description?: string\n columnsVariant: 'twoCols' | 'threeCols'\n tableVariant: 'separator' | 'filled'\n headings?: TableHeading[]\n rows: TableRow[]\n config?: SubEntityDetailsConfig\n classes?: EntityTableClasses\n accordionConfig?: EntitiesAccordionsConfig['documentAccordion']\n}\n\nexport const Table = ({\n tableVariant,\n description,\n columnsVariant,\n config,\n rows,\n title,\n headings,\n accordionConfig,\n classes,\n tabName\n}: EntityTableProps) => {\n const content = (\n <div className={cn(tableConfig({ columnsVariant }), classes?.wrapper)}>\n {title && (\n <Heading as='h4' className={cn('mb-4 desktop:mb-6', classes?.headline)}>\n {title}\n </Heading>\n )}\n\n <TableBody tableVariant={tableVariant} rows={rows} headings={headings} columnsVariant={columnsVariant} />\n\n {description && (\n <div\n className={cn('mt-4 [&&]:desk-body-regular-m desktop:mt-6', classes?.description)}\n dangerouslySetInnerHTML={{ __html: description ?? '' }}\n />\n )}\n </div>\n )\n\n const handleClick = () => {\n subEntityDL(config?.accordionTitle, tabName)\n }\n\n return (\n <>\n {config && config?.isAccordion && config?.accordionTitle ? (\n <Accordion\n onClick={handleClick}\n onPointerDown={() =>\n pushToDlAccordion({\n tabName: tabName,\n placement: 'switcher_content',\n name: config?.accordionTitle\n })\n }\n label={config?.accordionTitle}\n {...accordionConfig}\n >\n {accordionConfig?.children || content}\n </Accordion>\n ) : (\n content\n )}\n </>\n )\n}\n"],"names":["Table","tableVariant","description","columnsVariant","config","rows","title","headings","accordionConfig","classes","tabName","content","jsxs","cn","tableConfig","jsx","Heading","TableBody","handleClick","subEntityDL","Fragment","Accordion","pushToDlAccordion"],"mappings":"0eA8CO,MAAMA,EAAQ,CAAC,CACpB,aAAAC,EACA,YAAAC,EACA,eAAAC,EACA,OAAAC,EACA,KAAAC,EACA,MAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,QAAAC,EACA,QAAAC,CACF,IAAwB,CACtB,MAAMC,EACJC,EAAC,MAAA,CAAI,UAAWC,EAAGC,EAAY,CAAE,eAAAX,CAAA,CAAgB,EAAGM,GAAS,OAAO,EACjE,SAAA,CAAAH,GACCS,EAACC,EAAA,CAAQ,GAAG,KAAK,UAAWH,EAAG,oBAAqBJ,GAAS,QAAQ,EAClE,SAAAH,CAAA,CACH,EAGFS,EAACE,EAAA,CAAU,aAAAhB,EAA4B,KAAAI,EAAY,SAAAE,EAAoB,eAAAJ,EAAgC,EAEtGD,GACCa,EAAC,MAAA,CACC,UAAWF,EAAG,6CAA8CJ,GAAS,WAAW,EAChF,wBAAyB,CAAE,OAAQP,GAAe,EAAA,CAAG,CAAA,CACvD,EAEJ,EAGIgB,EAAc,IAAM,CACxBC,EAAYf,GAAQ,eAAgBM,CAAO,CAC7C,EAEA,OACEK,EAAAK,EAAA,CACG,SAAAhB,GAAUA,GAAQ,aAAeA,GAAQ,eACxCW,EAACM,EAAA,CACC,QAASH,EACT,cAAe,IACbI,EAAkB,CAChB,QAAAZ,EACA,UAAW,mBACX,KAAMN,GAAQ,cAAA,CACf,EAEH,MAAOA,GAAQ,eACd,GAAGI,EAEH,YAAiB,UAAYG,CAAA,CAAA,EAGhCA,CAAA,CAEJ,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as l}from"react";import{useRating as n}from"./model/hooks/useRating.js";import{cn as o}from"../../shared/utils/cn.js";import{FeedbackTrigger as c}from"./ui/FeedbackTrigger.js";import{Finally as m}from"./ui/Finally.js";import{UserReview as f}from"./ui/UserReview.js";import{SelectRating as p}from"./ui/SelectRating.js";import{Popover as d}from"../../shared/ui/popover/Popover.js";import{pushToDlTooltip as g}from"../../shared/dataLayers/utils.js";const u=({formStep:r,setFormStep:i,ratingProps:s,...e})=>{switch(r){case"rating":return t(p,{...s,classes:e.classes?.selectRating,...e.selectRatingStepProps});case"review":return t(f,{submitCallback:e.submitCallback,setFormStep:i,rating:s.selectedRating,classes:e.classes?.userReview,...e.userReviewStepProps});case"finally":return t(m,{classes:e.classes?.finally,...e.finallyStepProps})}},y=r=>{const[i,s]=l("rating"),e=n(s),{classes:a}=r;return t("div",{className:o("fixed right-5 top-[80%] z-[1000]",a?.root),children:t(d,{onPointerDown:()=>g("userFeedbackTrigger","userFeedback"),side:"top",align:"end",sideOffset:10,withArrow:!1,withCloseBtn:!1,classes:{content:"max-w-[330px] w-[330px] p-6"},triggerElement:t(c,{}),...r?.popoverProps,children:t("div",{className:o("w-full",a?.wrapper),children:u({formStep:i,setFormStep:s,ratingProps:e,...r})})})})};export{y as UserFeedback,y as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as l}from"react";import{useRating as n}from"./model/hooks/useRating.js";import{cn as o}from"../../shared/utils/cn.js";import{FeedbackTrigger as c}from"./ui/FeedbackTrigger.js";import{Finally as m}from"./ui/Finally.js";import{UserReview as f}from"./ui/UserReview.js";import{SelectRating as p}from"./ui/SelectRating.js";import{Popover as g}from"../../shared/ui/popover/Popover.js";import{pushToDlTooltip as d}from"../../shared/dataLayers/utils.js";const u=({formStep:r,setFormStep:i,ratingProps:s,...e})=>{switch(r){case"rating":return t(p,{...s,classes:e.classes?.selectRating,...e.selectRatingStepProps});case"review":return t(f,{submitCallback:e.submitCallback,setFormStep:i,rating:s.selectedRating,classes:e.classes?.userReview,...e.userReviewStepProps});case"finally":return t(m,{classes:e.classes?.finally,...e.finallyStepProps})}},y=r=>{const[i,s]=l("rating"),e=n(s),{classes:a}=r;return t("div",{className:o("fixed right-5 top-[80%] z-[1000]",a?.root),children:t(g,{triggerProps:{onPointerDown:()=>d({title:"userFeedbackTrigger",placement:"userFeedback"})},side:"top",align:"end",sideOffset:10,withArrow:!1,withCloseBtn:!1,classes:{content:"max-w-[330px] w-[330px] p-6"},triggerElement:t(c,{}),...r?.popoverProps,children:t("div",{className:o("w-full",a?.wrapper),children:u({formStep:i,setFormStep:s,ratingProps:e,...r})})})})};export{y as UserFeedback,y as default};
2
2
  //# sourceMappingURL=UserFeedback.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserFeedback.js","sources":["../../../../lib/widgets/userFeedback/UserFeedback.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { pushToDlTooltip } from '../../shared/dataLayers'\nimport { type FormStep, type FormStepSetter, type SubmitCallback, useRating, type UseRatingReturn } from './model'\nimport {\n FeedbackTrigger,\n Finally,\n type FinallyClasses,\n type FinallyProps,\n SelectRating,\n type SelectRatingClasses,\n type SelectRatingProps,\n UserReview,\n type UserReviewClasses,\n type UserReviewProps\n} from './ui'\nimport { Popover, type PopoverProps } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport type RenderFormStep = UserFeedbackProps & {\n formStep: FormStep\n setFormStep: FormStepSetter\n ratingProps: UseRatingReturn\n submitCallback: SubmitCallback\n}\n\nconst renderFormStep = ({ formStep, setFormStep, ratingProps, ...props }: RenderFormStep) => {\n switch (formStep) {\n case 'rating':\n return <SelectRating {...ratingProps} classes={props.classes?.selectRating} {...props.selectRatingStepProps} />\n\n case 'review':\n return (\n <UserReview\n submitCallback={props.submitCallback}\n setFormStep={setFormStep}\n rating={ratingProps.selectedRating}\n classes={props.classes?.userReview}\n {...props.userReviewStepProps}\n />\n )\n\n case 'finally':\n return <Finally classes={props.classes?.finally} {...props.finallyStepProps} />\n }\n}\n\ntype UserFeedbackClasses = {\n root?: string\n wrapper?: string\n selectRating?: SelectRatingClasses\n userReview?: UserReviewClasses\n finally?: FinallyClasses\n}\n\nexport type UserFeedbackProps = {\n submitCallback: SubmitCallback\n selectRatingStepProps?: SelectRatingProps\n userReviewStepProps?: Pick<UserReviewProps, 'title' | 'subtitle'>\n finallyStepProps?: FinallyProps\n classes?: UserFeedbackClasses\n popoverProps?: PopoverProps\n}\n\nexport const UserFeedback = (props: UserFeedbackProps) => {\n const [formStep, setFormStep] = useState<FormStep>('rating')\n const ratingProps = useRating(setFormStep)\n const { classes } = props\n\n return (\n <div className={cn('fixed right-5 top-[80%] z-[1000]', classes?.root)}>\n <Popover\n onPointerDown={() => pushToDlTooltip('userFeedbackTrigger', 'userFeedback')}\n side='top'\n align='end'\n sideOffset={10}\n withArrow={false}\n withCloseBtn={false}\n classes={{\n content: 'max-w-[330px] w-[330px] p-6'\n }}\n triggerElement={<FeedbackTrigger />}\n {...props?.popoverProps}\n >\n <div className={cn('w-full', classes?.wrapper)}>{renderFormStep({ formStep, setFormStep, ratingProps, ...props })}</div>\n </Popover>\n </div>\n )\n}\n\nexport default UserFeedback\n"],"names":["renderFormStep","formStep","setFormStep","ratingProps","props","jsx","SelectRating","UserReview","Finally","UserFeedback","useState","useRating","classes","cn","Popover","pushToDlTooltip","FeedbackTrigger"],"mappings":"sfAyBA,MAAMA,EAAiB,CAAC,CAAE,SAAAC,EAAU,YAAAC,EAAa,YAAAC,EAAa,GAAGC,KAA4B,CAC3F,OAAQH,EAAA,CACN,IAAK,SACH,OAAOI,EAACC,EAAA,CAAc,GAAGH,EAAa,QAASC,EAAM,SAAS,aAAe,GAAGA,EAAM,qBAAA,CAAuB,EAE/G,IAAK,SACH,OACEC,EAACE,EAAA,CACC,eAAgBH,EAAM,eACtB,YAAAF,EACA,OAAQC,EAAY,eACpB,QAASC,EAAM,SAAS,WACvB,GAAGA,EAAM,mBAAA,CAAA,EAIhB,IAAK,UACH,OAAOC,EAACG,GAAQ,QAASJ,EAAM,SAAS,QAAU,GAAGA,EAAM,iBAAkB,CAAA,CAEnF,EAmBaK,EAAgBL,GAA6B,CACxD,KAAM,CAACH,EAAUC,CAAW,EAAIQ,EAAmB,QAAQ,EACrDP,EAAcQ,EAAUT,CAAW,EACnC,CAAE,QAAAU,GAAYR,EAEpB,SACG,MAAA,CAAI,UAAWS,EAAG,mCAAoCD,GAAS,IAAI,EAClE,SAAAP,EAACS,EAAA,CACC,cAAe,IAAMC,EAAgB,sBAAuB,cAAc,EAC1E,KAAK,MACL,MAAM,MACN,WAAY,GACZ,UAAW,GACX,aAAc,GACd,QAAS,CACP,QAAS,6BAAA,EAEX,iBAAiBC,EAAA,EAAgB,EAChC,GAAGZ,GAAO,aAEX,WAAC,MAAA,CAAI,UAAWS,EAAG,SAAUD,GAAS,OAAO,EAAI,SAAAZ,EAAe,CAAE,SAAAC,EAAU,YAAAC,EAAa,YAAAC,EAAa,GAAGC,CAAA,CAAO,CAAA,CAAE,CAAA,CAAA,EAEtH,CAEJ"}
1
+ {"version":3,"file":"UserFeedback.js","sources":["../../../../lib/widgets/userFeedback/UserFeedback.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { pushToDlTooltip } from '../../shared/dataLayers'\nimport { type FormStep, type FormStepSetter, type SubmitCallback, useRating, type UseRatingReturn } from './model'\nimport {\n FeedbackTrigger,\n Finally,\n type FinallyClasses,\n type FinallyProps,\n SelectRating,\n type SelectRatingClasses,\n type SelectRatingProps,\n UserReview,\n type UserReviewClasses,\n type UserReviewProps\n} from './ui'\nimport { Popover, type PopoverProps } from '$/shared/ui'\nimport { cn } from '$/shared/utils'\n\nexport type RenderFormStep = UserFeedbackProps & {\n formStep: FormStep\n setFormStep: FormStepSetter\n ratingProps: UseRatingReturn\n submitCallback: SubmitCallback\n}\n\nconst renderFormStep = ({ formStep, setFormStep, ratingProps, ...props }: RenderFormStep) => {\n switch (formStep) {\n case 'rating':\n return <SelectRating {...ratingProps} classes={props.classes?.selectRating} {...props.selectRatingStepProps} />\n\n case 'review':\n return (\n <UserReview\n submitCallback={props.submitCallback}\n setFormStep={setFormStep}\n rating={ratingProps.selectedRating}\n classes={props.classes?.userReview}\n {...props.userReviewStepProps}\n />\n )\n\n case 'finally':\n return <Finally classes={props.classes?.finally} {...props.finallyStepProps} />\n }\n}\n\ntype UserFeedbackClasses = {\n root?: string\n wrapper?: string\n selectRating?: SelectRatingClasses\n userReview?: UserReviewClasses\n finally?: FinallyClasses\n}\n\nexport type UserFeedbackProps = {\n submitCallback: SubmitCallback\n selectRatingStepProps?: SelectRatingProps\n userReviewStepProps?: Pick<UserReviewProps, 'title' | 'subtitle'>\n finallyStepProps?: FinallyProps\n classes?: UserFeedbackClasses\n popoverProps?: PopoverProps\n}\n\nexport const UserFeedback = (props: UserFeedbackProps) => {\n const [formStep, setFormStep] = useState<FormStep>('rating')\n const ratingProps = useRating(setFormStep)\n const { classes } = props\n\n return (\n <div className={cn('fixed right-5 top-[80%] z-[1000]', classes?.root)}>\n <Popover\n triggerProps={{\n onPointerDown: () => pushToDlTooltip({ title: 'userFeedbackTrigger', placement: 'userFeedback' })\n }}\n side='top'\n align='end'\n sideOffset={10}\n withArrow={false}\n withCloseBtn={false}\n classes={{\n content: 'max-w-[330px] w-[330px] p-6'\n }}\n triggerElement={<FeedbackTrigger />}\n {...props?.popoverProps}\n >\n <div className={cn('w-full', classes?.wrapper)}>{renderFormStep({ formStep, setFormStep, ratingProps, ...props })}</div>\n </Popover>\n </div>\n )\n}\n\nexport default UserFeedback\n"],"names":["renderFormStep","formStep","setFormStep","ratingProps","props","jsx","SelectRating","UserReview","Finally","UserFeedback","useState","useRating","classes","cn","Popover","pushToDlTooltip","FeedbackTrigger"],"mappings":"sfAyBA,MAAMA,EAAiB,CAAC,CAAE,SAAAC,EAAU,YAAAC,EAAa,YAAAC,EAAa,GAAGC,KAA4B,CAC3F,OAAQH,EAAA,CACN,IAAK,SACH,OAAOI,EAACC,EAAA,CAAc,GAAGH,EAAa,QAASC,EAAM,SAAS,aAAe,GAAGA,EAAM,qBAAA,CAAuB,EAE/G,IAAK,SACH,OACEC,EAACE,EAAA,CACC,eAAgBH,EAAM,eACtB,YAAAF,EACA,OAAQC,EAAY,eACpB,QAASC,EAAM,SAAS,WACvB,GAAGA,EAAM,mBAAA,CAAA,EAIhB,IAAK,UACH,OAAOC,EAACG,GAAQ,QAASJ,EAAM,SAAS,QAAU,GAAGA,EAAM,iBAAkB,CAAA,CAEnF,EAmBaK,EAAgBL,GAA6B,CACxD,KAAM,CAACH,EAAUC,CAAW,EAAIQ,EAAmB,QAAQ,EACrDP,EAAcQ,EAAUT,CAAW,EACnC,CAAE,QAAAU,GAAYR,EAEpB,SACG,MAAA,CAAI,UAAWS,EAAG,mCAAoCD,GAAS,IAAI,EAClE,SAAAP,EAACS,EAAA,CACC,aAAc,CACZ,cAAe,IAAMC,EAAgB,CAAE,MAAO,sBAAuB,UAAW,eAAgB,CAAA,EAElG,KAAK,MACL,MAAM,MACN,WAAY,GACZ,UAAW,GACX,aAAc,GACd,QAAS,CACP,QAAS,6BAAA,EAEX,iBAAiBC,EAAA,EAAgB,EAChC,GAAGZ,GAAO,aAEX,WAAC,MAAA,CAAI,UAAWS,EAAG,SAAUD,GAAS,OAAO,EAAI,SAAAZ,EAAe,CAAE,SAAAC,EAAU,YAAAC,EAAa,YAAAC,EAAa,GAAGC,CAAA,CAAO,CAAA,CAAE,CAAA,CAAA,EAEtH,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{jsxs as l,jsx as r}from"react/jsx-runtime";import{cn as t}from"../../../shared/utils/cn.js";import{pushToDL as p}from"../../../shared/dataLayers/pushToDL.js";import{Icon as u}from"../../../shared/ui/icon/Icon.js";const f=Array(5).fill(0),g="Ваше мнение важно для нас!",b="Пожалуйста, оцените работу сайта, чтобы мы сделали его еще удобнее",y=({handleMouseLeave:o,hoveredRatings:a,selectedRating:i,handleSelectRating:c,handleMouseEnter:m,title:d=g,subtitle:s=b,classes:e})=>l("div",{className:t("flex flex-col items-center gap-4",e?.wrapper),children:[l("div",{className:t("flex flex-col gap-2 text-center",e?.textBlock),children:[r("p",{className:t("desk-body-medium-l",e?.title),children:d}),r("p",{className:t("desk-body-regular-l",e?.subtitle),children:s})]}),r("div",{className:t("flex items-center gap-2",e?.ratingsWrapper),children:f?.map((h,n)=>r("button",{onPointerDown:()=>p({event:"buttonClick",name:"userFeedbackVote",placement:"userFeedbackWidget"}),className:t("size-8",e?.ratingBtn),onMouseEnter:()=>m(n+1),onMouseLeave:()=>o(),onClick:()=>c(n+1),children:r(u,{name:"general/heart",className:t("fill-[#b0c0d2] transition-colors duration-12",e?.ratingIcon,{"fill-secondary-default":n<(a||i)})})},n))})]});export{y as SelectRating};
1
+ import{jsxs as n,jsx as r}from"react/jsx-runtime";import{cn as t}from"../../../shared/utils/cn.js";import{pushToDL as p}from"../../../shared/dataLayers/pushToDL.js";import{Icon as f}from"../../../shared/ui/icon/Icon.js";const u=Array(5).fill(0),g="Ваше мнение важно для нас!",b="Пожалуйста, оцените работу сайта, чтобы мы сделали его еще удобнее",y=({handleMouseLeave:o,hoveredRatings:a,selectedRating:i,handleSelectRating:c,handleMouseEnter:m,title:d=g,subtitle:s=b,classes:e})=>n("div",{className:t("flex flex-col items-center gap-4",e?.wrapper),children:[n("div",{className:t("flex flex-col gap-2 text-center",e?.textBlock),children:[r("p",{className:t("desk-body-medium-l",e?.title),children:d}),r("p",{className:t("desk-body-regular-l",e?.subtitle),children:s})]}),r("div",{className:t("flex items-center gap-2",e?.ratingsWrapper),children:u?.map((k,l)=>r("button",{onPointerDown:()=>p({event:"buttonClick",name:"Feedback",placement:"userFeedback",eventCategory:"click_block"}),className:t("size-8",e?.ratingBtn),onMouseEnter:()=>m(l+1),onMouseLeave:()=>o(),onClick:()=>c(l+1),children:r(f,{name:"general/heart",className:t("fill-[#b0c0d2] transition-colors duration-12",e?.ratingIcon,{"fill-secondary-default":l<(a||i)})})},l))})]});export{y as SelectRating};
2
2
  //# sourceMappingURL=SelectRating.js.map