@vchasno/ui-kit 0.3.2 → 0.3.3

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.
@@ -158,42 +158,6 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
158
158
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
159
159
  };
160
160
 
161
- function styleInject(css, ref) {
162
- if ( ref === void 0 ) ref = {};
163
- var insertAt = ref.insertAt;
164
-
165
- if (!css || typeof document === 'undefined') { return; }
166
-
167
- var head = document.head || document.getElementsByTagName('head')[0];
168
- var style = document.createElement('style');
169
- style.type = 'text/css';
170
-
171
- if (insertAt === 'top') {
172
- if (head.firstChild) {
173
- head.insertBefore(style, head.firstChild);
174
- } else {
175
- head.appendChild(style);
176
- }
177
- } else {
178
- head.appendChild(style);
179
- }
180
-
181
- if (style.styleSheet) {
182
- style.styleSheet.cssText = css;
183
- } else {
184
- style.appendChild(document.createTextNode(css));
185
- }
186
- }
187
-
188
- var css_248z$1 = ".vchasno-ui-flex-box {\n display: flex;\n max-width: 100%;\n flex-direction: row;\n align-content: flex-start;\n gap: 10px;\n}\n";
189
- styleInject(css_248z$1);
190
-
191
- var FlexBox = React__default.forwardRef(function (_a, ref) {
192
- var className = _a.className, _b = _a.tagName, tagName = _b === void 0 ? 'div' : _b, children = _a.children, direction = _a.direction, gap = _a.gap, wrap = _a.wrap, align = _a.align, justify = _a.justify, grow = _a.grow, shrink = _a.shrink, _c = _a.style, style = _c === void 0 ? {} : _c, rest = __rest(_a, ["className", "tagName", "children", "direction", "gap", "wrap", "align", "justify", "grow", "shrink", "style"]);
193
- return React__default.createElement(tagName, __assign({ ref: ref, className: cn('vchasno-ui-flex-box', className), style: __assign(__assign({}, style), { flexDirection: direction, gap: gap, flexWrap: wrap, justifyContent: justify, alignItems: align, alignContent: align, flexGrow: grow, flexShrink: shrink }) }, rest), children);
194
- });
195
- FlexBox.displayName = 'FlexBox';
196
-
197
161
  function _objectWithoutPropertiesLoose(source, excluded) {
198
162
  if (source == null) return {};
199
163
  var target = {};
@@ -12455,9 +12419,9 @@ var hrefMap = {
12455
12419
  kep: 'https://cap.vchasno.ua',
12456
12420
  kasa: 'https://kasa.vchasno.ua',
12457
12421
  zakupivli: 'https://zakupivli.pro',
12458
- prozorroSale: 'https://zakupivli.pro',
12459
- prozorroMarket: 'https://zakupivli.pro',
12460
- prozorroRRO: 'https://zakupivli.pro',
12422
+ prozorroSale: 'https://zakupivli.pro/auctions-dgf',
12423
+ prozorroMarket: 'https://zakupivli.pro/ecatalog/gov/list',
12424
+ prozorroRRO: 'https://zakupivli.pro/gov/tenders',
12461
12425
  };
12462
12426
  var tooltipHintMap = {
12463
12427
  edo: 'Обмін електронними документами',
@@ -12562,14 +12526,25 @@ var isZakupivliProduct = function (product) {
12562
12526
  return zakupivliProductsList.includes(product);
12563
12527
  };
12564
12528
 
12529
+ var composeZakupivliLink = function (_a) {
12530
+ var targetProduct = _a.targetProduct;
12531
+ var baseUrl = hrefMap[targetProduct];
12532
+ var link = new URL(baseUrl);
12533
+ link.searchParams.set('utm_source', 'vchasno-cabinet');
12534
+ link.searchParams.set('utm_medium', 'link');
12535
+ link.searchParams.set('utm_campaign', 'vchasno-cabinet');
12536
+ return link.href;
12537
+ };
12565
12538
  var composeLink = function (_a) {
12566
12539
  var targetProduct = _a.targetProduct, ctxProduct = _a.ctxProduct, queryParams = _a.queryParams, edrpou = _a.edrpou;
12540
+ if (zakupivliProductsList.includes(targetProduct)) {
12541
+ return composeZakupivliLink({ targetProduct: targetProduct });
12542
+ }
12567
12543
  var baseUrl = hrefMap[targetProduct];
12568
12544
  var link = new URL(baseUrl);
12569
12545
  if (edrpou) {
12570
12546
  link.searchParams.set('edrpou', edrpou);
12571
12547
  }
12572
- link.searchParams.set('utm_medium', 'link');
12573
12548
  link.searchParams.set('utm_source', ctxProduct);
12574
12549
  link.searchParams.set('utm_campaign', ctxProduct);
12575
12550
  if (queryParams) {
@@ -12597,7 +12572,34 @@ var ProductLink = function (_a) {
12597
12572
  React__default.createElement("h5", { className: "vchasno-ui-ProjectsPopover__box__title" }, titleMap[product]))))));
