@scbt-ecom/ui 0.162.0 → 0.163.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/shared/ui/phoneView/PhoneView.js +1 -1
- package/dist/lib/shared/ui/phoneView/PhoneView.js.map +1 -1
- package/dist/lib/widgets/breadcrumbs/Breadcrumb.js +1 -1
- package/dist/lib/widgets/breadcrumbs/Breadcrumb.js.map +1 -1
- package/dist/lib/widgets/footer/model/dataLayers.js +2 -0
- package/dist/lib/widgets/footer/model/dataLayers.js.map +1 -0
- package/dist/lib/widgets/footer/ui/NavLinks.js +1 -1
- package/dist/lib/widgets/footer/ui/NavLinks.js.map +1 -1
- package/dist/lib/widgets/footer/ui/SiteMap.js +1 -1
- package/dist/lib/widgets/footer/ui/SiteMap.js.map +1 -1
- package/dist/lib/widgets/footer/ui/SocialLinks.js +1 -1
- package/dist/lib/widgets/footer/ui/SocialLinks.js.map +1 -1
- package/dist/lib/widgets/model/helpers.js +2 -2
- package/dist/lib/widgets/model/helpers.js.map +1 -1
- package/dist/lib/widgets/seoHeader/model/dataLayers.js +1 -1
- package/dist/lib/widgets/seoHeader/model/dataLayers.js.map +1 -1
- package/dist/lib/widgets/seoHeader/model/index.js +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/CategoriesDesktop.js +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/CategoriesDesktop.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/CategoryTabs.js +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/CategoryTabs.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/rootTab/RootTab.js +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/rootTab/RootTab.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/tab/Tab.js +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/tab/Tab.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/tab/ui/content/TabContent.js +1 -1
- package/dist/lib/widgets/seoHeader/ui/desktop/tab/ui/content/TabContent.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/mobile/menu/Menu.js +1 -1
- package/dist/lib/widgets/seoHeader/ui/mobile/menu/Menu.js.map +1 -1
- package/dist/lib/widgets/seoHeader/ui/mobile/menu/MenuItem.js +1 -1
- package/dist/lib/widgets/seoHeader/ui/mobile/menu/MenuItem.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types/lib/widgets/footer/model/dataLayers.d.ts +1 -0
- package/dist/types/lib/widgets/seoHeader/model/dataLayers.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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{cn as v}from"../../../../../shared/utils/cn.js";import{TypeGuards as c}from"../../../../../shared/utils/typeGuards.js";import{Combobox as y}from"../../../../../shared/ui/formElements/uncontrolled/combobox/combobox.js";import{
|
|
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{cn as v}from"../../../../../shared/utils/cn.js";import{TypeGuards as c}from"../../../../../shared/utils/typeGuards.js";import{Combobox as y}from"../../../../../shared/ui/formElements/uncontrolled/combobox/combobox.js";import{pushToDlLinkSeoHeader as o}from"../../../model/dataLayers.js";import{Icon as m}from"../../../../../shared/ui/icon/Icon.js";const k=i=>i.map(t=>({value:t.title??"",label:t.title??""})),I=({categories:i,helpers:t,phone:n,...f})=>{const s=k(i),[r,d]=x(s[0]),u=e=>{c.isUndefined(e)||c.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:s,value:r,onChange:u}),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(e?.title,e.link?.href),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:()=>o(e.title,e.link.href),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:()=>o(n,`tel:${n}`),href:`tel:${n}`,className:"flex w-full items-center gap-x-1",children:[l(m,{name:"communication/phone",className:"size-4"}),n]})})]})]})};export{I 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 { type Category,
|
|
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 { type Category, pushToDlLinkSeoHeader, 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[]\n helpers: SeoHeaderHelpers[]\n phone: string\n}\n\nconst getSelectCategories = (categories: Category[]): ComboboxItemOption[] =>\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>>(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 multiple={false} label='Категория' options={selectCategories} value={selected} onChange={onCategoryChange} />\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={() => pushToDlLinkSeoHeader(subCategory?.title, subCategory.link?.href)}\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={() => pushToDlLinkSeoHeader(helper.title, helper.link.href)}\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={() => pushToDlLinkSeoHeader(phone, `tel:${phone}`)}\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","pushToDlLinkSeoHeader","MenuItem","helper","Icon"],"mappings":"mhBAaA,MAAMA,EAAuBC,GAC3BA,EAAW,IAAKC,IAAc,CAC5B,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,EAA+BH,EAAiB,CAAC,CAAC,EAE5EI,EAAoBC,GAAkC,CACtDC,EAAW,YAAYD,CAAM,GAAKC,EAAW,QAAQD,CAAM,GAE/DH,EAAYG,CAAM,CACpB,EAEME,EAAwBC,EAAoB,IAC3CP,EAEEP,EAAW,KAAMC,GAAaA,EAAS,QAAUM,EAAS,KAAK,GAAG,UAAY,CAAA,EAF/D,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,CAAS,SAAU,GAAO,MAAM,YAAY,QAASb,EAAkB,MAAOC,EAAU,SAAUG,CAAA,CAAkB,IACpH,MAAA,CAAI,UAAU,2DACZ,SAAAG,EAAsB,IAAKO,GACtBR,EAAW,aAAaQ,EAAY,QAAQ,EAE5CF,EAAC,MAAA,CAA4B,UAAU,qBACrC,SAAAA,EAAC,IAAA,CACC,cAAe,IAAMG,EAAsBD,GAAa,MAAOA,EAAY,MAAM,IAAI,EACrF,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,EAAQ,IAAKoB,GACZL,EAAC,MAAA,CAAuB,UAAU,qBAChC,SAAAH,EAAC,IAAA,CACC,cAAe,IAAMM,EAAsBE,EAAO,MAAOA,EAAO,KAAK,IAAI,EACzE,KAAMA,EAAO,MAAM,KACnB,UAAU,mCAET,SAAA,CAAAA,EAAO,MAAM,MAAQL,EAACM,EAAA,CAAK,KAAMD,EAAO,KAAK,KAAM,UAAU,QAAA,CAAS,EACtEA,EAAO,KAAA,CAAA,CAAA,GAPFA,EAAO,KASjB,CACD,EACDL,EAAC,MAAA,CAAI,UAAU,qBACb,SAAAH,EAAC,IAAA,CACC,cAAe,IAAMM,EAAsBjB,EAAO,OAAOA,CAAK,EAAE,EAChE,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,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{
|
|
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{pushToDlLinkSeoHeader as i}from"../../../model/dataLayers.js";import{Icon as n}from"../../../../../shared/ui/icon/Icon.js";const b=({category:r})=>e(f,{onPointerDown:()=>i(r.title,""),label:r.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: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:r.children.map(t=>{const o=!!t.link;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(n,{name:"arrows/arrowLink"})]}),t.children.map(l=>e("li",{className:"inline-block w-full [&:not(:last-child)]:mb-3",children:e("a",{onPointerDown:()=>i(l.title,l.link?.href),href:l.link?.href,className:"w-full",children:l.title})},l.title))]},t.title)})})},r.title);export{b 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 { type Category,
|
|
1
|
+
{"version":3,"file":"MenuItem.js","sources":["../../../../../../../lib/widgets/seoHeader/ui/mobile/menu/MenuItem.tsx"],"sourcesContent":["import { type Category, pushToDlLinkSeoHeader } 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={() => pushToDlLinkSeoHeader(category.title, '')}\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)\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={() => pushToDlLinkSeoHeader(innerChild.title, innerChild.link?.href)}\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","pushToDlLinkSeoHeader","Icon","cn","child","isLink","jsxs","innerChild"],"mappings":"uTAQO,MAAMA,EAAW,CAAC,CAAE,SAAAC,CAAA,IACzBC,EAACC,EAAA,CAEC,cAAe,IAAMC,EAAsBH,EAAS,MAAO,EAAE,EAC7D,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,WAAS,SAAS,IAAKK,GAAU,CAChC,MAAMC,EAAS,EAAQD,EAAM,KAG7B,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,EAAM,SAAS,IAAKG,GACnBR,EAAC,KAAA,CAA0B,UAAU,gDACnC,SAAAA,EAAC,IAAA,CACC,cAAe,IAAME,EAAsBM,EAAW,MAAOA,EAAW,MAAM,IAAI,EAClF,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"}
|