@redneckz/wildless-cms-uni-blocks 0.2.89 → 0.2.93
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +119 -57
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/api/LikeAPI.js +1 -0
- package/dist/api/LikeAPI.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +38 -14
- package/dist/components/Accordion/AccordionItem.js +8 -6
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +1 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BlockContent.d.ts +2 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.js +12 -10
- package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +0 -20
- package/dist/components/ComparisonTable/HeaderCell.js +1 -1
- package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/dist/components/ComparisonTable/TableCarouselContainer.d.ts +3 -0
- package/dist/components/ComparisonTable/TableCarouselContainer.js +5 -2
- package/dist/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
- package/dist/components/ComparisonTable/TableRow.js +1 -1
- package/dist/components/ComparisonTable/TableRow.js.map +1 -1
- package/dist/components/ContentPage/ContentPageHead.d.ts +1 -1
- package/dist/components/CreditCalculator/CreditCalculator.js +1 -1
- package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/dist/components/Footer/Contacts.js +1 -1
- package/dist/components/Footer/Contacts.js.map +1 -1
- package/dist/components/Footer/FooterContent.d.ts +1 -2
- package/dist/components/Footer/HorizontalNavigation.js +1 -1
- package/dist/components/Footer/SocialMedia.js +1 -2
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +2 -2
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +5 -5
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
- package/dist/components/MobileBlocks.js +0 -3
- package/dist/components/MobileBlocks.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +1 -1
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/PictureText/PictureTextContent.d.ts +2 -4
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js +3 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -4
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +2 -2
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.d.ts +1 -1
- package/dist/components/PromoTile/PromoTile.js +1 -1
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.d.ts +5 -0
- package/dist/components/TariffsTable/TariffsTable.js +25 -0
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -0
- package/dist/components/TariffsTable/TariffsTableCell.d.ts +6 -0
- package/dist/components/TariffsTable/TariffsTableCell.js +18 -0
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -0
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +55 -0
- package/dist/components/TariffsTable/TariffsTableContent.js +2 -0
- package/dist/components/TariffsTable/TariffsTableContent.js.map +1 -0
- package/dist/components/TariffsTable/TariffsTableRow.d.ts +8 -0
- package/dist/components/TariffsTable/TariffsTableRow.js +13 -0
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -0
- package/dist/components/TariffsTable/constants.d.ts +4 -0
- package/dist/components/TariffsTable/constants.js +7 -0
- package/dist/components/TariffsTable/constants.js.map +1 -0
- package/dist/components/TextBlock/TextBlock.d.ts +1 -1
- package/dist/components/TextBlock/TextBlock.js +1 -1
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/dist/components/Tile/Tile.d.ts +1 -1
- package/dist/components/Tile/Tile.js +14 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/content-page-repository/ContentPageRepository.js +1 -0
- package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/dist/hooks/useComparisonTableScroll.d.ts +12 -0
- package/dist/hooks/useComparisonTableScroll.js +12 -0
- package/dist/hooks/useComparisonTableScroll.js.map +1 -0
- package/dist/hooks/useLink.js +1 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/model/TableVersion.d.ts +1 -0
- package/dist/model/TableVersion.js +2 -0
- package/dist/model/TableVersion.js.map +1 -0
- package/dist/ui-kit/BlockItem/BlockItem.d.ts +1 -9
- package/dist/ui-kit/BlockItem/BlockItem.js +5 -5
- package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/dist/ui-kit/BlockItem/BlockItemProps.d.ts +20 -0
- package/dist/ui-kit/BlockItem/BlockItemProps.js +2 -0
- package/dist/ui-kit/BlockItem/BlockItemProps.js.map +1 -0
- package/dist/ui-kit/Icon/IconProps.d.ts +57 -25
- package/dist/ui-kit/Icon/IconProps.js +39 -23
- package/dist/ui-kit/Icon/IconProps.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +1 -1
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/SearchBar.js +2 -1
- package/dist/ui-kit/SearchBar.js.map +1 -1
- package/lib/api/LikeAPI.js +1 -0
- package/lib/api/LikeAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.fixture.d.ts +1 -4
- package/lib/components/Accordion/AccordionContent.d.ts +38 -14
- package/lib/components/Accordion/AccordionItem.js +8 -6
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +1 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BlockContent.d.ts +2 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.js +12 -10
- package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +0 -20
- package/lib/components/ComparisonTable/HeaderCell.js +1 -1
- package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/lib/components/ComparisonTable/TableCarouselContainer.d.ts +3 -0
- package/lib/components/ComparisonTable/TableCarouselContainer.js +5 -2
- package/lib/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
- package/lib/components/ComparisonTable/TableRow.js +2 -2
- package/lib/components/ComparisonTable/TableRow.js.map +1 -1
- package/lib/components/ContentPage/ContentPageHead.d.ts +1 -1
- package/lib/components/CreditCalculator/CreditCalculator.js +1 -1
- package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/lib/components/Footer/Contacts.js +1 -1
- package/lib/components/Footer/Contacts.js.map +1 -1
- package/lib/components/Footer/FooterContent.d.ts +1 -2
- package/lib/components/Footer/HorizontalNavigation.js +1 -1
- package/lib/components/Footer/SocialMedia.js +1 -2
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +2 -2
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Headline/Headline.fixture.d.ts +3 -2
- package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +6 -6
- package/lib/components/LinkDocs/LinkDocs.js +5 -5
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
- package/lib/components/MobileBlocks.js +0 -3
- package/lib/components/MobileBlocks.js.map +1 -1
- package/lib/components/PictureText/PictureText.fixture.d.ts +2 -0
- package/lib/components/PictureText/PictureText.js +1 -1
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/PictureText/PictureTextContent.d.ts +2 -4
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.mobile.js +3 -1
- package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -4
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +2 -2
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.d.ts +1 -1
- package/lib/components/PromoTile/PromoTile.js +1 -1
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.d.ts +5 -0
- package/lib/components/TariffsTable/TariffsTable.fixture.d.ts +7 -0
- package/lib/components/TariffsTable/TariffsTable.js +23 -0
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -0
- package/lib/components/TariffsTable/TariffsTableCell.d.ts +6 -0
- package/lib/components/TariffsTable/TariffsTableCell.js +16 -0
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -0
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +55 -0
- package/lib/components/TariffsTable/TariffsTableContent.js +2 -0
- package/lib/components/TariffsTable/TariffsTableContent.js.map +1 -0
- package/lib/components/TariffsTable/TariffsTableRow.d.ts +8 -0
- package/lib/components/TariffsTable/TariffsTableRow.js +11 -0
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -0
- package/lib/components/TariffsTable/constants.d.ts +4 -0
- package/lib/components/TariffsTable/constants.js +5 -0
- package/lib/components/TariffsTable/constants.js.map +1 -0
- package/lib/components/TextBlock/TextBlock.d.ts +1 -1
- package/lib/components/TextBlock/TextBlock.fixture.d.ts +2 -0
- package/lib/components/TextBlock/TextBlock.js +1 -1
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/lib/components/Tile/Tile.d.ts +1 -1
- package/lib/components/Tile/Tile.js +14 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/content-page-repository/ContentPageRepository.js +1 -0
- package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/lib/hooks/useComparisonTableScroll.d.ts +12 -0
- package/lib/hooks/useComparisonTableScroll.js +9 -0
- package/lib/hooks/useComparisonTableScroll.js.map +1 -0
- package/lib/hooks/useLink.js +1 -1
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/model/TableVersion.d.ts +1 -0
- package/lib/model/TableVersion.js +2 -0
- package/lib/model/TableVersion.js.map +1 -0
- package/lib/ui-kit/BlockItem/BlockItem.d.ts +1 -9
- package/lib/ui-kit/BlockItem/BlockItem.fixture.d.ts +6 -1
- package/lib/ui-kit/BlockItem/BlockItem.js +5 -5
- package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/lib/ui-kit/BlockItem/BlockItemProps.d.ts +20 -0
- package/lib/ui-kit/BlockItem/BlockItemProps.js +2 -0
- package/lib/ui-kit/BlockItem/BlockItemProps.js.map +1 -0
- package/lib/ui-kit/Icon/IconProps.d.ts +57 -25
- package/lib/ui-kit/Icon/IconProps.js +39 -23
- package/lib/ui-kit/Icon/IconProps.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +1 -1
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/SearchBar.js +2 -1
- package/lib/ui-kit/SearchBar.js.map +1 -1
- package/package.json +19 -9
- package/src/api/LikeAPI.ts +1 -0
- package/src/components/Accordion/Accordion.example.json +18 -42
- package/src/components/Accordion/Accordion.fixture.tsx +29 -119
- package/src/components/Accordion/AccordionContent.ts +47 -18
- package/src/components/Accordion/AccordionItem.tsx +13 -9
- package/src/components/BaseTile/BaseTile.tsx +6 -3
- package/src/components/BlockContent.ts +2 -0
- package/src/components/Blocks.ts +2 -0
- package/src/components/ComparisonTable/ComparisonTable.tsx +17 -14
- package/src/components/ComparisonTable/ComparisonTableContent.ts +0 -21
- package/src/components/ComparisonTable/HeaderCell.tsx +3 -3
- package/src/components/ComparisonTable/TableCarouselContainer.tsx +11 -4
- package/src/components/ComparisonTable/TableRow.tsx +2 -2
- package/src/components/ContentPage/ContentPage.fixture.tsx +3 -3
- package/src/components/ContentPage/ContentPage.page.json +425 -3
- package/src/components/ContentPage/ContentPageHead.tsx +1 -1
- package/src/components/CreditCalculator/CreditCalculator.tsx +1 -1
- package/src/components/Footer/Contacts.tsx +1 -1
- package/src/components/Footer/FooterContent.ts +1 -1
- package/src/components/Footer/HorizontalNavigation.tsx +1 -1
- package/src/components/Footer/SocialMedia.tsx +5 -6
- package/src/components/Gallery/GalleryInner.tsx +2 -1
- package/src/components/Headline/Headline.fixture.tsx +11 -34
- package/src/components/LinkDocs/LinkDocs.fixture.tsx +14 -14
- package/src/components/LinkDocs/LinkDocs.tsx +8 -7
- package/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
- package/src/components/MobileBlocks.ts +0 -3
- package/src/components/PictureText/PictureText.fixture.tsx +20 -20
- package/src/components/PictureText/PictureText.tsx +3 -1
- package/src/components/PictureText/PictureTextContent.ts +2 -5
- package/src/components/Placeholder/Placeholder.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +1 -0
- package/src/components/ProductBlock/ProductBlockInner.tsx +8 -11
- package/src/components/ProductGallery/ProductGallery.example.json +1 -1
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +7 -13
- package/src/components/ProductGallery/ProductGallery.tsx +7 -5
- package/src/components/PromoTile/PromoTile.tsx +3 -3
- package/src/components/TariffsTable/TariffsTable.example.json +87 -0
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +195 -0
- package/src/components/TariffsTable/TariffsTable.tsx +74 -0
- package/src/components/TariffsTable/TariffsTableCell.tsx +64 -0
- package/src/components/TariffsTable/TariffsTableContent.ts +61 -0
- package/src/components/TariffsTable/TariffsTableRow.tsx +46 -0
- package/src/components/TariffsTable/constants.ts +4 -0
- package/src/components/TextBlock/TextBlock.example.json +9 -2
- package/src/components/TextBlock/TextBlock.fixture.tsx +20 -64
- package/src/components/TextBlock/TextBlock.tsx +2 -2
- package/src/components/TextBlock/TextBlockContent.ts +1 -2
- package/src/components/Tile/Tile.example.json +5 -2
- package/src/components/Tile/Tile.tsx +16 -5
- package/src/content-page-repository/ContentPageRepository.ts +1 -0
- package/src/hooks/useComparisonTableScroll.ts +21 -0
- package/src/hooks/useLink.ts +1 -1
- package/src/model/TableVersion.ts +1 -0
- package/src/ui-kit/BlockItem/BlockItem.fixture.tsx +8 -1
- package/src/ui-kit/BlockItem/BlockItem.tsx +7 -18
- package/src/ui-kit/BlockItem/BlockItemProps.ts +22 -0
- package/src/ui-kit/Icon/IconProps.ts +34 -2
- package/src/ui-kit/InputRange/InputRange.tsx +2 -2
- package/src/ui-kit/SearchBar.tsx +16 -6
|
@@ -4,29 +4,45 @@
|
|
|
4
4
|
export enum IconMap {
|
|
5
5
|
'ActualBalanceIcon',
|
|
6
6
|
'AppleIcon',
|
|
7
|
+
'CalendarCircleIcon',
|
|
7
8
|
'CalendarIcon',
|
|
9
|
+
'CardIcon',
|
|
10
|
+
'CardPosIcon',
|
|
11
|
+
'CardTickIcon',
|
|
8
12
|
'ClockIcon',
|
|
9
13
|
'ComfortableCompIcon',
|
|
10
14
|
'DiscountShape',
|
|
11
15
|
'DocIcon',
|
|
12
16
|
'DocumentText',
|
|
13
17
|
'DollarIcon',
|
|
18
|
+
'EmptyWalletChangeIcon',
|
|
14
19
|
'EmptyWalletIcon',
|
|
15
20
|
'EuroIcon',
|
|
16
21
|
'GlassIcon',
|
|
17
22
|
'GridIcon',
|
|
23
|
+
'JCBIcon',
|
|
18
24
|
'LoupeIcon',
|
|
25
|
+
'MasterCardIcon',
|
|
19
26
|
'MinusIcon',
|
|
27
|
+
'MirIcon',
|
|
28
|
+
'MoneyIcon',
|
|
29
|
+
'MonitorMobileIcon',
|
|
20
30
|
'NewDocIcon',
|
|
21
31
|
'OkIcon',
|
|
22
32
|
'PassSendIcon',
|
|
23
33
|
'PercentageSquareIcon',
|
|
24
34
|
'PlayMarketIcon',
|
|
25
35
|
'PlusIcon',
|
|
36
|
+
'Profile2UserIcon',
|
|
26
37
|
'ProfileIcon',
|
|
38
|
+
'ShieldTickIcon',
|
|
27
39
|
'SignDocsIcon',
|
|
28
40
|
'TelegramIcon',
|
|
41
|
+
'UnionPayIcon',
|
|
42
|
+
'UserIcon',
|
|
43
|
+
'VisaIcon',
|
|
29
44
|
'VKIcon',
|
|
45
|
+
'WalletIcon',
|
|
30
46
|
}
|
|
31
47
|
|
|
32
48
|
/**
|
|
@@ -34,29 +50,45 @@ export enum IconMap {
|
|
|
34
50
|
* @enumNames [
|
|
35
51
|
* "Деньги",
|
|
36
52
|
* "Лого «Apple»",
|
|
53
|
+
* "Скруглённый календарь",
|
|
37
54
|
* "Календарь",
|
|
55
|
+
* "Кред. карта",
|
|
56
|
+
* "Кред. карта под наклоном",
|
|
57
|
+
* "Кред. карта с галочкой",
|
|
38
58
|
* "Часы",
|
|
39
59
|
* "Кресло",
|
|
40
60
|
* "Скидка",
|
|
41
61
|
* "Документ",
|
|
42
62
|
* "Документ с текстом",
|
|
43
63
|
* "Доллар",
|
|
44
|
-
* "
|
|
64
|
+
* "Пустой кошелёк с возвратом",
|
|
65
|
+
* "Пустой кошелёк",
|
|
45
66
|
* "Евро",
|
|
46
67
|
* "Зеркало",
|
|
47
68
|
* "Сетка",
|
|
69
|
+
* "JCB",
|
|
48
70
|
* "Лупа",
|
|
71
|
+
* "MasterCard",
|
|
49
72
|
* "Минус",
|
|
73
|
+
* "МИР",
|
|
74
|
+
* "Деньги",
|
|
75
|
+
* "Монитор и мобильный",
|
|
50
76
|
* "Новый документ",
|
|
51
77
|
* "Лого «Одноклассники»",
|
|
52
78
|
* "Бизнес",
|
|
53
79
|
* "Проценты",
|
|
54
80
|
* "Лого «PlayMarket»",
|
|
55
81
|
* "Плюс",
|
|
82
|
+
* "Профиль, 2 персоны",
|
|
56
83
|
* "Профиль",
|
|
84
|
+
* "Безопасность",
|
|
57
85
|
* "Подписанные документы",
|
|
58
86
|
* "Лого «Telegram»",
|
|
59
|
-
* "
|
|
87
|
+
* "UnionPay",
|
|
88
|
+
* "Пользователь",
|
|
89
|
+
* "Visa",
|
|
90
|
+
* "Лого «VK»",
|
|
91
|
+
* "Кошелёк",
|
|
60
92
|
* ]
|
|
61
93
|
*/
|
|
62
94
|
export type IconName = keyof typeof IconMap;
|
|
@@ -24,7 +24,7 @@ export const InputRange = JSX<InputRangeProps>(
|
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<div className={className}>
|
|
27
|
-
<
|
|
27
|
+
<label className="block relative">
|
|
28
28
|
{title ? (
|
|
29
29
|
<span className="absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5">
|
|
30
30
|
{title}
|
|
@@ -50,7 +50,7 @@ export const InputRange = JSX<InputRangeProps>(
|
|
|
50
50
|
style={inputStyle}
|
|
51
51
|
/>
|
|
52
52
|
</div>
|
|
53
|
-
</
|
|
53
|
+
</label>
|
|
54
54
|
<div className="flex justify-between mt-3 mb-4">
|
|
55
55
|
{items.map((item, i) => (
|
|
56
56
|
<span key={String(i)} className="text-xs text-secondary-text pl-4">
|
package/src/ui-kit/SearchBar.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { Icon } from './Icon/Icon';
|
|
|
4
4
|
|
|
5
5
|
export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
|
|
6
6
|
const { term, setTerm } = context.useSearch();
|
|
7
|
+
const [inputHasFocus, setInputHasFocus] = context.useState<boolean>(false);
|
|
7
8
|
return (
|
|
8
9
|
<form className={`relative ${className || ''}`}>
|
|
9
10
|
<div className="absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none">
|
|
@@ -11,22 +12,31 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
|
|
|
11
12
|
<Icon name="LoupeIcon" width="24" height="24" />
|
|
12
13
|
</div>
|
|
13
14
|
{!term && (
|
|
14
|
-
<
|
|
15
|
+
<label
|
|
16
|
+
htmlFor="search-bar-input"
|
|
17
|
+
className="font-sans font-normal text-base text-secondary-text"
|
|
18
|
+
>
|
|
15
19
|
Поиск по сайту
|
|
16
|
-
</
|
|
20
|
+
</label>
|
|
17
21
|
)}
|
|
18
22
|
</div>
|
|
19
23
|
<input
|
|
20
|
-
|
|
24
|
+
id="search-bar-input"
|
|
25
|
+
className={`${
|
|
26
|
+
inputHasFocus ? 'border-primary-text' : ''
|
|
27
|
+
} pr-32 h-12 pl-12 w-full font-sans font-normal text-base text-black border border-solid border-main-divider rounded h-full box-border outline-none pr-[6%]`}
|
|
21
28
|
value={term}
|
|
22
29
|
onChange={(e) => setTerm(e.target.value)}
|
|
30
|
+
onFocus={(e) => setInputHasFocus(true)}
|
|
31
|
+
onBlur={(e) => setInputHasFocus(false)}
|
|
23
32
|
type="text"
|
|
24
|
-
name="
|
|
33
|
+
name="search-bar-input"
|
|
25
34
|
/>
|
|
26
|
-
{
|
|
35
|
+
{inputHasFocus && (
|
|
27
36
|
<button
|
|
28
37
|
type="submit"
|
|
29
|
-
|
|
38
|
+
version="primary"
|
|
39
|
+
className="absolute font-sans font-normal cursor-pointer text-sm hover:bg-primary-hover active:bg-primary-active border-none px-9 py-[9px] rounded top-1 right-1 outline-none text-secondary-text text-white bg-primary-main"
|
|
30
40
|
onClick={(e) => {
|
|
31
41
|
e.preventDefault();
|
|
32
42
|
console.log('click');
|