12598
12573
  };
12599
12574
 
12600
- var css_248z = ".vchasno-ui-ProjectsPopover {\n display: inline-block;\n max-width: 440px;\n padding: 24px 16px 0;\n border-radius: 3px;\n background-color: #fff;\n}\n\n.vchasno-ui-ProjectsPopover a:hover {\n color: unset;\n text-decoration: none;\n}\n\n.vchasno-ui-ProjectsPopover--border {\n border: 1px solid #dbe5ea;\n}\n\n.vchasno-ui-ProjectsPopover__title {\n width: 100%;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n}\n\n.vchasno-ui-ProjectsPopover__box {\n display: inline-flex;\n min-width: 198px;\n min-height: 80px;\n box-sizing: border-box;\n align-items: center;\n padding: 20px;\n border: 1px solid #dbe5ea;\n border-radius: 8px;\n color: var(--vchasno-ui-text-primary-color);\n gap: 8px;\n text-decoration: none;\n transition: background-color 0.3s;\n}\n\n.vchasno-ui-ProjectsPopover__box__icon {\n width: 40px;\n height: 40px;\n box-sizing: border-box;\n flex-shrink: 0;\n border-radius: 50%;\n}\n\n.vchasno-ui-ProjectsPopover__box:hover {\n background-color: #f3f6f8;\n cursor: pointer;\n}\n\n.vchasno-ui-ProjectsPopover__box__title {\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 26px;\n}\n\n.vchasno-ui-ProjectsPopover .vchasno-ui-ProjectsPopover__footer {\n display: flex;\n min-height: 42px;\n align-items: center;\n justify-content: center;\n border-radius: 0 0 4px 4px;\n margin: 0 -16px;\n background: #ecf4ff;\n color: #6b8091;\n font-size: 12px;\n font-weight: 400;\n}\n\n.vchasno-ui-ProjectsPopover .vchasno-ui-ProjectsPopover__footer > a {\n color: #0890de;\n text-decoration: none;\n}\n";
12575
+ function styleInject(css, ref) {
12576
+ if ( ref === void 0 ) ref = {};
12577
+ var insertAt = ref.insertAt;
12578
+
12579
+ if (!css || typeof document === 'undefined') { return; }
12580
+
12581
+ var head = document.head || document.getElementsByTagName('head')[0];
12582
+ var style = document.createElement('style');
12583
+ style.type = 'text/css';
12584
+
12585
+ if (insertAt === 'top') {
12586
+ if (head.firstChild) {
12587
+ head.insertBefore(style, head.firstChild);
12588
+ } else {
12589
+ head.appendChild(style);
12590
+ }
12591
+ } else {
12592
+ head.appendChild(style);
12593
+ }
12594
+
12595
+ if (style.styleSheet) {
12596
+ style.styleSheet.cssText = css;
12597
+ } else {
12598
+ style.appendChild(document.createTextNode(css));
12599
+ }
12600
+ }
12601
+
12602
+ var css_248z = ".vchasno-ui-ProjectsPopover {\n display: inline-block;\n width: 440px;\n max-width: calc(100vw - 32px);\n box-sizing: border-box;\n padding: 24px 16px 0;\n border-radius: 3px;\n background-color: #fff;\n}\n\n.vchasno-ui-ProjectsPopover__content {\n display: flex;\n flex-direction: column;\n gap: 32px;\n}\n\n.vchasno-ui-ProjectsPopover__products {\n display: flex;\n width: calc(100% + 32px);\n box-sizing: border-box;\n flex-wrap: wrap;\n gap: 10px;\n}\n\n.vchasno-ui-ProjectsPopover a:hover {\n color: unset;\n text-decoration: none;\n}\n\n.vchasno-ui-ProjectsPopover--border {\n border: 1px solid #dbe5ea;\n}\n\n.vchasno-ui-ProjectsPopover__title {\n width: 100%;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n}\n\n.vchasno-ui-ProjectsPopover__box {\n display: inline-flex;\n width: 198px;\n box-sizing: border-box;\n align-items: center;\n padding: 20px;\n border: 1px solid #dbe5ea;\n border-radius: 8px;\n aspect-ratio: 198/80;\n color: var(--vchasno-ui-text-primary-color);\n gap: 8px;\n text-decoration: none;\n transition: background-color 0.3s;\n}\n\n.vchasno-ui-ProjectsPopover__box > svg {\n max-width: 90%;\n}\n\n.vchasno-ui-ProjectsPopover__box__icon {\n width: 40px;\n height: 40px;\n box-sizing: border-box;\n flex-shrink: 0;\n border-radius: 50%;\n}\n\n.vchasno-ui-ProjectsPopover__box:hover {\n background-color: #f3f6f8;\n cursor: pointer;\n}\n\n.vchasno-ui-ProjectsPopover__box__title {\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 26px;\n}\n\n.vchasno-ui-ProjectsPopover .vchasno-ui-ProjectsPopover__footer {\n display: flex;\n min-height: 42px;\n align-items: center;\n justify-content: center;\n border-radius: 0 0 4px 4px;\n margin: 0 -16px;\n background: #ecf4ff;\n color: #6b8091;\n font-size: 12px;\n font-weight: 400;\n}\n\n.vchasno-ui-ProjectsPopover .vchasno-ui-ProjectsPopover__footer > a {\n color: #0890de;\n text-decoration: none;\n}\n\n@media screen and (width <= 480px) {\n .vchasno-ui-ProjectsPopover {\n width: 330px;\n }\n\n .vchasno-ui-ProjectsPopover__box {\n width: calc(50% - 20px);\n flex-direction: column;\n justify-content: center;\n padding: 10px;\n aspect-ratio: 1 / 1;\n }\n}\n";
12601
12603
  styleInject(css_248z);
12602
12604
 
12603
12605
  var ProjectsPopover = function (_a) {
@@ -12607,19 +12609,15 @@ var ProjectsPopover = function (_a) {
12607
12609
  .filter(function (item) { return !hideProduct(item); });
12608
12610
  var displayZakupivliProducts = zakupivliProductsList.filter(function (item) { return !hideProduct(item); });
12609
12611
  return (React__default.createElement("div", { className: cn('vchasno-ui-ProjectsPopover', className) },
12610
- React__default.createElement(FlexBox, { direction: "column", gap: 32 },
12611
- React__default.createElement(FlexBox, { style: {
12612
- width: 420,
12613
- boxSizing: 'border-box',
12612
+ React__default.createElement("div", { className: "vchasno-ui-ProjectsPopover__content" },
12613
+ React__default.createElement("div", { className: "vchasno-ui-ProjectsPopover__products", style: {
12614
12614
  display: displayVchasnoProducts.length ? 'flex' : 'none',
12615
- }, gap: 10, wrap: "wrap" },
12615
+ } },
12616
12616
  React__default.createElement("h3", { className: "vchasno-ui-ProjectsPopover__title" }, vchasnoTitle),
12617
12617
  displayVchasnoProducts.map(function (key) { return (React__default.createElement(ProductLink, { overrideHint: overrideHint, queryParams: queryParams, onLinkClick: onLinkClick, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
12618
- React__default.createElement(FlexBox, { style: {
12619
- width: 420,
12620
- boxSizing: 'border-box',
12618
+ React__default.createElement("div", { className: "vchasno-ui-ProjectsPopover__products", style: {
12621
12619
  display: displayZakupivliProducts.length ? 'flex' : 'none',
12622
- }, gap: 10, wrap: "wrap" },
12620
+ } },
12623
12621
  React__default.createElement("h3", { className: "vchasno-ui-ProjectsPopover__title" }, zakupivliTitle),
12624
12622
  displayZakupivliProducts.map(function (key) { return (React__default.createElement(ProductLink, { overrideHint: overrideHint, onLinkClick: onLinkClick, queryParams: queryParams, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
12625
12623
  React__default.createElement("footer", { className: "vchasno-ui-ProjectsPopover__footer" },